Skip to content

Conversation

@mpeddada1
Copy link
Collaborator

@mpeddada1 mpeddada1 commented Jan 9, 2026

Follow up to #15848. Removes the remaining deprecated storage::Client constructors and adds migration documentation for them.

@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jan 9, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @mpeddada1, 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 focuses on refining the public API of the storage::Client class by eliminating previously deprecated constructors and methods. These elements were not intended for general application use and their removal simplifies the API, reducing potential misuse and improving maintainability. The changes include updating internal test code to reflect these removals.

Highlights

  • Removal of Deprecated Client Constructor: The Client constructor that accepted a std::shared_ptr<internal::StorageConnection> and a NoDecorations tag has been removed. This constructor was previously marked as deprecated and intended only for test code.
  • Removal of Deprecated raw_client() Method: The raw_client() method, which provided access to the underlying StorageConnection, has been removed. This method was also marked as deprecated and not intended for public use.
  • Test Code Adaptation: Test code in grpc_plugin_test.cc has been updated to use ClientImplDetails::GetConnection(client) as a replacement for the removed client.raw_client() method, ensuring tests continue to function correctly.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 removes a deprecated Client constructor and the raw_client() method. The changes are straightforward and correctly update the test code to use ClientImplDetails::GetConnection() instead of the removed raw_client() method. My feedback includes a suggestion to improve type correctness and avoid a magic number in the test code.

Comment on lines 121 to 122
EXPECT_GE(connection->options().get<storage::UploadBufferSizeOption>(),
32 * 1024 * 1024L);

Choose a reason for hiding this comment

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

medium

The type of storage::UploadBufferSizeOption is std::size_t, which is an unsigned type. The literal 32 * 1024 * 1024L has type long, which is signed. This can lead to compiler warnings about signed/unsigned comparisons. Please use an unsigned literal suffix like UL to match the type of the option.

Additionally, this value is a magic number. It would improve readability and maintainability to define it as a named constant, for example:

constexpr std::size_t k32MiB = 32 * 1024 * 1024;
  EXPECT_GE(connection->options().get<storage::UploadBufferSizeOption>(),
            32 * 1024 * 1024UL);

Copy link
Member

Choose a reason for hiding this comment

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

It's worthwhile to add the UL; don't worry about creating a named constant in this case.

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.88%. Comparing base (04c9b39) to head (6d0dd93).
⚠️ Report is 1 commits behind head on prepare-for-v3.0.0.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           prepare-for-v3.0.0   #15869      +/-   ##
======================================================
- Coverage               92.89%   92.88%   -0.01%     
======================================================
  Files                    2395     2395              
  Lines                  218536   218535       -1     
======================================================
- Hits                   203008   202991      -17     
- Misses                  15528    15544      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpeddada1 mpeddada1 marked this pull request as ready for review January 9, 2026 18:41
@mpeddada1 mpeddada1 requested review from a team as code owners January 9, 2026 18:41
@mpeddada1 mpeddada1 requested a review from scotthart January 9, 2026 18:42
@mpeddada1 mpeddada1 enabled auto-merge (squash) January 9, 2026 21:57
@mpeddada1 mpeddada1 merged commit 01104af into googleapis:prepare-for-v3.0.0 Jan 9, 2026
51 of 52 checks passed
ivanbolwan666-dotcom added a commit to ivanbolwan666-dotcom/google-cloud-cpp that referenced this pull request Jan 10, 2026
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 Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants