Skip to content

Commit d75da49

Browse files
committed
chore(smoke-nuke): drop ParentId filter so orphaned nested children get swept
After the first nuke, smoke retry for PR #321 failed because all-demo-PaperlessNgx-Q59CODQ417ER and all-demo-BopsPlanning-1KFCREGSEO53T still existed in CFN owning IAM roles, an ALB ('NdxBops-v2-ALB'), an ECS cluster, S3 buckets. The new umbrella's children then collided with "already exists" on every resource. The nuke was filtering on ParentId==null to avoid deleting live nested children, copying the pre-deploy script's safety. But the nuke's whole purpose is the opposite — sweep everything matching ${STACK}- regardless of ownership. Drop the ParentId filter from both the terminal-state and in-progress passes. The pre-deploy script's ParentId filter is still correct there (it must not touch live children), so the two scripts now diverge intentionally on that condition.
1 parent 0ef43cd commit d75da49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/smoke-nuke.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ top_stacks=$(aws cloudformation list-stacks \
113113
--stack-status-filter CREATE_COMPLETE UPDATE_COMPLETE UPDATE_ROLLBACK_COMPLETE \
114114
DELETE_FAILED UPDATE_ROLLBACK_FAILED CREATE_FAILED UPDATE_FAILED \
115115
ROLLBACK_COMPLETE ROLLBACK_FAILED \
116-
--query "StackSummaries[?(StackName=='${STACK}' || starts_with(StackName, '${STACK}-')) && ParentId==\`null\`].StackName" \
116+
--query "StackSummaries[?StackName=='${STACK}' || starts_with(StackName, '${STACK}-')].StackName" \
117117
--output text 2>/dev/null | tr '\t' '\n' | grep -v '^$' || true)
118118
if [ -z "$top_stacks" ]; then
119119
echo "(none in terminal states)"
@@ -130,7 +130,7 @@ fi
130130
in_progress=$(aws cloudformation list-stacks \
131131
--stack-status-filter CREATE_IN_PROGRESS UPDATE_IN_PROGRESS DELETE_IN_PROGRESS \
132132
ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_IN_PROGRESS UPDATE_COMPLETE_CLEANUP_IN_PROGRESS REVIEW_IN_PROGRESS \
133-
--query "StackSummaries[?(StackName=='${STACK}' || starts_with(StackName, '${STACK}-')) && ParentId==\`null\`].StackName" \
133+
--query "StackSummaries[?StackName=='${STACK}' || starts_with(StackName, '${STACK}-')].StackName" \
134134
--output text 2>/dev/null | tr '\t' '\n' | grep -v '^$' || true)
135135
if [ -n "$in_progress" ]; then
136136
echo "Waiting for in-progress matches to settle:"

0 commit comments

Comments
 (0)