Skip to content

feat: allow deletion of stacks in REVIEW_IN_PROGRESS state#646

Merged
go-to-k merged 2 commits into
mainfrom
feat/allow-delete-review-in-progress
May 22, 2026
Merged

feat: allow deletion of stacks in REVIEW_IN_PROGRESS state#646
go-to-k merged 2 commits into
mainfrom
feat/allow-delete-review-in-progress

Conversation

@go-to-k

@go-to-k go-to-k commented May 22, 2026

Copy link
Copy Markdown
Owner

Summary

1. Allow deletion of stacks in REVIEW_IN_PROGRESS

  • REVIEW_IN_PROGRESS is 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 CloudFormation DeleteStack API accepts it directly.
  • Previously delstack treated it as an XxxInProgress state and refused to delete, forcing users to clean these orphaned stacks up by hand.
  • Removed StackStatusReviewInProgress from StackStatusExceptionsForDescribeStacks so it flows through deleteStackNormally like any other deletable state. RemoveDeletionPolicy (used by -f) already skips non-updatable states via isUpdatableStackStatus, so no additional handling is needed.
  • As a side effect, REVIEW_IN_PROGRESS stacks are now also surfaced in ListStacksFilteredByKeyword results, which is the consistent behavior.

Reproduction

$ delstack -s my-stack -p my-profile
ERR OperationInProgressError: Stacks with XxxInProgress cannot be deleted, but REVIEW_IN_PROGRESS: my-stack

After this change, the same command deletes the stack normally.

2. Fix ci.yml branch filter

  • The '*' glob in GitHub Actions does not match the / character, so feature branches like feat/foo never triggered ci.yml and CI was silently skipped on every feature-branch push.
  • Switched to '**' so all branches run CI on push.

Test plan

  • go build ./...
  • go test -race ./internal/operation/...
  • make lint_diff
  • CI now runs on this feature branch (verified after pushing the workflow fix)
  • Manual: delete a real stack in REVIEW_IN_PROGRESS state

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.
@go-to-k
go-to-k merged commit 484055d into main May 22, 2026
7 checks passed
@go-to-k
go-to-k deleted the feat/allow-delete-review-in-progress branch May 22, 2026 10:50
@github-actions github-actions Bot mentioned this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant