GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add preconditions and retry configuration to blob.create_resumable_upload_session by cojenco · Pull Request #484 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Conversation

@cojenco

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cojenco added 2 commits June 29, 2021 12:21
@cojenco
feat: add preconditions and retry configuration to blob.create_resuma…
b473702
…ble_upload_session
@cojenco
move imports
0744824
@cojenco
cojenco requested review from a team, andrewsg and tritone June 29, 2021 20:19
@product-auto-label product-auto-label Bot added the api: storage Issues related to the googleapis/python-storage API. label Jun 29, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 29, 2021
@cojenco 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
@cojenco cojenco mentioned this pull request Jun 29, 2021
fix: replace default retry for upload operations #480
Merged
tritone
tritone reviewed Jun 30, 2021
View reviewed changes

@tritone tritone left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
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
)

@tritone tritone Jun 30, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cojenco cojenco Jun 30, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tritone tritone Jun 30, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sounds good!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/storage/blob.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cojenco cojenco mentioned this pull request Jun 30, 2021
feat: public access prevention #304
Merged
4 tasks done
tritone
tritone approved these changes Jun 30, 2021
View reviewed changes
@cojenco
Merge branch 'master' into add-resumable-session
cd257c4
@cojenco
cojenco merged commit 0ae35ee into master Jun 30, 2021
@cojenco
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
@cojenco
feat: add preconditions and retry configuration to blob.create_resuma…
91df76b
…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
@cojenco
feat: add preconditions and retry configuration to blob.create_resuma…
a164a0a
…ble_upload_session (googleapis#484)

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

* move imports
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@andrewsg andrewsg Awaiting requested review from andrewsg
1 more reviewer
@tritone tritone tritone approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: storage Issues related to the googleapis/python-storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@cojenco @tritone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.