-
Notifications
You must be signed in to change notification settings - Fork 151
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 defaultTags to trigger downstream updates #2585
Conversation
98dc88e
to
dbf7142
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
2 similar comments
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
7210506
to
7ed21a5
Compare
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.
I have rebuild the provider on top of a custom terraform-bridge with this line removed:
case v.IsArray():
// If this value has a diff and is considered computed by Terraform, the diff will be woefully incomplete. In
// this case, do not recurse into the array; instead, just use the count diff for the details.
- if d := tfDiff.Attribute(name + ".#"); d == nil || (!d.NewComputed && !isComputedInput) {
+ if d := tfDiff.Attribute(name + ".#"); d == nil || !d.NewComputed {
And the new integration test still passes.
Could we please consider removing the mystery change? Or is there an explanation, if not a repro, why is it needed?
Needs pulumi/pulumi-terraform-bridge#1266 - I think our investigation @AaronFriel shows that the integration test is passing while the bug basically resurfaced because a critical line got dropped out of the bridge master branch due to a merge issue. 1266 gets that back and adds coverage. On this PR we also need to make sure ProgramTest checks the right thing. I understand you're working on that. Once we get both of these done this is ready to go! |
The `defaultTags` input property on providers now triggers an update on downstream resources. Because of the nature of the fix in the Pulumi TF Bridge, and to limit the scope of the change, we mark only the `tags_all` field from TF schema as a `ComputedInput`, triggering new diff behavior within the bridge. As the `tags_all` field is otherwise hidden as a "computed" value, we omit detailed diff information. This is a tradeoff to avoid a more invasive change with more risk. Fixes #1655. Example output: ``` pulumi up --skip-preview Updating (test-aws-1655) View in Browser (Ctrl+O): https://app.pulumi.com/pulumi/simple-yaml/test-aws-1655/updates/9 Type Name Status Info pulumi:pulumi:Stack simple-yaml-test-aws-1655 ~ ├─ pulumi:providers:aws aws-provider updated (0.13s) [diff: ~defaultTags] ~ ├─ aws:s3:Bucket my-bucket updated (0.87s) ~ └─ aws:s3:BucketObject index.html updated (0.24s) ``` Verified when adding, updating, deleting, and removing entirely the `defaultTags` property.
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! But it should have a review from the providers team before going in.
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
1 similar comment
Does the PR have any schema changes?Looking good! No breaking changes found. |
@@ -27,7 +27,7 @@ export class Provider extends pulumi.ProviderResource { | |||
if (obj === undefined || obj === null) { | |||
return false; | |||
} | |||
return obj['__pulumiType'] === Provider.__pulumiType; | |||
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; |
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.
👀
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
All checks have passed, confirmed via checks tab in GitHub UI. Using admin to merge |
The
defaultTags
input property on providers now triggers an update on downstream resources. Because of the nature of the fix in the Pulumi TF Bridge, and to limit the scope of the change, we mark only thetags_all
field from TF schema as aComputedInput
, triggering new diff behavior within the bridge.As the
tags_all
field is otherwise hidden as a "computed" value, we omit detailed diff information. This is a tradeoff to avoid a more invasive change with more risk.Fixes #1655. To use a release version of TF Bridge, depends on:
Example output:
Verified when adding, updating, deleting, and removing entirely the
defaultTags
property.