Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an asyncio-friendly gRPC client to the Durable Task Python SDK (AsyncTaskHubGrpcClient) built on grpc.aio, and refactors shared request/interceptor/channel logic into internal helpers to keep sync and async clients aligned.
Changes:
- Introduces
AsyncTaskHubGrpcClientwith async equivalents of orchestration/entity operations. - Adds async gRPC channel creation (
get_async_grpc_channel) and async metadata interceptor support. - Adds async E2E coverage and updates test dependencies/configuration to run async pytest tests.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
durabletask/client.py |
Adds AsyncTaskHubGrpcClient and refactors shared logic usage for sync client. |
durabletask/internal/client_helpers.py |
New shared request/interceptor helper functions used by both clients. |
durabletask/internal/shared.py |
Adds get_async_grpc_channel and async interceptor typing. |
durabletask/internal/grpc_interceptor.py |
Adds DefaultAsyncClientInterceptorImpl and shared metadata application helper. |
tests/durabletask/test_orchestration_async_e2e.py |
New async E2E tests validating async client behavior with a sidecar. |
tests/durabletask/test_client.py |
Adds unit tests for async channel creation and async client construction. |
requirements.txt |
Adds pytest-asyncio for async testing. |
pyproject.toml |
Configures pytest-asyncio asyncio_mode = "auto". |
CHANGELOG.md |
Documents the new async client and related helpers. |
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.
Adds an async version of TaskHubGrpcClient (AsyncTaskHubGrpcClient) that offers async-aware client methods using grpc.aio's async gRPC calls. Refactors code shared by both clients to /internal/client_helpers.py.
Compare to earlier open-source contrib #65 / dapr#17
Resolves #64