Skip to content
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

makeDetailedDiff returns an empty diff for collections with a diff #2141

Closed
VenelinMartinov opened this issue Jun 27, 2024 · 2 comments · Fixed by #2405
Closed

makeDetailedDiff returns an empty diff for collections with a diff #2141

VenelinMartinov opened this issue Jun 27, 2024 · 2 comments · Fixed by #2405
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@VenelinMartinov
Copy link
Contributor

What happened?

During ...

Example

olds=resource.PropertyMap{
     "outp": {
         V:  "bar",
     },
     "prop": {
         V:  []resource.PropertyValue{
             {
                 V:  "foo",
             },
         },
     },
 }
 news=resource.PropertyMap{
     "prop": {},
 }

makeDetailedDiff returns:

changes=pulumirpc.DiffResponse_DiffChanges(2)
diff=map[string]*pulumirpc.PropertyDiff{
   "prop":    &pulumirpc.PropertyDiff{},
   "prop[0]": &pulumirpc.PropertyDiff{
       state:         impl.MessageState{},
       sizeCache:     0,
       unknownFields: nil,
       Kind:          2,
       InputDiff:     false,
   },
}
collectionDiffs=map[string]*pulumirpc.PropertyDiff{
   "prop": &pulumirpc.PropertyDiff{
       state:         impl.MessageState{},
       sizeCache:     0,
       unknownFields: nil,
       Kind:          4,
       InputDiff:     false,
   },
}

notice the empty PropertyDiff for "prop"

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).

@VenelinMartinov VenelinMartinov added the kind/bug Some behavior is incorrect or out of spec label Jun 27, 2024
@t0yv0
Copy link
Member

t0yv0 commented Jul 19, 2024

Can this be restated in terms of a Pulumi program and example provider before/after. Thanks. Might be something to build a test case for when rewriting detailed diff.

@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2405 and shipped in release v3.92.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
3 participants