Repository navigation
fix(cli): prompt for an existing service account when GCP setup skips creation - #2211
Conversation
… creation gcpStepCreateServiceAccount returned the fabricated default email cudly-service-account@<project>.iam.gserviceaccount.com on skip and on unknown input, so the grant and key steps acted on a principal that was never created or verified and failed later with an opaque IAM error. On skip or unknown input it now asks for the existing service account email, validates it (non-empty, no whitespace, <name>@...gserviceaccount.com) and fails loud otherwise. Wizard-driving tests gain the extra email line. Closes #2007 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 5 billable files and costs up to $1.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 8 minutes for your next included review. View limit details
Comment |
The 46-dash run matched the AWS-secret pattern in the git-secrets allowlist self-test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge-gate verdict: CLEAN at b5af035Independent adversarial review (non-author agent, Sonnet high, cold brief, full diff Traced end to end (code reading): the Skip/unknown-option branch now reads an existing SA email, trims and lowercases it, and validates it (one Non-blocking notes:
Local verification on macOS at b5af035 (fixture/mock-based, stdin readers, no cloud credentials):
CI is green on b5af035, mergeability is CLEAN, and labels are mirrored from #2007. CR waived: quota, adversarial review + local verification + green CI. A retrospective CR review is tracked as a follow-up. 🤖 Generated with Claude Code |
* docs(changelog): record the #2206 and #2211 fixes Both PRs merged with user-visible behaviour changes but without a CHANGELOG entry: configure-gcp now asks for an existing service account when the create step is skipped, and count changes re-derive the projection columns and the Redshift node count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): note ProjectedCoverage needs known existing coverage Addresses the CodeRabbit finding on #2220 about the #2206 entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Closes #2007
Summary
At Step 3 of
configure-gcp,gcpStepCreateServiceAccountreturned the default emailcudly-service-account@<project>.iam.gserviceaccount.comon Skip and on unknown input. The grant step (Step 4) and the key step (Step 5) then acted on a principal that was never created or verified, and the wizard failed later with an IAM error that did not mention the skipped step.readRequiredInputLinehelper.@, a non-empty local part, and a non-empty label before.gserviceaccount.com, compared case-insensitively. It rejects whitespace and control characters. The email is returned lowercased, because service account IDs are lowercase.docs/cli/cloud-setup.mdnow notes that Skip at this step prompts for an existing email.configure_gcp_iam_test.go,configure_gcp_signal_test.go) feed the extra email line after the Step 3s.Evidence (local, macOS,
GOTOOLCHAIN=go1.26.9; stdin-driven unit tests, no GCP calls)TestGCPStepCreateServiceAccount_SkipUsesOperatorEmailfails on origin/main code. It expectedexisting-sa@my-proj.iam.gserviceaccount.comand gotcudly-service-account@my-proj.iam.gserviceaccount.com. The unknown-option test and the invalid-email test also fail without the fix.label == ""check is removed.unicode.IsControlcheck is removed.make build: ok.go vet ./...: clean.go test -race ./cmd/...: pass.🤖 Generated with Claude Code