feat: add support for partial success in ListBuckets for grpc#1
Open
Dhriti07 wants to merge 9 commits into
Open
feat: add support for partial success in ListBuckets for grpc#1Dhriti07 wants to merge 9 commits into
Dhriti07 wants to merge 9 commits into
Conversation
ajayky-os
approved these changes
Nov 27, 2025
| .map( | ||
| name -> { | ||
| String encoded = bucketNameCodec.encode(name); | ||
| BucketInfo.Builder builder = BucketInfo.newBuilder(encoded); |
There was a problem hiding this comment.
nit: can chain the setters of this builder
| // New logic for partial success | ||
| try { | ||
| GrpcCallContext merge = Utils.merge(grpcCallContext, Retrying.newCallContext()); | ||
| com.google.storage.v2.ListBucketsResponse response = |
There was a problem hiding this comment.
this logic seems to be repeated multiple times including implementation of ListBucketsWithPartialSuccessPage, can we can have a helper method for this ?
| page.iterateAll().forEach(allBuckets::add); | ||
|
|
||
| // Verify we found all expected buckets | ||
| assertThat( |
There was a problem hiding this comment.
we can use other syntaxes of assertThat made specifically for assertion on collection.
Ex: assertThat(actualList).containsExactlyInAnyOrder(elem1, elem2)
ShreyasSinha
approved these changes
Dec 5, 2025
| throw StorageException.coalesce(e); | ||
| } | ||
| } else { | ||
| // New logic for partial success |
| throw StorageException.coalesce(e); | ||
| .apply(ListBucketsRequest.newBuilder()); | ||
|
|
||
| final ListBucketsRequest request = builder.build(); |
There was a problem hiding this comment.
any reason for breaking this to new line, rather than keeping it above as ListBucketRequest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR adds support for partial list buckets for GRPC.