Skip to content
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 args into Bucket.delete_blobs() #130

Merged

Conversation

IlyaFaer
Copy link

@IlyaFaer IlyaFaer commented May 5, 2020

Towards #127

@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 5, 2020
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 5, 2020
@IlyaFaer IlyaFaer changed the title Delete blobs generation match feat: add if*generation*match args into Bucket.delete_blobs() May 5, 2020
@IlyaFaer
Copy link
Author

IlyaFaer commented May 5, 2020

This should be merged only after merging #123, as this branch based on the one from PR 123.

@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 5, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 5, 2020
if_generation_not_match=next(if_generation_not_match, None),
if_metageneration_match=next(if_metageneration_match, None),
if_metageneration_not_match=next(if_metageneration_not_match, None),
)
Copy link
Author

@IlyaFaer IlyaFaer May 5, 2020

Choose a reason for hiding this comment

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

In this method we're converting args into iterators to be able to take next item (or None if there is no next item, or items at all) with a single line.

@IlyaFaer IlyaFaer requested review from frankyn and crwilcox May 5, 2020 14:01
@IlyaFaer IlyaFaer marked this pull request as ready for review May 5, 2020 14:01
@IlyaFaer
Copy link
Author

IlyaFaer commented May 5, 2020

I don't see any system tests for this method. Maybe it should be added to check generation match args are working fine?

@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
@andrewsg
Copy link
Contributor

Since #123 has been merged, I be ready to review this once the branch is updated and conflicts resolved. Thanks!

@IlyaFaer
Copy link
Author

@andrewsg, I've pushed some changes to check if generation match args length differs from blobs list (as we done in compose()) as well.

@IlyaFaer IlyaFaer requested a review from andrewsg May 21, 2020 10:15
google/cloud/storage/bucket.py Outdated Show resolved Hide resolved
@andrewsg andrewsg added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 8, 2020
@frankyn frankyn added kokoro:force-run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 15, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit 5e60991 into googleapis:master Jun 15, 2020
@IlyaFaer IlyaFaer deleted the delete_blobs_generation_match branch June 16, 2020 07:17
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. automerge Merge the pull request once unit tests and other checks pass. 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
Development

Successfully merging this pull request may close these issues.

None yet

5 participants