Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure craco build has enough heap space. #6459

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Ensure craco build has enough heap space. #6459

merged 1 commit into from
Jul 14, 2023

Conversation

absoludity
Copy link
Contributor

Description of the change

Ensures that the craco build step has enough heap space. I can reproduce the issue that CI sees by reducing the heap space and re-running:

% yarn build
yarn run v1.22.19
warning ../../package.json: No license field
$ npm-run-all build-css compile-lang build-js
warning ../../package.json: No license field
$ sass src/ --no-source-map && yarn run copy-clr
warning ../../package.json: No license field
$ shx cp ./node_modules/@clr/ui/clr-ui-dark.min.css public/clr-ui-dark.min.css && shx cp node_modules/@clr/ui/clr-ui.min.css public/clr-ui.min.css && shx cp ./node_modules/@clr/ui/clr-ui-dark.min.css.map public/clr-ui-dark.min.css.map && shx cp ./node_modules/@clr/ui/clr-ui.min.css.map public/clr-ui.min.css.map
warning ../../package.json: No license field
$ formatjs compile-folder lang src/locales/ --ast --format simple
warning ../../package.json: No license field
$ export NODE_OPTIONS=--max-old-space-size=256 && craco build
Creating an optimized production build...

<--- Last few GCs --->

[47979:0x158008000]     7400 ms: Scavenge (reduce) 251.8 (262.0) -> 251.2 (262.0) MB, 1.3 / 0.0 ms  (average mu = 0.230, current mu = 0.085) allocation failure 
[47979:0x158008000]     7406 ms: Scavenge (reduce) 252.2 (262.0) -> 251.3 (262.0) MB, 0.5 / 0.0 ms  (average mu = 0.230, current mu = 0.085) allocation failure 
[47979:0x158008000]     7408 ms: Scavenge (reduce) 252.2 (262.0) -> 251.4 (262.0) MB, 0.4 / 0.0 ms  (average mu = 0.230, current mu = 0.085) allocation failure 

Benefits

Less friction getting things landed.

Possible drawbacks

Could be a patch solution for a memory leak.

Applicable issues

@netlify
Copy link

netlify bot commented Jul 14, 2023

Deploy Preview for kubeapps-dev canceled.

Name Link
🔨 Latest commit 0882c9e
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/64b0927988a8570008d4e123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants