Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kube-runtime): setup backoff with builder pattern #1603

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions kube-runtime/src/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,14 +898,13 @@
impl Default for DefaultBackoff {
fn default() -> Self {
Self(ResetTimerBackoff::new(
backoff::ExponentialBackoff {
initial_interval: Duration::from_millis(800),
max_interval: Duration::from_secs(30),
randomization_factor: 1.0,
multiplier: 2.0,
max_elapsed_time: None,
..ExponentialBackoff::default()
},
backoff::ExponentialBackoffBuilder::new()
.with_initial_interval(Duration::from_millis(800))
.with_max_interval(Duration::from_secs(30))

Check warning on line 903 in kube-runtime/src/watcher.rs

View check run for this annotation

Codecov / codecov/patch

kube-runtime/src/watcher.rs#L901-L903

Added lines #L901 - L903 were not covered by tests
.with_randomization_factor(1.0)
.with_multiplier(2.0)
.with_max_elapsed_time(None)

Check warning on line 906 in kube-runtime/src/watcher.rs

View check run for this annotation

Codecov / codecov/patch

kube-runtime/src/watcher.rs#L906

Added line #L906 was not covered by tests
.build(),
Duration::from_secs(120),
))
}
Expand Down
Loading