feat: media operation retries can be configured using the same interface as with non-media operation by andrewsg · Pull Request #447 · googleapis/python-storage

added 6 commits

March 30, 2021 11:25

@google-cla google-cla bot added the cla: yes

This human has signed the Contributor License Agreement.

label

May 20, 2021

@andrewsg andrewsg added the do not merge

Indicates a pull request not ready for merge, due to either quality or timing.

label

May 20, 2021

frankyn

tritone

cojenco

@andrewsg andrewsg removed the do not merge

Indicates a pull request not ready for merge, due to either quality or timing.

label

Jun 11, 2021

@andrewsg

@andrewsg

tseaver

@andrewsg

cojenco pushed a commit to cojenco/python-storage that referenced this pull request

Oct 13, 2021
…ace as with non-media operation (googleapis#447)

All media operation calls (downloads and uploads) can be configured with Retry objects and ConditionalRetryPolicy objects, nearly identically to non-media operations. This is accomplished by converting the Retry object to a google-resumable-media-python library RetryStrategy object at the point of entry to that library.

Custom predicates of Retry objects (for instance set with Retry(predicate=...)) are not supported for media operations; they will be replaced with a media-operation-specific predicate.

This change is backwards-compatible for users of public methods using num_retries arguments to configure uploads; num_retries continue to be supported but the deprecation warning remains in effect. They will be fully removed and replaced with Retry objects in the future.

With this change, the default parameters for a media operations retry changes to be uniform with non-media operation retries. Specifically, the retry deadline for media operation retries becomes 120 seconds unless otherwise configured.

cojenco pushed a commit to cojenco/python-storage that referenced this pull request

Oct 13, 2021
…ace as with non-media operation (googleapis#447)

All media operation calls (downloads and uploads) can be configured with Retry objects and ConditionalRetryPolicy objects, nearly identically to non-media operations. This is accomplished by converting the Retry object to a google-resumable-media-python library RetryStrategy object at the point of entry to that library.

Custom predicates of Retry objects (for instance set with Retry(predicate=...)) are not supported for media operations; they will be replaced with a media-operation-specific predicate.

This change is backwards-compatible for users of public methods using num_retries arguments to configure uploads; num_retries continue to be supported but the deprecation warning remains in effect. They will be fully removed and replaced with Retry objects in the future.

With this change, the default parameters for a media operations retry changes to be uniform with non-media operation retries. Specifically, the retry deadline for media operation retries becomes 120 seconds unless otherwise configured.