-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Conversation
Filling the fields manually and leaving the current_interval out meant that the current_interval is set to its default rather than track the initial_interval The builder addresses this for us by setting it on the build method. Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1603 +/- ##
=======================================
+ Coverage 75.2% 75.2% +0.1%
=======================================
Files 82 82
Lines 7336 7335 -1
=======================================
Hits 5514 5514
+ Misses 1822 1821 -1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Thanks @clux, I've fixed the fmt and also added a test, so hopefully code cov is also ok now. |
This reverts commit fd3d1c2. Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
95f519d
to
a181dec
Compare
Filling the fields manually and leaving the current_interval out meant that the current_interval is set to its default rather than track the initial_interval
The builder addresses this for us by setting it on the build method.
Motivation
Noticed that the current_interval of the watcher backoff is left empty, which may lead to unintended behaviour.
Granted the difference is currently minimal (800ms to 500ms)
Solution
Using the builder pattern method from the backoff crate can be used to set the fields appropriately rather than simply the default value.