Skip to content

Commit

Permalink
feat: move storage, bigquery, and compute to new auth lib (#2695)
Browse files Browse the repository at this point in the history
All other clients in this repo have been exercising the new library
for almost 3 months now. I believe things to be stable so we should
move the remaining libraries.
  • Loading branch information
codyoss authored Jul 24, 2024
1 parent cbc19e7 commit 66ace6c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions bigquery/v2/bigquery-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compute/v0.alpha/compute-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compute/v0.beta/compute-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compute/v1/compute-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions google-api-go-generator/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ var skipAPIGeneration = map[string]bool{
"datalineage:v1": true,
}

// skipNewAuthLibrary is a set of APIs to not migrate to cloud.google.com/go/auth.
var skipNewAuthLibrary = map[string]bool{
"bigquery:v2": true,
"compute:alpha": true,
"compute:beta": true,
"compute:v1": true,
"storage:v1": true,
}

var apisToSplit = map[string]bool{
"compute": true,
}
Expand Down Expand Up @@ -897,9 +888,8 @@ func (a *API) GenerateCode() ([]byte, error) {
if a.mtlsAPIBaseURL() != "" {
pn("opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))")
}
if !skipNewAuthLibrary[a.ID] {
pn("opts = append(opts, internaloption.EnableNewAuthLibrary())")
}
pn("opts = append(opts, internaloption.EnableNewAuthLibrary())")

pn("client, endpoint, err := htransport.NewClient(ctx, opts...)")
pn("if err != nil { return nil, err }")
pn("s, err := New(client)")
Expand Down
1 change: 1 addition & 0 deletions storage/v1/storage-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66ace6c

Please sign in to comment.