-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rewrite DeletedWith
properties when renaming stacks
#16216
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changelog[uncommitted] (2024-05-16)Bug Fixes
|
When renaming a stack, we need to rewrite URN references to use the new stack name instead of the old one. Presently such references can occur as: * `Parent` references * `Provider` references * `Dependencies` * `PropertyDependencies` * `DeletedWith` references The current renaming implementation fails to rewrite `DeletedWith` references. Previously this went unnoticed since such references were also omitted when checking snapshot integrity. Now that integrity checks correctly inspect `DeletedWith` properties, the omission during rename has been surfaced. This commit fixes renaming to handle `DeletedWith` correctly. A follow-up should also ensure that renaming checks integrity itself prior to operation completion.
lunaris
force-pushed
the
wjones/rename-deleted-with
branch
from
May 16, 2024 14:13
d6ae52d
to
8eea7aa
Compare
Zaid-Ajaj
approved these changes
May 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 24, 2024
Tentative changelog: ### Features - [engine] Guess ID references of dependant resources when generating code for import operations [#16208](#16208) ### Bug Fixes - [engine] Check property dependencies and deleted-with relationships for target dependents [#16220](#16220) - [engine] Propagate dependencies of untargeted resources correctly during targeted updates [#16247](#16247) - [backend/diy] Rewrite DeletedWith references when renaming stacks [#16216](#16216) - [sdk/python] Use a separate type variable for static methods on Output [#16172](#16172) - [sdk/python] Relax Output.all types to better match the implementation [#16172](#16172) - [sdkgen/python] Generate __init__.py files for modules that only contain enumerations [#16229](#16229)
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 24, 2024
To be merged after: - #16261 - pulumi/pulumi-docker-containers#195 Tentative changelog... ### Features - [engine] Guess ID references of dependant resources when generating code for import operations [#16208](#16208) ### Bug Fixes - [engine] Check property dependencies and deleted-with relationships for target dependents [#16220](#16220) - [engine] Propagate dependencies of untargeted resources correctly during targeted updates [#16247](#16247) - [backend/diy] Rewrite DeletedWith references when renaming stacks [#16216](#16216) - [cli/state] Fix state renames involving DeletedWith - [sdk/python] Use a separate type variable for static methods on Output [#16172](#16172) - [sdk/python] Relax Output.all types to better match the implementation [#16172](#16172) - [sdkgen/python] Generate __init__.py files for modules that only contain enumerations [#16229](#16229)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When renaming a stack, we need to rewrite URN references to use the new stack name instead of the old one. Presently such references can occur as:
Parent
referencesProvider
referencesDependencies
PropertyDependencies
DeletedWith
referencesThe current renaming implementation fails to rewrite
DeletedWith
references. Previously this went unnoticed since such references were also omitted when checking snapshot integrity. Now that integrity checks correctly inspectDeletedWith
properties, the omission during rename has been surfaced. This commit fixes renaming to handleDeletedWith
correctly. A follow-up should also ensure that renaming checks integrity itself prior to operation completion.Fixes #16215