Skip to content

Fix out-of-memory Netlify deploys for external contributors#2252

Merged
delucis merged 1 commit into
mainfrom
chris/oom-fix
Dec 29, 2022
Merged

Fix out-of-memory Netlify deploys for external contributors#2252
delucis merged 1 commit into
mainfrom
chris/oom-fix

Conversation

@delucis
Copy link
Copy Markdown
Member

@delucis delucis commented Dec 29, 2022

What kind of changes does this PR include?

  • Something else!

Description

To solve out-of-memory issues when building docs we set a NODE_OPTIONS environment variable in Netlify’s dashboard to increase the default memory limit. This worked fine in internal tests because those of us trying it out are included in the Netlify team. Now that external contributors are triggering deploys, Netlify is not using the environment variable for those builds because it considers all environment variables as “sensitive” (which some are, like our GitHub API key). Without NODE_OPTIONS the build fails (see #2251 for example).

This fix moves where we set the variable directly into the build command specified in netlify.toml. I would expect Netlify to then use NODE_OPTIONS correctly for all PRs.

To solve out-of-memory issues when building docs we set a `NODE_OPTIONS` environment variable in Netlify’s dashboard to increase the default memory limit. This worked fine in internal tests because those of us trying it out are included in the Netlify team. Now that external contributors are triggering deploys, Netlify is not using the environment variable for those builds because it considers all environment variables as “sensitive” (which some are, like our GitHub API key). Without `NODE_OPTIONS` the build fails.

This fix moves where we set the variable directly into the build command specified in `netlify.toml`. I would expect Netlify to then use `NODE_OPTIONS` correctly for all PRs.
@delucis delucis added the bug Something on the site isn't working label Dec 29, 2022
@delucis delucis self-assigned this Dec 29, 2022
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 29, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 5375a6a
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/63ad533ec612d70009f8a08d
😎 Deploy Preview https://deploy-preview-2252--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@delucis delucis merged commit 545b646 into main Dec 29, 2022
@delucis delucis deleted the chris/oom-fix branch December 29, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something on the site isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant