Skip to content

Commit

Permalink
feat: move storage, bigquery, and compute to new auth lib (#2730)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss committed Aug 13, 2024
1 parent a0ed1f3 commit 2b4e9f4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 15 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.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
cloud.google.com/go v0.115.0
cloud.google.com/go/auth v0.7.3
cloud.google.com/go/auth v0.8.1
cloud.google.com/go/auth/oauth2adapt v0.2.3
cloud.google.com/go/compute/metadata v0.5.0
github.com/google/go-cmp v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14=
cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU=
cloud.google.com/go/auth v0.7.3 h1:98Vr+5jMaCZ5NZk6e/uBgf60phTk/XN84r8QEWB9yjY=
cloud.google.com/go/auth v0.7.3/go.mod h1:HJtWUx1P5eqjy/f6Iq5KeytNpbAcGolPhOgyop2LlzA=
cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo=
cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc=
cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI=
cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I=
cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=
Expand Down
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 @@ -900,9 +891,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 2b4e9f4

Please sign in to comment.