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

fix: upload download instances are not marked invalid with retriable error codes #261

Merged
merged 7 commits into from Aug 30, 2021

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Aug 27, 2021

ResumableUpload and ChunkedDownload can retry when it is safe to do so (encountering retriable error codes and specify preconditions if needed). The instance should not be marked as invalid if it encounters a retriable status code.

Update helper method require_status_code() to only make an instance invalid with non-retriable error codes.

@cojenco cojenco added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 27, 2021
@cojenco cojenco requested a review from a team as a code owner August 27, 2021 17:32
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/google-resumable-media-python API. label Aug 27, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 27, 2021
@cojenco cojenco requested a review from andrewsg August 27, 2021 20:53
google/resumable_media/_helpers.py Outdated Show resolved Hide resolved
google/resumable_media/_helpers.py Show resolved Hide resolved
@cojenco cojenco removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 30, 2021
@cojenco cojenco requested a review from tseaver August 30, 2021 18:54
Copy link
Contributor

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elegant solution!

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 googleapis/google-resumable-media-python API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants