-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back support for retries in storage uploads. #3378
Conversation
Was #3375 |
@tseaver @lukesneeringer Can I get a review here? |
@@ -631,13 +637,19 @@ def _do_multipart_upload(self, client, stream, content_type, size): | |||
upload_url = _MULTIPART_URL_TEMPLATE.format( | |||
bucket_path=self.bucket.path) | |||
upload = MultipartUpload(upload_url, headers=headers) | |||
|
|||
if num_retries is not None: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -693,13 +709,19 @@ def _initiate_resumable_upload(self, client, stream, content_type, | |||
upload_url = _RESUMABLE_URL_TEMPLATE.format( | |||
bucket_path=self.bucket.path) | |||
upload = ResumableUpload(upload_url, chunk_size, headers=headers) | |||
|
|||
if num_retries is not None: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -817,6 +818,11 @@ def test__do_multipart_upload_no_size(self, mock_get_boundary): | |||
def test__do_multipart_upload_with_size(self, mock_get_boundary): | |||
self._do_multipart_success(mock_get_boundary, size=10) | |||
|
|||
@mock.patch(u'google.resumable_media._upload.get_boundary', | |||
return_value=b'==0==') | |||
def test__do_multipart_upload_with_retry(self, mock_get_boundary): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
No description provided.