cloudpathlib icon indicating copy to clipboard operation
cloudpathlib copied to clipboard

GCS live tests can be flaky on blob.patch

Open github-actions[bot] opened this issue 3 years ago • 1 comments

Workflow failed: tests #580

github-actions[bot] avatar Aug 21 '22 00:08 github-actions[bot]

The GCS tests have recently become flaky. We should see if there's some retry setting we can use at the SDK level to avoid this kind of flakiness.

Here's the error:

E           google.api_core.exceptions.ServiceUnavailable: 503 PATCH https://storage.googleapis.com/storage/v1/b/***/o/8pTzjcQttNHsrKFDubuBWw-test_cloudpath_upload_copy-test_upload_from_dir%2Fupload_test_dir%2Fupload_1.txt?generation=1661041260576377&projection=full&prettyPrint=false: We encountered an internal error. Please try again.

For the 2 failing tests, both of the call stacks look like the following and involve the blob.patch call:

cloudpathlib/gs/gspath.py:49: in touch
    self.client._move_file(self, self)
cloudpathlib/gs/gsclient.py:185: in _move_file
    blob.patch()
/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/google/cloud/storage/_helpers.py:337: in patch
    api_response = client._patch_resource(
/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/google/cloud/storage/client.py:463: in _patch_resource
    return self._connection.api_request(
/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/google/cloud/storage/_http.py:73: in api_request
    return call()

pjbull avatar Aug 22 '22 22:08 pjbull

Haven't seen in a while. Closing.

pjbull avatar Dec 19 '22 00:12 pjbull