-
Notifications
You must be signed in to change notification settings - Fork 43
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
Detailed diff shows diff on __defaults when number of elements changes #2400
Comments
This adds tests for the detailed diff output of - List blocks - Set blocks - MaxItemsOne list blocks for adding, removing, changing the property and adding, removing, changing nested properties in the block. A few issues here: - #2234 affects quite a few of the cases - #2399 diffs are displayed on nested properties which are not specified when a block is removed - #2400 diffs are displayed on the `__defaults` property when the number of elements in the block changes.
This one is not an issue with the detailed diff calculation:
There is no __defaults marked here - instead this seems to be an issue with the news - the block object contains the __defaults key when it looks like there is no reason for that:
Non-top level defaults don't seem to get used anywhere. Also: pulumi-terraform-bridge/pkg/tfbridge/schema.go Line 1749 in 6b95c60
|
Perhaps we can remove all empty nested defaults arrays. |
this is all sidestepped if we only return the bottom-most property which has a diff, instead of all the properties in the tree - this works so much better. |
__defaults is a special property used by the bridge and it should never be presented in the diffs AFAIK. It's "about" some other properties. Whether they were populated from a default value or not. |
This issue has been addressed in PR #2405 and shipped in release v3.92.0. |
What happened?
When adding/removing elements from a block type we seem to display a diff on the
__defaults
:Example
#2398
list block element added back
Output of
pulumi about
.
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: