GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: delete bucket OLM rules by athakor · Pull Request #352 · googleapis/java-storage
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Conversation
Contributor
Fixes #344
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@ ## master #352 +/- ## ============================================ + Coverage 62.73% 63.13% +0.40% - Complexity 554 601 +47 ============================================ Files 31 32 +1 Lines 5023 5078 +55 Branches 480 481 +1 ============================================ + Hits 3151 3206 +55 - Misses 1707 1708 +1 + Partials 165 164 -1
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
List<LifecycleRule> deleteLifecycleRules(String bucket, LifecycleRule... rulesToDelete);
Neither Storage nor Bucket defines methods to deal with LifecycleRules. Adding a method to them to delete that rules doesn't look logical. Would it make sense to implement this functionality in the BucketInfo class next to List<? extends BucketInfo.LifecycleRule> getLifecycleRules() method?
cc: @frankyn
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 to @dmitry-fa, it would be better to define this in the BlobInfo builder because that's how metadata is mutated. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@frankyn @dmitry-fa PTAL |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@frankyn PTAL |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new implementation is much better than the previous one. Could you fix a few nits, please.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think you're super close, but I may have been too short on my surface expectations. Provided an example of what I would expect.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * boolean rulesDeleted = bucket.deleteLifecycleRules(); | ||
| * if (rulesDeleted) { | ||
| * // the lifecycle rules were deleted | ||
| * } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm expecting the following surface:
String bucketName = "my-unique-bucket"; Bucket bucket = storage.get(bucketName); updatedBucketMetdata = bucket.toBuilder().deleteLifecycleRules().build().update(); if (updatedBucketMetadata.getLifecycleRules().size() == 0) { // the lifecycle rules were deleted }
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@frankyn @dmitry-fa implemented in the same manner as other methods updating Bucket's properties. PTAL when you get chance |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. A few nits to address just left.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@dmitry-fa all the comments have been addressed PTAL |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me know, thanks for addressing my comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
🤖 I have created a release \*beep\* \*boop\* --- ## [1.110.0](https://www.github.com/googleapis/java-storage/compare/v1.109.1...v1.110.0) (2020-06-18) ### Features * delete bucket OLM rules ([#352](https://www.github.com/googleapis/java-storage/issues/352)) ([0a528c6](https://www.github.com/googleapis/java-storage/commit/0a528c6916f8b031916a4c6ecc96ce5e49ea99c7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Deleting the bucket OLM rules
There was an error while loading. Please reload this page.