Skip to content

Add history propagation#1025

Open
acroca wants to merge 1 commit into
dapr:mainfrom
acroca:history-propagation
Open

Add history propagation#1025
acroca wants to merge 1 commit into
dapr:mainfrom
acroca:history-propagation

Conversation

@acroca
Copy link
Copy Markdown
Member

@acroca acroca commented May 12, 2026

Description

Adds workflow history propagation to dapr-ext-workflow.

A workflow can opt into propagating its execution history to a child workflow or activity via propagation=PropagationScope.OWN_HISTORY or propagation=PropagationScope.LINEAGE on call_activity / call_child_workflow.

The receiver reads the propagated chunk through ctx.get_propagated_history() and queries it with PropagatedHistory.get_workflow_by_name(...)WorkflowResult.get_activity_by_name(...) / .get_child_workflow_by_name(...).

Public surface lives in dapr.ext.workflow.propagation and is re-exported from dapr.ext.workflow — users never need to import from _durabletask. Default behavior is unchanged: propagation=None propagates nothing.

Requires a Dapr sidecar built with history propagation support (durabletask-go #85+ / runtime 1.18+). Against an older sidecar the propagation field is silently dropped and get_propagated_history() returns None.

Includes an example app at examples/workflow/history_propagation.py.

References

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 71.40696% with 189 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.94%. Comparing base (bffb749) to head (53cc107).
⚠️ Report is 126 commits behind head on main.

Files with missing lines Patch % Lines
.../_durabletask/internal/orchestrator_service_pb2.py 1.61% 61 Missing ⚠️
...rkflow/_durabletask/internal/history_events_pb2.py 3.44% 56 Missing ⚠️
...orkflow/_durabletask/internal/orchestration_pb2.py 4.00% 24 Missing ⚠️
.../_durabletask/internal/orchestrator_actions_pb2.py 4.54% 21 Missing ⚠️
.../workflow/_durabletask/internal/attestation_pb2.py 42.85% 16 Missing ⚠️
...dapr-ext-workflow/dapr/ext/workflow/propagation.py 96.52% 5 Missing ⚠️
...-workflow/dapr/ext/workflow/_durabletask/worker.py 75.00% 3 Missing ⚠️
...xt-workflow/dapr/ext/workflow/_durabletask/task.py 88.88% 1 Missing ⚠️
...ext-workflow/dapr/ext/workflow/workflow_context.py 75.00% 1 Missing ⚠️
...kflow/tests/durabletask/test_propagation_wiring.py 98.94% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1025      +/-   ##
==========================================
- Coverage   86.63%   81.94%   -4.69%     
==========================================
  Files          84      142      +58     
  Lines        4473    13977    +9504     
==========================================
+ Hits         3875    11453    +7578     
- Misses        598     2524    +1926     

☔ View full report in Codecov by Sentry.
📢 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.

@acroca acroca force-pushed the history-propagation branch from f492eed to 4e5a9ad Compare May 13, 2026 12:08
Signed-off-by: Albert Callarisa <albert@diagrid.io>
@acroca acroca force-pushed the history-propagation branch from 4e5a9ad to 53cc107 Compare May 13, 2026 12:22
@acroca acroca marked this pull request as ready for review May 13, 2026 12:48
@acroca acroca requested review from a team as code owners May 13, 2026 12:48
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