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

secret-manager client 2.18 incompatible with google-auth 2.24 #12364

Closed
kojiromike opened this issue Feb 26, 2024 · 4 comments · Fixed by googleapis/gapic-generator-python#1957
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

@kojiromike
Copy link

When we had google-cloud-secret-manager 2.18 and google-auth 2.24, we got this traceback:

  File "/opt/venv/lib/python3.11/site-packages/phc/secrets/lib.py", line 18, in get
    response = self.client.access_secret_version(request={"name": name})
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 1764, in access_secret_version
    self._validate_universe_domain()
  File "/opt/venv/lib/python3.11/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 551, in _validate_universe_domain
    or SecretManagerServiceClient._compare_universes(
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 528, in _compare_universes
    credentials_universe = getattr(credentials, "universe_domain", default_universe)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/google/auth/compute_engine/credentials.py", line 139, in universe_domain
    self._universe_domain = _metadata.get_universe_domain()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: get_universe_domain() missing 1 required positional argument: 'request'

This was resolved by updating google-auth to 2.28.1. I didn't test intermediate versions.

I would expect pip to complain about installing google-cloud-secret-manager 2.18 with an incompatible version of google-auth.

@parthea
Copy link
Contributor

parthea commented Feb 26, 2024

Hi @kojiromike,

I believe the issue you're seeing was introduced in google-auth==2.24.0 and fixed in version 2.25.1 and newer.

https://github.com/googleapis/google-auth-library-python/releases/tag/v2.24.0
https://github.com/googleapis/google-auth-library-python/releases/tag/v2.25.1

Please can you check if the issue still appears with google-auth 2.25.1 or newer?

@parthea parthea added type: question Request for information or clarification. Not an issue. needs more info This issue needs more information from the customer to proceed. labels Feb 26, 2024
@parthea
Copy link
Contributor

parthea commented Feb 26, 2024

This was resolved by updating google-auth to 2.28.1

google-auth>=2.14.1 will work (excluding 2.24.0 and 2.25.0 due to a bug in google-auth)

@kojiromike
Copy link
Author

@parthea I believe you. :)

What I'm asking is for google-cloud-secret-manager to be released with packaging metadata so that pip (et al) know that google-auth 2.24 is incompatible.

@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed type: question Request for information or clarification. Not an issue. needs more info This issue needs more information from the customer to proceed. labels Feb 26, 2024
@kojiromike
Copy link
Author

y'all are awesome ❤️

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