-
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
[sdk/nodejs] Pickup provider as part of providers #8923
[sdk/nodejs] Pickup provider as part of providers #8923
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.
LGTM otherwise
const depreciation = "This will become an error by the end of July 2022. See https://github.com/pulumi/pulumi/issues/8799 for more details"; | ||
log.warn(message+depreciation); | ||
} else { | ||
(<ProviderResource[]> componentOpts.providers).push(componentOpts.provider); |
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.
Is componentOpts.providers
guaranteed to be truthy here? I think we need to guard against that.
(<ProviderResource[]> componentOpts.providers).push(componentOpts.provider); | |
(<ProviderResource[]> componentOpts.providers)?.push(componentOpts.provider); |
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.
We do need to guard against it, but not by bailing out. In case of a providers === undefined
, we should set providers = [provider]
. a27708f makes that change.
Codecov Report
@@ Coverage Diff @@
## master #8923 +/- ##
=======================================
Coverage 59.39% 59.40%
=======================================
Files 642 642
Lines 99643 99665 +22
Branches 1389 1392 +3
=======================================
+ Hits 59185 59203 +18
+ Misses 37086 37083 -3
- Partials 3372 3379 +7
Continue to review full report at Codecov.
|
Description
Fixes #8921
Checklist