Skip to content

Commit

Permalink
[ui] Fix Storybook memory bug (#22742)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Disable react-docgen in Storybook build, because pulling in massive
generated GraphQL types is causing memory failures in CI/Vercel.

## How I Tested These Changes

Add a memory-limited build command to package.json:

```
"build-storybook-limited": "NODE_OPTIONS=--max_old_space_size=2048 storybook build"
```
Run this to repro the memory failure. Kill docgen (as in the PR), rerun.
Verify that the build completes correctly.
  • Loading branch information
hellendag authored Jun 27, 2024
1 parent 2027389 commit dd2c4e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ const config = {
name: getAbsolutePath('@storybook/nextjs'),
options: {},
},
// https://github.com/hipstersmoothie/react-docgen-typescript-plugin/issues/78#issuecomment-1409224863
typescript: {
reactDocgen: 'react-docgen-typescript-plugin',
reactDocgen: false,
},
docs: {},
env: (config) => ({
Expand Down
4 changes: 3 additions & 1 deletion js_modules/dagster-ui/packages/ui-core/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ const config = {
getAbsolutePath('@storybook/addon-mdx-gfm'),
'@chromatic-com/storybook',
],
typescript: {
reactDocgen: false,
},
framework: {
name: getAbsolutePath('@storybook/nextjs'),
options: {},
},
// https://github.com/storybookjs/storybook/issues/16690#issuecomment-971579785
webpackFinal: async (config) => {
Expand Down

2 comments on commit dd2c4e7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-leyvjn8hc-elementl.vercel.app

Built with commit dd2c4e7.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-2yqs31t0w-elementl.vercel.app

Built with commit dd2c4e7.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.