Skip to content

Add ctx.schedule_new_workflow for detached workflows - #1177

Draft
acroca wants to merge 1 commit into
dapr:mainfrom
acroca:detached-workflows
Draft

Add ctx.schedule_new_workflow for detached workflows#1177
acroca wants to merge 1 commit into
dapr:mainfrom
acroca:detached-workflows

Conversation

@acroca

@acroca acroca commented Jul 27, 2026

Copy link
Copy Markdown
Member

Ref: dapr/dapr#9261

Summary

Adds first-class support for spawning fully decoupled workflows from within another workflow in the Python SDK, mirroring the API introduced upstream in dapr/durabletask-go#100 and the runtime support in dapr/dapr#9902. Users no longer need to wrap DaprWorkflowClient.schedule_new_workflow inside an activity to start an independent workflow — it's now a first-class context method.

Notes

  • No proto regeneration on this branch, commit 9d3681cb… already includes CreateDetachedWorkflowAction and DetachedWorkflowInstanceCreatedEvent.
  • Async client wrapper (dapr.ext.workflow.aio) is unchanged: the workflow context API is sync (generator-based) in this SDK; only the client has an async variant, and detached spawning is a context operation.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.09677% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.86%. Comparing base (866ee5a) to head (acad112).

Files with missing lines Patch % Lines
dapr/ext/workflow/_durabletask/worker.py 84.61% 6 Missing ⚠️
dapr/ext/workflow/_durabletask/task.py 66.66% 1 Missing ⚠️
dapr/ext/workflow/workflow_context.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1177      +/-   ##
==========================================
+ Coverage   82.84%   82.86%   +0.02%     
==========================================
  Files         123      123              
  Lines       10130    10191      +61     
==========================================
+ Hits         8392     8445      +53     
- Misses       1738     1746       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca
acroca force-pushed the detached-workflows branch from 9010aa9 to acad112 Compare July 27, 2026 13:57
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.

1 participant