chore(deps): replace backoff with backon #1653
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.