-
Notifications
You must be signed in to change notification settings - Fork 116
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
Improve provider option propagation for component resources #2624
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2624 +/- ##
==========================================
- Coverage 18.73% 18.62% -0.11%
==========================================
Files 47 47
Lines 9535 9589 +54
==========================================
Hits 1786 1786
- Misses 7645 7699 +54
Partials 104 104 ☔ View full report in Codecov by Sentry. |
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.
Looks good so far!
1513075
to
421488d
Compare
Refactoring this PR into a PR per SDK. |
Proposed changes
Closes #2254
Closes #2345
Fixes a few related aspects of options on component resources:
provider
orproviders
on the optionsTo better encapsulate the logic, each SDK now uses a pair of utility functions (e.g.
GetChildOptions
,GetInvokeOptions
), to be used by the various resource types. Hopefully it is more clear that, at runtime,ComponentResourceOptions
becomesCustomResourceOptions
(for the nascent children) which then becomesInvokeOptions
(with the component as parent).Impacts of this PR:
protect
.TODO:
Related issues (optional)
Related to #1833 in that this PR will set the dependOn option on the chart resources, which is one variation of the original problem.
Loosely related to #2666 and pulumi/pulumi#8969.
Fixes
Here's a list of issues that are believed to be fixed by this PR.
Python SDK
Error: Default provider for 'kubernetes' disabled. 'kubernetes:yaml:decode' must use an explicit provider.
In some circumstances, the SDK attempts to use the default provider despite being configured otherwise. If the default provider is disabled, deployment fails with:
NodeJS SDK
Error: Default provider for 'kubernetes' disabled. 'kubernetes:yaml:decode' must use an explicit provider.
In some circumstances, the SDK attempts to use the default provider despite being configured otherwise. If the default provider is disabled, deployment fails with:
Support for
providers
option onConfigGroup
:Previously, the
providers
option onConfigGroup
was wrongly propagated to the innerConfigMap
, yielding an error. Given:Old behavior: