chore: migrate to Durable Functions Python 2.x - #189
Merged
Tsuyoshi Ushio (TsuyoshiUshio) merged 9 commits intoSep 2, 2026
Conversation
Durable native Activity retry needs the Python 2.x RetryPolicy (backoff coefficient, maximum interval, and retry timeout); the 1.x RetryOptions can only express a constant first interval and an attempt count. Carry only the collateral the bump requires: the DurableFunctionsClient binding type, Task.result now raising instead of returning its failure, the 2.x trigger decorator typing, and a Durable client whose lifetime spans SSE stream consumption instead of the invocation that created it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Durable Functions Python 2.x pulls in durabletask, which depends on grpcio. The Python worker bundles its own grpcio, and with no customer dependency path the worker resolved a mixed grpcio/protobuf set and segfaulted (exit 139) while importing function_app.py — so every E2E app failed to start, including ones that never touch workflows. Install the runtime once into a shared tree, link it in as .python_packages for every app with a host.json, and put that path ahead of the worker's own packages. This is what a deployed app already looks like. The extension bundle is unchanged: the host's LATEST channel already selects 4.37.1 for the existing [4.*, 5.0.0) and [4.32.0, 5.0.0) ranges. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6638e540-8004-4e8e-82ae-b11f8bdb00b8
The docs workflow syncs with --locked, so the pin change has to be reflected in uv.lock. Resolution adds durabletask and its grpcio/protobuf/asyncio dependencies, drops furl and orderedmultidict, and moves azure-functions from 2.1.0 to 2.3.0 because azure-functions-durable 2.0.0b2 requires >=2.3.0b2. Artifact URLs for packages that did not change are kept as committed: the Microsoft feed proxy hands out a different mirror host on every resolution, which would otherwise rewrite every URL in the file for no change in content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6638e540-8004-4e8e-82ae-b11f8bdb00b8
Tsuyoshi Ushio (TsuyoshiUshio)
requested a review
from a team
as a code owner
September 1, 2026 14:41
hallvictoria
reviewed
Sep 1, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6638e540-8004-4e8e-82ae-b11f8bdb00b8
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6638e540-8004-4e8e-82ae-b11f8bdb00b8
added 2 commits
September 1, 2026 20:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6638e540-8004-4e8e-82ae-b11f8bdb00b8
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6638e540-8004-4e8e-82ae-b11f8bdb00b8
Laveesh Rohra (larohra)
approved these changes
Sep 2, 2026
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
azure-functions-durablefrom 1.x to2.0.0b2This is the migration-only prerequisite split requested for #185. It intentionally contains no Activity retry schema, policy, sample, or documentation.
Why the compatibility changes are included
Durable 2.x injects an asynchronous
DurableFunctionsClientinto async functions and closes invocation-scoped clients when the function returns. Streaming responses therefore need to own a client through stream consumption. Durable 2.x also changes failedTask.resultbehavior, and nested composite tasks do not propagate completion to their parent, so workflow waves now select over leaf tasks and fail immediately on the first task error.Validation
python -m ruff check src testspython -m mypy srcuv lock --checkpython -m pytest --cache-clear --cov=./src/azure_functions_agents --cov-report=xml --cov-branch tests— 1104 passed locallysamples/basic-chatsample and the Dynamic Workflowsamples/workflow-incident-triagesample using the E2E customer dependency layoutFollow-up
After this merges, #185 will rebase onto
mainand remove its migration-only commits, leaving the Durable native Activity retry feature as the focused follow-up.