gcp-hcp-cleanup-on-demand: accept the full gcphcpctl infra ID family #89874
All Vouch review confidence checks passed
Residual risk 0.34 = Change Risk (0.64) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.64 · 318 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.345
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.064
Real PR Conversation Timeline
1 comments
"Review active on #89874"
general
weight: 0.35
gbarabasz
What
Widens the three infra ID validations in
gcp-hcp-cleanup-on-demand-commands.sh(theSHARED_DIR/hosted-cluster-infra-idcheck, the cluster-status cross-check, and the worker-label recovery) from the exact shape^e2e-hc-[0-9a-f]{4}$to the whole family^e2e-hc(-[0-9a-f]{1,6})?-[0-9a-f]{4}$. The cluster-name and nodepool-name validations are unchanged.Why
gcphcpctl iam create --cluster-name(gcp-hcp-ctl) derives the infra ID from the cluster name, truncated at the release contract'smaximumInfraIDLength, plus a random 4-hex suffix. Today's bound (12) truncatese2e-hc-<6hex>names to thee2e-hcprefix, so recorded IDs match the current exact shape. A future catalog bound increase (13-18+) would record IDs likee2e-hc-a1b2-9f8eore2e-hc-a1b2c3-9f8e; the step would then exit 1 with fallback cleanup infra ID is invalid before runningnetwork destroy/iam destroy, leaving the run's network and IAM resources behind in the persistent customer project.Safety
The family stays tightly scoped to this suite's
e2e-hc-naming: an optional single hex segment of at most 6 chars (the cluster-name suffix, possibly truncated), then exactly 4 hex. The step's other guards (cluster name^e2e-hc-[0-9a-f]{6}$, nodepool${cluster_name}-np,E2E_TARGET_allowlists, project equality) are unchanged and still bound the cleanup target.Companion to openshift-online/gcp-hcp-infra#3166 (the HC E2E suites' migration to the receipt flow), whose lifecycle suite asserts the same family on the IDs it records, so a bound change that outgrows this family fails the suite at
iam createinstead of silently breaking the post-step.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
This PR changes the on-demand GCP HCP cleanup fallback in
ci-operator/step-registry/gcp-hcp/cleanup-on-demand/gcp-hcp-cleanup-on-demand-commands.sh.The script now accepts infra IDs in the form
e2e-hc[-<1–6 hex>]-<4 hex>. Before this change, it accepted onlye2e-hc-<4 hex>. The change applies to three checks: theSHARED_DIR/hosted-cluster-infra-idcheck, the cluster-status cross-check, and worker-label recovery.Without this change, a longer infra ID would stop the script before
network destroyandiam destroy. The cluster-name, nodepool-name,E2E_TARGET_, and project checks are unchanged. The PR description reports no test results.<!-- end of auto-generated comment: release notes by coderabbit.ai -->