Skip to content
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

Merged
merged 1 commit into from
May 10, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented May 5, 2017

No description provided.

@dhermes dhermes added the api: storage Issues related to the Cloud Storage API. label May 5, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 5, 2017
@dhermes
Copy link
Contributor Author

dhermes commented May 5, 2017

Was #3375

@dhermes
Copy link
Contributor Author

dhermes commented May 9, 2017

@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.

@@ -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.

@@ -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.

@dhermes dhermes merged commit ff4f492 into googleapis:master May 10, 2017
@dhermes dhermes deleted the add-back-storage-retries2 branch May 10, 2017 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants