-
Notifications
You must be signed in to change notification settings - Fork 115
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
Component option propagation (Go SDK) #2709
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
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.
The code looks pretty good to me, but I'll defer the final approval to Levi since he is more familiar with overlays. One suggestion I'd make is to break up the PR into either multiple PRs or commits at the very least. It looks like this PR does a few things, add more test capabilities and utility functions as well as actual logic updates. Having all these squashed in 1 commit makes it harder to review, especially since some of these files are autogenerated.
I'd even go as far as to suggest separating the test changes to its own PR. This way, if we ever did need to revert this PR, the test improvements won't be reverted together.
6e15719
to
04a3492
Compare
Proposed changes
Epic: #2254
Fixes: #2710
This PR standardizes the option propagation logic for the component resources in the pulumi-kubernetes Go SDK. The general approach is:
version
andpluginDownloadURL
if specified.Specification
The component resource is responsible for computing sub-options for invokes and for child resource declarations. This table outlines the expected behavior for each resource option when presented to a component resource.
additionalSecretOutputs
aliases
customTimeouts
deleteBeforeReplace
deletedWith
dependsOn
ignoreChanges
import
parent
protect
provider
providers
replaceOnChanges
retainOnDelete
transformations
version
Should propagate when child resource is from the same provider type.
pluginDownloadURL
Should propagate when child resource is from the same provider type.
Testing
A new test case is provided (test case, test program) that exercises option propagation across the component resources:
Upgrade testing must be done manually, with an emphasis on avoiding replacement due to reparenting.
Related issues (optional)
The Go SDK doesn't allow for options to be mutated via the "kubernetes-style" transformation function.
#2666
During testing it was observed that the
parent
field is occasionally missing fromRegisterResource
RPC call.pulumi/pulumi#14826
Here's some key related PRs for additional context:
provider
andproviders
behaviour pulumi#8796