Repository navigation
[Async stack 0/6] Async orchestrator contract - #356
andystaples wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The documentation incorrectly implies synchronous commands are awaitable, which can cause a TypeError after scheduling an action; it should explicitly state that these commands must be called without await.
1 open issue
What changed in this PR
This documentation-only PR defines the async orchestrator contract for the core SDK, Azure Managed, and Azure Functions. It establishes behavior that later layers of the review-only stack will implement.
Changes:
- Describe coroutine authoring, cold operations, reusable handles, and Functions compatibility.
- Specify deterministic asyncio composition, cancellation, timeouts, and dispatch cleanup.
- Document replay migration constraints and Python-runtime compatibility limits.
| File | Description |
|---|---|
docs/supported-patterns.md |
Connects durable patterns to async authoring and clarifies root cancellation behavior. |
docs/features.md |
Introduces coroutine orchestrators alongside generator orchestrators. |
docs/async-orchestrators.md |
Defines the cross-package async contract and replay constraints. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
b420f99 to
73cac11
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| @@ -0,0 +1,296 @@ | |||
| # Async orchestrators | |||
|
|
|||
| All three packages accept native `async def` orchestrators alongside existing | |||
There was a problem hiding this comment.
Open question (resolve before merge): should async orchestrators ship as preview?
This change adds async orchestrators without a preview or experimental label. Two things could still change after release:
- The public surface: the cold
AsyncOrchestrationContextversus eager handles viaas_task_context(). - Replay behavior that depends on the Python minor version (Document Python runtime compatibility and safe upgrade guidance for durable orchestrations #337): Python 3.11 and 3.12+ record different histories for
asyncio.wait_for.
Should core and durabletask.azuremanaged label async orchestrators as preview in the docs and changelogs until those settle, or ship them as generally available? Please answer and resolve this thread before the stack merges.
…rnings Add motivation, goals, non-goals, and alternatives considered; document the orchestrator classification rule and that operation inputs are not copied; promote the unsupported asyncio.wait/as_completed, dispatch-teardown, and Python minor-version replay notes to callouts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Warning
Neither this PR nor any other PR in this stack should be merged on its own. The whole stack will be squash-merged once every PR in it is approved.
This is the contract-documentation layer (0/6) of a review-only stack that splits the closed #293. The APIs documented here are implemented in later layers; this PR changes documentation only. Later layers extend
docs/async-orchestrators.mdas they implement each area, and the final version of the contract is in #364.asyncio.wait/asyncio.as_completedare documented as unsupported), and migration and Python-runtime compatibility limits, including keeping the Python minor version fixed for in-flight instances (Document Python runtime compatibility and safe upgrade guidance for durable orchestrations #337).Differences from #293
The stack is roughly 800 lines larger than #293, mostly from hardening:
durabletask/internal/asyncio_loop.py).Any-typed overload for async sub-orchestration calls withoutreturn_type.