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 if*generation*Match support, pt1 by IlyaFaer · Pull Request #123 · googleapis/python-storage

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

Conversation

@IlyaFaer

@IlyaFaer IlyaFaer commented May 1, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Add if_generation_match, if_generation_not_match, if_metageneration_match and if_metageneration_not_match arguments into methods:

Client(): lookup_bucket(), get_bucket()

Bucket(): get_blob(), delete_blob(), delete(), exists(), patch(), reload(), update()

Blob(): delete(), download_to_file(), download_to_filename(), download_as_string(), rewrite(), update_storage_class(), exists(), patch(), reload(), update(), reload()

Towards #127

Sorry, something went wrong.

Uh oh!

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

All reactions
IlyaFaer
feat: add ifMetageneration*Match support, pt1
3fa6245
@IlyaFaer IlyaFaer added api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels May 1, 2020
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 1, 2020
IlyaFaer
IlyaFaer commented May 1, 2020
View reviewed changes
Comment thread google/cloud/storage/_helpers.py Resolved

Uh oh!

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

IlyaFaer
fix unit tests, add test for helper
4cbad43
IlyaFaer
IlyaFaer commented May 1, 2020
View reviewed changes
Comment thread tests/unit/test_client.py Resolved

Uh oh!

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

IlyaFaer
IlyaFaer commented May 1, 2020
View reviewed changes
Comment thread google/cloud/storage/_helpers.py Resolved

Uh oh!

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

IlyaFaer
fix unit tests
b905487
@IlyaFaer
IlyaFaer requested a review from frankyn May 1, 2020 10:36
@IlyaFaer
IlyaFaer marked this pull request as ready for review May 1, 2020 10:36
IlyaFaer
add generation match args into more methods
ddecf53
@IlyaFaer IlyaFaer changed the title feat: add ifMetageneration*Match support, pt1 feat: add if*generation*Match support, pt1 May 1, 2020
IlyaFaer added 2 commits May 4, 2020 13:33
IlyaFaer
feat: add if*generation*Match support, pt2
74961fa
IlyaFaer
Lint fix.
7e08361
@IlyaFaer IlyaFaer mentioned this pull request May 4, 2020
feat: add if*generation*Match support, pt2 #126
Closed
@IlyaFaer
IlyaFaer requested a review from crwilcox May 4, 2020 11:13
frankyn
frankyn suggested changes May 4, 2020
View reviewed changes

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

Client-side checks for if_*generation checks should not be added for this case.

Please remove use of _raise_for_more_than_one_none and let the service handle those errors.

Sorry, something went wrong.

Uh oh!

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

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

Uh oh!

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

@frankyn frankyn mentioned this pull request May 4, 2020
Support If*generation preconditions #127
Closed
IlyaFaer added 4 commits May 5, 2020 10:34
IlyaFaer
delete "more than one set "checks
6f9f910
IlyaFaer
del excess import
ff26d2f
IlyaFaer
Merge branch 'metageneration_match_pt1' into metageneration_match_pt2
551df43
IlyaFaer
delete "more than one set" checks
1f4d9c1
@IlyaFaer IlyaFaer mentioned this pull request May 5, 2020
feat: add if*generation*match args into Bucket.delete_blobs() #130
Merged
@frankyn
Merge branch 'master' into metageneration_match_pt1
0a34086
andrewsg
andrewsg suggested changes May 5, 2020
View reviewed changes

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

Looks like the system tests are in part 2. So that we don't merge an incomplete change, please go ahead and merge part 2 into this PR and close that one. It will be a large PR but that's better than risking merging one and having the other delayed.

Sorry, something went wrong.

Uh oh!

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

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

Uh oh!

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

Comment thread google/cloud/storage/_helpers.py Resolved

Uh oh!

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

IlyaFaer added 4 commits May 12, 2020 09:55
IlyaFaer
Merge branch 'master' into metageneration_match_pt1
e1b67b5
IlyaFaer
rename the helper; add error raising in case of wront parameters type
bd5b54f
IlyaFaer
Merge branch 'metageneration_match_pt2' into metageneration_match_pt1
ea37318
IlyaFaer
Merge branch 'metageneration_match_pt1' of https://github.com/q-logic…
9d19e15
…/python-storage into metageneration_match_pt1
IlyaFaer
IlyaFaer commented May 12, 2020
View reviewed changes

@IlyaFaer IlyaFaer left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
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.

In fact, parts 1 and 2 are completely separated from each other, I've just tried to make PRs easier to read. Anyway after erasing the checks changes become much more shorter, so I suppose we can merge part 2 into this one.

Sorry, something went wrong.

Uh oh!

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

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

Uh oh!

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

Comment thread google/cloud/storage/_helpers.py Resolved

Uh oh!

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

@IlyaFaer

IlyaFaer commented May 12, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Author

Lint session failed, but the problem is not related to this PR:

Running session lint
Creating virtual environment (virtualenv) using python3.8 in .nox/lint
pip install flake8 black==19.10b0
black --check docs google tests noxfile.py setup.py
All done! ✨ 🍰 ✨
35 files would be left unchanged.
flake8 google tests
google/cloud/storage/_signing.py:156:13: F523 '...'.format(...) has unused arguments at position(s): 0
Command flake8 google tests failed with exit code 1
Session lint failed.
All reactions

Sorry, something went wrong.

Uh oh!

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

@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 13, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 13, 2020
@frankyn
Merge branch 'master' into metageneration_match_pt1
d8f790a
andrewsg
andrewsg suggested changes May 13, 2020
View reviewed changes

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

Thanks Ilya. This looks great, only thing to note is that it looks like the metageneration match could use a system test. I don't think there's utility in making a system test for each modified function, but adding a system test for the metageneration match in addition to the generation might be a sweet spot for effort/reward. Should be good to go after that's in.

Sorry, something went wrong.

Uh oh!

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

All reactions
IlyaFaer added 4 commits May 14, 2020 14:21
IlyaFaer
add more system tests
bbebfc1
IlyaFaer
system tests fixes
e9748bb
IlyaFaer
cleanup system test
3e83091
IlyaFaer
fix comments
0dbd9a9
@IlyaFaer

IlyaFaer commented May 14, 2020

Copy link
Copy Markdown
Author

I've added more system tests, and re-reviewed it all once again - fixed a couple of nits.

All reactions

Sorry, something went wrong.

Uh oh!

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

@IlyaFaer IlyaFaer mentioned this pull request May 14, 2020
feat: add *generation*match args into Blob.compose() #122
Merged
frankyn
frankyn suggested changes May 14, 2020
View reviewed changes

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

One nit, but otherwise LGTM. Pending @andrewsg's comments.

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.

IlyaFaer
delete excess checks
dc0bb4f
frankyn
frankyn approved these changes May 14, 2020
View reviewed changes

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

LGTM, pending @andrewsg's approval.

Sorry, something went wrong.

Uh oh!

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

All reactions
andrewsg
andrewsg approved these changes May 14, 2020
View reviewed changes

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

Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
@frankyn
frankyn merged commit 0944442 into googleapis:master May 15, 2020
@IlyaFaer
IlyaFaer deleted the metageneration_match_pt1 branch May 15, 2020 07:49
IlyaFaer pushed a commit to MaxxleLLC/python-storage that referenced this pull request May 20, 2020
IlyaFaer @frankyn
feat: add if*generation*Match support, pt1 (googleapis#123)
648d3c8
* feat: add ifMetageneration*Match support, pt1

* fix unit tests, add test for helper

* fix unit tests

* add generation match args into more methods

* feat: add if*generation*Match support, pt2

* Lint fix.

* delete "more than one set "checks

* del excess import

* delete "more than one set" checks

* rename the helper; add error raising in case of wront parameters type

* add more system tests

* system tests fixes

* cleanup system test

* fix comments

* delete excess checks

Co-authored-by: Frank Natividad <[email protected]>
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
Gurov Ilya @frankyn @cojenco
feat: add if*generation*Match support, pt1 (googleapis#123)
4580729
* feat: add ifMetageneration*Match support, pt1

* fix unit tests, add test for helper

* fix unit tests

* add generation match args into more methods

* feat: add if*generation*Match support, pt2

* Lint fix.

* delete "more than one set "checks

* del excess import

* delete "more than one set" checks

* rename the helper; add error raising in case of wront parameters type

* add more system tests

* system tests fixes

* cleanup system test

* fix comments

* delete excess checks

Co-authored-by: Frank Natividad <[email protected]>
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
Gurov Ilya @frankyn @cojenco
feat: add if*generation*Match support, pt1 (googleapis#123)
33622ae
* feat: add ifMetageneration*Match support, pt1

* fix unit tests, add test for helper

* fix unit tests

* add generation match args into more methods

* feat: add if*generation*Match support, pt2

* Lint fix.

* delete "more than one set "checks

* del excess import

* delete "more than one set" checks

* rename the helper; add error raising in case of wront parameters type

* add more system tests

* system tests fixes

* cleanup system test

* fix comments

* delete excess checks

Co-authored-by: Frank Natividad <[email protected]>
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 24, 2026
Add backfill-s2s CLI to seed sample recordings coval-ai/benchmarks#345
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@crwilcox crwilcox Awaiting requested review from crwilcox
2 more reviewers
@andrewsg andrewsg andrewsg approved these changes
@frankyn frankyn frankyn 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. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

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.

5 participants

@IlyaFaer @andrewsg @frankyn @googlebot @yoshi-kokoro
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.