Skip to content

Conversation

@shubhangi-google
Copy link
Owner

@shubhangi-google shubhangi-google commented Nov 7, 2025

This pull request enhances the Google Cloud Storage client library by adding support for partial success scenarios when listing buckets. Previously, listing operations only returned the list of successfully created bucket. With this change, users can now opt to receive a list of successfully retrieved buckets along with a separate collection of bucket names that were unreachable, providing morevisibility into listing operations.

Highlights

  • Partial Success for Bucket Listing: Introduced a new return_partial_success parameter to the buckets method, allowing the API to return a list of unreachable buckets.
  • Access to Unreachable Buckets: The Bucket::List object now includes an unreachable attribute, which will contain the names of buckets that could not be reached when return_partial_success is enabled.
  • New Sample Code: A new sample storage_list_unreachable_buckets.rb has been added to demonstrate how to use this new feature and retrieve unreachable buckets.

@gemini-code-assist
Copy link

Summary of Changes

Hello @shubhangi-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 support for partial success scenarios when listing buckets. Previously, listing operations might fail entirely if some buckets were inaccessible. With this change, users can now opt to receive a list of successfully retrieved buckets along with a separate collection of bucket names that were unreachable, providing more robust error handling and visibility into listing operations.

Highlights

  • Partial Success for Bucket Listing: Introduced a new return_partial_success parameter to the buckets method, allowing the API to return a list of unreachable buckets instead of failing the entire operation.
  • Access to Unreachable Buckets: The Bucket::List object now includes an unreachable attribute, which will contain the names of buckets that could not be reached when return_partial_success is enabled.
  • New Sample Code: A new sample storage_list_unreachable_buckets.rb has been added to demonstrate how to use this new feature and retrieve unreachable buckets.
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

@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 adds support for partial success when listing buckets, allowing users to identify which buckets were unreachable during the API call. The implementation looks solid, introducing a return_partial_success flag and an unreachable attribute on the result list. I've provided a few suggestions to improve documentation, code formatting, and style for better maintainability and user experience.

Comment on lines 104 to 105
soft_deleted: soft_deleted,
return_partial_success: return_partial_success, options: options

Choose a reason for hiding this comment

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

medium

For better readability and consistency, it's good practice to have one argument per line when the argument list is long and spans multiple lines.

                        soft_deleted: soft_deleted,
                        return_partial_success: return_partial_success,
                        options: options

def list_unreachable_buckets
require "google/cloud/storage"

storage = Google::Cloud::Storage.new

Choose a reason for hiding this comment

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

medium

This line has trailing whitespace, which should be removed to maintain a clean codebase.

  storage = Google::Cloud::Storage.new

Copy link
Collaborator

@mahendra-google mahendra-google left a comment

Choose a reason for hiding this comment

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

LGTM only adds feat(): adding_support_for_partialsuccess_bucket_list in coventional commit

@shubhangi-google shubhangi-google changed the title adding_support_for_partialsuccess_bucket_list feat(storage): adding_support_for_partialsuccess_bucket_list Nov 11, 2025
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.

5 participants