Skip to content

impl(v3): switch GCS to use GUAC#15890

Merged
scotthart merged 4 commits intogoogleapis:prepare-for-v3.0.0from
scotthart:v3_gcs_switch_guac
Jan 20, 2026
Merged

impl(v3): switch GCS to use GUAC#15890
scotthart merged 4 commits intogoogleapis:prepare-for-v3.0.0from
scotthart:v3_gcs_switch_guac

Conversation

@scotthart
Copy link
Copy Markdown
Member

This is second (and hopefully last PR to decommission the GCS specific OAuth2 API and use the GUAC API instead.

This PR:

  • updates the tests previously using the GCS OAuth implementation to now use the GUAC implementation.
  • updates the v3 migration guide
  • deletes the GCS specific OAuth2 files
  • updates the storage abi dump

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @scotthart, 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 completes the transition of the Google Cloud Storage client library's authentication mechanism from its legacy GCS-specific OAuth2 implementation to the unified Google Unified Authentication Client (GUAC) API. This change simplifies the authentication codebase, removes deprecated components, and aligns GCS with a more consistent and modern authentication strategy across Google Cloud client libraries. The migration guide and various tests have been updated to reflect these significant internal changes.

Highlights

  • Migration to GUAC API: The Google Cloud Storage (GCS) client library has been updated to use the Google Unified Authentication Client (GUAC) API, replacing the GCS-specific OAuth2 API.
  • Deprecated GCS OAuth2 Removal: All GCS-specific OAuth2 credential files and related internal components have been removed from the codebase, including oauth2/anonymous_credentials, oauth2/authorized_user_credentials, oauth2/compute_engine_credentials, oauth2/google_credentials, and oauth2/service_account_credentials.
  • V3 Migration Guide Update: The v3 migration guide has been updated with new sections detailing the removal of Oauth2CredentialsOption and CreateServiceAccountCredentialsFromFilePath, providing clear 'Before' and 'After' code examples for migrating to the GUAC equivalents.
  • Credential Handling Refinement: Internal credential handling logic has been centralized and streamlined, with the introduction of ApplyServiceAccountCredentialsInfoOverrides and a WrapRestCredentials class to adapt GUAC credentials for GCS client use.
  • Test Suite Updates: Numerous unit and integration tests across the GCS client library have been updated to reflect the new GUAC-based authentication mechanisms, ensuring compatibility and correct behavior.

🧠 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
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 is a significant and valuable refactoring that switches the GCS client to use the unified authentication client (GUAC), decommissioning the GCS-specific OAuth2 API. This aligns the GCS client with other C++ client libraries and simplifies the codebase by removing a lot of deprecated code. The changes correctly update client construction, authentication logic in tests and benchmarks, and the v3 migration guide. My review found a few typos in the code examples within the migration guide, for which I've provided suggestions. Overall, the changes are well-executed and improve the maintainability of the library.

Comment thread doc/v3-migration-guide.md Outdated
Comment thread doc/v3-migration-guide.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 87.96992% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.82%. Comparing base (d8fe957) to head (0991429).
⚠️ Report is 1 commits behind head on prepare-for-v3.0.0.

Files with missing lines Patch % Lines
...ts/service_account_credentials_integration_test.cc 0.00% 10 Missing ⚠️
.../cloud/storage/benchmarks/throughput_experiment.cc 0.00% 5 Missing ⚠️
...oud/internal/oauth2_service_account_credentials.cc 90.90% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           prepare-for-v3.0.0   #15890      +/-   ##
======================================================
- Coverage               92.84%   92.82%   -0.02%     
======================================================
  Files                    2391     2360      -31     
  Lines                  218505   216610    -1895     
======================================================
- Hits                   202881   201079    -1802     
+ Misses                  15624    15531      -93     

☔ 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.

@scotthart scotthart marked this pull request as ready for review January 20, 2026 20:54
@scotthart scotthart requested review from a team January 20, 2026 20:54
@scotthart scotthart merged commit 69724ae into googleapis:prepare-for-v3.0.0 Jan 20, 2026
51 of 52 checks passed
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.

2 participants