Skip to content

[Async stack 6/6] Document coroutine orchestrators and add Managed compatibility tests - #364

Open
andystaples wants to merge 1 commit into
andystaples-async-stack-5-functions-supportfrom
andystaples-async-stack-6-docs-compatibility
Open

andystaples wants to merge 1 commit into
andystaples-async-stack-5-functions-supportfrom
andystaples-async-stack-6-docs-compatibility

Conversation

@andystaples

@andystaples andystaples commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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 #294

Changes

  • Documentation: adds async orchestrator guidance to the root README.md, docs/async-orchestrators.md, and azure-functions-durable/README.md.
    • Functions async orchestrators use the two-parameter shape with task.AsyncOrchestrationContext. Single-parameter async def orchestrators are unsupported and raise TypeError when registered.
    • Fan-out uses asyncio.gather or asyncio.TaskGroup. Races use ctx.as_task_context() handles with task.when_any.
    • Documents df.call_http for durable HTTP requests from async and generator durabletask contexts.
  • Migration guide: azure-functions-durable/MIGRATION_GUIDE.md describes the native async shape, adds the context.call_http → df.call_http mapping, and covers async composition with self-contained gather and race examples.
  • Changelogs: the only changelog changes in the stack. Adds one ## Unreleased ADDED entry each for the core SDK, durabletask.azuremanaged, and azure-functions-durable. The core entry includes a replay and Python-version warning. The core changelog also adds a CHANGED entry: a generator orchestrator whose first yield is not a durabletask.Task now fails on its first dispatch with TypeError. Previously a bare first yield left the instance pending indefinitely, and a non-Task first yield scheduled its work and then failed later with AttributeError.
  • Managed compatibility tests: adds 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 marked dts and read ENDPOINT / TASKHUB with emulator defaults.

CI

  • eng/templates/build.yml runs the in-memory (not dts) cases of the new Managed test file in the official build, which has no emulator.
  • The azuremanaged_tests nox 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.

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]>
@andystaples
andystaples marked this pull request as ready for review November 23, 2026 19:04
Copilot AI balanced review requested due to automatic review settings November 23, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@andystaples
andystaples force-pushed the andystaples-async-stack-6-docs-compatibility branch from fc59e38 to 2163808 Compare November 23, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support async/await orchestrators across the Python SDK packages

2 participants