-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: problematic dependency resolution with stats
#11283
Comments
same issue here |
Facing the same issue as well. |
The problem is that Upgrading to the latest |
same issue here. direct removal something has to be changed in |
I created a PR to update the GRPC dependency in all modules: #11284 |
I mean, that change is huge. not sure can be accepted need someone from google to fix this |
Depends, the amount of code changed is minimal (I believe just a singe line of code). The rest is just replacing the current version of the dependency with the newest one and bumping Go everywhere where it's still 1.21 to 1.22 🙂 The new grpc dependency requires at least 1.22. |
ok, updating everything and keeping |
I believe the only (?) issue here is that grpc-go moved some of the symbols that cloud storage was relying upon from our |
@dfawley I'm not sure this solves the issue. In So you still have the problem where if you use both Example go.mod: module testmodule
go 1.22
require (
cloud.google.com/go/storage v1.48.0
google.golang.org/grpc v1.69.0
) Then call
The only solution seems to be to stick with an older version of |
@fasmat Thanks for confirming that the change above will not fully fix things. This document seems to indicate that such an operation is possible and valid, but it's missing details on how to perform the removal -- it just refers to the "adding a module" instructions and how to actually do it correctly is left as an exercise for the reader. In particular, splitting a module requires adding a dependency from the new module to a new version of the existing module, but when joining modules, I can't add a dependency to the removed module, since no module exists there anymore. So for now I'm not sure how to properly remove a module and move its packages to its parent module. (If it is possible as the wiki suggests.) I'll keep working on this. |
Hey all, apologies for the issue here, we are working to fix this ASAP. There is a workaround that should unblock compilation and
Let me know if this resolves this issue. |
It avoids the dependency resolution failing at least, for the repositories I've tried. The non-manual way is |
@tritone @zasweq Is it possible to just add the Also, anything that imported the missing module will be unable to upgrade to gRPC-go 1.69: |
My plan is to do the opposite. Pull the module into grpc-go v1.67.x and v1.68.x, so it's like it never existed. Then googleapis can upgrade its version to those and everything should work moving forward, too. I was hoping we could actually find a way to do this that worked automagically, just like how you can split modules without any coordination. But no such approach seems possible, and https://go.dev/wiki/Modules#is-it-possible-to-remove-a-module-from-a-multi-module-repository should really be updated to say "no, not really" instead of "yes, just do the opposite of the above". |
@dfawley You are probably already aware, but I wanted to get confirmation that I understand the plan for my colleagues. However:
So after you have merged #7935 and released grpc-go v1.67.3(?) , cloud.google.com/go/storage will need to update to that (not v1.68.x) and then cut a new release (maybe v1.50.0 since v1.49.0 release already has a PR for it and appears to be in progress). Then people can update to grpc-go v1.67.3(?) or cloud.google.com/go/storage v1.50.0(?) and not have an ambiguous update. In January, cloud.google.com/go/storage can update to Go 1.22 and updating to grpc-go v1.69.x+ becomes unblocked. In the meantime, |
@StevenACoffman I believe you summarized this well, yes. |
This reverts commit b3ce3b8. and commit 9a78ef5. There is an issue with the cloud.google.com/go/storage dependency details here: googleapis/google-cloud-go#11283 (comment)
Please file a bug in go-control-plane. That issue is unrelated. envoyproxy/go-control-plane#714 probably didn't follow the right steps for splitting modules: https://go.dev/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository |
Ugh. I'll open a new issue here as well to track resolution, since it blocks updates for storage as well as other clients which have this as an indirect dependency (spanner, bigtable). |
Follow along here: #11344 |
This updates all of the go modules. I had to manually run these workarounds for the first time before make go-update and make go-tidy would work: - googleapis/google-cloud-go#11283 (comment) - googleapis/google-cloud-go#11344
This updates all of the go modules. I had to manually run these workarounds for the first time before make go-update and make go-tidy would work: - googleapis/google-cloud-go#11283 (comment) - googleapis/google-cloud-go#11344
This updates all of the go modules. I had to manually run these workarounds for the first time before make go-update and make go-tidy would work: - googleapis/google-cloud-go#11283 (comment) - googleapis/google-cloud-go#11344
Since grpc removed `google.golang.org/grpc/stats/opentelemetry` dependency but go mod has not picked this up, we needed to remove the indirect dependency manually. More details are available here googleapis/google-cloud-go#11283
Since grpc removed `google.golang.org/grpc/stats/opentelemetry` dependency but go mod has not picked this up, we needed to remove the indirect dependency manually. More details are available here googleapis/google-cloud-go#11283
Unclear why this happens only when I use a go workspace, but there's some underlying problem here. googleapis/google-cloud-go#11283
Add exclude google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a to go.mod according to googleapis/google-cloud-go#11283 (comment) . This fixes the following strange issue on `make vendor-update`: cloud.google.com/go/storage imports google.golang.org/grpc/stats/opentelemetry: ambiguous import: found package google.golang.org/grpc/stats/opentelemetry in multiple modules: google.golang.org/grpc v1.69.0 (/go/pkg/mod/google.golang.org/grpc@v1.69.0/stats/opentelemetry) google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a (/go/pkg/mod/google.golang.org/grpc/stats/opentelemetry@v0.0.0-20240907200651-3ffb98b2c93a)
Add exclude google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a to go.mod according to googleapis/google-cloud-go#11283 (comment) . This fixes the following strange issue on `make vendor-update`: cloud.google.com/go/storage imports google.golang.org/grpc/stats/opentelemetry: ambiguous import: found package google.golang.org/grpc/stats/opentelemetry in multiple modules: google.golang.org/grpc v1.69.0 (/go/pkg/mod/google.golang.org/grpc@v1.69.0/stats/opentelemetry) google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a (/go/pkg/mod/google.golang.org/grpc/stats/opentelemetry@v0.0.0-20240907200651-3ffb98b2c93a)
#3030 failed to update indexer due to problematic dependency resolution. Following googleapis/google-cloud-go#11283 (comment) to resolve it. Change contains: [cloud.google.com/go/storage](https://redirect.github.com/googleapis/google-cloud-go) v1.48.0 -> v1.50.0 [github.com/go-git/go-git/v5](https://redirect.github.com/go-git/go-git) v5.13.0 -> v5.13.1 [google.golang.org/api](https://redirect.github.com/googleapis/google-api-go-client) v0.214.0 -> v0.216.0 --------- Co-authored-by: Mend Renovate <bot@renovateapp.com>
Add exclude google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a to go.mod according to googleapis/google-cloud-go#11283 (comment) . This fixes the following strange issue on `make vendor-update`: cloud.google.com/go/storage imports google.golang.org/grpc/stats/opentelemetry: ambiguous import: found package google.golang.org/grpc/stats/opentelemetry in multiple modules: google.golang.org/grpc v1.69.0 (/go/pkg/mod/google.golang.org/grpc@v1.69.0/stats/opentelemetry) google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a (/go/pkg/mod/google.golang.org/grpc/stats/opentelemetry@v0.0.0-20240907200651-3ffb98b2c93a)
) * fix(grpc): update to fix ambiguous imports caused by grpc modules full context in googleapis/google-cloud-go#11283 * fix(grpc): related dependency fixes for the grpc stats/opentelemetry issue * go mod tidy, go work sync * fix: remove toolchain lines * update cncf/xds/go, which just fixed the stats/opentelemetry mixup * and grpc/examples, too. 🤦 * mod tidy * go work sync * missed a few mod tidys
Having upgraded from:
cloud.google.com/go/storage v1.46.0
->cloud.google.com/go/storage v1.48.0
, I get the following error:This corresponds to:
google-cloud-go/storage/storage.go
Line 264 in d95c86d
... and I believe these two imports are in conflict:
google-cloud-go/storage/storage.go
Lines 56 to 57 in d95c86d
google-cloud-go/storage/go.mod
Lines 26 to 27 in d95c86d
I suspect that somehow, this
NewMetrics
is getting shadowed by https://pkg.go.dev/google.golang.org/grpc/stats/opentelemetry@v0.0.0-20241028142157-ada6787961b3 .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.The text was updated successfully, but these errors were encountered: