Skip to content

Commit 39d730a

Browse files
authored
Remove deprecated Google API usage
Remove deprecated Google API usage. Summary: - Remove explicit Spanner SessionPoolConfig usage now that google-cloud-go/spanner uses multiplexed sessions. - Replace deprecated credentials JSON loading with type-aware WithAuthCredentialsJSON handling and validation. - Update google.golang.org/api and related transitive dependencies needed for the new credential option. - Document the Go 1.25 modernization baseline, including Go 1.22 loop-variable semantics. Validation: - make check - CI lint, test, and readme-sync passed - Gemini summary refreshed; Copilot and Gemini reviewed the current head with no unresolved comments
1 parent 924beba commit 39d730a

6 files changed

Lines changed: 172 additions & 85 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ For full gh-helper command reference, see [dev-docs/issue-management.md](dev-doc
8181
- **Static patterns**: Precompile at package level (`var patternRe = regexp.MustCompile(...)`)
8282
- **Dynamic patterns**: Compile at runtime, avoid caching unless profiling shows need
8383

84+
### Go Modernization Baseline
85+
- This module targets Go 1.25. Use language features and standard-library APIs available through Go 1.25 when touching nearby code, while keeping modernization changes scoped.
86+
- Do not add loop-variable shadow copies only for closure or parallel-subtest safety. Go 1.22+ gives loop variables per-iteration scope for modules declaring `go 1.22` or later.
87+
- Prefer clear standard-library helpers over older hand-written patterns when they fit: `slices`, `maps`, `cmp.Or`, `min`/`max`, integer `range`, `sync.OnceFunc`/`OnceValue`, `sync.WaitGroup.Go`, `testing.T.Context()`, and `testing.B.Loop()`.
88+
- Treat modernization as opportunistic cleanup, not a reason for broad churn-only rewrites.
89+
8490
## Development Workflow
8591

8692
### Worktree Usage

go.mod

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@ require (
4949
github.com/testcontainers/testcontainers-go v0.42.0
5050
github.com/vbauerster/mpb/v8 v8.10.2
5151
go.uber.org/zap v1.27.0
52-
golang.org/x/term v0.40.0
52+
golang.org/x/term v0.41.0
5353
golang.org/x/time v0.15.0
54-
google.golang.org/api v0.256.0
54+
google.golang.org/api v0.265.0
5555
google.golang.org/genai v1.47.0
5656
google.golang.org/grpc v1.79.3
5757
google.golang.org/protobuf v1.36.11
5858
)
5959

6060
require (
6161
cel.dev/expr v0.25.1 // indirect
62-
cloud.google.com/go/auth v0.17.0 // indirect
62+
cloud.google.com/go/auth v0.18.1 // indirect
6363
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
6464
cloud.google.com/go/compute/metadata v0.9.0 // indirect
6565
cloud.google.com/go/iam v1.5.3 // indirect
6666
cloud.google.com/go/monitoring v1.24.3 // indirect
6767
dario.cat/mergo v1.0.2 // indirect
6868
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
69-
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.3 // indirect
69+
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.6.0 // indirect
7070
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect
7171
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect
7272
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect
@@ -112,8 +112,8 @@ require (
112112
github.com/google/jsonschema-go v0.4.2 // indirect
113113
github.com/google/s2a-go v0.1.9 // indirect
114114
github.com/google/uuid v1.6.0 // indirect
115-
github.com/googleapis/enterprise-certificate-proxy v0.3.9 // indirect
116-
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
115+
github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect
116+
github.com/googleapis/gax-go/v2 v2.16.0 // indirect
117117
github.com/gorilla/websocket v1.5.3 // indirect
118118
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
119119
github.com/hashicorp/golang-lru v1.0.2 // indirect
@@ -169,24 +169,24 @@ require (
169169
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect
170170
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 // indirect
171171
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
172-
go.opentelemetry.io/otel v1.41.0 // indirect
173-
go.opentelemetry.io/otel/metric v1.41.0 // indirect
174-
go.opentelemetry.io/otel/sdk v1.41.0 // indirect
175-
go.opentelemetry.io/otel/sdk/metric v1.41.0 // indirect
176-
go.opentelemetry.io/otel/trace v1.41.0 // indirect
172+
go.opentelemetry.io/otel v1.42.0 // indirect
173+
go.opentelemetry.io/otel/metric v1.42.0 // indirect
174+
go.opentelemetry.io/otel/sdk v1.42.0 // indirect
175+
go.opentelemetry.io/otel/sdk/metric v1.42.0 // indirect
176+
go.opentelemetry.io/otel/trace v1.42.0 // indirect
177177
go.uber.org/multierr v1.11.0 // indirect
178-
golang.org/x/crypto v0.48.0 // indirect
178+
golang.org/x/crypto v0.49.0 // indirect
179179
golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b // indirect
180-
golang.org/x/mod v0.32.0 // indirect
181-
golang.org/x/net v0.49.0 // indirect
182-
golang.org/x/oauth2 v0.34.0 // indirect
183-
golang.org/x/sync v0.19.0 // indirect
180+
golang.org/x/mod v0.33.0 // indirect
181+
golang.org/x/net v0.52.0 // indirect
182+
golang.org/x/oauth2 v0.36.0 // indirect
183+
golang.org/x/sync v0.20.0 // indirect
184184
golang.org/x/sys v0.42.0 // indirect
185-
golang.org/x/text v0.34.0 // indirect
186-
golang.org/x/tools v0.41.0 // indirect
187-
google.golang.org/genproto v0.0.0-20250818200422-3122310a409c // indirect
188-
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
189-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
185+
golang.org/x/text v0.35.0 // indirect
186+
golang.org/x/tools v0.42.0 // indirect
187+
google.golang.org/genproto v0.0.0-20251202230838-ff82c1b0f217 // indirect
188+
google.golang.org/genproto/googleapis/api v0.0.0-20260316180232-0b37fe3546d5 // indirect
189+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260319201613-d00831a3d3e7 // indirect
190190
gopkg.in/inf.v0 v0.9.1 // indirect
191191
gopkg.in/yaml.v3 v3.0.1 // indirect
192192
)

0 commit comments

Comments
 (0)