Skip to content

feat: re-implement retry based on tokio_retry2.#21

Merged
peterhuene merged 4 commits intostjude-rust-labs:mainfrom
peterhuene:retry
Aug 20, 2025
Merged

feat: re-implement retry based on tokio_retry2.#21
peterhuene merged 4 commits intostjude-rust-labs:mainfrom
peterhuene:retry

Conversation

@peterhuene
Copy link
Contributor

@peterhuene peterhuene commented Aug 19, 2025

This PR re-implements the retry feature on top of tokio_retry2.

Removes the dependency on reqwest-retry as it doesn't seem to be currently maintained and has dependencies that are quite outdated.

Also fixes an infinite timeout for connecting and reading from the underlying reqwest::Client.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have added at least one relevant code reviewer to the PR.
  • Your code builds clean without any errors or warnings.
  • You have added tests (when appropriate).
  • You have updated the README or other documentation to account for these
    changes (when appropriate).
  • You have added an entry to the relevant CHANGELOG.md (see
    "keep a changelog" for more information).
  • Your commit messages follow the conventional commit style.

This commit updates dependencies and fixes a few unnecessary dependencies.

It also removes the retry functionality based on `reqwest-retry` as the crate
is now significantly out of date and hasn't had anyone respond to requests to
release a new version in some time.
This commit re-implements the retry feature on top of `tokio_retry2`.
@peterhuene peterhuene requested a review from claymcleod August 19, 2025 20:57
@peterhuene peterhuene self-assigned this Aug 19, 2025
@peterhuene
Copy link
Contributor Author

FYI: the motivation for this change was seeing very old (and some packages with advisories) being transitively referenced through reqwest-retry and seeing an open issue that's been there since the beginning of the year to ask the maintainers to publish a new version.

As the reqwest operations are minimal from the client, it seemed like a relatively easy thing to replicate without using a middleware.

Make the connect and read timeouts configurable on the builder.
@peterhuene peterhuene merged commit 4ca5b46 into stjude-rust-labs:main Aug 20, 2025
6 checks passed
@peterhuene peterhuene deleted the retry branch August 20, 2025 19:41
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.

2 participants