Repository navigation
refactor(cmd): move GCP key provisioning into configure_gcp_keys.go - #2263
Merged
Merged
Conversation
Pure move, no logic, signature, name or comment changes. Moves gcpKeyProvisioner, iamKeyProvisioner (CreateKey/DeleteKey), createKeyError, newIAMKeyProvisioner, createGCPServiceAccountKey, deleteGCPServiceAccountKey, writeServiceAccountKey, uploadGCPCredentialsFile, deleteMintedGCPKeyRemotely, gcloudDeleteKeyCommand, mintedGCPKeyFilename, newMintedGCPKeyPath and removeMintedGCPKey out of configure_gcp.go. cmd/configure_gcp.go: 1069 -> 839 lines. New cmd/configure_gcp_keys.go: 243 lines. Refs #1834 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1834. This is part 1 of the
configure_gcp.gosplit. Part 2 will bring that file under the 500-line cap.Summary
This PR moves the GCP service-account key provisioning group out of
cmd/configure_gcp.gointo a newcmd/configure_gcp_keys.go. The move changes no logic, signatures, names, or comments; the only other edits are to the imports.configure_gcp.gogoes from 1069 lines to 839, and the new file is 243 lines.Moved symbols:
gcpKeyProvisioner,iamKeyProvisioner(with itsCreateKeyandDeleteKeymethods),newIAMKeyProvisionercreateKeyErrorcreateGCPServiceAccountKey,deleteGCPServiceAccountKeywriteServiceAccountKey,uploadGCPCredentialsFile,deleteMintedGCPKeyRemotelygcloudDeleteKeyCommand,mintedGCPKeyFilename,newMintedGCPKeyPath,removeMintedGCPKeyThe callers that stay in
configure_gcp.goaregetGCPCredentialsFilePathandgcpStepCreateKey. They are part of the wizard flow, so they belong there.Evidence (local, macOS,
GOTOOLCHAIN=go1.26.9)git diff -U0are identical. Both the author and an independent reviewer checked this.go build -o /dev/null ./cmdpasses.go vet ./...passes.go test -race ./cmd/...passes, including 92 GCP tests.scripts/test-git-secrets-allowlist.shpasses 44/44.🤖 Generated with Claude Code
Summary by CodeRabbit