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

chore(deps): replace backoff with backon #1653

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flavio
Copy link
Contributor

@flavio flavio commented Nov 29, 2024

Motivation

The backoff crate is no longer maintained and it's pulling the instant which is also marked as unmaintained by RUSTSEC.

This PR fixes #1635

Solution

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.

I also had to introduce this new trait because the backon::Backoff trait doesn't have a reset 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 to backon and propose the extension of their trait to include the reset method.

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]>
@flavio flavio force-pushed the replace-instant-with-backon branch from 53cc42e to a7d6e70 Compare November 29, 2024 11:46
@flavio
Copy link
Contributor Author

flavio commented Nov 29, 2024

About the rustfmt linter... I've updated my rust nightly and ran just fmt, everything is fine locally 🤔

@flavio
Copy link
Contributor Author

flavio commented Nov 29, 2024

Also, the tarpaulin failure doesn't seem related with this PR

@nightkr
Copy link
Member

nightkr commented Nov 29, 2024

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.

@flavio
Copy link
Contributor Author

flavio commented Dec 2, 2024

@nightkr: ouch, I didn't notice you had just submitted a similar PR 😓

@nightkr
Copy link
Member

nightkr commented Dec 2, 2024

Didn't realize you had actually picked up the issue 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RUSTSEC-2024-0384: instant is unmaintained
2 participants