Add retry to gRPC calls that failed due to transient errors#714
Merged
Conversation
Contributor
Author
|
@copilot add tests for the new retry logic in this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds retry logic around worker gRPC calls when they fail with transient transport errors, with accompanying structured logging for each retry attempt.
Changes:
- Wrap multiple gRPC client calls (abandon/complete operations) in a shared retry helper with exponential backoff + jitter.
- Add a new warning log event to record transient gRPC retry attempts and backoff duration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/Worker/Grpc/Logs.cs | Adds a new structured log message for retry attempts. |
| src/Worker/Grpc/GrpcDurableTaskWorker.Processor.cs | Introduces ExecuteWithRetryAsync and applies it to multiple gRPC calls. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/durabletask-dotnet/sessions/e65654b0-082d-4c4a-b2c9-34330dd3eb37 Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>
Contributor
Added tests for
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…b.com/microsoft/durabletask-dotnet into stevosyan/add-retry-to-complete-calls
…member' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
sophiatev
commented
Apr 27, 2026
sophiatev
commented
Apr 27, 2026
…egration test Agent-Logs-Url: https://github.com/microsoft/durabletask-dotnet/sessions/8d495e35-19ea-440a-80a7-e7538566e906 Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>
torosent
approved these changes
Apr 27, 2026
YunchuWang
approved these changes
Apr 28, 2026
This was referenced Apr 29, 2026
This was referenced Jun 29, 2026
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.
Summary
What changed?
As per the PR title, this PR adds retry logic to gRPC calls in the worker process that failed due to transient errors (i.e.
StatusCode.Unavailable)Why is this change needed?
Previously the call would just fail, which means the work item would be abandoned and only picked up again after a relatively long delay. We want to retry pretty immediately for these transient errors.