-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
chore(deps): replace backoff with backon #1653
base: main
Are you sure you want to change the base?
Conversation
53cc42e
to
a7d6e70
Compare
About the |
Also, the tarpaulin failure doesn't seem related with this PR |
Yeah.. ran into tarpaulin issues on my end too. Need to go figure out what's happening there. FWIW I took a stab at this as well (#1652) since I didn't realize you had picked it up too. |
@nightkr: ouch, I didn't notice you had just submitted a similar PR 😓 |
Didn't realize you had actually picked up the issue 😅 |
A lot of work has already gone into #1652 . I'm closing this PR |
a7d6e70
to
f085689
Compare
I've rebased the initial code against the current |
f085689
to
102dd43
Compare
Fixed rustfmt warnings with nightly |
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.
This one is fine with me, thank you. I'll let @nightkr chime in before merging. unfortunatete that you both made implementations at the same time!
Don't worry too much about the unrelated clippy warnings from the other PR, they can always be fixed after.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1653 +/- ##
=======================================
- Coverage 75.9% 75.8% -0.0%
=======================================
Files 84 84
Lines 7611 7630 +19
=======================================
+ Hits 5771 5779 +8
- Misses 1840 1851 +11
|
Replace the `backoff` dependency with `backon`. The former one is no longer maintained and is also pulling the `instant` crate, which has been marked as unmaintained by RUSTSEC. Prior to this commit the public API of kube-rs exposed a trait defined by the `backoff` crate. This commits introduces a new trait defined by kube-rs, which wraps the `backon` trait. Fixes kube-rs#1635 Signed-off-by: Flavio Castelli <[email protected]>
102dd43
to
5694214
Compare
I've fixed the clippy warnings |
I'm not going to hard-block this, but I don't feel super comfortable with how we end up baking the boundary details into our API here. It also feels like we're not really gaining much from reusing backon if our API ends up being incompatible with them anyway. @Xuanwo is this sort of adaptive reset policy something you'd be interested in tackling upstream at some point? I agree with Xuanwo/backon#52 (comment) that a "manual" reset() is kind of redundant, but it can end up helpful when trying to manage the state over time. |
Hi, I'm interested in starting a discussion on this to learn more about your use case. I don't understand the difference between starting a new retry and resetting the API currently. More input would be greatly appreciated. |
Motivation
The
backoff
crate is no longer maintained and it's pulling theinstant
which is also marked as unmaintained by RUSTSEC.This PR fixes #1635
Solution
Replace the
backoff
dependency withbackon
. The former one is no longer maintained and is also pulling theinstant
crate, which has been marked as unmaintained by RUSTSEC.Prior to this commit the public API of kube-rs exposed a trait defined by the
backoff
crate. This commits introduces a new trait defined by kube-rs, which wraps thebackon
trait.I also had to introduce this new trait because the
backon::Backoff
trait doesn't have areset
method. kubers makes use of this method, hence the "trick" of defining our own trait solves this challenge. If you don't like this approach, I can try to go upstream tobackon
and propose the extension of their trait to include thereset
method.