Conversation
`cdk deploy` and `cdk bootstrap` hung forever against a stack that
already exists.
Before creating its change set the CDK CLI deletes any leftover one with
the same name, then polls `DescribeChangeSet` until the call reports
`DELETE_COMPLETE`/`DELETE_FAILED` or raises `ChangeSetNotFoundException`
(`waitForGone`). On a lookup miss `DescribeChangeSet` fabricated
`{"Status": "CREATE_COMPLETE", "ExecutionStatus": "AVAILABLE"}`, so the
change set was never gone and the poll never terminated: one
`DeleteChangeSet` followed by `DescribeChangeSet` every five seconds,
with `CreateChangeSet` never reached.
`ChangeSetNotFoundException` is declared on `DescribeChangeSet`,
`DescribeChangeSetHooks` and `ExecuteChangeSet`, with awsQueryError code
`ChangeSetNotFound` and HTTP 404 (aws-models/cloudformation.json), so
returning it costs no conformance. `DeleteChangeSet` does not declare it
and still succeeds for a change set that was never created, matching AWS.
All three reads had the same fabricated success with the lookup
copy-pasted, `ExecuteChangeSet` explicitly so ("pass-through success
rather than hard-fail"). They now share one `find_change_set` and map a
miss to the error, which is also what CONTRIBUTING's no-stub-responses
rule asks for.
The unit coverage was asserting the stub: `change_sets` built a fresh
service per call, so `DescribeChangeSet("cs")` only passed because the
miss was faked. It now runs the lifecycle against one service.
Sorttech
force-pushed
the
fix/cfn-describe-change-set-not-found
branch
from
September 24, 2026 16:14
bc0a3ff to
64d711b
Compare
Owner
Author
|
Retargeted upstream as faiscadev#2563. |
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.
cdk deployandcdk bootstraphung forever against a stack thatalready exists.
Before creating its change set the CDK CLI deletes any leftover one with
the same name, then polls
DescribeChangeSetuntil the call reportsDELETE_COMPLETE/DELETE_FAILEDor raisesChangeSetNotFoundException(
waitForGone). On a lookup missDescribeChangeSetfabricated{"Status": "CREATE_COMPLETE", "ExecutionStatus": "AVAILABLE"}, so thechange set was never gone and the poll never terminated: one
DeleteChangeSetfollowed byDescribeChangeSetevery five seconds,with
CreateChangeSetnever reached.ChangeSetNotFoundExceptionis declared onDescribeChangeSet,DescribeChangeSetHooksandExecuteChangeSet, with awsQueryError codeChangeSetNotFoundand HTTP 404 (aws-models/cloudformation.json), soreturning it costs no conformance.
DeleteChangeSetdoes not declare itand still succeeds for a change set that was never created, matching AWS.
All three reads had the same fabricated success with the lookup
copy-pasted,
ExecuteChangeSetexplicitly so ("pass-through successrather than hard-fail"). They now share one
find_change_setand map amiss to the error, which is also what CONTRIBUTING's no-stub-responses
rule asks for.
The unit coverage was asserting the stub:
change_setsbuilt a freshservice per call, so
DescribeChangeSet("cs")only passed because themiss was faked. It now runs the lifecycle against one service.
Test plan
Regression test:
describe_change_set_reports_unknown_change_set_as_not_foundincrates/fakecloud-e2e/tests/cloudformation_execute_change_set.rs, plus thechange_setsunit lifecycle inextras.rswhich previously asserted the stubVerification
On this exact head, rebased onto current
main:cargo fmt --all --check- clean.cargo clippy --workspace --all-targets -- -D warnings- clean.cargo test --workspaceexcludingfakecloud-e2e,fakecloud-conformance,fakecloud-tfaccandfakecloud-parity(the same set CI'stestjob runs),plus
cargo test -p fakecloud-conformance --lib- 9929 passed, 0 failed.cargo test -p fakecloud-e2e --test cloudformation_execute_change_set- theregression test above passes against a freshly built
target/debug/fakecloud.Found by deploying a CDK CloudFront + S3 SPA against fakecloud.