-
Notifications
You must be signed in to change notification settings - Fork 172
Description
This test failed!
To configure my behavior, see the Flaky Bot documentation.
If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.
commit: 9f256fc
buildURL: Build Status, Sponge
status: failed
Test output
kms_bucket =
file_data = {'big': {'hash': b'cEome4a+NYd7YIXzXQnR5Q==', 'path': '/tmpfs/src/github/python-storage/tests/data/five-point-one-mb-f...g'}, 'simple': {'hash': b'3Hkwjv2WvCnKjNR6Z3CboA==', 'path': '/tmpfs/src/github/python-storage/tests/data/simple.txt'}}
blobs_to_delete = []
kms_key_name = 'projects/precise-truck-742/locations/us/keyRings/gcs-test/cryptoKeys/gcs-test'
def test_upload_chunks_concurrently_with_kms(
kms_bucket, file_data, blobs_to_delete, kms_key_name
):
source_file = file_data["big"]
filename = source_file["path"]
blob_name = "mpu_file_kms"
blob = kms_bucket.blob(blob_name, kms_key_name=kms_key_name)
chunk_size = 5 * 1024 * 1024 # Minimum supported by XML MPU API
assert os.path.getsize(filename) > chunk_size # Won't make a good test otherwise
transfer_manager.upload_chunks_concurrently(
filename, blob, chunk_size=chunk_size, deadline=DEADLINE
)
tests/system/test_transfer_manager.py:376:
google/cloud/storage/transfer_manager.py:1017: in upload_chunks_concurrently
container.initiate(transport=transport, content_type=content_type)
.nox/system-3-8/lib/python3.8/site-packages/google/resumable_media/requests/upload.py:636: in initiate
return _request_helpers.wait_and_retry(
.nox/system-3-8/lib/python3.8/site-packages/google/resumable_media/requests/_request_helpers.py:155: in wait_and_retry
response = func()
.nox/system-3-8/lib/python3.8/site-packages/google/resumable_media/requests/upload.py:632: in retriable_request
self._process_initiate_response(result)
.nox/system-3-8/lib/python3.8/site-packages/google/resumable_media/_upload.py:988: in _process_initiate_response
_helpers.require_status_code(response, (http.client.OK,), self._get_status_code)
response = <Response [403]>, status_codes = (<HTTPStatus.OK: 200>,)
get_status_code = <function RequestsMixin._get_status_code at 0x7fd73a611430>
callback = <function do_nothing at 0x7fd73a673e50>
def require_status_code(response, status_codes, get_status_code, callback=do_nothing):
"""Require a response has a status code among a list.
Args:
response (object): The HTTP response object.
status_codes (tuple): The acceptable status codes.
get_status_code (Callable[Any, int]): Helper to get a status code
from a response.
callback (Optional[Callable]): A callback that takes no arguments,
to be executed when an exception is being raised.
Returns:
int: The status code.
Raises:
~google.resumable_media.common.InvalidResponse: If the status code
is not one of the values in ``status_codes``.
"""
status_code = get_status_code(response)
if status_code not in status_codes:
if status_code not in common.RETRYABLE:
callback()
raise common.InvalidResponse(
response,
"Request failed with status code",
status_code,
"Expected one of",
*status_codes
)
E google.resumable_media.common.InvalidResponse: ('Request failed with status code', 403, 'Expected one of', <HTTPStatus.OK: 200>)
.nox/system-3-8/lib/python3.8/site-packages/google/resumable_media/_helpers.py:108: InvalidResponse