Skip to content

Added support for retry policies#23

Merged
cgillum merged 1 commit intomainfrom
cgillum/retries
Apr 5, 2022
Merged

Added support for retry policies#23
cgillum merged 1 commit intomainfrom
cgillum/retries

Conversation

@cgillum
Copy link
Copy Markdown
Member

@cgillum cgillum commented Apr 4, 2022

This PR covers the first two bullets of #18: task options and declarative retry policies.

Summary of changes:

  • Introduced TaskOptions parameter for activities and sub-orchestrations
  • Introduced RetryPolicy class which can be applied to TaskOptions to configure declarative retries.
  • Started adding @Nullable attributes to help proactively identify NullPointerException is the code (I got hit by this a couple times during debugging).
  • Added two integration tests: one for activity retry and one for sub-orchestration retry

Much of the design is inspired by the retry work I recently did for .NET Isolated: microsoft/durabletask-dotnet#6.

Special thanks to @davidmrdavid for helping me figure out (without him knowing it) how to design retries in a language that doesn't support async/await. I borrowed the strategy for implementing retry policies from the Durable JS codebase.

After this PR gets merged, I plan to work on imperative retry policies, implemented in code.

@davidmrdavid
Copy link
Copy Markdown
Member

My favorite help is that which occurs without me knowing :P . Glad to hear the JS approach was useful. Looking into the PR now

Copy link
Copy Markdown
Member

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some thoughts and questions. Thank you for this PR :-)

Copy link
Copy Markdown
Member

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After getting answers to all my comments and questions, this looks good to me :-)

@cgillum cgillum merged commit 703b475 into main Apr 5, 2022
@cgillum cgillum deleted the cgillum/retries branch April 5, 2022 01:34
@kaibocai kaibocai linked an issue Apr 5, 2022 that may be closed by this pull request
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.

Durable retry policies

3 participants