Skip to content

Add experimental Event Groups support - #1784

Merged
mjameswh merged 7 commits into
mainfrom
event-groups-feature
Sep 18, 2026
Merged

mjameswh merged 7 commits into
mainfrom
event-groups-feature

Conversation

@mjameswh

@mjameswh mjameswh commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add 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.

  • Explicit groups: create_event_group(id, label="...") takes the Event Group's ID as its first and only required argument. The user-provided ID is used verbatim as the grouping key and should not contain sensitive information. The label is optional and, if provided, is a codec-encoded Payload. Attach a group per call (event_groups=[...]) or ambiently with with group.scope(): (propagated through coroutines via contextvars). Nested scopes compose; markers dedupe by id.
  • Implicit groups: automatically wrap signal and update handlers.
  • Markers are serialized onto outgoing commands as event_group_markers. The user-facing type is EventGroup; the protocol type remains EventGroupMarker.

Testing

Event Groups support requires an Event-Groups-capable server. Local tests pin Temporal CLI:

v1.8.3-server-1.32.0-162.0

Time-skipping and Cloud environments skip history-transcription cases.

@mjameswh
mjameswh force-pushed the event-groups-feature branch from 09293a3 to 426d273 Compare August 25, 2026 02:59
Comment thread temporalio/worker/_workflow_instance.py Outdated
Comment thread temporalio/worker/_workflow_instance.py Outdated
@mjameswh mjameswh changed the title Add experimental Event Groups support [WIP] Add experimental Event Groups support Aug 25, 2026
@mjameswh
mjameswh force-pushed the event-groups-feature branch 6 times, most recently from fa34107 to 7a893ae Compare September 9, 2026 03:13
@mjameswh mjameswh changed the title [WIP] Add experimental Event Groups support Add experimental Event Groups support Sep 9, 2026
@mjameswh
mjameswh marked this pull request as ready for review September 9, 2026 03:30
@mjameswh
mjameswh requested a review from a team as a code owner September 9, 2026 03:30
@mjameswh
mjameswh requested a review from tconley1428 September 9, 2026 12:08
Comment thread temporalio/workflow/_event_groups.py Outdated
Comment thread temporalio/workflow/_event_groups.py Outdated
Comment thread temporalio/workflow/__init__.py Outdated

@Sushisource Sushisource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall makes sense to me. Will let Tim approve, his comment about the exports seems important.

Boy oh boy is adding these parameters to 8 billion function overrides annoying. Thank god the LLMs can do it now.

Comment thread temporalio/workflow/_event_groups.py Outdated
@mjameswh
mjameswh force-pushed the event-groups-feature branch from 7b390ef to 0b0daf9 Compare September 15, 2026 21:09
@mjameswh
mjameswh enabled auto-merge (squash) September 18, 2026 19:36
@mjameswh
mjameswh merged commit 1d1ad74 into main Sep 18, 2026
72 of 79 checks passed
@mjameswh
mjameswh deleted the event-groups-feature branch September 18, 2026 21:09
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.

3 participants