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

feat: add preconditions and retry configuration to blob.create_resumable_upload_session by cojenco · Pull Request #484 · 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: add preconditions and retry configuration to blob.create_resumable_upload_session - #484

Merged
cojenco merged 3 commits into
masterfrom
add-resumable-session
Jun 30, 2021
Merged

feat: add preconditions and retry configuration to blob.create_resumable_upload_session#484
cojenco merged 3 commits into
masterfrom
add-resumable-session

Conversation

cojenco commented Jun 29, 2021

Copy link
Copy Markdown
Contributor

This adds preconditions and retry configuration to the upload entry method blob.create_resumable_upload_session(), in the continuation of #447 and #480.

This exposes the method to preconditions and therefore can make the operation conditional. It can also be configured with Retry objects and ConditionalRetryPolicy objects.

cojenco requested review from a team, andrewsg and tritone June 29, 2021 20:19
product-auto-label Bot added the api: storage Issues related to the googleapis/python-storage API. label Jun 29, 2021
google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 29, 2021
cojenco changed the title feat: add preconditions and retry configuration to blob.create_resumable_upload_session()()` feat: add preconditions and retry configuration to blob.create_resumable_upload_session Jun 29, 2021

tritone 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

Generally looks good. Did you test against the emulator that things are working?

Comment thread tests/unit/test_blob.py
def test_create_resumable_upload_session_with_conditional_retry_failure(self):
self._create_resumable_upload_session_helper(
retry=DEFAULT_RETRY_IF_GENERATION_SPECIFIED
)

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

How does this test verify that retries don't happen?

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

@tritone, I've tested the retry behaviors against the emulator that things are working as intended. The unit test asserts if the mock call was made with the corresponding url and query params.

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!

cojenco mentioned this pull request Jun 30, 2021
4 tasks
cojenco merged commit 0ae35ee into master Jun 30, 2021
cojenco deleted the add-resumable-session branch June 30, 2021 16:56
cojenco added a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…ble_upload_session (googleapis#484)

* feat: add preconditions and retry configuration to blob.create_resumable_upload_session

* move imports
cojenco added a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…ble_upload_session (googleapis#484)

* feat: add preconditions and retry configuration to blob.create_resumable_upload_session

* move imports
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. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL