Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

samples: add samples for partial list bucket#1627

Merged
Pulkit0110 merged 3 commits intogoogleapis:mainfrom
Pulkit0110:partial-list-samples
Nov 20, 2025
Merged

samples: add samples for partial list bucket#1627
Pulkit0110 merged 3 commits intogoogleapis:mainfrom
Pulkit0110:partial-list-samples

Conversation

@Pulkit0110
Copy link
Copy Markdown
Contributor

Add samples for the partial list bucket feature.

@Pulkit0110 Pulkit0110 requested a review from a team as a code owner November 19, 2025 12:35
@Pulkit0110 Pulkit0110 requested review from a team and balajismaniam November 19, 2025 12:35
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Nov 19, 2025

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Nov 19, 2025
@product-auto-label product-auto-label Bot added api: storage Issues related to the googleapis/python-storage API. samples Issues that are directly related to samples. labels Nov 19, 2025
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Pulkit0110, 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 introduces a new Python sample for Google Cloud Storage. This sample illustrates how to effectively use the list_buckets method with the return_partial_success option, allowing developers to gracefully handle scenarios where some bucket locations might be temporarily unreachable while still retrieving information from accessible ones. This enhances the robustness of applications interacting with Cloud Storage by providing a clear example of how to manage such edge cases.

Highlights

  • New Sample Code: A new Python sample storage_list_buckets_partial_success.py has been added to demonstrate how to list Google Cloud Storage buckets with partial success handling.
  • Partial Success Handling: The sample showcases the use of return_partial_success=True in storage_client.list_buckets() to identify and process both reachable buckets and unreachable locations.
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
Contributor

@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 a new sample for the partial list bucket feature. The code is clear and effectively demonstrates how to use this functionality. I have one suggestion to simplify the condition for checking unreachable locations, which will make the sample code more concise and idiomatic.

Comment thread samples/snippets/storage_list_buckets_partial_success.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread samples/snippets/storage_list_buckets_partial_success.py
Comment thread samples/snippets/storage_list_buckets_partial_success.py
@Pulkit0110 Pulkit0110 merged commit 46a5728 into googleapis:main Nov 20, 2025
14 checks passed
@Pulkit0110 Pulkit0110 deleted the partial-list-samples branch January 2, 2026 11:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/python-storage API. samples Issues that are directly related to samples. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants