fix(deploy): wait on the stack's own status, not a per-operation waiter - #80
Merged
Conversation
The settle step used the create waiter, then the update waiter, then `|| true`. On a stack update the create waiter returns at once, so the S3 sync and the invalidation ran while CloudFront was still applying the new configuration (2026-09-09, the alias deploy). Poll describe-stacks until the stack leaves every *_IN_PROGRESS state; fail on a rollback with the failed resources printed. Claude-Session: https://claude.ai/code/session_01Wrb85mvgMjYTHHSkKWFre4
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.
Summary
The deploy's "Wait for stack to settle" step did not wait on a stack update. It called the create waiter, then the update waiter, then
|| true; on an update the create waiter returns immediately, so the sync and invalidation ran while CloudFront was still applying the change. Seen on the 2026-09-09 alias deploy (run 34379035054), harmless that time, wrong in general.Changes
.github/workflows/deploy.yml— the step pollsdescribe-stacksevery 30 s until the status leaves every*_IN_PROGRESSstate:CREATE_COMPLETE/UPDATE_COMPLETEpass, any rollback or failed state fails the job and prints the failed resources, and a 28-minute ceiling fails inside the job's 30-minute timeout. A stack with nothing to update is already*_COMPLETEand passes on the first poll.Key Handling
No change. Workflow only; nothing in the app, no outbound call from the page, file mode untouched.
Testing
npm run format:checkclean on a fresh clone afternpm ci. The step is exercised by the next deploy; a status poll has no local harness.🤖 Generated with Claude Code
https://claude.ai/code/session_01Wrb85mvgMjYTHHSkKWFre4