Skip to content

Commit

Permalink
fix(storage): fix routing header for writes (#8159)
Browse files Browse the repository at this point in the history
This fixes several integration tests that were broken since
GCS started enforcing new formatting. Only writes are affected;
for other calls, the GAPIC handles the routing annotation.

Fixes #8142
Fixes #8143
Fixes #8144
Fixes #8145
Fixes #8149
  • Loading branch information
tritone authored Jun 21, 2023
1 parent cdfd268 commit 42a59f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ func (w *gRPCWriter) uploadBuffer(recvd int, start int64, doneReading bool) (*st
// The first message on the WriteObject stream must either be the
// Object or the Resumable Upload ID.
if first {
ctx := gapic.InsertMetadata(w.ctx, metadata.Pairs("x-goog-request-params", "bucket="+url.QueryEscape(w.bucket)))
ctx := gapic.InsertMetadata(w.ctx, metadata.Pairs("x-goog-request-params", fmt.Sprintf("bucket=projects/_/buckets/%s", url.QueryEscape(w.bucket))))
w.stream, err = w.c.raw.WriteObject(ctx)
if err != nil {
return nil, 0, false, err
Expand Down

0 comments on commit 42a59f5

Please sign in to comment.