Skip to content

Commit

Permalink
revert: move storage, bigquery, and compute to new auth lib (#2695)" (#…
Browse files Browse the repository at this point in the history
…2704)

This reverts commit 66ace6c.
  • Loading branch information
codyoss authored Jul 30, 2024
1 parent 7b03cff commit aa62c85
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion bigquery/v2/bigquery-gen.go

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

1 change: 0 additions & 1 deletion 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: 0 additions & 1 deletion 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: 0 additions & 1 deletion compute/v1/compute-gen.go

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

14 changes: 12 additions & 2 deletions google-api-go-generator/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ 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 @@ -888,8 +897,9 @@ func (a *API) GenerateCode() ([]byte, error) {
if a.mtlsAPIBaseURL() != "" {
pn("opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))")
}
pn("opts = append(opts, internaloption.EnableNewAuthLibrary())")

if !skipNewAuthLibrary[a.ID] {
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: 0 additions & 1 deletion 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 aa62c85

Please sign in to comment.