feat: allow deletion of stacks in REVIEW_IN_PROGRESS state#646
Merged
Conversation
REVIEW_IN_PROGRESS only indicates an unexecuted change set with no actual resources, and DeleteStack accepts it directly. Treat it as a deletable state so users do not have to hand-clean these orphaned stacks.
The `'*'` glob in GitHub Actions does not match the `/` character, so feature branches like `feat/foo` never triggered ci.yml. Use `'**'` so all branches run CI on push.
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
1. Allow deletion of stacks in
REVIEW_IN_PROGRESSREVIEW_IN_PROGRESSis set when a change set is created for a new stack but has not been executed yet. The stack has no actual resources, just metadata, and the CloudFormationDeleteStackAPI accepts it directly.XxxInProgressstate and refused to delete, forcing users to clean these orphaned stacks up by hand.StackStatusReviewInProgressfromStackStatusExceptionsForDescribeStacksso it flows throughdeleteStackNormallylike any other deletable state.RemoveDeletionPolicy(used by-f) already skips non-updatable states viaisUpdatableStackStatus, so no additional handling is needed.REVIEW_IN_PROGRESSstacks are now also surfaced inListStacksFilteredByKeywordresults, which is the consistent behavior.Reproduction
After this change, the same command deletes the stack normally.
2. Fix
ci.ymlbranch filter'*'glob in GitHub Actions does not match the/character, so feature branches likefeat/foonever triggeredci.ymland CI was silently skipped on every feature-branch push.'**'so all branches run CI on push.Test plan
go build ./...go test -race ./internal/operation/...make lint_diffREVIEW_IN_PROGRESSstate