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

Bump exponential-backoff from 1.2.0 to 2.0.0 #131

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 28, 2024

Bumps exponential-backoff from 1.2.0 to 2.0.0.

Release notes

Sourced from exponential-backoff's releases.

v2.0.0

Overview

This release changes the type yielded by the iterator from Duration to Option<Duration>. This should simplify writing correct retry logic: after the last attempt there should never be an extra sleep.

This patch also changes the terminology: rather than counting retries, we're now counting total attempts. This makes it so that if you pass "3" as the number to the constructor, you'll now have a total of 3 attempts, rather than 1 attempt + 3 additional retries.

Finally: there is now also an implementation of IntoIterator for Backoff: that means if you're not reusing Backoff instances, you no longer have to pass the type by-reference:

use exponential_backoff::Backoff;
use std::{fs, thread, time::Duration};
let attempts = 3;
let min = Duration::from_millis(100);
let max = Duration::from_secs(10);
for duration in Backoff::new(attempts, min, max) { // ← Backoff passed by-value
match fs::read_to_string("README.md") {
Ok(string) => return Ok(string),
Err(err) => match duration {
Some(duration) => thread::sleep(duration),
None => return Err(err),
}
}
}

What's Changed

New Contributors

Full Changelog: yoshuawuyts/exponential-backoff@v1.2.0...v2.0.0

Commits
  • 2a10fec chore: Release exponential-backoff version 2.0.0
  • d91da6b Merge pull request #18 from yoshuawuyts/fix-retry-logic
  • dc5eaf2 Merge pull request #20 from demoray/simplify-clamp
  • a0fe8b3 Merge pull request #22 from demoray/fix-merge-errors
  • 0763723 Merge branch 'main' into fix-retry-logic
  • f0f4eff Merge branch 'main' into simplify-clamp
  • cbf0cf7 Merge pull request #21 from demoray/single-iter-impl
  • b78d5a8 fix retry logic
  • aa76a00 rename attempt_count -> attempts
  • 5e0e83f rename retries to attempts
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [exponential-backoff](https://github.com/yoshuawuyts/exponential-backoff) from 1.2.0 to 2.0.0.
- [Release notes](https://github.com/yoshuawuyts/exponential-backoff/releases)
- [Commits](yoshuawuyts/exponential-backoff@v1.2.0...v2.0.0)

---
updated-dependencies:
- dependency-name: exponential-backoff
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants