fix(#5912): GitLab WIF install/uninstall cleanup and edge cases - #5914
Conversation
|
🤖 Finished Review · ✅ Success · Started 9:04 PM UTC · Completed 9:22 PM UTC |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runReviewFindingsLow
Previous run (2)ReviewFindingsLow
Previous run (3)ReviewFindingsMedium
Low
Previous run (4)ReviewFindingsMedium
Low
Previous run (5)ReviewFindingsLow
Previous run (6)ReviewFindingsLow
Previous run (7)ReviewFindingsMedium
Low
Labels: PR modifies GitLab WIF install/uninstall flow and GCP dispatch client |
ba48028 to
7dda7d3
Compare
|
🤖 Review · |
7dda7d3 to
7b721fb
Compare
|
🤖 Review · ❌ Terminated · Started 9:32 PM UTC · Ended 9:49 PM UTC |
Site previewPreview: https://df9bd7b5-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 9:32 PM UTC · Completed 9:49 PM UTC |
7b721fb to
5661e80
Compare
|
🤖 Finished Review · ✅ Success · Started 9:54 PM UTC · Completed 10:11 PM UTC |
5661e80 to
319e96a
Compare
|
🤖 Finished Review · ✅ Success · Started 11:10 PM UTC · Completed 11:26 PM UTC |
319e96a to
b01f462
Compare
b01f462 to
fd534a9
Compare
|
🤖 Review · |
fd534a9 to
2f16bf4
Compare
|
🤖 Finished Review · ✅ Success · Started 11:57 PM UTC · Completed 12:13 AM UTC |
2f16bf4 to
b318b47
Compare
|
🤖 Finished Review · ✅ Success · Started 12:17 AM UTC · Completed 12:34 AM UTC |
b318b47 to
688bd64
Compare
|
🤖 Finished Review · ✅ Success · Started 12:41 AM UTC · Completed 1:02 AM UTC |
Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
688bd64 to
67b45cb
Compare
|
🤖 Finished Review · ✅ Success · Started 2:49 AM UTC · Completed 3:05 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 3:58 AM UTC · Completed 4:11 AM UTC |
Retro: PR #5914 — GitLab WIF install/uninstall cleanupWhat happenedIssue #5912 was filed by Code agent (run 30948690170) produced a solid initial implementation in ~25 minutes: +519/-30 lines across 10 files with unit tests covering all 4 tasks. PR #5914 was opened at 21:03 UTC. Review agent ran 11 times (8 completed, 3 cancelled by superseding pushes) between 21:04 and 03:05 UTC. It caught 4 legitimate bugs that led to code improvements:
Human rework loop: Merge: PR merged at 03:56 UTC with human approval from What went well
What could go betterReview agent redundancy was the dominant issue. Of 29 inline review comments posted by the bot, approximately 18 (62%) were duplicates of findings already raised in prior iterations. The No fix agent involvement. The human iterated manually 10 times rather than using Label churn. The PR oscillated between Existing issue coverageAll identified improvement areas are well-covered by existing open issues. This PR provides additional quantitative evidence:
Autonomy signalThe review agent demonstrated strong correctness detection for Go/GCP/IAM changes — it caught backward-compatibility, resource lifecycle ordering, and credential cleanup gaps that the code agent missed. If the redundancy issues tracked above were resolved (reducing noise from 62% to near-zero), the review agent's signal quality would strongly support increased autonomy for this class of change. |
Summary
Address four unresolved review findings from PR #5898 for the GitLab WIF install/uninstall flow.
Changes
cleanupGitLabBotTokenSecretto delete the bot token Secret Manager secret during GitLab uninstall. Before teardown, theFULLSEND_SAvariable is read to derive the GCP project ID for best-effort cleanup._dot_inbotTokenSecretIDsomy.groupandmy-groupproduce distinct secret IDs. Slashes continue to map to double underscores.ReplaceSecretIAMBindingorCreateProtectedCIVariablefails afterstoreSecretManagerTokensucceeds, best-effortDeleteSecretcleans up the orphaned secret.ReplaceSecretIAMBindingto theGCFClientinterface with replace semantics (all existing members for the role are replaced with the specified member). The bot token path uses this method so re-install with a different service account revokes the old binding. The provisioner's agent PEM path retains the additiveSetSecretIAMBinding.Testing
botTokenSecretIDdot-vs-hyphen collision (owner and repo)projectIDFromSAEmailparsingcleanupGitLabBotTokenSecretsuccess and failure pathsReplaceSecretIAMBindingis calledDeleteSecretcleanupCreateProtectedCIVariablefailure test verifiesDeleteSecretcleanupSetSecretIAMBindingtests pass (additive behavior preserved)go vetpassesCloses #5912
Post-script verification
agent/5912-gitlab-wif-cleanup)9df3b1398df9f29db3eada0607b4c9f06535bcb0..HEAD)