Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ to include examples, links to docs, or any other relevant information.

### Added

- **Experimental**: Experimental support for _Event Groups_. **Event Groups** is a new form of
Workflow-level metadata that allows for improved visibility into a Workflow execution's history
by grouping logically related Events together based on user-defined or system-inferred criteria.
An event group is created using `workflow.create_event_group(label)`, then attach it either per
call (`workflow.start_activity(..., event_groups=[group])`) or ambiently to everything issued
inside `with group.scope():`. Each signal and update handler is also implicitly wrapped in a
group of its own. Requires a server that understands the Event Groups fields.

### Changed

- System Nexus Signal-with-Start Workflow operations now use the typed
Expand Down
7 changes: 7 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tools]
python = "3.14.7"
uv = "0.12.9"

[settings]
# Activate (and create if needed) the uv-managed .venv when entering the project
python.uv_venv_auto = "create|source"
7 changes: 7 additions & 0 deletions temporalio/worker/_interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class ContinueAsNewInput:
headers: Mapping[str, temporalio.api.common.v1.Payload]
versioning_intent: VersioningIntent | None
initial_versioning_behavior: ContinueAsNewVersioningBehavior | None
event_groups: Sequence[temporalio.workflow.EventGroup] | None
# The types may be absent
arg_types: list[type] | None

Expand Down Expand Up @@ -231,6 +232,7 @@ class SignalChildWorkflowInput:
args: Sequence[Any]
child_workflow_id: str
headers: Mapping[str, temporalio.api.common.v1.Payload]
event_groups: Sequence[temporalio.workflow.EventGroup] | None = None


@dataclass
Expand All @@ -243,6 +245,7 @@ class SignalExternalWorkflowInput:
workflow_id: str
workflow_run_id: str | None
headers: Mapping[str, temporalio.api.common.v1.Payload]
event_groups: Sequence[temporalio.workflow.EventGroup] | None = None


@dataclass
Expand All @@ -263,6 +266,7 @@ class StartActivityInput:
disable_eager_execution: bool
versioning_intent: VersioningIntent | None
summary: str | None
event_groups: Sequence[temporalio.workflow.EventGroup] | None
priority: temporalio.common.Priority
# The types may be absent
arg_types: list[type] | None
Expand Down Expand Up @@ -293,6 +297,7 @@ class StartChildWorkflowInput:
versioning_intent: VersioningIntent | None
static_summary: str | None
static_details: str | None
event_groups: Sequence[temporalio.workflow.EventGroup] | None
priority: temporalio.common.Priority
# The types may be absent
arg_types: list[type] | None
Expand All @@ -313,6 +318,7 @@ class StartNexusOperationInput(Generic[InputT, OutputT]):
cancellation_type: temporalio.workflow.NexusOperationCancellationType
headers: Mapping[str, str] | None
summary: str | None
event_groups: Sequence[temporalio.workflow.EventGroup] | None = None
output_type: type[OutputT] | None = None

def __post_init__(self) -> None:
Expand Down Expand Up @@ -366,6 +372,7 @@ class StartLocalActivityInput:
cancellation_type: temporalio.workflow.ActivityCancellationType
headers: Mapping[str, temporalio.api.common.v1.Payload]
summary: str | None
event_groups: Sequence[temporalio.workflow.EventGroup] | None

# The types may be absent
arg_types: list[type] | None
Expand Down
1 change: 1 addition & 0 deletions temporalio/worker/_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ def _create_workflow_instance(
first_execution_run_id=init.first_execution_run_id,
headers=dict(init.headers),
namespace=self._namespace,
original_execution_run_id=init.original_execution_run_id or act.run_id,
parent=parent,
root=root,
raw_memo=dict(init.memo.fields),
Expand Down
Loading