pulumi/sdk/go/common
Will Jones 403b3d3fa4
Fix panics due to different length `ignoreChanges` arrays (#16742)
The `ignoreChanges` resource option accepts a list of paths into a
resource that should be ignored when computing whether or not something
has changed. For example:

```typescript
const r = new Resource(
  "r",
  {
    a: "a",
    b: [1, 2],
    c: { d: "d" },
  },
  {
    ignoreChanges: [
      "a",
      "b[*]",
    ],
  }
)
```

Here, when diffing `r`, Pulumi will ignore changes to `a` (due to the
path `"a"`) as well as changes to any element of `b` (due to the
_wildcard_ path `"b[*]"`). Under the hood, `ignoreChanges` is
implemented partly by "resetting" pieces of a resource's state to older
values -- that is, rather than ignoring changes that might be reported,
Pulumi will undo the changes before they are used altogether.

In #16406, a panic encountered when resetting children of arrays of
different length was fixed. This commit extends this fix to cover panics
that occur when simply resetting arrays themselves (e.g. resetting
`[1,2]` to `[1,2,3]`). As part of this, some test cases are renamed to
convey that the are actually testing the children of arrays or
wildcard-selected objects, in order to accommodate new test cases for
this panic.

Fixes #16724
2024-07-22 14:54:37 +00:00
..
apitype New deployment settings wizards and environment variables management comands (#16564) 2024-07-03 20:24:26 +00:00
channel Send all events to the engine event stream (#14607) 2023-11-20 21:55:59 +00:00
constant Send update metadata about update plans 2022-10-12 22:55:59 +01:00
diag turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
encoding all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
env Set the --continue-on-error flag with PULUMI_CONTINUE_ON_ERROR environment variable (#16442) 2024-06-25 08:28:37 +00:00
promise Use promise rather than `atomic.Value` to record step errors. (#14612) 2023-11-18 19:03:35 +00:00
resource Fix panics due to different length `ignoreChanges` arrays (#16742) 2024-07-22 14:54:37 +00:00
slice Engine support for remote transforms (#15290) 2024-02-21 16:30:46 +00:00
testing Use a new PULUMI_HOME for every test environment (#15559) 2024-03-01 21:32:49 +00:00
tokens Move resource.URN to urn.URN (#15689) 2024-03-14 15:28:32 +00:00
tools all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util disallow OutputState to be deepcopied (#16690) 2024-07-18 12:56:36 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace New deployment settings wizards and environment variables management comands (#16564) 2024-07-03 20:24:26 +00:00