Skip to content

feat(Storage): Add returnPartialSuccess support to ListBuckets#9

Open
mahendra-google wants to merge 1 commit intomainfrom
list-bucket-partials-support
Open

feat(Storage): Add returnPartialSuccess support to ListBuckets#9
mahendra-google wants to merge 1 commit intomainfrom
list-bucket-partials-support

Conversation

@mahendra-google
Copy link
Copy Markdown
Owner

@mahendra-google mahendra-google commented Nov 11, 2025

This PR introduces the returnPartialSuccess flag (via ListBucketsOptions). When set to true, the method will return buckets from reachable locations and populate the unreachable buckets from unreachable locations, rather than failing the entire request. Please see b/459649174

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @mahendra-google, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Google Cloud Storage client library by adding a returnPartialSuccess option to the ListBuckets method. This new capability allows developers to retrieve a list of available buckets even if some storage locations are temporarily inaccessible, providing a more robust and fault-tolerant way to interact with Google Cloud Storage by reporting unreachable locations rather than halting the entire operation.

Highlights

  • New Feature: returnPartialSuccess: Introduced a returnPartialSuccess flag to ListBucketsOptions. When set to true, the ListBuckets method will return buckets from reachable locations and populate an unreachable field for any locations that could not be reached, instead of failing the entire request.
  • Integration Tests: Added a new integration test, ListBuckets_ReturnPartialSuccess_ReturnsBothReachableAndUnreachable, to verify the correct behavior of the returnPartialSuccess option, ensuring both reachable and unreachable locations are handled as expected.
  • Unit Test Updates: Updated unit tests for ListBucketsOptions to include assertions for the new ReturnPartialSuccess property, ensuring it is correctly handled when default and explicitly set.
  • Dependency Update: The Google.Apis.Storage.v1 package reference has been updated to version 1.71.0.3920.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the returnPartialSuccess option for listing buckets, which is a useful feature for handling partial failures. The implementation is well-done, with appropriate changes to the options class, unit tests, and a necessary dependency update. I've added one suggestion to simplify the new integration test by removing some redundant code. Overall, this is a solid contribution.

@mahendra-google
Copy link
Copy Markdown
Owner Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the returnPartialSuccess option for listing buckets, allowing for partial results when some storage locations are unreachable. The changes to ListBucketsOptions.cs and the associated unit tests in ListBucketsOptionsTest.cs are well-implemented. The necessary dependency updates are also included. My main feedback concerns the new integration tests in ListBucketsTest.cs. They appear to rely on the test environment having unreachable locations, which can make them flaky. Specifically, one test is likely to fail in a fully healthy environment, and another contains a weak assertion that doesn't effectively validate the new functionality.

@mahendra-google
Copy link
Copy Markdown
Owner Author

/Gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the returnPartialSuccess flag for listing buckets, allowing for partial results when some locations are unreachable. The changes are well-implemented, including the new option, dependency updates, and corresponding tests. I have one suggestion to refactor the new integration tests to improve maintainability by reducing code duplication.

@mahendra-google
Copy link
Copy Markdown
Owner Author

/Gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the returnPartialSuccess flag for listing buckets, which is a valuable addition for handling partial failures. The implementation looks solid, with corresponding changes in the options class, unit tests, and a new integration test to verify the behavior. I have one suggestion to improve the clarity of the public API documentation for the new option. Otherwise, great work!

@mahendra-google
Copy link
Copy Markdown
Owner Author

/Gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the returnPartialSuccess flag for listing buckets, which is a valuable addition for handling unreachable storage locations gracefully. The implementation is straightforward and well-tested, including updates to the options class, unit tests, integration tests, and dependencies. I have a couple of minor suggestions to improve the code documentation for clarity and to apply a small optimization in the new integration test. Overall, this is a well-executed feature addition.

Comment thread apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1/ListBucketsOptions.cs Outdated
@mahendra-google
Copy link
Copy Markdown
Owner Author

/Gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the returnPartialSuccess flag for listing buckets, allowing for partial results when some locations are unreachable. The implementation is well-executed, including updates to the options class, project dependencies, and the addition of both unit and integration tests. The changes are correct and follow existing patterns. I have one suggestion to improve the clarity of the XML documentation for the new option.

Comment thread apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1/ListBucketsOptions.cs Outdated
@mahendra-google mahendra-google force-pushed the list-bucket-partials-support branch from 7b6ce5a to 27bd50b Compare November 17, 2025 11:03
@mahendra-google
Copy link
Copy Markdown
Owner Author

/Gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces returnPartialSuccess support for ListBuckets, which is a useful feature for handling partially available services. The implementation is sound, with appropriate updates to the options class, dependencies, and the addition of new tests. I have provided a couple of suggestions to enhance the clarity of the new API's documentation and the associated test code to improve maintainability.

Comment thread apis/Google.Cloud.Storage.V1/Google.Cloud.Storage.V1/ListBucketsOptions.cs Outdated
@mahendra-google mahendra-google force-pushed the list-bucket-partials-support branch from 415a9b2 to 6886cfb Compare November 17, 2025 11:39
@mahendra-google mahendra-google force-pushed the list-bucket-partials-support branch from fddc896 to 9e11bdc Compare November 20, 2025 09:39
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.

1 participant