Skip to content

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

@tseaver

Description

@tseaver

From this Kokoro failure:

______________ TestRetentionPolicy.test_bucket_w_retention_period ______________
self = <tests.system.TestRetentionPolicy testMethod=test_bucket_w_retention_period>
    def test_bucket_w_retention_period(self):
        import datetime
        from google.api_core import exceptions
        period_secs = 10
        new_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: in wrapped_function
    return to_wrap(*args, **kwargs)
google/cloud/storage/client.py:379: in create_bucket
    bucket.create(client=self, project=project)
google/cloud/storage/bucket.py:649: in create
    _target_object=self,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <google.cloud.storage._http.Connection object at 0x7fbd6ea43690>
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 = None
api_version = None, expect_json = True
_target_object = <Bucket: w-retention-period-1568826493867>
    def api_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.
        if data and isinstance(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,
        )
        if not 200 <= response.status_code < 300:
>           raise exceptions.from_http_response(response)
E           ServiceUnavailable: 503 POST https://www.googleapis.com/storage/v1/b?project=precise-truck-742: Backend Error
../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