KEMBAR78
Resumable media retry appears to treat `deadline` differently than google.api.core.Retry · Issue #1361 · googleapis/python-storage · GitHub
Skip to content

Resumable media retry appears to treat deadline differently than google.api.core.Retry  #1361

@samlevy3

Description

@samlevy3

Environment details

  • Python version: 3.11.10
  • pip version: 24.2
  • google-cloud-storage version: 2.18.2

Description

For resumable media calls in cloud storage (ex: download_as_string), the provided google.api.core.Retry is converted to a google.resumable_media.RetryStrategy. However, the meaning of the provided deadline appears to differ between these two classes.

For google.api.core.Retry, deadline seems to be defined as "the maximum amount of time a function can block"

However, for google.resumable_media.RetryStrategy, max_cumulative_retry (what deadline corresponds to) is defined as "The maximum total amount of time to sleep during the retry process."

There appears to be a mismatch between the definitions though. One refers to the total time the function blocks while the other refers to the cumulative time spent sleeping between retries.

If this is indeed a mismatch is it possible to update the documentation of resumable media operations to clarify that they have a different retry strategy?

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/python-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions