Skip to content

Add retry handler support #1412

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

Merged
merged 12 commits into from
Jun 11, 2025
Merged

Add retry handler support #1412

merged 12 commits into from
Jun 11, 2025

Conversation

TheForbiddenAi
Copy link
Contributor

@TheForbiddenAi TheForbiddenAi commented Jun 10, 2025

Description

This PR allows users to use the RetryHandler class from DurableTask for retrying tasks. RetryHandler allows for a lot more customization than the RetryPolicy class does

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1406

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

This PR is dependent upon this durabletask pr dapr/durabletask-java#25

@TheForbiddenAi TheForbiddenAi requested review from a team as code owners June 10, 2025 12:03
@TheForbiddenAi
Copy link
Contributor Author

TheForbiddenAi commented Jun 10, 2025

checks failed because the durable task pr still needs to be merged, leading to the builds failing

@TheForbiddenAi
Copy link
Contributor Author

I think we should be good to try rerunning the workflows. Seems like it has published https://repo.maven.apache.org/maven2/io/dapr/durabletask-client/1.5.6/

@cicoyle cicoyle added this to the v1.15 milestone Jun 11, 2025
@cicoyle cicoyle added the durabletask work for dapr/durabletask-java label Jun 11, 2025
@TheForbiddenAi
Copy link
Contributor Author

TheForbiddenAi commented Jun 11, 2025

Not sure if this failure is due to my changes. Can someone else take a look

@cicoyle
Copy link
Contributor

cicoyle commented Jun 11, 2025

lets see with this next run if it was just flaky or a result of this PR 👍🏻

@TheForbiddenAi
Copy link
Contributor Author

Passed on rerun. Thanks!

@TheForbiddenAi
Copy link
Contributor Author

@siri-varma @javier-aliaga Anything else that needs to be addressed here?

@cicoyle cicoyle merged commit 981b3b4 into dapr:master Jun 11, 2025
9 checks passed
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

Attention: Patch coverage is 82.85714% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.46%. Comparing base (d759c53) to head (a317fc8).
Report is 168 commits behind head on master.

Files with missing lines Patch % Lines
...va/io/dapr/workflows/WorkflowTaskRetryContext.java 60.00% 4 Missing ⚠️
.../dapr/workflows/client/WorkflowFailureDetails.java 0.00% 1 Missing ⚠️
...rkflows/runtime/DefaultWorkflowFailureDetails.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1412      +/-   ##
============================================
+ Coverage     76.91%   78.46%   +1.54%     
- Complexity     1592     1867     +275     
============================================
  Files           145      230      +85     
  Lines          4843     5790     +947     
  Branches        562      601      +39     
============================================
+ Hits           3725     4543     +818     
- Misses          821      927     +106     
- Partials        297      320      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cicoyle added a commit to cicoyle/java-sdk that referenced this pull request Jun 11, 2025
* Add retry handler support

Signed-off-by: Mason <[email protected]>

* Wrap DurableTask objects

Signed-off-by: Mason <[email protected]>

* Rename method

Signed-off-by: Mason <[email protected]>

* Add isNonRetriable field to WorkflowTaskFailureDetails

Signed-off-by: Mason <[email protected]>

* Add unit test

Signed-off-by: Mason <[email protected]>

* Removed duplicate WorkflowFailureDetails class

Signed-off-by: Mason <[email protected]>

* Removed unneeded when statements in retry policy unit test

Signed-off-by: Mason <[email protected]>

* Add unit test to test both RetryPolicy and RetryHandler

Signed-off-by: Mason <[email protected]>

* Create toRetryPolicy method

Signed-off-by: Mason <[email protected]>

---------

Signed-off-by: Mason <[email protected]>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
cicoyle added a commit that referenced this pull request Jun 11, 2025
* Add retry handler support



* Wrap DurableTask objects



* Rename method



* Add isNonRetriable field to WorkflowTaskFailureDetails



* Add unit test



* Removed duplicate WorkflowFailureDetails class



* Removed unneeded when statements in retry policy unit test



* Add unit test to test both RetryPolicy and RetryHandler



* Create toRetryPolicy method



---------

Signed-off-by: Mason <[email protected]>
Co-authored-by: Mason <[email protected]>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
durabletask work for dapr/durabletask-java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add retry handler support
4 participants