Upgrade Watermill to https://github.com/cenkalti/backoff/v5 #570
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 / Background
Watermill currently uses an obsolete version of the Exponential Backoff Go Package. This upgrades Watermill from using v3 to v5.
This upgrade contains multiple breaking changes, but since the API is wrapped inside custom retry middleware we can hide these API changes from the user.
Detail
This requires moving from backoff/v3 MaxElapsedTime to a full backoff/v5 Retry implementation.
IMO, making the retry hook work here is a bit clunky since there is no native way of implementing it, and it needs to be hidden in the operation.
This also bumps the go version in go.mod up to 1.23
Alternative approaches considered (if applicable)
I am aware this conflicts with PR #564.
Happy to move forward with that PR instead if the community decides that is a better approach.
Please also provide feedback on my implementation! I have only been working with Go a few months.
Checklist
The resources of our team are limited. There are a couple of things that you can do to help us merge your PR faster:
make up
.make test_short
for a quick check.make test
.