From 5c0da44055728454ed53c327383a8c44ebeb3c61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 02:46:44 +0000 Subject: [PATCH] chore(deps): Bump cloud.google.com/go/storage Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.62.1 to 1.62.2. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/storage/v1.62.1...storage/v1.62.2) --- updated-dependencies: - dependency-name: cloud.google.com/go/storage dependency-version: 1.62.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- ci/resources/stemcell-version-bump/go.mod | 2 +- ci/resources/stemcell-version-bump/go.sum | 4 +- .../cloud.google.com/go/storage/CHANGES.md | 18 ++ .../go/storage/grpc_client.go | 22 ++- .../go/storage/grpc_reader_multi_range.go | 164 +++++++++++++++-- .../storage/internal/apiv2/storage_client.go | 172 +++++++++++++++++- .../internal/apiv2/storagepb/storage.pb.go | 2 +- .../apiv2/storagepb/storage_grpc.pb.go | 2 +- .../go/storage/internal/version.go | 2 +- .../cloud.google.com/go/storage/reader.go | 5 +- .../cloud.google.com/go/storage/storage.go | 3 + .../stemcell-version-bump/vendor/modules.txt | 2 +- 12 files changed, 364 insertions(+), 34 deletions(-) diff --git a/ci/resources/stemcell-version-bump/go.mod b/ci/resources/stemcell-version-bump/go.mod index ddd39e05..d4769068 100644 --- a/ci/resources/stemcell-version-bump/go.mod +++ b/ci/resources/stemcell-version-bump/go.mod @@ -3,7 +3,7 @@ module stemcell-version-bump go 1.25.0 require ( - cloud.google.com/go/storage v1.62.1 + cloud.google.com/go/storage v1.62.2 github.com/stretchr/testify v1.11.1 google.golang.org/api v0.277.0 ) diff --git a/ci/resources/stemcell-version-bump/go.sum b/ci/resources/stemcell-version-bump/go.sum index ad888b69..038ab977 100644 --- a/ci/resources/stemcell-version-bump/go.sum +++ b/ci/resources/stemcell-version-bump/go.sum @@ -16,8 +16,8 @@ cloud.google.com/go/longrunning v0.9.0 h1:0EzbDEGsAvOZNbqXopgniY0w0a1phvu5IdUFq8 cloud.google.com/go/longrunning v0.9.0/go.mod h1:pkTz846W7bF4o2SzdWJ40Hu0Re+UoNT6Q5t+igIcb8E= cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE= cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI= -cloud.google.com/go/storage v1.62.1 h1:Os0G3XbUbjZumkpDUf2Y0rLoXJTCF1kU2kWUujKYXD8= -cloud.google.com/go/storage v1.62.1/go.mod h1:cpYz/kRVZ+UQAF1uHeea10/9ewcRbxGoGNKsS9daSXA= +cloud.google.com/go/storage v1.62.2 h1:WgR4U9n7bIzXkkVnwPKKE8bkaKUNsHG+0MAAlh9DGU4= +cloud.google.com/go/storage v1.62.2/go.mod h1:cpYz/kRVZ+UQAF1uHeea10/9ewcRbxGoGNKsS9daSXA= cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U= cloud.google.com/go/trace v1.11.7/go.mod h1:TNn9d5V3fQVf6s4SCveVMIBS2LJUqo73GACmq/Tky0s= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 h1:DHa2U07rk8syqvCge0QIGMCE1WxGj9njT44GH7zNJLQ= diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/CHANGES.md b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/CHANGES.md index 9ccbb914..fd5247f7 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/CHANGES.md +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/CHANGES.md @@ -1,6 +1,18 @@ # Changes +## [1.62.2](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.62.2) (2026-05-18) + +### Features + +* enable open telemetry attrs (#14426) ([74eab64](https://github.com/googleapis/google-cloud-go/commit/74eab64d1b4e22d8c79b0de4e5fc9a36bc4c6c19)) + +### Bug Fixes + +* Set default chunkRetryDeadline to 32s in NewWriterFromAppendableObject (#14458) ([ec7c7d6](https://github.com/googleapis/google-cloud-go/commit/ec7c7d66eb0bf6e52a3ae1f529cb8e5de6f8dc86)) +* refactor userProject metadata propagation in ListObjects (#14533) ([fbb543e](https://github.com/googleapis/google-cloud-go/commit/fbb543e3bb0d9b45c8e9aa167b6551c154f23169)) +* restore metadata operations timeout in gRPC (#14575) ([275ff56](https://github.com/googleapis/google-cloud-go/commit/275ff562aee8c0201b9e5bf2913bb85bcdbe947a)) + ## [1.62.1](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.62.1) (2026-04-13) ### Bug Fixes @@ -70,6 +82,12 @@ * Update documentation for `BidiReadObject`, `ReadObjectRequest`, and `ObjectContexts` ([611f239](https://github.com/googleapis/google-cloud-go/commit/611f239219225fb03f6475c7238f497a349961e2)) +## [1.59.3](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.59.3) (2026-05-05) + +### Bug Fixes + +* handle MRD hang corner case (#14509) ([1ca3b6f](https://github.com/googleapis/google-cloud-go/commit/1ca3b6f02d35f87c336e34358e16985557c7fd58)) + ## [1.59.2](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.59.2) (2026-01-28) ### Bug Fixes diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_client.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_client.go index 19c8d701..8801d66c 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_client.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_client.go @@ -156,7 +156,7 @@ func newGRPCStorageClient(ctx context.Context, opts ...storageOption) (*grpcStor s := initSettings(opts...) s.clientOption = append(defaultGRPCOptions(), s.clientOption...) // Disable all gax-level retries in favor of retry logic in the veneer client. - s.gax = append(s.gax, gax.WithRetry(nil), gax.WithTimeout(0)) + s.gax = append(s.gax, gax.WithRetry(nil)) config := newStorageConfig(s.clientOption...) if config.readAPIWasSet { @@ -187,10 +187,23 @@ func newGRPCStorageClient(ctx context.Context, opts ...storageOption) (*grpcStor if err != nil { return nil, err } + configureStreamingTimeouts(g) c.raw = g return c, nil } +// configureStreamingTimeouts explicitly overrides default call timeouts to 0 (unbounded) +// for all generated payload streaming RPCs. This guarantees that long-running data reads +// and writes are not prematurely aborted by default transport deadlines, while allowing +// all transactional and metadata/unary operations to retain their safety deadlines. +func configureStreamingTimeouts(g *gapic.Client) { + g.CallOptions.ReadObject = append(g.CallOptions.ReadObject, gax.WithTimeout(0)) + g.CallOptions.WriteObject = append(g.CallOptions.WriteObject, gax.WithTimeout(0)) + g.CallOptions.BidiReadObject = append(g.CallOptions.BidiReadObject, gax.WithTimeout(0)) + g.CallOptions.BidiWriteObject = append(g.CallOptions.BidiWriteObject, gax.WithTimeout(0)) + g.CallOptions.CancelResumableWrite = append(g.CallOptions.CancelResumableWrite, gax.WithTimeout(0)) +} + func (c *grpcStorageClient) routingInterceptors() (grpc.UnaryClientInterceptor, grpc.StreamClientInterceptor) { unary := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { ctx, err := c.prepareDirectPathMetadata(ctx, cc.Target()) @@ -536,6 +549,9 @@ func (c *grpcStorageClient) LockBucketRetentionPolicy(ctx context.Context, bucke } func (c *grpcStorageClient) ListObjects(ctx context.Context, bucket string, q *Query, opts ...storageOption) *ObjectIterator { s := callSettings(c.settings, opts...) + if s.userProject != "" { + ctx = setUserProjectMetadata(ctx, s.userProject) + } it := &ObjectIterator{ ctx: ctx, } @@ -556,9 +572,6 @@ func (c *grpcStorageClient) ListObjects(ctx context.Context, bucket string, q *Q IncludeFoldersAsPrefixes: it.query.IncludeFoldersAsPrefixes, Filter: it.query.Filter, } - if s.userProject != "" { - ctx = setUserProjectMetadata(ctx, s.userProject) - } fetch := func(pageSize int, pageToken string) (token string, err error) { // Add trace span around List API call within the fetch. ctx, _ = startSpan(ctx, "grpcStorageClient.ObjectsListCall") @@ -567,7 +580,6 @@ func (c *grpcStorageClient) ListObjects(ctx context.Context, bucket string, q *Q var gitr *gapic.ObjectIterator err = run(it.ctx, func(ctx context.Context) error { gitr = c.raw.ListObjects(ctx, req, s.gax...) - it.ctx = ctx objects, token, err = gitr.InternalFetch(pageSize, pageToken) return err }, s.retry, s.idempotent) diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go index 11f96afd..db33098f 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/grpc_reader_multi_range.go @@ -335,8 +335,7 @@ func (c *mrdAddStreamErrorCmd) apply(ctx context.Context, m *multiRangeDownloade } else { err = errors.New("no streams available") } - m.setPermanentError(err) - m.failAllPending(m.getPermanentError()) + m.failManager(err) } } @@ -433,6 +432,13 @@ func (m *multiRangeDownloaderManager) add(output io.Writer, offset, length int64 } func (m *multiRangeDownloaderManager) close(err error) error { + if m.ctx.Err() != nil { + m.wg.Wait() + if pErr := m.getPermanentError(); pErr != nil { + return pErr + } + return m.ctx.Err() + } cmd := &mrdCloseCmd{err: err} select { case m.cmds <- cmd: @@ -452,6 +458,10 @@ func (m *multiRangeDownloaderManager) close(err error) error { } func (m *multiRangeDownloaderManager) wait() { + if err := m.ctx.Err(); err != nil { + m.callbackWg.Wait() + return + } doneC := make(chan struct{}) cmd := &mrdWaitCmd{doneC: doneC} select { @@ -476,7 +486,9 @@ func (m *multiRangeDownloaderManager) getHandle() []byte { case <-m.ctx.Done(): return nil } - + if err := m.ctx.Err(); err != nil { + return nil + } respC := make(chan []byte, 1) cmd := &mrdGetHandleCmd{respC: respC} select { @@ -536,6 +548,9 @@ func (m *multiRangeDownloaderManager) eventLoop() { defer m.cleanup() for { + if m.ctx.Err() != nil { + return + } var nextReq *storagepb.BidiReadObjectRequest var nextRangeReq *rangeRequest var targetStream *mrdStream @@ -603,10 +618,18 @@ func (m *multiRangeDownloaderManager) cleanup() { } // Drain and free any remaining responses to prevent buffer leaks. - close(m.sessionResps) - for result := range m.sessionResps { - if result.decoder != nil { - result.decoder.databufs.Free() +sessionDrainLoop: + for { + select { + case result, ok := <-m.sessionResps: + if !ok { + break sessionDrainLoop + } + if result.decoder != nil { + result.decoder.databufs.Free() + } + default: + break sessionDrainLoop } } @@ -624,6 +647,39 @@ func (m *multiRangeDownloaderManager) cleanup() { close(waiter) } m.attrsOnce.Do(func() { close(m.attrsReady) }) + // Complete any commands leftover in cmds channel. +cmdDrainLoop: + for { + select { + case cmd, ok := <-m.cmds: + if !ok { + break cmdDrainLoop + } + // Parse type of command. + switch cmd := cmd.(type) { + case *mrdCloseCmd: + case *mrdWaitCmd: + close(cmd.doneC) + case *mrdAddCmd: + m.runCallback(cmd.offset, cmd.length, finalErr, cmd.callback) + case *mrdGetHandleCmd: + // Non-blocking send of handle if attributes are ready, otherwise close. + select { + case <-m.attrsReady: + select { + case cmd.respC <- m.lastReadHandle: + default: + close(cmd.respC) + } + default: + close(cmd.respC) + } + } + default: + break cmdDrainLoop + } + } + // Wait for all callbacks (including any initiated by the drained command) to finish. m.callbackWg.Wait() } @@ -779,12 +835,17 @@ func (m *multiRangeDownloaderManager) handleAddCmd(ctx context.Context, cmd *mrd return } } + if m.attrs != nil && req.length == 0 { + req.length = m.attrs.Size - req.offset + } m.unsentRequests.PushBack(req) } func (m *multiRangeDownloaderManager) shouldAddStream() bool { - if m.streamCreating || len(m.streams) >= m.params.maxConnections { + if m.ctx.Err() != nil || + m.streamCreating || + len(m.streams) >= m.params.maxConnections { return false } if len(m.streams) < m.params.minConnections { @@ -843,6 +904,25 @@ func (m *multiRangeDownloaderManager) handleWaitCmd(ctx context.Context, cmd *mr } func (m *multiRangeDownloaderManager) handleAddStreamCmd(ctx context.Context, cmd *addStreamCmd) { + // Check for any error in stream before adding this stream. + var streamErr error + if cmd.stream != nil && cmd.stream.session != nil { + streamErr = cmd.stream.session.getError() + } + + if cmd.stream == nil || + cmd.stream.session == nil || + streamErr != nil { + m.streamCreating = false + if len(m.streams) == 0 { + err := streamErr + if err == nil { + err = errors.New("no streams available: stream creation failed or has error") + } + m.failManager(err) + } + return + } m.streams[cmd.id] = cmd.stream if cmd.spec != nil { m.readSpec = cmd.spec @@ -860,13 +940,23 @@ func (m *multiRangeDownloaderManager) handleReconnectStreamCmd(ctx context.Conte return } stream.reconnecting = false - - if cmd.err != nil { - m.failStream(stream, cmd.err) + var streamErr error + if cmd.session != nil { + streamErr = cmd.session.getError() + } + if cmd.err != nil || + cmd.session == nil || + streamErr != nil { + finalErr := cmd.err + if finalErr == nil && cmd.session == nil { + finalErr = errors.New("session nil for reconnected stream") + } else if finalErr == nil { + finalErr = streamErr + } + m.failStream(stream, finalErr) if len(m.streams) == 0 && !m.streamCreating { - err := fmt.Errorf("no streams available. Last observed error: %w", cmd.err) - m.setPermanentError(err) - m.failAllPending(m.getPermanentError()) + err := fmt.Errorf("no streams available. Last observed error: %w", finalErr) + m.failManager(err) } return } @@ -1034,8 +1124,7 @@ func (m *multiRangeDownloaderManager) handleStreamEnd(result mrdSessionResult, s m.failStream(stream, err) if len(m.streams) == 0 && !m.streamCreating { err := fmt.Errorf("no streams available. Last observed error: %w", err) - m.setPermanentError(err) - m.failAllPending(m.getPermanentError()) + m.failManager(err) } } } @@ -1101,6 +1190,12 @@ func (m *multiRangeDownloaderManager) setPermanentError(err error) { } } +func (m *multiRangeDownloaderManager) failManager(err error) { + m.setPermanentError(err) + m.failAllPending(m.getPermanentError()) + m.cancel() +} + // --- bidiReadStreamSession --- // Controls lifespan of an individual bi-directional gRPC stream to the // object in GCS. Spins up goroutines for the read and write sides of the @@ -1121,8 +1216,12 @@ type bidiReadStreamSession struct { respC chan<- mrdSessionResult wg sync.WaitGroup - errOnce sync.Once - streamErr error + // To make manualShutdown and streamErr fields thread-safe + // as it can be accessed by both event loop and receive loop. + mu sync.RWMutex + errOnce sync.Once + streamErr error + manualShutdown bool } func newBidiReadStreamSession(ctx context.Context, id int, respC chan<- mrdSessionResult, client *grpcStorageClient, settings *settings, params *newMultiRangeDownloaderParams, readSpec *storagepb.BidiReadObjectSpec) (*bidiReadStreamSession, error) { @@ -1177,14 +1276,26 @@ func (s *bidiReadStreamSession) SendRequest(req *storagepb.BidiReadObjectRequest } } func (s *bidiReadStreamSession) Shutdown() { + s.mu.Lock() + s.manualShutdown = true + s.mu.Unlock() + s.cancel() s.wg.Wait() + s.setError(s.ctx.Err()) } func (s *bidiReadStreamSession) setError(err error) { s.errOnce.Do(func() { + s.mu.Lock() + defer s.mu.Unlock() s.streamErr = err }) } +func (s *bidiReadStreamSession) getError() error { + s.mu.RLock() + defer s.mu.RUnlock() + return s.streamErr +} func (s *bidiReadStreamSession) sendLoop() { defer s.wg.Done() defer s.stream.CloseSend() @@ -1224,6 +1335,13 @@ func (s *bidiReadStreamSession) receiveLoop() { if err != nil { databufs.Free() + s.mu.RLock() + isManual := s.manualShutdown + s.mu.RUnlock() + if isManual { + return + } + redirectErr, isRedirect := isRedirectError(err) result := mrdSessionResult{ err: err, @@ -1257,9 +1375,17 @@ func (s *bidiReadStreamSession) receiveLoop() { }: case <-s.ctx.Done(): + s.mu.RLock() + isManual := s.manualShutdown + s.mu.RUnlock() + if isManual { + databufs.Free() + return + } + // If context is cancelled unexpectedly, make sure to notify // eventLoop before returning - err := s.streamErr + err := s.getError() if err == nil { err = s.ctx.Err() } diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go index 3287701f..54b39646 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go @@ -29,6 +29,7 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" gax "github.com/googleapis/gax-go/v2" + "github.com/googleapis/gax-go/v2/callctx" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -985,6 +986,16 @@ type gRPCClient struct { // any other character (no special directory semantics). func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := defaultGRPCClientOptions() + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + clientOpts = append(clientOpts, internaloption.WithTelemetryAttributes(map[string]string{ + "gcp.client.service": "storage", + "gcp.client.version": getVersionClient(), + "gcp.client.repo": "googleapis/google-cloud-go", + "gcp.client.artifact": "cloud.google.com/go/storage/internal/apiv2", + "gcp.client.language": "go", + "url.domain": "storage.googleapis.com", + })) + } if newClientHook != nil { hookOpts, err := newClientHook(ctx, clientHookParams{}) if err != nil { @@ -1006,6 +1017,43 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() + if gax.IsFeatureEnabled("METRICS") { + metrics := gax.NewClientMetrics( + gax.WithTelemetryLogger(c.logger), + gax.WithTelemetryAttributes(map[string]string{ + gax.ClientService: "storage", + gax.ClientVersion: getVersionClient(), + gax.ClientArtifact: "cloud.google.com/go/storage/internal/apiv2", + gax.RPCSystem: "grpc", + gax.URLDomain: "storage.googleapis.com", + }), + ) + + client.CallOptions.DeleteBucket = append(client.CallOptions.DeleteBucket, gax.WithClientMetrics(metrics)) + client.CallOptions.GetBucket = append(client.CallOptions.GetBucket, gax.WithClientMetrics(metrics)) + client.CallOptions.CreateBucket = append(client.CallOptions.CreateBucket, gax.WithClientMetrics(metrics)) + client.CallOptions.ListBuckets = append(client.CallOptions.ListBuckets, gax.WithClientMetrics(metrics)) + client.CallOptions.LockBucketRetentionPolicy = append(client.CallOptions.LockBucketRetentionPolicy, gax.WithClientMetrics(metrics)) + client.CallOptions.GetIamPolicy = append(client.CallOptions.GetIamPolicy, gax.WithClientMetrics(metrics)) + client.CallOptions.SetIamPolicy = append(client.CallOptions.SetIamPolicy, gax.WithClientMetrics(metrics)) + client.CallOptions.TestIamPermissions = append(client.CallOptions.TestIamPermissions, gax.WithClientMetrics(metrics)) + client.CallOptions.UpdateBucket = append(client.CallOptions.UpdateBucket, gax.WithClientMetrics(metrics)) + client.CallOptions.ComposeObject = append(client.CallOptions.ComposeObject, gax.WithClientMetrics(metrics)) + client.CallOptions.DeleteObject = append(client.CallOptions.DeleteObject, gax.WithClientMetrics(metrics)) + client.CallOptions.RestoreObject = append(client.CallOptions.RestoreObject, gax.WithClientMetrics(metrics)) + client.CallOptions.CancelResumableWrite = append(client.CallOptions.CancelResumableWrite, gax.WithClientMetrics(metrics)) + client.CallOptions.GetObject = append(client.CallOptions.GetObject, gax.WithClientMetrics(metrics)) + client.CallOptions.ReadObject = append(client.CallOptions.ReadObject, gax.WithClientMetrics(metrics)) + client.CallOptions.BidiReadObject = append(client.CallOptions.BidiReadObject, gax.WithClientMetrics(metrics)) + client.CallOptions.UpdateObject = append(client.CallOptions.UpdateObject, gax.WithClientMetrics(metrics)) + client.CallOptions.WriteObject = append(client.CallOptions.WriteObject, gax.WithClientMetrics(metrics)) + client.CallOptions.BidiWriteObject = append(client.CallOptions.BidiWriteObject, gax.WithClientMetrics(metrics)) + client.CallOptions.ListObjects = append(client.CallOptions.ListObjects, gax.WithClientMetrics(metrics)) + client.CallOptions.RewriteObject = append(client.CallOptions.RewriteObject, gax.WithClientMetrics(metrics)) + client.CallOptions.StartResumableWrite = append(client.CallOptions.StartResumableWrite, gax.WithClientMetrics(metrics)) + client.CallOptions.QueryWriteStatus = append(client.CallOptions.QueryWriteStatus, gax.WithClientMetrics(metrics)) + client.CallOptions.MoveObject = append(client.CallOptions.MoveObject, gax.WithClientMetrics(metrics)) + } client.internalClient = c @@ -1051,6 +1099,12 @@ func (c *gRPCClient) DeleteBucket(ctx context.Context, req *storagepb.DeleteBuck hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetName())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/DeleteBucket") + } opts = append((*c.CallOptions).DeleteBucket[0:len((*c.CallOptions).DeleteBucket):len((*c.CallOptions).DeleteBucket)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error @@ -1074,6 +1128,12 @@ func (c *gRPCClient) GetBucket(ctx context.Context, req *storagepb.GetBucketRequ hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetName())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/GetBucket") + } opts = append((*c.CallOptions).GetBucket[0:len((*c.CallOptions).GetBucket):len((*c.CallOptions).GetBucket)], opts...) var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1104,6 +1164,12 @@ func (c *gRPCClient) CreateBucket(ctx context.Context, req *storagepb.CreateBuck hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetParent())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/CreateBucket") + } opts = append((*c.CallOptions).CreateBucket[0:len((*c.CallOptions).CreateBucket):len((*c.CallOptions).CreateBucket)], opts...) var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1131,9 +1197,15 @@ func (c *gRPCClient) ListBuckets(ctx context.Context, req *storagepb.ListBuckets hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetParent())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/ListBuckets") + } opts = append((*c.CallOptions).ListBuckets[0:len((*c.CallOptions).ListBuckets):len((*c.CallOptions).ListBuckets)], opts...) it := &BucketIterator{} - req = proto.Clone(req).(*storagepb.ListBucketsRequest) + req = proto.CloneOf(req) it.InternalFetch = func(pageSize int, pageToken string) ([]*storagepb.Bucket, string, error) { resp := &storagepb.ListBucketsResponse{} if pageToken != "" { @@ -1186,6 +1258,12 @@ func (c *gRPCClient) LockBucketRetentionPolicy(ctx context.Context, req *storage hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/LockBucketRetentionPolicy") + } opts = append((*c.CallOptions).LockBucketRetentionPolicy[0:len((*c.CallOptions).LockBucketRetentionPolicy):len((*c.CallOptions).LockBucketRetentionPolicy)], opts...) var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1216,6 +1294,12 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetResource())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/GetIamPolicy") + } opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1246,6 +1330,12 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetResource())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/SetIamPolicy") + } opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1279,6 +1369,12 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetResource())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/TestIamPermissions") + } opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1306,6 +1402,9 @@ func (c *gRPCClient) UpdateBucket(ctx context.Context, req *storagepb.UpdateBuck hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/UpdateBucket") + } opts = append((*c.CallOptions).UpdateBucket[0:len((*c.CallOptions).UpdateBucket):len((*c.CallOptions).UpdateBucket)], opts...) var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1333,6 +1432,12 @@ func (c *gRPCClient) ComposeObject(ctx context.Context, req *storagepb.ComposeOb hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetKmsKey())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/ComposeObject") + } opts = append((*c.CallOptions).ComposeObject[0:len((*c.CallOptions).ComposeObject):len((*c.CallOptions).ComposeObject)], opts...) var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1360,6 +1465,12 @@ func (c *gRPCClient) DeleteObject(ctx context.Context, req *storagepb.DeleteObje hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/DeleteObject") + } opts = append((*c.CallOptions).DeleteObject[0:len((*c.CallOptions).DeleteObject):len((*c.CallOptions).DeleteObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error @@ -1383,6 +1494,12 @@ func (c *gRPCClient) RestoreObject(ctx context.Context, req *storagepb.RestoreOb hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/RestoreObject") + } opts = append((*c.CallOptions).RestoreObject[0:len((*c.CallOptions).RestoreObject):len((*c.CallOptions).RestoreObject)], opts...) var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1410,6 +1527,9 @@ func (c *gRPCClient) CancelResumableWrite(ctx context.Context, req *storagepb.Ca hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/CancelResumableWrite") + } opts = append((*c.CallOptions).CancelResumableWrite[0:len((*c.CallOptions).CancelResumableWrite):len((*c.CallOptions).CancelResumableWrite)], opts...) var resp *storagepb.CancelResumableWriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1437,6 +1557,12 @@ func (c *gRPCClient) GetObject(ctx context.Context, req *storagepb.GetObjectRequ hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/GetObject") + } opts = append((*c.CallOptions).GetObject[0:len((*c.CallOptions).GetObject):len((*c.CallOptions).GetObject)], opts...) var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1464,6 +1590,12 @@ func (c *gRPCClient) ReadObject(ctx context.Context, req *storagepb.ReadObjectRe hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/ReadObject") + } opts = append((*c.CallOptions).ReadObject[0:len((*c.CallOptions).ReadObject):len((*c.CallOptions).ReadObject)], opts...) var resp storagepb.Storage_ReadObjectClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1481,6 +1613,9 @@ func (c *gRPCClient) ReadObject(ctx context.Context, req *storagepb.ReadObjectRe func (c *gRPCClient) BidiReadObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_BidiReadObjectClient, error) { ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/BidiReadObject") + } var resp storagepb.Storage_BidiReadObjectClient opts = append((*c.CallOptions).BidiReadObject[0:len((*c.CallOptions).BidiReadObject):len((*c.CallOptions).BidiReadObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1510,6 +1645,9 @@ func (c *gRPCClient) UpdateObject(ctx context.Context, req *storagepb.UpdateObje hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/UpdateObject") + } opts = append((*c.CallOptions).UpdateObject[0:len((*c.CallOptions).UpdateObject):len((*c.CallOptions).UpdateObject)], opts...) var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1525,6 +1663,9 @@ func (c *gRPCClient) UpdateObject(ctx context.Context, req *storagepb.UpdateObje func (c *gRPCClient) WriteObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_WriteObjectClient, error) { ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/WriteObject") + } var resp storagepb.Storage_WriteObjectClient opts = append((*c.CallOptions).WriteObject[0:len((*c.CallOptions).WriteObject):len((*c.CallOptions).WriteObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1542,6 +1683,9 @@ func (c *gRPCClient) WriteObject(ctx context.Context, opts ...gax.CallOption) (s func (c *gRPCClient) BidiWriteObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_BidiWriteObjectClient, error) { ctx = gax.InsertMetadataIntoOutgoingContext(ctx, c.xGoogHeaders...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/BidiWriteObject") + } var resp storagepb.Storage_BidiWriteObjectClient opts = append((*c.CallOptions).BidiWriteObject[0:len((*c.CallOptions).BidiWriteObject):len((*c.CallOptions).BidiWriteObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1571,9 +1715,15 @@ func (c *gRPCClient) ListObjects(ctx context.Context, req *storagepb.ListObjects hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetParent())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/ListObjects") + } opts = append((*c.CallOptions).ListObjects[0:len((*c.CallOptions).ListObjects):len((*c.CallOptions).ListObjects)], opts...) it := &ObjectIterator{} - req = proto.Clone(req).(*storagepb.ListObjectsRequest) + req = proto.CloneOf(req) it.InternalFetch = func(pageSize int, pageToken string) ([]*storagepb.Object, string, error) { resp := &storagepb.ListObjectsResponse{} if pageToken != "" { @@ -1629,6 +1779,12 @@ func (c *gRPCClient) RewriteObject(ctx context.Context, req *storagepb.RewriteOb hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetDestinationBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/RewriteObject") + } opts = append((*c.CallOptions).RewriteObject[0:len((*c.CallOptions).RewriteObject):len((*c.CallOptions).RewriteObject)], opts...) var resp *storagepb.RewriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1656,6 +1812,9 @@ func (c *gRPCClient) StartResumableWrite(ctx context.Context, req *storagepb.Sta hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/StartResumableWrite") + } opts = append((*c.CallOptions).StartResumableWrite[0:len((*c.CallOptions).StartResumableWrite):len((*c.CallOptions).StartResumableWrite)], opts...) var resp *storagepb.StartResumableWriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1683,6 +1842,9 @@ func (c *gRPCClient) QueryWriteStatus(ctx context.Context, req *storagepb.QueryW hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/QueryWriteStatus") + } opts = append((*c.CallOptions).QueryWriteStatus[0:len((*c.CallOptions).QueryWriteStatus):len((*c.CallOptions).QueryWriteStatus)], opts...) var resp *storagepb.QueryWriteStatusResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -1710,6 +1872,12 @@ func (c *gRPCClient) MoveObject(ctx context.Context, req *storagepb.MoveObjectRe hds = append(c.xGoogHeaders, hds...) ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + if gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "resource_name", fmt.Sprintf("//storage.googleapis.com/%v", req.GetBucket())) + } + if gax.IsFeatureEnabled("METRICS") || gax.IsFeatureEnabled("TRACING") || gax.IsFeatureEnabled("LOGGING") { + ctx = callctx.WithTelemetryContext(ctx, "rpc_method", "google.storage.v2.Storage/MoveObject") + } opts = append((*c.CallOptions).MoveObject[0:len((*c.CallOptions).MoveObject):len((*c.CallOptions).MoveObject)], opts...) var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go index ceb8f4ec..78839a01 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v6.31.0 +// protoc v6.33.2 // source: google/storage/v2/storage.proto package storagepb diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go index f12e2300..bd14d954 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v6.31.0 +// - protoc v6.33.2 // source: google/storage/v2/storage.proto package storagepb diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/version.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/version.go index 8180ba7a..27f817af 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/version.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/internal/version.go @@ -17,4 +17,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.62.1" +const Version = "1.62.2" diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/reader.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/reader.go index 1ba21a21..f0061315 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/reader.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/reader.go @@ -496,11 +496,14 @@ func (mrd *MultiRangeDownloader) Add(output io.Writer, offset, length int64, cal // Close the MultiRangeDownloader. It must be called when done reading. // Adding new ranges after this has been called will cause an error. // -// This will immediately close the stream and can result in a +// This will immediately close the streams and can result in a // "stream closed early" error if a response for a range is still not processed. // Call [MultiRangeDownloader.Wait] to avoid this error. // // If the downloader is in a permanent error state, this will return an error. +// +// This must not be called from the callback sent into Add command otherwise +// it could lead to a deadlock. func (mrd *MultiRangeDownloader) Close() error { err := mrd.impl.close(nil) endSpan(mrd.impl.getSpanCtx(), err) diff --git a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/storage.go b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/storage.go index 5d18e974..62170bd9 100644 --- a/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/storage.go +++ b/ci/resources/stemcell-version-bump/vendor/cloud.google.com/go/storage/storage.go @@ -1305,6 +1305,9 @@ func (o *ObjectHandle) NewWriterFromAppendableObject(ctx context.Context, opts * if w.ChunkSize == 0 { w.ChunkSize = googleapi.DefaultUploadChunkSize } + if w.ChunkRetryDeadline == 0 { + w.ChunkRetryDeadline = defaultWriteChunkRetryDeadline + } err := w.openWriter() if err != nil { return nil, 0, err diff --git a/ci/resources/stemcell-version-bump/vendor/modules.txt b/ci/resources/stemcell-version-bump/vendor/modules.txt index be9df34d..1bec3046 100644 --- a/ci/resources/stemcell-version-bump/vendor/modules.txt +++ b/ci/resources/stemcell-version-bump/vendor/modules.txt @@ -42,7 +42,7 @@ cloud.google.com/go/iam/apiv1/iampb cloud.google.com/go/monitoring/apiv3/v2 cloud.google.com/go/monitoring/apiv3/v2/monitoringpb cloud.google.com/go/monitoring/internal -# cloud.google.com/go/storage v1.62.1 +# cloud.google.com/go/storage v1.62.2 ## explicit; go 1.25.0 cloud.google.com/go/storage cloud.google.com/go/storage/experimental