-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Always read and write nodejs runtime options from/to the environment #6076
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some tests that are specific to this scenario? Even if it's just setting some config and then reading the appropriate envvar.
@EvanBoyle any chance you could add some tests and close this out this week? |
…odeRuntimeOpts
@pgavlin good catch, I had actually forgotten that this should apply to config as well. I updated the config code to always read/write from the environment as well. I also added some settings tests that round trip some mutations to options and config and then check the resulting environment variables. Our node config module already has some extensive tests that lend additional confidence to this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for adding those tests!
Fixes #6059 Fixes #6041.
See #6059 for more detail on why this is necessary. TLDR; is that nodejs package resolution can result in multiple copies of a given package in the
node_modules
tree, and thus multiple runtime options variables that can get out of sync (specifically for automation API where the lifetime of runtime options is managed manually).In order for settings to be shared appropriately in the instance where an inline program and a provider sdk dependency both bring in different copies of
@pulumi/pulumi
, we must read and write settings via the environment and avoid caching values.