Skip to content

Conversation

@chandra-siri
Copy link
Collaborator

@chandra-siri chandra-siri commented Jan 28, 2026

Change contructors of MRD and AAOW AsyncGrpcClient.grpc_client to AsyncGrpcClient. This will help us extend multiple methods in AsyncGrpcClient in future.

More details in b/479030029

AsyncGrpcClient.grpc_client to AsyncGrpcClient
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/python-storage API. labels Jan 28, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @chandra-siri, 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 refactors the client type used by asynchronous storage components, specifically AsyncAppendableObjectWriter and AsyncMultiRangeDownloader. The change streamlines the public interface of these classes by allowing them to directly accept an AsyncGrpcClient instance, improving consistency and ease of use. The internal logic has been updated to correctly access the gRPC client from this new interface, with corresponding updates across samples and unit tests to ensure compatibility and correct mocking behavior.

Highlights

  • Client Interface Simplification: The AsyncAppendableObjectWriter and AsyncMultiRangeDownloader classes now accept an AsyncGrpcClient instance directly in their constructors and create_mrd methods, rather than requiring the nested AsyncGrpcClient.grpc_client attribute. This simplifies the public API for these components.
  • Internal Client Access Update: Internally, both AsyncAppendableObjectWriter and AsyncMultiRangeDownloader have been updated to access the underlying gRPC client via the grpc_client attribute of the AsyncGrpcClient instance passed to them.
  • Sample Code and Test Fixture Alignment: All relevant sample snippets and test fixtures have been updated to reflect the new client interface, instantiating AsyncGrpcClient directly when creating client objects.
  • Unit Test Mocking Refinement: Unit tests for AsyncAppendableObjectWriter and AsyncMultiRangeDownloader have been adjusted to correctly mock the AsyncGrpcClient object and its grpc_client attribute, and redundant @mock.patch decorators have been removed.
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
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 refactors the client interface for AsyncAppendableObjectWriter and AsyncMultiRangeDownloader, changing the expected client type from AsyncGrpcClient.grpc_client to AsyncGrpcClient. This is a breaking change, correctly marked with fix!:. The changes are consistently applied across the library code, samples, and tests. The implementation looks correct. I have one suggestion to improve test code maintainability by reducing code duplication in the unit tests for AsyncMultiRangeDownloader.

@chandra-siri chandra-siri marked this pull request as ready for review January 28, 2026 13:06
@chandra-siri chandra-siri requested review from a team as code owners January 28, 2026 13:06
@chandra-siri chandra-siri requested a review from nicain January 28, 2026 13:06
@chandra-siri chandra-siri changed the title fix!: change interface of mrd. client type from fix!: Change contructors of MRD and AAOW AsyncGrpcClient.grpc_client to AsyncGrpcClient Jan 28, 2026
@chandra-siri chandra-siri merged commit e730bf5 into main Jan 28, 2026
18 checks passed
@chandra-siri chandra-siri deleted the change_mrd_interface branch January 28, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/python-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants