Skip to content

feat(pubsub): include subscription name in StreamingPull header#4585

Merged
haphungw merged 9 commits intogoogleapis:mainfrom
haphungw:streaming-pull-routing-header
Feb 6, 2026
Merged

feat(pubsub): include subscription name in StreamingPull header#4585
haphungw merged 9 commits intogoogleapis:mainfrom
haphungw:streaming-pull-routing-header

Conversation

@haphungw
Copy link
Copy Markdown
Contributor

@haphungw haphungw commented Feb 6, 2026

Fix #4470

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Feb 6, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (48bc5b2) to head (f5166e4).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4585   +/-   ##
=======================================
  Coverage   95.02%   95.02%           
=======================================
  Files         195      195           
  Lines        7456     7458    +2     
=======================================
+ Hits         7085     7087    +2     
  Misses        371      371           

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

@haphungw haphungw marked this pull request as ready for review February 6, 2026 00:23
@haphungw haphungw requested a review from a team February 6, 2026 00:23
Copy link
Copy Markdown
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

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

How can we test this so the code doesn't regress?

I have an idea (SPOILERS)

We have a mock Pub/Sub service ...

request: tonic::Request<mpsc::Receiver<tonic::Result<v1::StreamingPullRequest>>>,

... which we use in the session.rs unit tests. Maybe we can add a new unit test where we extract the metadata from the incoming tonic::Request and check that it has the header we just set?

https://docs.rs/tonic/0.14.2/tonic/struct.Request.html#method.metadata

@haphungw haphungw force-pushed the streaming-pull-routing-header branch from d10b0a8 to d56698b Compare February 6, 2026 14:43
Copy link
Copy Markdown
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

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

Looks great. I like having unit tests for each of the interfaces involved. (Plus the one you added in session.rs that ties them all together)

@haphungw haphungw enabled auto-merge (squash) February 6, 2026 16:28
@haphungw haphungw merged commit 4662c64 into googleapis:main Feb 6, 2026
34 checks passed
@haphungw haphungw deleted the streaming-pull-routing-header branch April 4, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set routing header for StreamingPull RPC

2 participants