feat(gcp): redesign region model, add Secret Manager, recover Init panics#1062
Open
james00012 wants to merge 1 commit intomasterfrom
Open
feat(gcp): redesign region model, add Secret Manager, recover Init panics#1062james00012 wants to merge 1 commit intomasterfrom
james00012 wants to merge 1 commit intomasterfrom
Conversation
4bbf738 to
26619af
Compare
2 tasks
26619af to
55bb7ce
Compare
75d1ea0 to
8bbc3c3
Compare
Member
|
Lint failures |
denis256
reviewed
Mar 16, 2026
e7970e5 to
0dcf459
Compare
…nics - Recover panics in GcpResourceAdapter.Init() and store as InitializationError - Validate project ID upfront via Cloud Resource Manager API - Wire ExcludeAfter, IncludeAfter, Timeout to gcp.Query via generateGcpQuery() - Drop global/regional split: --region is now a location filter hint each resource handles internally via MatchesLocationFilter helper - Add Secret Manager resource with multi-client architecture (global + regional endpoints discovered dynamically via ListLocations RPC) - Close global client after discovery when not needed for querying - Post-filter Cloud Functions results with ExcludeLocations on wildcard queries - Case-insensitive location matching throughout (validateLocations, filters)
0dcf459 to
7c6eb4a
Compare
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.
Summary
GcpResourceAdapter.Init()and store asInitializationErrorfor graceful degradationgenerateGcpQuery()helper withTimeoutwiring--regiona location filter hint each resource handles internallyMatchesLocationFilterhelper; update Cloud Functions, Artifact Registry, GCS, Pub/Sub to use itListLocationsRPC)Why Secret Manager?
Secret Manager is the first GCP resource that has both global and regional endpoints — secrets can live at
projects/{p}/secrets/{s}(global) orprojects/{p}/locations/{loc}/secrets/{s}(regional). The previous global/regional registry split couldn't model this: a single resource type needs to query multiple endpoint classes and route deletions to the correct client based on the secret's fully qualified name. This drove the redesign from a registry-level split to per-resource location handling, and Secret Manager serves as the concrete proof that the new model works for mixed-endpoint resources.Closes #1053
Test plan
go build ./...passesgo vet ./...passesgolangci-lint run ./...— 0 issuesgo test ./gcp/... ./config/... ./resource/... ./commands/...— all passscripts/check-resource-naming.sh— lint passes