Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

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

Merged
tseaver merged 7 commits into
googleapis:mainfrom
cojenco:recover25
Aug 30, 2021
Merged

tseaver merged 7 commits into
googleapis:mainfrom
cojenco:recover25

Conversation

@cojenco

@cojenco cojenco commented Aug 27, 2021

Copy link
Copy Markdown
Contributor

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 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
Comment thread google/resumable_media/_helpers.py
Comment thread google/resumable_media/_helpers.py
@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

@andrewsg andrewsg left a comment

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants