Skip to content

Commit

Permalink
fix(spanner): allow non default service account only when direct path…
Browse files Browse the repository at this point in the history
… is enabled (#11046)
  • Loading branch information
rahul2393 authored Nov 14, 2024
1 parent f329c4c commit 4250788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spanner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,11 @@ func allClientOpts(numChannels int, compression string, userOpts ...option.Clien
clientDefaultOpts := []option.ClientOption{
option.WithGRPCConnectionPool(numChannels),
option.WithUserAgent(fmt.Sprintf("spanner-go/v%s", internal.Version)),
internaloption.AllowNonDefaultServiceAccount(true),
option.WithGRPCDialOption(grpc.WithChainUnaryInterceptor(addNativeMetricsInterceptor()...)),
option.WithGRPCDialOption(grpc.WithChainStreamInterceptor(addStreamNativeMetricsInterceptor()...)),
}
if enableDirectPathXds, _ := strconv.ParseBool(os.Getenv("GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS")); enableDirectPathXds {
clientDefaultOpts = append(clientDefaultOpts, internaloption.AllowNonDefaultServiceAccount(true))
clientDefaultOpts = append(clientDefaultOpts, internaloption.EnableDirectPath(true), internaloption.EnableDirectPathXds())
}
if compression == "gzip" {
Expand Down

0 comments on commit 4250788

Please sign in to comment.