Skip to content

feat: create a generic wrapper for gRPC and REST pure background thre…#16154

Open
bajajneha27 wants to merge 3 commits into
googleapis:mainfrom
bajajneha27:generic-background-thread
Open

feat: create a generic wrapper for gRPC and REST pure background thre…#16154
bajajneha27 wants to merge 3 commits into
googleapis:mainfrom
bajajneha27:generic-background-thread

Conversation

@bajajneha27

Copy link
Copy Markdown
Contributor

…ad impl

@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 refactors the background thread creation logic by introducing a generic template class, AutomaticallyCreatedBackgroundThreadsImpl, to consolidate duplicate code from both gRPC and REST background thread implementations. However, the reviewer identified a critical issue where this generic implementation breaks REST pure background threads due to invalid default-construction of RestPureCompletionQueue and the omission of internal::CallContext setup. To resolve this, the reviewer suggested introducing a customizable QueueTraits template parameter to handle queue-specific initialization and execution logic.

Comment thread google/cloud/internal/generic_background_threads_impl.h Outdated
Comment thread google/cloud/internal/rest_pure_background_threads_impl.h
Comment thread google/cloud/internal/rest_pure_background_threads_impl.h Outdated
@bajajneha27 bajajneha27 marked this pull request as ready for review June 12, 2026 12:25
@bajajneha27 bajajneha27 requested a review from a team as a code owner June 12, 2026 12:25
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.94595% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.21%. Comparing base (adba263) to head (c755b37).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...e/cloud/internal/generic_background_threads_impl.h 89.65% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16154   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files        2265     2265           
  Lines      209121   209134   +13     
=======================================
+ Hits       192834   192849   +15     
+ Misses      16287    16285    -2     

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this file is now empty, let's delete it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this file is now empty, let's delete it.

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