Skip to content

Commit

Permalink
Merge branch 'main' into release-please--branches--main--components--…
Browse files Browse the repository at this point in the history
…bigtable
  • Loading branch information
bhshkh authored May 10, 2024
2 parents 6b9b9f0 + 194ed46 commit 75713ca
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .release-please-manifest-individual.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ai": "0.4.1",
"ai": "0.5.0",
"aiplatform": "1.67.0",
"auth": "0.4.0",
"auth": "0.4.1",
"auth/oauth2adapt": "0.2.2",
"bigquery": "1.61.0",
"bigtable": "1.24.0",
Expand Down
7 changes: 7 additions & 0 deletions ai/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/ai/v0.4.1...ai/v0.5.0) (2024-05-09)


### Features

* **ai/generativelanguage:** Add FileState to File ([3e25053](https://github.com/googleapis/google-cloud-go/commit/3e250530567ee81ed4f51a3856c5940dbec35289))

## [0.4.1](https://github.com/googleapis/google-cloud-go/compare/ai/v0.4.0...ai/v0.4.1) (2024-05-01)


Expand Down
2 changes: 1 addition & 1 deletion ai/internal/version.go

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

7 changes: 7 additions & 0 deletions auth/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.4.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.4.0...auth/v0.4.1) (2024-05-09)


### Bug Fixes

* **auth:** Don't try to detect default creds it opt configured ([#10143](https://github.com/googleapis/google-cloud-go/issues/10143)) ([804632e](https://github.com/googleapis/google-cloud-go/commit/804632e7c5b0b85ff522f7951114485e256eb5bc))

## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.3.0...auth/v0.4.0) (2024-05-07)


Expand Down
12 changes: 8 additions & 4 deletions auth/grpctransport/grpctransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,16 @@ func dial(ctx context.Context, secure bool, opts *Options) (*grpc.ClientConn, er
// Authentication can only be sent when communicating over a secure connection.
if !opts.DisableAuthentication {
metadata := opts.Metadata
creds, err := credentials.DetectDefault(opts.resolveDetectOptions())
if err != nil {
return nil, err
}

var creds *auth.Credentials
if opts.Credentials != nil {
creds = opts.Credentials
} else {
var err error
creds, err = credentials.DetectDefault(opts.resolveDetectOptions())
if err != nil {
return nil, err
}
}

qp, err := creds.QuotaProjectID(ctx)
Expand Down
16 changes: 9 additions & 7 deletions auth/httptransport/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@ func newTransport(base http.RoundTripper, opts *Options) (http.RoundTripper, err
Key: opts.APIKey,
}
default:
creds, err := credentials.DetectDefault(opts.resolveDetectOptions())
if err != nil {
return nil, err
var creds *auth.Credentials
if opts.Credentials != nil {
creds = opts.Credentials
} else {
var err error
creds, err = credentials.DetectDefault(opts.resolveDetectOptions())
if err != nil {
return nil, err
}
}
qp, err := creds.QuotaProjectID(context.Background())
if err != nil {
Expand All @@ -72,10 +78,6 @@ func newTransport(base http.RoundTripper, opts *Options) (http.RoundTripper, err
}
headers.Set(quotaProjectHeaderKey, qp)
}

if opts.Credentials != nil {
creds = opts.Credentials
}
creds.TokenProvider = auth.NewCachedTokenProvider(creds.TokenProvider, nil)
trans = &authTransport{
base: trans,
Expand Down
2 changes: 2 additions & 0 deletions internal/godocfx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,7 @@ language: "go"
fmt.Fprintf(w, "stem: \"/appengine/docs/legacy/standard/go111/reference\"\n")
case "google.golang.org/appengine/v2":
fmt.Fprintf(w, "stem: \"/appengine/docs/standard/go/reference/services/bundled\"\n")
case "cloud.google.com/go/vertexai":
fmt.Fprintf(w, "stem: \"/vertex-ai/generative-ai/docs/reference/go\"\n")
}
}

0 comments on commit 75713ca

Please sign in to comment.