GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.46k stars 6.45k forks source link

healthcare.api-client.v1.datasets.datasets_test: test_CRUD_dataset failed #8419

Closed flaky-bot[bot] closed 2 years ago

flaky-bot[bot] commented 2 years ago

Note: #6818 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 26fd536d49798b6dab042078eaeb101f88c22c48 buildURL: Build Status, Sponge status: failed

Test output
Traceback (most recent call last):
  File "/workspace/healthcare/api-client/v1/datasets/datasets_test.py", line 141, in test_CRUD_dataset
    get_dataset()
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/retrying.py", line 206, in call
    return attempt.get(self._wrap_exception)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/six.py", line 719, in reraise
    raise value
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/workspace/healthcare/api-client/v1/datasets/datasets_test.py", line 139, in get_dataset
    datasets.get_dataset(project_id, cloud_region, crud_dataset_id)
  File "/workspace/healthcare/api-client/v1/datasets/datasets.py", line 112, in get_dataset
    dataset = datasets.get(name=dataset_name).execute()
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/googleapiclient/http.py", line 922, in execute
    resp, content = _retry_request(
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/googleapiclient/http.py", line 190, in _retry_request
    resp, content = http.request(uri, method, *args, **kwargs)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/google_auth_httplib2.py", line 209, in request
    self.credentials.before_request(self._request, method, uri, request_headers)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/google/auth/credentials.py", line 133, in before_request
    self.refresh(request)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/service_account.py", line 410, in refresh
    access_token, expiry, _ = _client.jwt_grant(
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/_client.py", line 193, in jwt_grant
    response_data = _token_endpoint_request(request, token_uri, body)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/_client.py", line 165, in _token_endpoint_request
    _handle_error_response(response_data)
  File "/workspace/healthcare/api-client/v1/datasets/.nox/py-3-8/lib/python3.8/site-packages/google/oauth2/_client.py", line 60, in _handle_error_response
    raise exceptions.RefreshError(error_details, response_data)
google.auth.exceptions.RefreshError: ('invalid_grant: Invalid grant: account not found', {'error': 'invalid_grant', 'error_description': 'Invalid grant: account not found'})
flaky-bot[bot] commented 2 years ago

Looks like this issue is flaky. :worried:

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (26fd536d49798b6dab042078eaeb101f88c22c48), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

noerog commented 2 years ago

This appears to be an issue with the OAuth 2 client, not the sample or the Healthcare API service. I'll investigate.

dandhlee commented 2 years ago

Haven't seen this issue in a long time. Closing for now.