Skip to content

feat(pubsub): support publish hedging - #6861

Merged
suzmue merged 2 commits into
googleapis:mainfrom
suzmue:remove_into
Sep 18, 2026
Merged

suzmue merged 2 commits into
googleapis:mainfrom
suzmue:remove_into

Conversation

@suzmue

@suzmue suzmue commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Finalize API and enable release of pubsub.

For #6776

@suzmue
suzmue requested review from a team as code owners September 18, 2026 21:16
@product-auto-label product-auto-label Bot added the api: pubsub Issues related to the Pub/Sub API. label Sep 18, 2026

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

Copy link
Copy Markdown
Contributor

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 removes the skip_release flag for the pubsub library in librarian.yaml and refactors the hedging options builder methods in src/pubsub/src/publisher/builder.rs to accept concrete types (HedgingOptions and Option<HedgingOptions>) instead of generic types implementing Into<HedgingOptions>. Feedback is provided to remove redundant .into() and .map(Into::into) conversions in PublisherPartialBuilder's methods, as the arguments are already of the target types.

Comment thread src/pubsub/src/publisher/builder.rs
Comment thread src/pubsub/src/publisher/builder.rs
where
V: Into<HedgingOptions>,
{
pub fn set_or_clear_hedging_options(mut self, v: Option<HedgingOptions>) -> Self {

@dbolduc dbolduc Sep 18, 2026

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.

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.

Another argument for keeping the API is that an application might want to explicitly disable hedging in case the client library ever changes its default behavior.

where
V: Into<HedgingOptions>,
{
pub fn set_or_clear_hedging_options(mut self, v: Option<HedgingOptions>) -> Self {

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.

Another argument for keeping the API is that an application might want to explicitly disable hedging in case the client library ever changes its default behavior.

@suzmue
suzmue enabled auto-merge (squash) September 18, 2026 21:24
@suzmue
suzmue merged commit f4c5ac4 into googleapis:main Sep 18, 2026
42 checks passed
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.18%. Comparing base (9925abe) to head (5085404).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6861   +/-   ##
=======================================
  Coverage   97.18%   97.18%           
=======================================
  Files         331      331           
  Lines      110482   110478    -4     
=======================================
- Hits       107373   107370    -3     
+ Misses       3109     3108    -1     

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

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.

2 participants