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

fix(pacmak): invokeBinScript fails when using symlinked cache #4389

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Jan 3, 2024

This was previously attempted to fix in #4324 While the above fix resolves issues with dependencies, it causes failures when the binary is shelling out to other node processes. This is due to the intrusive and indiscriminate overloading of NODE_OPTIONS, which will forcibly apply to any child processes as well. While in theory adding the symlink flags should not be an issue, this seems to trigger a bug in node: nodejs/node#41000

tl;dr this all sucks very much and we are now just disabling the runtime cache for binaries.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This was previously attempted to fix in #4324
While the above fix resolves issues with dependencies, it causes failures when the binary is shelling out to other node processes. This is due to the intrusive and indiscriminate overloading of NODE_OPTIONS, which will forcibly apply to any child processes as well. While in theory adding the symlink flags should not be an issue, this seems to trigger a bug in node: nodejs/node#41000

tl;dr this all sucks very much and we are now just disabling the runtime cache for binaries.
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 3, 2024
Comment on lines -1375 to -1378
// When we are using the symlinked version of the cache, we need to preserve both symlink settings for binaries
if (nodeOptions.includes('--preserve-symlinks')) {
nodeOptions.push('--preserve-symlinks-main');
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This reverts #4324

@mrgrain mrgrain added the pr/do-not-merge This PR should not be merged at this time. label Jan 3, 2024
@mrgrain mrgrain removed the pr/do-not-merge This PR should not be merged at this time. label Jan 3, 2024
Copy link
Contributor

mergify bot commented Jan 3, 2024

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Jan 3, 2024
Copy link
Contributor

mergify bot commented Jan 3, 2024

Merging (with squash)...

@mergify mergify bot merged commit 37d9dc7 into main Jan 3, 2024
30 checks passed
@mergify mergify bot deleted the mrgrain/fix/disable-bin-cache branch January 3, 2024 18:36
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants