Skip to content

impl(generator): add OperationContext to Bigtable stub and decorators - #16331

Merged
scotthart merged 3 commits into
googleapis:mainfrom
scotthart:generator_stub_bigtable_operation_context
Aug 7, 2026
Merged

impl(generator): add OperationContext to Bigtable stub and decorators#16331
scotthart merged 3 commits into
googleapis:mainfrom
scotthart:generator_stub_bigtable_operation_context

Conversation

@scotthart

@scotthart scotthart commented Aug 7, 2026

Copy link
Copy Markdown
Member

As part of ongoing Bigtable metric collection, some additional metrics require data to be collected in a stub decorator. To enable this, we need to plumb the bigtable_internal::OperationContext object into the decorators via the stub RPC methods. This requires a minor but widespread change to how we emit stubs from the generator. For now, we are going to limit this generator change to the bigtable library where it is needed. In the future, as we expand metric collection, we will factor OperationContext out into a common library and make the generator changes service generic instead of specific to bigtable.

The code changes have been grouped into separate commits for clarity.

@scotthart
scotthart marked this pull request as ready for review August 7, 2026 20:17
@scotthart
scotthart requested a review from a team as a code owner August 7, 2026 20:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 an experimental feature to propagate OperationContext through the Bigtable client stub and decorator layers. It adds a new configuration option experimental_bigtable_operation_context to the code generator, updates the C++ code generator templates (including auth, logging, metadata, round-robin, stub, and tracing decorators) to support passing this context, and integrates the context parameter across the handwritten Bigtable client implementation files and their corresponding unit tests. I have no feedback to provide as there are no review comments.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.80617% with 128 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.23%. Comparing base (95b11e1) to head (88a60f9).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...loud/bigtable/internal/bigtable_channel_refresh.cc 2.85% 34 Missing ⚠️
generator/internal/descriptor_utils.cc 41.66% 14 Missing ⚠️
generator/internal/tracing_stub_generator.cc 0.00% 13 Missing ⚠️
generator/internal/metadata_decorator_generator.cc 0.00% 12 Missing ⚠️
generator/internal/auth_decorator_generator.cc 0.00% 10 Missing ⚠️
...erator/internal/round_robin_decorator_generator.cc 0.00% 10 Missing ⚠️
generator/internal/stub_generator.cc 9.09% 10 Missing ⚠️
generator/internal/stub_generator_base.cc 0.00% 9 Missing ⚠️
generator/internal/logging_decorator_generator.cc 0.00% 7 Missing ⚠️
...oud/bigtable/internal/data_connection_impl_test.cc 95.79% 5 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16331      +/-   ##
==========================================
- Coverage   92.24%   92.23%   -0.01%     
==========================================
  Files        2227     2227              
  Lines      209169   209208      +39     
==========================================
+ Hits       192943   192969      +26     
- Misses      16226    16239      +13     

☔ View full report in Codecov by Harness.
📢 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 30a02c2 into googleapis:main Aug 7, 2026
67 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