Skip to content

Conversation

@scotthart
Copy link
Member

This is necessary to implement bigtable::WaitForConsistency using the generated admin types.

@scotthart scotthart requested a review from a team as a code owner January 27, 2026 19:28
@gemini-code-assist
Copy link

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 enhances the code generation framework by adding a new configuration option that allows specific service connections to expose their internal CompletionQueue. This feature is crucial for scenarios like bigtable::WaitForConsistency, which requires direct access to the underlying CompletionQueue for asynchronous operations. The changes ensure that generated client libraries can provide this access when configured, without exposing it by default.

Highlights

  • New Generator Option: Introduced emit_completion_queue_accessor in generator_config.proto to control the generation of a CompletionQueue accessor for service connections.
  • Bigtable Admin Integration: Enabled this new option for the BigtableTableAdmin service in generator_config.textproto, specifically to support bigtable::WaitForConsistency.
  • Code Generation Logic: Updated the code generator to conditionally include completion_queue.h and generate a protected virtual completion_queue() method in the Connection interface, along with a friend function in the internal namespace.
  • Implementation Generation: The ConnectionImpl generator now produces an override for the completion_queue() method, returning the CompletionQueue from the background threads.
  • Bigtable Admin Connection Update: The generated BigtableTableAdminConnection and BigtableTableAdminConnectionImpl classes now include the necessary CompletionQueue accessor.
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 introduces a new configuration option, emit_completion_queue_accessor, to the service configuration. This option enables the generation of a protected accessor and a friend function to expose the CompletionQueue from the BackgroundThreads owned by the Connection class. This functionality is specifically noted as necessary for bigtable::WaitForConsistency. The changes are consistently applied across the generator's logic and the generated Bigtable Table Admin client code. The implementation appears correct and adheres to the repository's style guide and best practices. No critical, high, or medium severity issues were found.

@scotthart scotthart enabled auto-merge (squash) January 27, 2026 19:55
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 48.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.87%. Comparing base (f944a14) to head (c98296c).
⚠️ Report is 1 commits behind head on prepare-for-v3.0.0.

Files with missing lines Patch % Lines
generator/internal/connection_generator.cc 37.50% 10 Missing ⚠️
generator/internal/connection_impl_generator.cc 50.00% 3 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           prepare-for-v3.0.0   #15912   +/-   ##
===================================================
  Coverage               92.87%   92.87%           
===================================================
  Files                    2343     2343           
  Lines                  216117   216141   +24     
===================================================
+ Hits                   200710   200741   +31     
+ Misses                  15407    15400    -7     

☔ 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 merged commit 2b9130f into googleapis:prepare-for-v3.0.0 Jan 27, 2026
51 of 52 checks passed
scotthart added a commit to scotthart/google-cloud-cpp that referenced this pull request Jan 28, 2026
scotthart added a commit that referenced this pull request Jan 28, 2026
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