Skip to content

Storage: 'test_bucket_w_retention_period' systest flakes with 503. #9247

Description

@tseaver

From this Kokoro failure:

______________TestRetentionPolicy.test_bucket_w_retention_period______________self=<tests.system.TestRetentionPolicytestMethod=test_bucket_w_retention_period>deftest_bucket_w_retention_period(self):
importdatetimefromgoogle.api_coreimportexceptionsperiod_secs=10new_bucket_name="w-retention-period"+unique_resource_id("-")
>bucket=retry_429(Config.CLIENT.create_bucket)(new_bucket_name)
tests/system.py:1534:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../test_utils/test_utils/retry.py:95: inwrapped_functionreturnto_wrap(*args, **kwargs)
google/cloud/storage/client.py:379: increate_bucketbucket.create(client=self, project=project)
google/cloud/storage/bucket.py:649: increate_target_object=self,
__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self=<google.cloud.storage._http.Connectionobjectat0x7fbd6ea43690>method='POST', path='/b', query_params= {'project': 'precise-truck-742'}
data='{"name": "w-retention-period-1568826493867"}'content_type='application/json', headers=None, api_base_url=Noneapi_version=None, expect_json=True_target_object=<Bucket: w-retention-period-1568826493867>defapi_request(
self,
method,
path,
query_params=None,
data=None,
content_type=None,
headers=None,
api_base_url=None,
api_version=None,
expect_json=True,
_target_object=None,
):
"""Make a request over the HTTP transport to the API. ... """url=self.build_api_url(
path=path,
query_params=query_params,
api_base_url=api_base_url,
api_version=api_version,
)
# Making the executive decision that any dictionary# data will be sent properly as JSON.ifdataandisinstance(data, dict):
data=json.dumps(data)
content_type="application/json"response=self._make_request(
method=method,
url=url,
data=data,
content_type=content_type,
headers=headers,
target_object=_target_object,
)
ifnot200<=response.status_code<300:
>raiseexceptions.from_http_response(response)
EServiceUnavailable: 503POSThttps://www.googleapis.com/storage/v1/b?project=precise-truck-742: BackendError
../core/google/cloud/_http.py:393: ServiceUnavailable

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.flakytestingtype: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions