-
Notifications
You must be signed in to change notification settings - Fork 525
Rethrow particular not-retryable exceptions #281
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9fa3d2d
add rethrow exceptions
ttulka 1e48e3e
use policy for exceptions to rethrow
ttulka c1be894
fix readme
ttulka 7c7ac67
revert test
ttulka 39e385a
revert
ttulka 79bc8e8
assignable exceptions
ttulka 198a7f8
update readme
ttulka eade411
add tests
ttulka 65dc650
add subtyping test
ttulka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is identical to the previous 3 lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is using
rethrowExceptions
, the previousfor
is usingexcludes
to iterate over.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right but why do we need
rethrowExceptions
when we already haveexcludes
+rethrow
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
rethrowExceptions
onRetryable
sets thenoRecoveryForNotRetryable
flag of RetryTemplate, so the listed exceptions are not only not-retryable, but also directly rethrown (without recovery and wrapping).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, just set
rethrow
alongsideexcludes
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sine 1.3.3 hasn't been built yet, maybe we should revert that commit until this is sorted out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's sounds reasonable.
Looks like that one was requested by @ttulka as well: ec245fd.
So, we are safe so to not release anything on the matter and continue discussion 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - maybe we should move this whole thing to the new 2.0 branch where we can overhaul the entire attribute list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly happy about not getting anything in the next release, but as far as you guys decide on the API attributes, I would love to implement it if you want me to.
All in all, this feature is going to save me a lot of work!
Many thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand you are "not happy", but you realized that the previous commit did not satisfy all your needs and submitted this new PR, that does not use the new attribute from the previous commit.
It made no sense to us to release a version with a new attribute that would immediately become obsolete in the "next" release.
We are happy that you are willing to contribute, but we need to finalize a design that makes sense for the entire community, and provides minimal confusion for users with simpler use cases.
Thanks, again, for your contribution; we will continue to work this through.