samples.snippets.quickstart.quickstart_test: test_quickstart failed
flaky-bot opened this issue · 2 comments
This test failed!
To configure my behavior, see the Build Cop Bot documentation.
If I'm commenting on this issue too often, add the buildcop: quiet
label and
I will stop commenting.
commit: 72fb526
buildURL: Build Status, Sponge
status: failed
Test output
@pytest.fixture(autouse=True) def setup_teardown(): storage_client = storage.Client() > bucket = storage_client.create_bucket(STAGING_BUCKET)quickstart/quickstart_test.py:42:
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/storage/client.py:533: in create_bucket
timeout=timeout,
self = <google.cloud.storage._http.Connection object at 0x7f0e69d3fdd8>
method = 'POST', path = '/b'
query_params = {'project': 'python-docs-samples-tests'}
data = '{"name": "py-dataproc-qs-bucket-8bcb04b5-4057-4605-b826-f1d9c086af0c"}'
content_type = 'application/json', headers = None, api_base_url = None
api_version = None, expect_json = True
_target_object = <Bucket: py-dataproc-qs-bucket-8bcb04b5-4057-4605-b826-f1d9c086af0c>
timeout = 60def 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, timeout=_DEFAULT_TIMEOUT, ): """Make a request over the HTTP transport to the API. You shouldn't need to use this method, but if you plan to interact with the API using these primitives, this is the correct one to use. :type method: str :param method: The HTTP method name (ie, ``GET``, ``POST``, etc). Required. :type path: str :param path: The path to the resource (ie, ``'/b/bucket-name'``). Required. :type query_params: dict or list :param query_params: A dictionary of keys and values (or list of key-value pairs) to insert into the query string of the URL. :type data: str :param data: The data to send as the body of the request. Default is the empty string. :type content_type: str :param content_type: The proper MIME type of the data provided. Default is None. :type headers: dict :param headers: extra HTTP headers to be sent with the request. :type api_base_url: str :param api_base_url: The base URL for the API endpoint. Typically you won't have to provide this. Default is the standard API base URL. :type api_version: str :param api_version: The version of the API to call. Typically you shouldn't provide this and instead use the default for the library. Default is the latest API version supported by google-cloud-python. :type expect_json: bool :param expect_json: If True, this method will try to parse the response as JSON and raise an exception if that cannot be done. Default is True. :type _target_object: :class:`object` :param _target_object: (Optional) Protected argument to be used by library callers. This can allow custom behavior, for example, to defer an HTTP request and complete initialization of the object at a later time. :type timeout: float or tuple :param timeout: (optional) The amount of time, in seconds, to wait for the server response. Can also be passed as a tuple (connect_timeout, read_timeout). See :meth:`requests.Session.request` documentation for details. :raises ~google.cloud.exceptions.GoogleCloudError: if the response code is not 200 OK. :raises ValueError: if the response content type is not JSON. :rtype: dict or str :returns: The API response payload, either as a raw string or a dictionary if the response is valid JSON. """ 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, timeout=timeout, ) if not 200 <= response.status_code < 300:
raise exceptions.from_http_response(response)
E google.api_core.exceptions.ServiceUnavailable: 503 POST https://storage.googleapis.com/storage/v1/b?project=python-docs-samples-tests&prettyPrint=false: Backend Error
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/_http.py:438: ServiceUnavailable
Looks like this issue is flaky. 😟
I'm going to leave this open and stop commenting.
A human should fix and close this.
When run at the same commit (72fb526), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).
Looks like a service issue. Closing this, will take another look if it pops up again