FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Enable custom predicates for media operations by andrewsg · Pull Request #1385 · googleapis/python-storage · GitHub

This repository was archived by the owner on Mar 31, 2026. It is now read-only.
/ python-storage Public archive

feat: Enable custom predicates for media operations - #1385

Merged
andrewsg merged 5 commits into
3.0-develfrom
3.0-retry-unification
Dec 3, 2024
Merged

feat: Enable custom predicates for media operations#1385
andrewsg merged 5 commits into
3.0-develfrom
3.0-retry-unification

Conversation

andrewsg commented Nov 21, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

This refactor unifies the old resumable media retry code with the newer google.api_core retry code, enabling custom predicates for media operations.

Fixes #1361

andrewsg added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 21, 2024
andrewsg requested review from a team November 21, 2024 18:09
product-auto-label Bot added size: xl Pull request size is extra large. api: storage Issues related to the googleapis/python-storage API. labels Nov 21, 2024
andrewsg removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 21, 2024

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looking good, very excited about retry unification!

requests.ConnectionError,
requests_exceptions.ChunkedEncodingError,
requests_exceptions.Timeout,
http.client.BadStatusLine,

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks for consolidating the retryable errors. Looking at the requests docs requests.ConnectionError should be equivalent to requests.exceptions.ConnectionError so we're good!

)
return _request_helpers.wait_and_retry(retriable_request, self._retry_strategy)


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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: to match download, we probably want to add the retry arg docstrings for MultipartUpload, ResumableUpload etc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, done

and the object will configure backoff and timeout options. Custom
predicates (customizable error codes) are not supported for media
operations such as this one.
and the object will configure backoff and timeout options.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: Do we want to call out the default retry? I recall we received some feedback around stating the default value in our docstrings

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I would like to incorporate DEFAULT_RETRY into the docs somehow without copy/pasting it into every method. Not sure how to do that yet. I'd prefer not to include it in this change as it's already quite large but it's a good idea.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sounds good, let's update that in a separate PR

andrewsg merged commit a2e9b57 into 3.0-devel Dec 3, 2024
andrewsg deleted the 3.0-retry-unification branch December 3, 2024 00:00
andrewsg mentioned this pull request Dec 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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/python-storage API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL