Repository navigation
docs(workflow): add retry policy authoring example - #958
Closed
ekanshbannsal wants to merge 1 commit into
Closed
ekanshbannsal wants to merge 1 commit into
ekanshbannsal wants to merge 1 commit into
Conversation
Signed-off-by: Ekansh Bannsal <ekanshbannsal@gmail.com>
Author
|
Closing this myself — I raised it during a batch of contributions and it is outside the scope I can properly commit to maintaining. Better to clear it out of your review queue than leave it sitting. Sorry for the time spent triaging it, and thanks for the docs. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Adds a workflow authoring example (
examples/workflow/authoring/src/retry-policy.ts) with corresponding npm scripts and README documentation demonstrating how to configure and apply DaprRetryPolicyon both workflow activities and child workflows.Why is this change needed?
While
RetryPolicyis supported in the SDK viactx.callActivityandctx.callChildWorkflow,examples/workflow/authoringdid not yet have a dedicated example explaining eachRetryPolicyparameter (firstRetryInterval,maxNumberOfAttempts,backoffCoefficient,maxRetryInterval, andretryTimeout).How was it implemented?
examples/workflow/authoring/src/retry-policy.tsdocumenting all fiveRetryPolicyfields and showing automatic retry recovery for both an activity (ctx.callActivity(..., { retryPolicy })) and a child workflow (ctx.callChildWorkflow(..., undefined, { retryPolicy })).start:retry-policyandstart:dapr:retry-policyscripts toexamples/workflow/authoring/package.json.examples/workflow/authoring/README.md.Testing performed
npm run buildin repo root: compiled SDK to./build/.npx tsc --noEmit --target es2022 --module commonjs --esModuleInterop --strict --skipLibCheck src/retry-policy.tsinexamples/workflow/authoring: passed with 0 errors.npx eslint examples/workflow/authoring/src/retry-policy.ts: passed with 0 errors.npx prettier --check examples/workflow/authoring/src/retry-policy.ts examples/workflow/authoring/package.json examples/workflow/authoring/README.md: passed.Related issue
Closes #689