Skip to content

Commit

Permalink
feat(gengapic): move all libraries to new auth lib (#1564)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Aug 27, 2024
1 parent 9879c87 commit 74b6c39
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
17 changes: 0 additions & 17 deletions internal/gengapic/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,6 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)

var enableNewAuthLibraryBlocklist = map[string]bool{
"generativelanguage.googleapis.com": true,
"aiplatform.googleapis.com": true,
"analyticshub.googleapis.com": true,
"biglake.googleapis.com": true,
"bigtableadmin.googleapis.com": true,
"bigtable.googleapis.com": true,
"datastore.googleapis.com": true,
"clouderrorreporting.googleapis.com": true,
"firestore.googleapis.com": true,
"logging.googleapis.com": true,
"cloudprofiler.googleapis.com": true,
"pubsub.googleapis.com": true,
"pubsublite.googleapis.com": true,
"spanner.googleapis.com": true,
}

// keyed by proto package name, e.g. "google.cloud.foo.v1".
var enableWrapperTypesForPageSize = map[string]bool{
"google.cloud.bigquery.v2": true,
Expand Down
4 changes: 1 addition & 3 deletions internal/gengapic/gengrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ func (g *generator) grpcClientOptions(serv *descriptorpb.ServiceDescriptorProto,
p(" internaloption.WithDefaultAudience(%q),", generateDefaultAudience(host))
p(" internaloption.WithDefaultScopes(DefaultAuthScopes()...),")
p(" internaloption.EnableJwtWithScope(),")
if _, ok := enableNewAuthLibraryBlocklist[g.serviceConfig.GetName()]; !ok {
p("internaloption.EnableNewAuthLibrary(),")
}
p(" internaloption.EnableNewAuthLibrary(),")
p(" option.WithGRPCDialOption(grpc.WithDefaultCallOptions(")
p(" grpc.MaxCallRecvMsgSize(math.MaxInt32))),")
p(" }")
Expand Down
4 changes: 1 addition & 3 deletions internal/gengapic/genrest.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ func (g *generator) restClientOptions(serv *descriptorpb.ServiceDescriptorProto,
p(" internaloption.WithDefaultUniverseDomain(%q),", googleDefaultUniverse)
p(" internaloption.WithDefaultAudience(%q),", generateDefaultAudience(host))
p(" internaloption.WithDefaultScopes(DefaultAuthScopes()...),")
if _, ok := enableNewAuthLibraryBlocklist[g.serviceConfig.GetName()]; !ok {
p("internaloption.EnableNewAuthLibrary(),")
}
p(" internaloption.EnableNewAuthLibrary(),")
p(" }")
p("}")
}
Expand Down

0 comments on commit 74b6c39

Please sign in to comment.