pulumi/pkg/engine
Will Jones 79c5d97afa
Normalize URNs in `DeletedWith` references (#17666)
It's often the case that we want to move or rename resources in our
Pulumi programs. Doing so can result in a change in the resource's URN,
which means that Pulumi will, by default, see the move as a deletion of
the old resource and a creation of the new resource. We can tell Pulumi
that a resource has been renamed by using *aliases*, whereby a resource
can be annotated with its previous URNs. Pulumi will then use these URNs
in several places:

* When looking for a resource's previous state, Pulumi will try to find
it using the new URN first and any aliases second.
* When writing out a new snapshot, Pulumi will *normalize* all URNs
(e.g. those in provider, parent and dependency references) to remove
aliases and replace them with the new URNs they resolve to.

Alas, a familiar story presents itself in the second case -- Pulumi does
not currently normalize `DeletedWith` references. This can result in
snapshot integrity errors as Pulumi leaves stale references in the
snapshot before writing it. This commit addresses this omission, using
the now-preferred `GetAllDependencies` method introduced in #17320 to
hopefully stop this from happening again in this part of the codebase.

Fixes #17614
2024-11-05 13:27:11 +00:00
..
lifecycletest Normalize URNs in `DeletedWith` references (#17666) 2024-11-05 13:27:11 +00:00
combinedManager.go Test SnapshotManager and Journal in engine tests (#15871) 2024-04-11 22:54:08 +00:00
debugging.go implement the engine bits for debugging support (#17072) 2024-08-30 10:31:28 +00:00
deployment.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
deployment_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
destroy.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
detailedDiff.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
detailedDiff_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
engine.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
errors.go Centralise human-friendly error handling in the CLI (#17046) 2024-08-23 08:48:42 +00:00
events.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
events_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
eventsink.go turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
import.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
journal.go Introduce snapshot metadata (#17430) 2024-09-30 16:45:40 +00:00
plugin_host.go [conformance tests] Fix run root and use program info everywhere (#15191) 2024-01-25 23:28:58 +00:00
plugins.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
plugins_test.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
progress.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
progress_test.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
project.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
query.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
refresh.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
snapshot.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
update.go plugin versions code reuse (#17311) 2024-09-24 13:36:45 +00:00
update_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00