You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AWS Resource Management: Cleanup and Destruction Utilities #95
Status correction (audit 2026-08-17): the scripts exist locally but have never been pushed, and the requested safeguards are missing.
scripts/aws/cleanup_test_resources.py and scripts/aws/destroy_cluster.py exist in the working tree but are absent from origin/master — they are part of the 30 unpushed local commits. Nobody but this laptop has them.
Safeguards requested by this issue are not implemented:grep -rn "dry_run\|confirm\|input(" scripts/aws/*.py returns 0 hits. These are unguarded resource-destruction scripts — no dry-run mode, no confirmation prompt, no scoping check.
Given that, this issue should stay open with its scope sharpened to: (1) push the scripts, (2) add --dry-run as the default with an explicit --yes to actually destroy, (3) add a tag/name-prefix filter so the scripts cannot touch non-test resources, and (4) a test that asserts the default invocation destroys nothing.
Dry run is the default.cleanup_resources.py:251-254 deletes only when --execute is passed; without it the script prints what it would delete and exits. Both scripts take --region and --execute through argparse and print every resource before touching it.
Ownership is checked. Neither will touch a resource that is not tagged clustrix:managed=true. This is the thing the originals — recovered from git history — did not do: they deleted every NAT gateway and VPC in the account with no ownership check at all.
Tested without mocks.tests/unit/test_aws_cleanup_scripts.py has 21 tests and zero boto3 mocks.
boto3 is imported lazily with its own message ("boto3 is not a clustrix dependency; these AWS utilities are optional"), so these scripts stay useful without adding a dependency — which is why they survived the removal of the AWS backend in PR #149. They are operator teardown tooling, not an execution backend.
Activity
jeremymanning commentedon Aug 17, 2026
Status correction (audit 2026-08-17): the scripts exist locally but have never been pushed, and the requested safeguards are missing.
scripts/aws/cleanup_test_resources.pyandscripts/aws/destroy_cluster.pyexist in the working tree but are absent fromorigin/master— they are part of the 30 unpushed local commits. Nobody but this laptop has them.Safeguards requested by this issue are not implemented:
grep -rn "dry_run\|confirm\|input(" scripts/aws/*.pyreturns 0 hits. These are unguarded resource-destruction scripts — no dry-run mode, no confirmation prompt, no scoping check.Given that, this issue should stay open with its scope sharpened to: (1) push the scripts, (2) add
--dry-runas the default with an explicit--yesto actually destroy, (3) add a tag/name-prefix filter so the scripts cannot touch non-test resources, and (4) a test that asserts the default invocation destroys nothing.Fix three fabricated-result bugs, close the RCE, and overhaul the doc…
jeremymanning commentedon Aug 19, 2026
Resolved
Both utilities exist and are safe by construction.
Dry run is the default.
cleanup_resources.py:251-254deletes only when--executeis passed; without it the script prints what it would delete and exits. Both scripts take--regionand--executethroughargparseand print every resource before touching it.Ownership is checked. Neither will touch a resource that is not tagged
clustrix:managed=true. This is the thing the originals — recovered from git history — did not do: they deleted every NAT gateway and VPC in the account with no ownership check at all.Tested without mocks.
tests/unit/test_aws_cleanup_scripts.pyhas 21 tests and zero boto3 mocks.boto3is imported lazily with its own message ("boto3 is not a clustrix dependency; these AWS utilities are optional"), so these scripts stay useful without adding a dependency — which is why they survived the removal of the AWS backend in PR #149. They are operator teardown tooling, not an execution backend.