Skip to content

Conversation

@Dhriti07
Copy link

PR adds support for partial list buckets for GRPC.

@Dhriti07 Dhriti07 marked this pull request as draft November 25, 2025 23:17
@Dhriti07 Dhriti07 marked this pull request as ready for review November 27, 2025 01:31
.map(
name -> {
String encoded = bucketNameCodec.encode(name);
BucketInfo.Builder builder = BucketInfo.newBuilder(encoded);

Choose a reason for hiding this comment

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

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 =

Choose a reason for hiding this comment

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

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(

Choose a reason for hiding this comment

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

we can use other syntaxes of assertThat made specifically for assertion on collection.

Ex: assertThat(actualList).containsExactlyInAnyOrder(elem1, elem2)

throw StorageException.coalesce(e);
}
} else {
// New logic for partial success

Choose a reason for hiding this comment

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

remove redundant comment

throw StorageException.coalesce(e);
.apply(ListBucketsRequest.newBuilder());

final ListBucketsRequest request = builder.build();

Choose a reason for hiding this comment

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

any reason for breaking this to new line, rather than keeping it above as ListBucketRequest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants