feat(pubsub): support publish hedging - #6861
Conversation
There was a problem hiding this comment.
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.
| where | ||
| V: Into<HedgingOptions>, | ||
| { | ||
| pub fn set_or_clear_hedging_options(mut self, v: Option<HedgingOptions>) -> Self { |
There was a problem hiding this comment.
Oh, we do have set_or_clear_* for fields with presence like messages:
LGTM
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Finalize API and enable release of pubsub.
For #6776