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
1 change: 1 addition & 0 deletions changelog/added/humming-sticky-teapot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added experimental workflow-affine activities through `workflow.ActivitySessionOptions.workflow_session()` and `worker.WorkerSessionOptions`, with optional `worker.SingleSessionOptions` for lifetime dedication to a stable destination.
2 changes: 2 additions & 0 deletions changelog/added/unmanipulative-ettie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Core: Experimental session workers can poll workflow-affine activity queues; individual activities opt into their workflow's session, while normal activity routing remains the default. This increment supports fixed-size activity slots with capacity of at least two; resource-based and custom activity suppliers are not supported yet. Activity session options must select workflow-session routing; empty options or an explicit false selection are rejected.
Core: Experimental worker session options support a single-session policy with a stable destination, dedicating that destination to the first matched workflow for its lifetime with a supporting server. Sticky-only mode may use one fixed activity slot.
1 change: 1 addition & 0 deletions changelog/added/unpimpled-flora.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Core: The OTLP metrics exporter can export histograms as OpenTelemetry exponential histograms, which Prometheus-compatible backends store as native histograms, when an SDK enables the option, including through the C bridge. It applies to every histogram, including custom ones, and names each series with a suffix, `_native` by default, so it never shares a name with the fixed-bucket series it replaces. It cannot be combined with histogram bucket overrides. Explicit buckets remain the default.
1 change: 1 addition & 0 deletions changelog/fixed/unmanipulative-ettie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Core: Session workers drain both activity poll sources during graceful shutdown, avoiding abandoned deliveries when one source finishes before the other.
1 change: 1 addition & 0 deletions changelog/fixed/unpimpled-flora.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Core: Workers now replay workflows paused before a scheduled task starts, allowing those workflows to make progress after unpause.
1 change: 1 addition & 0 deletions changelog/security/unpimpled-flora.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Core: Ephemeral server downloads now use `zip` 9.0 for ZIP extraction, replacing the 8.x dependency [yanked upstream for security issues](https://github.com/zip-rs/zip2/issues/1075#issuecomment-6209381974).
85 changes: 44 additions & 41 deletions temporalio/api/command/v1/message_pb2.py

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions temporalio/api/command/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import temporalio.api.enums.v1.workflow_pb2
import temporalio.api.failure.v1.message_pb2
import temporalio.api.sdk.v1.event_group_marker_pb2
import temporalio.api.sdk.v1.user_metadata_pb2
import temporalio.api.session.v1.message_pb2
import temporalio.api.taskqueue.v1.message_pb2
import temporalio.api.workflow.v1.message_pb2

Expand All @@ -44,6 +45,7 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message):
REQUEST_EAGER_EXECUTION_FIELD_NUMBER: builtins.int
USE_WORKFLOW_BUILD_ID_FIELD_NUMBER: builtins.int
PRIORITY_FIELD_NUMBER: builtins.int
SESSION_OPTIONS_FIELD_NUMBER: builtins.int
activity_id: builtins.str
@property
def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ...
Expand Down Expand Up @@ -106,6 +108,10 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message):
"""Priority metadata. If this message is not present, or any fields are not
present, they inherit the values from the workflow.
"""
@property
def session_options(
self,
) -> temporalio.api.session.v1.message_pb2.ActivitySessionOptions: ...
def __init__(
self,
*,
Expand All @@ -122,6 +128,8 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message):
request_eager_execution: builtins.bool = ...,
use_workflow_build_id: builtins.bool = ...,
priority: temporalio.api.common.v1.message_pb2.Priority | None = ...,
session_options: temporalio.api.session.v1.message_pb2.ActivitySessionOptions
| None = ...,
) -> None: ...
def HasField(
self,
Expand All @@ -142,6 +150,8 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message):
b"schedule_to_close_timeout",
"schedule_to_start_timeout",
b"schedule_to_start_timeout",
"session_options",
b"session_options",
"start_to_close_timeout",
b"start_to_close_timeout",
"task_queue",
Expand Down Expand Up @@ -171,6 +181,8 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message):
b"schedule_to_close_timeout",
"schedule_to_start_timeout",
b"schedule_to_start_timeout",
"session_options",
b"session_options",
"start_to_close_timeout",
b"start_to_close_timeout",
"task_queue",
Expand Down
269 changes: 136 additions & 133 deletions temporalio/api/history/v1/message_pb2.py

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions temporalio/api/history/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import temporalio.api.nexus.v1.message_pb2
import temporalio.api.sdk.v1.event_group_marker_pb2
import temporalio.api.sdk.v1.task_complete_metadata_pb2
import temporalio.api.sdk.v1.user_metadata_pb2
import temporalio.api.session.v1.message_pb2
import temporalio.api.taskqueue.v1.message_pb2
import temporalio.api.update.v1.message_pb2
import temporalio.api.workflow.v1.message_pb2
Expand Down Expand Up @@ -1290,6 +1291,7 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message):
RETRY_POLICY_FIELD_NUMBER: builtins.int
USE_WORKFLOW_BUILD_ID_FIELD_NUMBER: builtins.int
PRIORITY_FIELD_NUMBER: builtins.int
SESSION_OPTIONS_FIELD_NUMBER: builtins.int
activity_id: builtins.str
"""The worker/user assigned identifier for the activity"""
@property
Expand Down Expand Up @@ -1348,6 +1350,13 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message):
"""Priority metadata. If this message is not present, or any fields are not
present, they inherit the values from the workflow.
"""
@property
def session_options(
self,
) -> temporalio.api.session.v1.message_pb2.ActivitySessionOptions:
"""Preserves the scheduling command's session routing options so activity state
can be reconstructed from history.
"""
def __init__(
self,
*,
Expand All @@ -1364,6 +1373,8 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message):
retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ...,
use_workflow_build_id: builtins.bool = ...,
priority: temporalio.api.common.v1.message_pb2.Priority | None = ...,
session_options: temporalio.api.session.v1.message_pb2.ActivitySessionOptions
| None = ...,
) -> None: ...
def HasField(
self,
Expand All @@ -1384,6 +1395,8 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message):
b"schedule_to_close_timeout",
"schedule_to_start_timeout",
b"schedule_to_start_timeout",
"session_options",
b"session_options",
"start_to_close_timeout",
b"start_to_close_timeout",
"task_queue",
Expand Down Expand Up @@ -1411,6 +1424,8 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message):
b"schedule_to_close_timeout",
"schedule_to_start_timeout",
b"schedule_to_start_timeout",
"session_options",
b"session_options",
"start_to_close_timeout",
b"start_to_close_timeout",
"task_queue",
Expand Down
Loading