Skip to content

BigQuery: 'test_extract_table_json' snippet flakes with 429 #5747

@tseaver

Description

@tseaver

See: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/7569

___________________________ test_extract_table_json ____________________________

client = <google.cloud.bigquery.client.Client object at 0x7fb88a41ced0>
to_delete = []

    def test_extract_table_json(client, to_delete):
        from google.cloud import storage
    
        bucket_name = 'extract_shakespeare_json_{}'.format(_millis())
        storage_client = storage.Client()
>       bucket = storage_client.create_bucket(bucket_name)  # API request

../docs/bigquery/snippets.py:2042: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../.nox/snip-2-7/lib/python2.7/site-packages/google/cloud/storage/client.py:267: in create_bucket
    bucket.create(client=self, project=project)
../.nox/snip-2-7/lib/python2.7/site-packages/google/cloud/storage/bucket.py:299: in create
    data=properties, _target_object=self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <google.cloud.storage._http.Connection object at 0x7fb88b77a350>
method = 'POST', path = '/b', query_params = {'project': 'precise-truck-742'}
data = '{"name": "extract_shakespeare_json_1533311714254"}'
content_type = 'application/json', headers = None, api_base_url = None
api_version = None, expect_json = True
_target_object = <Bucket: extract_shakespeare_json_1533311714254>

    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):

...
    
        if not 200 <= response.status_code < 300:
>           raise exceptions.from_http_response(response)
E           TooManyRequests: 429 POST https://www.googleapis.com/storage/v1/b?project=precise-truck-742: The project exceeded the rate limit for creating and deleting buckets.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.flakytype: processA process-related concern. May include testing, release, or the like.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions