Add gRPC client and worker connection resiliency#135
Open
berndverst wants to merge 28 commits intomainfrom
Open
Add gRPC client and worker connection resiliency#135berndverst wants to merge 28 commits intomainfrom
berndverst wants to merge 28 commits intomainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extend worker resiliency coverage with an end-to-end silent-disconnect recovery test and an explicit reconnect backoff assertion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class gRPC connection resiliency to the Durable Task Python SDK (core durabletask/) and threads the new configuration through Azure Managed wrappers, with extensive regression tests and design docs.
Changes:
- Introduces
GrpcWorkerResiliencyOptions/GrpcClientResiliencyOptionsand shared internal resiliency helpers (backoff, failure tracking, transport-failure classification). - Updates worker stream loop and sync/async clients to detect transport-shaped failures and safely recreate/retire SDK-owned channels while preserving caller-owned channel semantics.
- Adds comprehensive unit tests (core + azuremanaged) plus docs/specs and changelog entries.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| durabletask/worker.py | Implements worker stream monitoring, backoff, failure tracking, and safe SDK-owned channel retirement with in-flight tracking. |
| durabletask/client.py | Adds sync/async unary invocation wrappers and SDK-owned channel recreation + retirement handling. |
| durabletask/grpc_options.py | Adds public resiliency option dataclasses with validation. |
| durabletask/internal/grpc_resiliency.py | Adds shared backoff, FailureTracker, and transport-failure classification helpers. |
| durabletask-azuremanaged/durabletask/azuremanaged/client.py | Forwards client resiliency options through Azure Managed client wrappers. |
| durabletask-azuremanaged/durabletask/azuremanaged/worker.py | Forwards worker resiliency options through Azure Managed worker wrapper. |
| tests/durabletask/test_worker_resiliency.py | New worker resiliency tests (silent disconnect, graceful close, recreation thresholds, in-flight close deferral). |
| tests/durabletask/test_grpc_resiliency.py | New tests for option validation, backoff, FailureTracker, and transport-failure classification. |
| tests/durabletask/test_client.py | Adds sync/async client channel recreation/retirement tests and wrapper verification. |
| tests/durabletask/test_worker_concurrency_loop.py | Updates tests to call prepare_for_run() before reusing the worker manager. |
| tests/durabletask/test_worker_concurrency_loop_async.py | Updates async loop tests to call prepare_for_run() before reusing the worker manager. |
| tests/durabletask-azuremanaged/test_azuremanaged_grpc_resiliency.py | New tests validating Azure Managed wrapper pass-through of resiliency options. |
| CHANGELOG.md | Documents new resiliency options and behavior changes in core SDK. |
| durabletask-azuremanaged/CHANGELOG.md | Documents pass-through resiliency options in Azure Managed package. |
| docs/superpowers/specs/2026-04-23-grpc-resiliency-design.md | Adds design spec for resiliency behavior and public API. |
| docs/superpowers/plans/2026-04-23-grpc-resiliency.md | Adds implementation plan document for the work. |
| .gitignore | Ignores .worktrees/ and normalizes coverage.lcov entry formatting. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Test Plan