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

Support activity retry policies #83

Merged
merged 9 commits into from
Oct 24, 2024

Conversation

famarting
Copy link
Contributor

required of dapr/go-sdk#541

adds the ActivityRetryPolicy struct and updates CallActivity to execute a different code path if retries are needed.

I tried to mimic the behavior of https://github.com/Azure/durabletask/blob/main/src/DurableTask.Core/RetryInterceptor.cs#L52

but in the case of golang I had to make it a recursive algorithm

Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Can you add one or two integration tests that use this feature? I'd like to see what the programming model looks like when users write code that uses this feature.

task/activity.go Outdated Show resolved Hide resolved
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Just a couple small test validation requests.

tests/orchestrations_test.go Show resolved Hide resolved
tests/grpc/grpc_test.go Show resolved Hide resolved
cgillum and others added 4 commits October 23, 2024 15:04
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for making these changes!

@cgillum cgillum changed the title support retry policies Support activity retry policies Oct 24, 2024
@cgillum
Copy link
Member

cgillum commented Oct 24, 2024

Note that I've updated the title of this PR to clarify that it only covers activity retry policies. Another PR will be needed to cover orchestration retry policies (which cover sub-orchestration scenarios).

@cgillum cgillum merged commit 0c4afbc into microsoft:main Oct 24, 2024
4 checks passed
@famarting famarting deleted the support-retry-policies branch October 25, 2024 09:06
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.

2 participants