Skip to content

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

@VenelinMartinov

Description

@VenelinMartinov

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

Metadata

Metadata

Labels

kind/bugSome behavior is incorrect or out of specresolution/fixedThis issue was fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions