fix(teardown): make the workshop sweep name-agnostic and eliminate residue #915
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 407 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #915"
general
weight: 0.35
shapirov103
Problem
The Delete-time sweep (
workshop/scripts/sweep-workshop-resources.py, run by theClustersStackDeployCodeBuild aftertask destroy) leaves orphaned residue on reused accounts. PR #914 (arbitrary spoke names) widens the gap: several sections key on the hard-coded<prefix>-spoke-dev/<prefix>-spoke-prodnames, so a spoke created with an arbitrary name (e.g.oap-test) — and its VPC, IAM roles, secrets and log groups — escapes the sweep entirely. There is also no S3 sweep at all, so the Ray/vLLM model-cache bucket (2+ GB) persists and keeps billing.Observed leftovers after a full teardown: spoke VPCs, unassociated EIPs, the
-ray-modelsS3 bucket + deploy-staging bucket, arbitrarily-named-spoke IAM roles, and stale log groups.Changes
_discover_spokes()returns the union of the legacy name pattern and every non-hub EKS cluster carrying the #914 ownership tagplatform.gitops.io/prefix=<prefix>. All downstream sections consume this list, so arbitrarily-named spokes are reaped too. Fully backwards-compatible — on pre-#914 environments the tag is simply absent and the legacy names are used.<prefix>-ray-models-<acct>(and<hub>-ray-models-<acct>) model cache and the self-serve<prefix>-workshop-deploy-staging bucket — the same unowned class as the ECR repo already handled in 8b. Empties all object versions + delete markers first. Prefix-scoped and region-checked, so shared bootstrap buckets (cdk-hnb659fds-,ws-assets-) are never matched.oap-test-cluster-roleetc. do not start with the prefix); policies are now paginated.<cluster>/configsecret is force-deleted./aws/eks/and/aws/containerinsights/for the hub and all discovered spokes, plus/aws/lambda/<prefix>-custom-resource log groups.platform.gitops.io/prefixtag to VPC discovery (catches any owned VPC regardless of name) and extend the ENI-detach retry budget from ~2 min to ~4 min (Auto Mode / KRO ENIs occasionally take longer than the old budget, which was leaving spoke VPCs behind).Safety
cdk-hnb659fds-/ws-assets-*.Testing
python3 -m py_compile workshop/scripts/sweep-workshop-resources.pypasses.