Skip to content
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

Import error when updating to v0.182.0 #2613

Closed
CoreFloDev opened this issue May 30, 2024 · 6 comments · Fixed by #2614
Closed

Import error when updating to v0.182.0 #2613

CoreFloDev opened this issue May 30, 2024 · 6 comments · Fixed by #2614
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@CoreFloDev
Copy link

Hi,

I got another issue similar to #2543

when I update to v0.182.0, there is:

  • github.com/googleapis/gax-go/v2 v2.12.4 // indirect that break with
error while importing github.com/googleapis/gax-go/v2/apierror/internal/proto: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/code in multiple modules:
	google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 (/home/florent/go/pkg/mod/google.golang.org/genproto@v0.0.0-20200526211855-cb27e3aa2013/googleapis/rpc/code)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e (/home/florent/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20240521202816-d264139d666e/code)
error while importing github.com/googleapis/gax-go/v2/apierror: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/errdetails in multiple modules:
	google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 (/home/florent/go/pkg/mod/google.golang.org/genproto@v0.0.0-20200526211855-cb27e3aa2013/googleapis/rpc/errdetails)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e (/home/florent/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20240521202816-d264139d666e/errdetails)
  • google.golang.org/grpc v1.64.0 // indirect also break with
error while importing google.golang.org/grpc/status: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
	google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 (/home/florent/go/pkg/mod/google.golang.org/genproto@v0.0.0-20200526211855-cb27e3aa2013/googleapis/rpc/status)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e (/home/florent/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20240521202816-d264139d666e/status)

The previous version v0.181.0 is working fine but not that one, do you get why this is happening?

Thanks!

@CoreFloDev CoreFloDev added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 30, 2024
@codyoss
Copy link
Member

codyoss commented May 30, 2024

Can you share your go.mod file?

@CoreFloDev
Copy link
Author

Hey Cody,

Sure it is

go 1.22.3

require (
	github.com/99designs/gqlgen v0.17.47
	github.com/go-chi/chi/v5 v5.0.12
	github.com/go-webauthn/webauthn v0.10.2
	github.com/google/wire v0.6.0
	github.com/jackc/pgx/v5 v5.6.0
	github.com/nicksnyder/go-i18n/v2 v2.4.0
	github.com/vektah/gqlparser/v2 v2.5.12
	golang.org/x/net v0.25.0
	google.golang.org/api v0.182.0
)

require (
	cloud.google.com/go/auth v0.4.2 // indirect
	cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
	cloud.google.com/go/compute/metadata v0.3.0 // indirect
	github.com/agnivade/levenshtein v1.1.1 // indirect
	github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
	github.com/felixge/httpsnoop v1.0.4 // indirect
	github.com/fxamacker/cbor/v2 v2.6.0 // indirect
	github.com/go-logr/logr v1.4.1 // indirect
	github.com/go-logr/stdr v1.2.2 // indirect
	github.com/go-webauthn/x v0.1.9 // indirect
	github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
	github.com/golang/protobuf v1.5.4 // indirect
	github.com/google/go-tpm v0.9.0 // indirect
	github.com/google/s2a-go v0.1.7 // indirect
	github.com/google/uuid v1.6.0 // indirect
	github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
	github.com/googleapis/gax-go/v2 v2.12.4 // indirect
	github.com/gorilla/websocket v1.5.0 // indirect
	github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
	github.com/jackc/pgpassfile v1.0.0 // indirect
	github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
	github.com/jackc/puddle/v2 v2.2.1 // indirect
	github.com/kr/text v0.2.0 // indirect
	github.com/mitchellh/mapstructure v1.5.0 // indirect
	github.com/rogpeppe/go-internal v1.11.0 // indirect
	github.com/russross/blackfriday/v2 v2.1.0 // indirect
	github.com/sosodev/duration v1.3.1 // indirect
	github.com/urfave/cli/v2 v2.27.2 // indirect
	github.com/x448/float16 v0.8.4 // indirect
	github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
	go.opencensus.io v0.24.0 // indirect
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
	go.opentelemetry.io/otel v1.24.0 // indirect
	go.opentelemetry.io/otel/metric v1.24.0 // indirect
	go.opentelemetry.io/otel/trace v1.24.0 // indirect
	golang.org/x/crypto v0.23.0 // indirect
	golang.org/x/mod v0.17.0 // indirect
	golang.org/x/oauth2 v0.20.0 // indirect
	golang.org/x/sync v0.7.0 // indirect
	golang.org/x/sys v0.20.0 // indirect
	golang.org/x/text v0.15.0 // indirect
	golang.org/x/tools v0.21.0 // indirect
	google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 // indirect
	google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect
	google.golang.org/grpc v1.64.0 // indirect
	google.golang.org/protobuf v1.34.1 // indirect
	gopkg.in/yaml.v3 v3.0.1 // indirect
)

@codyoss
Copy link
Member

codyoss commented May 30, 2024

Can you also share a minimal main.go? I am unable to reproduce the error with the go.mod

@CoreFloDev
Copy link
Author

codyoss added a commit to codyoss/google-api-go-client that referenced this issue May 31, 2024
I believe the soure for these issue is opencensus outdated imports
of really old version of our libraries, genproto. Once we drop that
dep we should test removing these workarounds.

Updates: googleapis#2559
Fixes: googleapis#2613
@codyoss
Copy link
Member

codyoss commented May 31, 2024

Opened a PR that should help with this issue in the short term. I think once we drop some old deps in the future this will go away.

gcf-merge-on-green bot pushed a commit that referenced this issue May 31, 2024
I believe the soure for these issue is opencensus outdated imports of really old version of our libraries, genproto. Once we drop that dep we should test removing these workarounds.

Updates: #2559
Fixes: #2613
gcf-merge-on-green bot pushed a commit that referenced this issue Jun 4, 2024
🤖 I have created a release *beep* *boop*
---


## [0.183.0](https://togithub.com/googleapis/google-api-go-client/compare/v0.182.0...v0.183.0) (2024-06-04)


### Features

* **all:** Auto-regenerate discovery clients ([#2611](https://togithub.com/googleapis/google-api-go-client/issues/2611)) ([1de148b](https://togithub.com/googleapis/google-api-go-client/commit/1de148b049cad72efb924df7f3435bcbca7d214f))
* **all:** Auto-regenerate discovery clients ([#2616](https://togithub.com/googleapis/google-api-go-client/issues/2616)) ([5f21214](https://togithub.com/googleapis/google-api-go-client/commit/5f21214e2284f5162d89383f528326325091796c))
* **all:** Auto-regenerate discovery clients ([#2617](https://togithub.com/googleapis/google-api-go-client/issues/2617)) ([08fdd71](https://togithub.com/googleapis/google-api-go-client/commit/08fdd71cae0bbfd16ed7e13a00c8bc7dd596ce94))
* **all:** Auto-regenerate discovery clients ([#2619](https://togithub.com/googleapis/google-api-go-client/issues/2619)) ([c7f1614](https://togithub.com/googleapis/google-api-go-client/commit/c7f161413cf50b50db98ba483afc2f2344e0896f))
* **all:** Auto-regenerate discovery clients ([#2622](https://togithub.com/googleapis/google-api-go-client/issues/2622)) ([0077748](https://togithub.com/googleapis/google-api-go-client/commit/007774894a48d24634ace7b9e09def4d61433f7f))


### Bug Fixes

* Add another temporary dep on genproto ([#2614](https://togithub.com/googleapis/google-api-go-client/issues/2614)) ([4f98211](https://togithub.com/googleapis/google-api-go-client/commit/4f9821115b5b14b2a32a4cdcbbb84bed018dac2c)), refs [#2559](https://togithub.com/googleapis/google-api-go-client/issues/2559) [#2613](https://togithub.com/googleapis/google-api-go-client/issues/2613)

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
@CoreFloDev
Copy link
Author

working fine with 0.183.0 thanks!

abs3ntdev pushed a commit to abs3ntdev/gspot that referenced this issue Jul 6, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | require | minor | `v0.182.0` -> `v0.187.0` |

---

### Release Notes

<details>
<summary>googleapis/google-api-go-client (google.golang.org/api)</summary>

### [`v0.187.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.187.0)

[Compare Source](googleapis/google-api-go-client@v0.186.0...v0.187.0)

##### Features

-   **all:** Auto-regenerate discovery clients ([#&#8203;2655](googleapis/google-api-go-client#2655)) ([1a28e06](googleapis/google-api-go-client@1a28e06))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2658](googleapis/google-api-go-client#2658)) ([719f988](googleapis/google-api-go-client@719f988))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2659](googleapis/google-api-go-client#2659)) ([7cd88da](googleapis/google-api-go-client@7cd88da))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2660](googleapis/google-api-go-client#2660)) ([3ca2f84](googleapis/google-api-go-client@3ca2f84))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2661](googleapis/google-api-go-client#2661)) ([0a238f5](googleapis/google-api-go-client@0a238f5))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2663](googleapis/google-api-go-client#2663)) ([6e061ce](googleapis/google-api-go-client@6e061ce))

##### Bug Fixes

-   **gensupport:** Wrap chunk upload err for retries ([#&#8203;2657](googleapis/google-api-go-client#2657)) ([a758bc1](googleapis/google-api-go-client@a758bc1))
-   Pass through gRPC api key option to new auth lib ([#&#8203;2664](googleapis/google-api-go-client#2664)) ([e051997](googleapis/google-api-go-client@e051997))

### [`v0.186.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.186.0)

[Compare Source](googleapis/google-api-go-client@v0.185.0...v0.186.0)

##### Features

-   **all:** Auto-regenerate discovery clients ([#&#8203;2641](googleapis/google-api-go-client#2641)) ([72fb128](googleapis/google-api-go-client@72fb128))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2644](googleapis/google-api-go-client#2644)) ([20ffdd8](googleapis/google-api-go-client@20ffdd8))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2645](googleapis/google-api-go-client#2645)) ([c1a7681](googleapis/google-api-go-client@c1a7681))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2648](googleapis/google-api-go-client#2648)) ([1bac79d](googleapis/google-api-go-client@1bac79d))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2649](googleapis/google-api-go-client#2649)) ([695484b](googleapis/google-api-go-client@695484b))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2652](googleapis/google-api-go-client#2652)) ([10c47f3](googleapis/google-api-go-client@10c47f3))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2653](googleapis/google-api-go-client#2653)) ([bc370a7](googleapis/google-api-go-client@bc370a7))

### [`v0.185.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.185.0)

[Compare Source](googleapis/google-api-go-client@v0.184.0...v0.185.0)

##### Features

-   **all:** Auto-regenerate discovery clients ([#&#8203;2636](googleapis/google-api-go-client#2636)) ([51ff8a4](googleapis/google-api-go-client@51ff8a4))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2638](googleapis/google-api-go-client#2638)) ([0c868b2](googleapis/google-api-go-client@0c868b2))

##### Bug Fixes

-   **internal/gensupport:** Update shouldRetry for GCS uploads ([#&#8203;2634](googleapis/google-api-go-client#2634)) ([ea513cb](googleapis/google-api-go-client@ea513cb))

### [`v0.184.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.184.0)

[Compare Source](googleapis/google-api-go-client@v0.183.0...v0.184.0)

##### Features

-   **all:** Auto-regenerate discovery clients ([#&#8203;2624](googleapis/google-api-go-client#2624)) ([7fccba6](googleapis/google-api-go-client@7fccba6))
-   Regen cloudcommerceprocurement v1 from updated discovery file ([#&#8203;2627](googleapis/google-api-go-client#2627)) ([7e30ed2](googleapis/google-api-go-client@7e30ed2))
-   Support structpb.Struct as req/resp ([#&#8203;2632](googleapis/google-api-go-client#2632)) ([ebc44d1](googleapis/google-api-go-client@ebc44d1)), refs [#&#8203;2601](googleapis/google-api-go-client#2601)

##### Bug Fixes

-   **cba:** Update credsNewAuth to support oauth2 over mTLS ([#&#8203;2610](googleapis/google-api-go-client#2610)) ([953f728](googleapis/google-api-go-client@953f728))

### [`v0.183.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.183.0)

[Compare Source](googleapis/google-api-go-client@v0.182.0...v0.183.0)

##### Features

-   **all:** Auto-regenerate discovery clients ([#&#8203;2611](googleapis/google-api-go-client#2611)) ([1de148b](googleapis/google-api-go-client@1de148b))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2616](googleapis/google-api-go-client#2616)) ([5f21214](googleapis/google-api-go-client@5f21214))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2617](googleapis/google-api-go-client#2617)) ([08fdd71](googleapis/google-api-go-client@08fdd71))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2619](googleapis/google-api-go-client#2619)) ([c7f1614](googleapis/google-api-go-client@c7f1614))
-   **all:** Auto-regenerate discovery clients ([#&#8203;2622](googleapis/google-api-go-client#2622)) ([0077748](googleapis/google-api-go-client@0077748))

##### Bug Fixes

-   Add another temporary dep on genproto ([#&#8203;2614](googleapis/google-api-go-client#2614)) ([4f98211](googleapis/google-api-go-client@4f98211)), refs [#&#8203;2559](googleapis/google-api-go-client#2559) [#&#8203;2613](googleapis/google-api-go-client#2613)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjQuMyIsInVwZGF0ZWRJblZlciI6IjM3LjQyNC4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Reviewed-on: https://git.asdf.cafe/abs3nt/gspot/pulls/9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants