Visitar URL original
Add child workflow versioning overrides by Quinn-With-Two-Ns · Pull Request #1944 · temporalio/sdk-python · GitHub
Skip to content

Add child workflow versioning overrides - #1944

Open
Quinn-With-Two-Ns wants to merge 4 commits into
mainfrom
quinn/child-workflow-versioning-overrides
Open

Quinn-With-Two-Ns wants to merge 4 commits into
mainfrom
quinn/child-workflow-versioning-overrides

Conversation

@Quinn-With-Two-Ns

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Port temporalio/sdk-go#2707 to the Python SDK.

  • Add experimental versioning_override to workflow.start_child_workflow and workflow.execute_child_workflow, including all overloads, ChildWorkflowConfig, and outbound interceptor propagation.
  • Add common.OneTimeVersioningOverride for routing an execution to a target deployment version until a workflow task completes there.
  • Raise exceptions.InvalidVersioningOverrideError when a child start fails because of an invalid override, following the existing Python child-start exception convention.

Child workflow overrides require Temporal Server 1.32 or newer.

Validation

  • poe build-develop — passed.
  • poe format and poe lint — passed, including Pyright, mypy, BasedPyright, formatting/import checks, and docstyle.
  • poe test -s -n 0 tests/test_workflow.py tests/test_workflow_exports.py tests/test_common.py tests/worker/test_child_workflow_versioning.py tests/worker/test_worker.py::test_child_workflows_can_use_versioning_override — 52 passed.
  • poe test -s -n 0 tests/worker/test_child_workflow_versioning.py tests/worker/test_workflow.py -k child — 25 passed, including 9 existing child-workflow regression tests.
  • The 8 deployment routing cases ran against the pinned Temporal Server 1.32 development build and cover both child APIs, parent-override precedence, and one-time routing with AUTO_UPGRADE and PINNED child behavior.
  • git diff --check — passed.

Note

Medium Risk
Changes worker deployment routing for child workflows and depends on server 1.32 behavior; misconfigured overrides can fail child starts or route to unexpected build IDs, though the API is explicitly experimental.

Overview
Adds experimental child workflow versioning overrides so parents can pass versioning_override to workflow.start_child_workflow and workflow.execute_child_workflow (including ChildWorkflowConfig and outbound interceptor input). The override takes precedence over versioning inherited from the parent and is serialized on the start-child command; Temporal Server 1.32+ is required.

Introduces common.OneTimeVersioningOverride, which routes tasks to a target deployment version until the first workflow task completes on that version, then clears the override (distinct from pinning). Nexus/proto helpers decode the new one_time override shape.

When the server rejects a child start for an invalid override, the worker maps the failure to exceptions.InvalidVersioningOverrideError. Changelog and tests cover command encoding, failure mapping, Nexus round-trip, and deployment routing integration.

Reviewed by Cursor Bugbot for commit 3bdf07f. Bugbot is set up for automated code reviews on this repo. Configure here.

@Quinn-With-Two-Ns
Quinn-With-Two-Ns requested a review from a team as a code owner October 7, 2026 21:57
Comment thread temporalio/worker/_interceptor.py
@Quinn-With-Two-Ns
Quinn-With-Two-Ns force-pushed the quinn/child-workflow-versioning-overrides branch from 566b5eb to 4fe7b18 Compare October 9, 2026 16:30

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4fe7b18. Configure here.

Comment thread temporalio/common.py
@tconley1428

Copy link
Copy Markdown
Contributor

@VegetarianOrc got you, rebase is needed.

This branch has not been deployed

No deployments
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.

2 participants