-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add if*generation*Match support, pt1 #123
feat: add if*generation*Match support, pt1 #123
Conversation
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.
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.
…/python-storage into metageneration_match_pt1
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.
Lint session failed, but the problem is not related to this PR:
|
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.
I've added more system tests, and re-reviewed it all once again - fixed a couple of nits. |
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.
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.
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!
* 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 <frankyn@users.noreply.github.com>
* 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 <frankyn@users.noreply.github.com>
* 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 <frankyn@users.noreply.github.com>
Add
if_generation_match
,if_generation_not_match
,if_metageneration_match
andif_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