Skip to content

storage: problematic dependency resolution with statsΒ #11283

@StephenWithPH

Description

@StephenWithPH

Having upgraded from:

cloud.google.com/go/storage v1.46.0 -> cloud.google.com/go/storage v1.48.0, I get the following error:

<redacted>/go/pkg/mod/cloud.google.com/go/[email protected]/storage.go:264:25: undefined: stats.NewMetrics

This corresponds to:

Metrics: stats.NewMetrics("grpc.client.attempt.duration"),

... and I believe these two imports are in conflict:

"google.golang.org/grpc/experimental/stats"
"google.golang.org/grpc/stats/opentelemetry"

google.golang.org/grpc v1.67.2
google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a

I suspect that somehow, this NewMetrics is getting shadowed by https://pkg.go.dev/google.golang.org/grpc/stats/[email protected] .

For a brief period, I was getting ambiguous import errors pointing at these two packages with go mod tidy. I'm no longer getting those errors, but I still fail to compile.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions