fix(toolkit-lib): classify create-only properties as non-hotswappable - #1967
Merged
mrgrain merged 2 commits intoSep 23, 2026
Merged
Conversation
The generic Cloud Control hotswap handler passed every changed property to classifyChanges as a hotswap candidate without consulting the resource type's createOnlyProperties, so a change like SQS QueueName was PATCHed in place and hard-failed with NotUpdatableException under both --hotswap and --hotswap-fallback. The handler now reads createOnlyProperties from the registry schema via DescribeType before classifying, and treats those properties as non-hotswappable up front, so --hotswap skips them and --hotswap-fallback falls back to a full deployment. Schema lookup failures keep the previous behavior.
ShadowCat567
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the contribution @dedsec-terminal! It looks good overall! One minor comment about variable names
This branch was successfully deployed
This file contains hidden or 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
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.
fixes #1965.
The generic Cloud Control hotswap handler passed every changed property to classifyChanges as a hotswap candidate without consulting the resource type's createOnlyProperties. A change like SQS QueueName was therefore PATCHed in place and hard-failed with NotUpdatableException under both --hotswap and --hotswap-fallback, and fallback never triggered because the change had been classified hotswappable.
The handler now reads createOnlyProperties from the registry schema via cloudformation DescribeType before classifying, and treats those properties as non-hotswappable up front through the existing classifyChanges path. --hotswap skips them like any other non-hotswappable change, and --hotswap-fallback falls back to a full CloudFormation deployment. When the schema cannot be retrieved the lookup returns empty and behavior is unchanged. A mixed change still hotswaps its mutable properties; only the create-only ones are held back.
Verified with two new unit tests in cloud-control-hotswap-deployments.test.ts (each running in both hotswap-only and fall-back modes): a create-only-only change sends no UpdateResource call, and a mixed change PATCHes only the mutable property. Both tests fail against the unfixed code. Full cloud-control suite passes (63 tests), tsc compiles, and eslint reports no new findings on the touched files (the no-literal-partition errors elsewhere in the package pre-exist on main).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license