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

Switch from re-retrying to kiwiproject's retrying-again #531

Closed
sleberknight opened this issue Apr 2, 2021 · 0 comments · Fixed by #532
Closed

Switch from re-retrying to kiwiproject's retrying-again #531

sleberknight opened this issue Apr 2, 2021 · 0 comments · Fixed by #532
Assignees
Labels
enhancement A request for change or improvement to an existing feature
Milestone

Comments

@sleberknight
Copy link
Member

sleberknight commented Apr 2, 2021

Now that retrying-again has been officially released (first release is 0.5.0), we can switch kiwi to use it.

Since there were some breaking API changes in retrying-again such as throwing Exception instead of Throwable, this switch will include breaking API changes. As is our policy, we are not yet at 1.0.0 so we reserve the right to change APIs.

@sleberknight sleberknight added the enhancement A request for change or improvement to an existing feature label Apr 2, 2021
@sleberknight sleberknight added this to the 0.21.0 milestone Apr 2, 2021
@sleberknight sleberknight self-assigned this Apr 2, 2021
sleberknight added a commit that referenced this issue Apr 2, 2021
NOTE: The package for retrying-again is the same as the one in kiwi
which (for now) lets us access package-private members. If (when?) we
update to make proper use of the JPMS (module system) this will most
likely break and we'd need to change that somehow.

* Change POM to use org.kiwiproject:retrying-again:0.5.0 and remove
  the (now unnecessary) guava exclusion

* Update KiwiRetryer to use retrying-again
  - API breaking change: exceptionPredicates are Exception not Throwable
  - call now catches InterruptedException
  - call no longer catches ExecutionException
  - the internal Retryer is no longer generic
  - remove (now redundant) warning suppression for Unstable API usage
  - fix generic in LoggingRetryListener (is now wildcard)
  - fix code in logExceptionAttempt to call attempt.getException()

* Update KiwiRetryerException
  - Constructor now accepts Exception not Throwable, and it validates
    the type is RetryException or InterruptedException
  - Update unwrapKiwiRetryerException to remove handling for
    ExecutionException which is no longer thrown by Retryer
  - Add some new methods:
    isCauseRetryException, isCauseInterruptedException, getLastAttempt,
    getNumberOfFailedAttempts, and unwrapAsRetryException

* Update KiwiRetryerPredicates
  - all the Predicates are now java.util.Predicate
  - the exception Predicates now use Exception, not Throwable

Closes #531
Closes #481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request for change or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant