Skip to content

Detailed diff for set element changes shows more additions/removals than present #2235

@VenelinMartinov

Description

@VenelinMartinov

What happened?

changing "setProps": []interface{}{"val2", "val3"} to "setProps": []interface{}{"val1", "val2", "val3"} produces:

  ~ prov:index/test:Test: (update)
      [id=newid]
      [urn=urn:pulumi:test::test::prov:index/test:Test::mainRes]
    ~ setProps: [
        + [0]: "val1"
        ~ [1]: "val3" => "val2"
        + [2]: "val3"
      ]

The detailed diff shows 2 elements added and 1 changed but only 1 element was added.

Similarly:

Changing "setProps": []interface{}{"val1", "val2", "val3"} to "setProps": []interface{}{"val1", "val3"} produces:

  ~ prov:index/test:Test: (update)
      [id=newid]
      [urn=urn:pulumi:test::test::prov:index/test:Test::mainRes]
    ~ setProps: [
          [0]: "val1"
        - [1]: "val2"
        - [2]: "val3"
      ]

Which shows 2 elements being removed but only 1 was removed

Example

https://github.com/pulumi/pulumi-terraform-bridge/pull/2159/files

set element removed middle and set element added front

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions