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
commented
May 1, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
IlyaFaer
changed the title
feat: add ifMetageneration*Match support, pt1
feat: add if*generation*Match support, pt1
May 1, 2020
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
IlyaFaer
left a comment
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
IlyaFaer
commented
May 12, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
I've added more system tests, and re-reviewed it all once again - fixed a couple of nits.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
IlyaFaer
pushed a commit
to MaxxleLLC/python-storage
that referenced
this pull request
May 20, 2020
* 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
* 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
* 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]>
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.
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.
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.
|