Repository navigation
fix(#739): return error when IAM operation has no name and is not done - #6033
Conversation
waitForIAMOperation previously returned nil (success) when the IAM API response had done:false and an empty name field. This silently swallowed an incomplete operation, making it appear successful when there was no way to poll for completion. Return an error instead, consistent with handleCloudRunLRO which already returns an error in the same situation. This ensures callers (CreateWIFPool, CreateWIFProvider, UpdateWIFProvider, etc.) surface the failure rather than proceeding on a false success. Add unit tests covering all branches of waitForIAMOperation: done immediately, done with error, not-done with empty name (the bug), and not-done with valid name (polls until done). Note: golangci-lint could not run (not installed in sandbox). go vet and go test -race passed. Closes #739
|
🤖 Finished Review · ✅ Success · Started 11:11 AM UTC · Completed 11:24 AM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me |
|
🤖 Finished Retro · ✅ Success · Started 7:48 AM UTC · Completed 8:00 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.95 |
Retro: PR #6033 — fix IAM operation silent false-successTimeline
What went well
Evidence for existing issues
Merge latencyThe 17-day PR-to-merge latency is a 30.7× outlier versus the 13-hour median for recent agent PRs. The bottleneck was entirely human reviewer availability (rh-hemartin, 15.9 days), not agent performance. Recent PRs reviewed by ggallen typically merge within hours. This appears to be a one-off reviewer routing/availability issue rather than a systemic problem. Proposals skipped (target repo not allowed)File manually or update
|
Summary
Return an error from
waitForIAMOperationwhen the IAM API response hasdone: falseand an emptynamefield, instead of silently returningnil(success). This prevents callers from proceeding on a false success when the operation hasn't completed and cannot be polled.Related Issue
Closes #739
Changes
waitForIAMOperationininternal/dispatch/gcf/gcp.goto returnfmt.Errorf("IAM operation returned no name and is not done")instead ofnilwhendoneisfalseandnameis emptywaitForIAMOperation: done immediately, done with error, not-done with empty name (the bug), and not-done with valid name (polls until done)Testing
go test -race ./internal/dispatch/gcf/...passesgo vet ./internal/dispatch/gcf/...passesgolangci-lintcould not run in sandbox (not installed)Closes #739
Post-script verification
agent/739-iam-op-empty-name)743f99d88b883f61b19f09d00b723f7a3f8ae4f8..HEAD)