feat(seatbelt): add handle_unavailable to RetryConfig and HedgingConfig#314
feat(seatbelt): add handle_unavailable to RetryConfig and HedgingConfig#314
Conversation
Add the handle_unavailable boolean field to both config structs so it can be driven from external configuration sources (e.g. config files). The field defaults to false, matching the existing layer default. The config() methods on RetryLayer and HedgingLayer now forward the new field, and all snapshot tests are updated accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a handle_unavailable: bool flag to both retry and hedging configuration structs so the existing layer behavior can be controlled via externally loaded config (e.g., JSON), and wires those configs through the respective Layer::config() convenience methods.
Changes:
- Add
handle_unavailabletoRetryConfigandHedgingConfigwith a default offalse. - Forward
handle_unavailablethroughRetryLayer::config()andHedgingLayer::config(). - Update relevant insta snapshots to reflect the new field.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/seatbelt/src/retry/config.rs | Adds handle_unavailable to RetryConfig and documents its default/meaning. |
| crates/seatbelt/src/retry/layer.rs | Forwards handle_unavailable from RetryConfig via .config(). |
| crates/seatbelt/src/retry/snapshots/seatbelt__retry__config__tests__default_snapshot.snap | Updates JSON snapshot to include handle_unavailable. |
| crates/seatbelt/src/retry/snapshots/seatbelt__retry__layer__tests__config_applies_all_settings.snap | Updates debug snapshot for config_applies_all_settings. |
| crates/seatbelt/src/hedging/config.rs | Adds handle_unavailable to HedgingConfig and documents its default/meaning. |
| crates/seatbelt/src/hedging/layer.rs | Forwards handle_unavailable from HedgingConfig via .config(). |
| crates/seatbelt/src/hedging/snapshots/seatbelt__hedging__config__tests__default_snapshot.snap | Updates JSON snapshot to include handle_unavailable. |
| crates/seatbelt/src/hedging/snapshots/seatbelt__hedging__layer__tests__config_applies_all_settings.snap | Updates debug snapshot for config_applies_all_settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 153 153
Lines 9401 9405 +4
=======================================
+ Hits 9401 9405 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Add the handle_unavailable boolean field to both config structs so it can be driven from external configuration sources (e.g. config files). The field defaults to false, matching the existing layer default.
The config() methods on RetryLayer and HedgingLayer now forward the new field, and all snapshot tests are updated accordingly.