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

No retry on Impersonation Token Bigquery #2013

Open
nitishxp opened this issue Sep 5, 2024 · 1 comment
Open

No retry on Impersonation Token Bigquery #2013

nitishxp opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery API.

Comments

@nitishxp
Copy link

nitishxp commented Sep 5, 2024

Hi team,

Using google-cloud-bigquery==3.24.0
on python 3.11 cloud function runtime

File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/bigquery/client.py", line 494, in api_request return self._call_api( 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/bigquery/client.py", line 833, in _call_api return call() 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/api_core/retry/retry_unary.py", line 293, in retry_wrapped_func return retry_target( 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/api_core/retry/retry_unary.py", line 153, in retry_target _retry_error_helper( File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/api_core/retry/retry_base.py", line 212, in _retry_error_helper raise final_exc from source_exc File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/api_core/retry/retry_unary.py", line 144, in retry_target result = target() 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/_http/__init__.py", line 482, in api_request response = self._make_request( 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/_http/__init__.py", line 341, in _make_request return self._do_request( 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/cloud/_http/__init__.py", line 379, in _do_request return self.http.request( 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/auth/transport/requests.py", line 534, in request self.credentials.before_request(auth_request, method, url, request_headers) File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/auth/credentials.py", line 230, in before_request self._blocking_refresh(request) File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/auth/credentials.py", line 193, in _blocking_refresh self.refresh(request) File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/auth/impersonated_credentials.py", line 235, in refresh self._update_token(request) File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/auth/impersonated_credentials.py", line 267, in _update_token self.token, self.expiry = _make_iam_token_request( 
File "/layers/google.python.pip/pip/lib/python3.11/site-packages/google/auth/impersonated_credentials.py", line 83, in _make_iam_token_request raise exceptions.RefreshError(_REFRESH_ERROR, response_body) google.auth.exceptions.RefreshError: ('Unable to acquire impersonated credentials', '<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\n <title>Error 502 (Server Error)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n </style>\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n <p><b>502.</b> <ins>That’s an error.</ins>\n <p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds. <ins>That’s all we know.</ins>\n')
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 5, 2024
@shollyman
Copy link
Contributor

I'm not super clear on the flow here, but there's a reliance is on the google-auth package which provides it's own retry mechanisms within the package. If the concern is about retries within the auth library, could you provide those details to that project at https://github.com/googleapis/google-auth-library-python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API.
Projects
None yet
Development

No branches or pull requests

3 participants