Repository navigation
[Async stack 6/6] Document coroutine orchestrators and add Managed compatibility tests - #364
Conversation
1df84a9 to
88e2d24
Compare
88e2d24 to
510dc24
Compare
510dc24 to
818c9e2
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the coroutine documentation and Managed compatibility test updates.
No open issues 🎉
What changed in this PR
This final layer of the async-orchestrator stack documents coroutine support across all three SDK packages and adds Managed compatibility tests. It includes no SDK source, version, or dependency changes and must be merged with the complete stack.
Changes:
- Documents two-argument async orchestrators, durable HTTP, supported composition, and replay/migration constraints.
- Adds cross-worker gRPC tests for mixed generator/coroutine orchestrations, with optional DTS-backed coverage.
- Adds changelog entries and wires in-memory Managed tests into Nox and the official build.
| File | Description |
|---|---|
tests/durabletask-azuremanaged/test_dts_coroutine_orchestrators.py |
Adds core and Managed coroutine compatibility tests. |
README.md |
Introduces async authoring and key execution constraints. |
noxfile.py |
Adds in-memory compatibility cases to the Managed test session. |
eng/templates/build.yml |
Runs in-memory Managed cases without an emulator. |
durabletask-azuremanaged/CHANGELOG.md |
Records Managed async support and core release requirements. |
docs/async-orchestrators.md |
Updates Functions guidance to the two-argument async shape and df.call_http. |
CHANGELOG.md |
Records core async support, replay warnings, and first-yield validation changes. |
azure-functions-durable/README.md |
Documents async composition, durable HTTP, and replay execution. |
azure-functions-durable/MIGRATION_GUIDE.md |
Explains native async migration, joins, races, and HTTP mapping. |
azure-functions-durable/CHANGELOG.md |
Records Functions async support and the durable HTTP helper. |
Review effort: Balanced
fc59e38 to
2163808
Compare
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Approved for this docs and Managed test layer only; the runtime issues on the earlier PRs still block the stack. The docs describe one native async signature across the SDKs, and the Managed smoke tests exercise mixed generator and coroutine workflows. Please clarify who owns the losing handle in the approval example, and align #294 with the two-argument Functions scope before closing it. The smoke tests don't establish mixed-runtime replay or native Pydantic compatibility.
2163808 to
7bd2fe0
Compare
7bd2fe0 to
d7451e7
Compare
178b3ad to
80235ee
Compare
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Approved for this docs and Managed test layer. The preview scope and replay upgrade guidance are clear. Both Functions approval examples now cancel the losing wait or timer, and the shared guide shows the same pattern. The Managed coverage remains in place. Earlier implementation layers still have separate review blockers.
80235ee to
a976f29
Compare
Rebased onto main as a single commit. Includes: - Document coroutine orchestrators and add Managed compatibility tests - Clarify async migration joins and cover in-memory provider cases - Consolidate async changelog entries and gate Managed coroutine tests - Document the native async shape and call_http for Functions - Disclose the generator first-yield check and make async migration snippets runnable Co-authored-by: Copilot App <[email protected]>
…race's losing handle Co-authored-by: Copilot App <[email protected]>
a976f29 to
0bead8a
Compare
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Renewing approval for this docs and Managed test layer after the rebase. Its patch is unchanged, and the mixed generator/coroutine gRPC tests passed on the rebased stack. This does not clear the separate cleanup finding in #360.
Warning
This PR is part of a review-only stack and must not be merged individually. The whole stack will be squash-merged after every PR in it is approved.
Stacked on #363. Final layer (6/6) of the coroutine (
async def) orchestrator stack. Resolves #294Changes
README.md,docs/async-orchestrators.md, andazure-functions-durable/README.md.task.AsyncOrchestrationContext.async deforchestrators that cannot be called with(ctx, input)are unsupported and raiseTypeErrorwhen registered.asyncio.gatherorasyncio.TaskGroup. Races usectx.as_task_context()handles withtask.when_any; the examples cancel the losing event wait or timer, and point toctx.wait_for_external_event(..., timeout=...)for an event with a deadline.df.call_httpfor durable HTTP requests from async and generator durabletask contexts.azure-functions-durable/MIGRATION_GUIDE.mddescribes the native async shape, adds thecontext.call_http→df.call_httpmapping, and covers async composition with self-contained gather and race examples.## UnreleasedADDED entry each for the core SDK,durabletask.azuremanaged, andazure-functions-durable, each marking async orchestrators as preview. The core entry includes a replay and Python-version warning (drain in-flight instances, or keep them on workers pinned to the original version, before upgrading). The core changelog also adds a CHANGED entry: a generator orchestrator whose firstyieldis not adurabletask.Tasknow fails on its first dispatch withTypeError. Previously a bare firstyieldleft the instance pending indefinitely, and a non-Taskfirst yield scheduled its work and then failed later withAttributeError.tests/durabletask-azuremanaged/test_dts_coroutine_orchestrators.py, which runs coroutine orchestrators through the Durable Task Scheduler worker/client. Cases run against in-memory gRPC for both core and Managed types; DTS-backed variants are markeddtsand readENDPOINT/TASKHUBwith emulator defaults.CI
eng/templates/build.ymlruns the in-memory (not dts) cases of the new Managed test file in the official build, which has no emulator.azuremanaged_testsnox session (used by the GitHub Actions Managed workflow) also runs those in-memory cases, so they gate pull requests as well as the official build.No source, version, or dependency changes are included in this layer.