Skip to content

Commit 40b109c

Browse files
committed
Update protos
1 parent 737ace2 commit 40b109c

File tree

12 files changed

+464
-262
lines changed

12 files changed

+464
-262
lines changed

temporalio/api/enums/v1/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
)
1212
from .namespace_pb2 import ArchivalState, NamespaceState, ReplicationState
1313
from .query_pb2 import QueryRejectCondition, QueryResultType
14-
from .reset_pb2 import ResetReapplyType, ResetType
14+
from .reset_pb2 import ResetReapplyExcludeType, ResetReapplyType, ResetType
1515
from .schedule_pb2 import ScheduleOverlapPolicy
1616
from .task_queue_pb2 import TaskQueueKind, TaskQueueType, TaskReachability
17-
from .update_pb2 import UpdateWorkflowExecutionLifecycleStage
17+
from .update_pb2 import (
18+
UpdateRequestedEventOrigin,
19+
UpdateWorkflowExecutionLifecycleStage,
20+
)
1821
from .workflow_pb2 import (
1922
ContinueAsNewInitiator,
2023
HistoryEventFilterType,
@@ -45,6 +48,7 @@
4548
"QueryRejectCondition",
4649
"QueryResultType",
4750
"ReplicationState",
51+
"ResetReapplyExcludeType",
4852
"ResetReapplyType",
4953
"ResetType",
5054
"ResourceExhaustedCause",
@@ -57,6 +61,7 @@
5761
"TaskQueueType",
5862
"TaskReachability",
5963
"TimeoutType",
64+
"UpdateRequestedEventOrigin",
6065
"UpdateWorkflowExecutionLifecycleStage",
6166
"WorkflowExecutionStatus",
6267
"WorkflowIdReusePolicy",

temporalio/api/enums/v1/event_type_pb2.py

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

temporalio/api/enums/v1/event_type_pb2.pyi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ class _EventTypeEnumTypeWrapper(
200200
"""
201201
EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: _EventType.ValueType # 46
202202
"""Workflow properties modified by user workflow code"""
203+
EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REQUESTED: _EventType.ValueType # 47
204+
"""An update was requested. Note that not all update requests result in this
205+
event. See UpdateRequestedEventOrigin for situations in which this event
206+
is created.
207+
"""
203208

204209
class EventType(_EventType, metaclass=_EventTypeEnumTypeWrapper):
205210
"""Whenever this list of events is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering"""
@@ -359,4 +364,9 @@ maintain determinism when using the command-based approach.
359364
"""
360365
EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: EventType.ValueType # 46
361366
"""Workflow properties modified by user workflow code"""
367+
EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REQUESTED: EventType.ValueType # 47
368+
"""An update was requested. Note that not all update requests result in this
369+
event. See UpdateRequestedEventOrigin for situations in which this event
370+
is created.
371+
"""
362372
global___EventType = EventType

temporalio/api/enums/v1/reset_pb2.py

Lines changed: 13 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

temporalio/api/enums/v1/reset_pb2.pyi

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,35 @@ else:
3636

3737
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
3838

39+
class _ResetReapplyExcludeType:
40+
ValueType = typing.NewType("ValueType", builtins.int)
41+
V: typing_extensions.TypeAlias = ValueType
42+
43+
class _ResetReapplyExcludeTypeEnumTypeWrapper(
44+
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[
45+
_ResetReapplyExcludeType.ValueType
46+
],
47+
builtins.type,
48+
): # noqa: F821
49+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
50+
RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED: _ResetReapplyExcludeType.ValueType # 0
51+
RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL: _ResetReapplyExcludeType.ValueType # 1
52+
"""Exclude signals when reapplying events."""
53+
RESET_REAPPLY_EXCLUDE_TYPE_UPDATE: _ResetReapplyExcludeType.ValueType # 2
54+
"""Exclude updates when reapplying events."""
55+
56+
class ResetReapplyExcludeType(
57+
_ResetReapplyExcludeType, metaclass=_ResetReapplyExcludeTypeEnumTypeWrapper
58+
):
59+
"""Event types to exclude when reapplying events."""
60+
61+
RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED: ResetReapplyExcludeType.ValueType # 0
62+
RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL: ResetReapplyExcludeType.ValueType # 1
63+
"""Exclude signals when reapplying events."""
64+
RESET_REAPPLY_EXCLUDE_TYPE_UPDATE: ResetReapplyExcludeType.ValueType # 2
65+
"""Exclude updates when reapplying events."""
66+
global___ResetReapplyExcludeType = ResetReapplyExcludeType
67+
3968
class _ResetReapplyType:
4069
ValueType = typing.NewType("ValueType", builtins.int)
4170
V: typing_extensions.TypeAlias = ValueType
@@ -49,17 +78,25 @@ class _ResetReapplyTypeEnumTypeWrapper(
4978
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
5079
RESET_REAPPLY_TYPE_UNSPECIFIED: _ResetReapplyType.ValueType # 0
5180
RESET_REAPPLY_TYPE_SIGNAL: _ResetReapplyType.ValueType # 1
81+
"""Signals are reapplied when workflow is reset."""
5282
RESET_REAPPLY_TYPE_NONE: _ResetReapplyType.ValueType # 2
83+
"""No events are reapplied when workflow is reset."""
84+
RESET_REAPPLY_TYPE_ALL_ELIGIBLE: _ResetReapplyType.ValueType # 3
85+
"""All eligible events are reapplied when workflow is reset."""
5386

5487
class ResetReapplyType(_ResetReapplyType, metaclass=_ResetReapplyTypeEnumTypeWrapper):
55-
"""Reset reapply (replay) options
56-
* RESET_REAPPLY_TYPE_SIGNAL (default) - Signals are reapplied when workflow is reset
57-
* RESET_REAPPLY_TYPE_NONE - nothing is reapplied
88+
"""Event types to include when reapplying events. Deprecated: applications
89+
should use ResetReapplyExcludeType to specify exclusions from this set, and
90+
new event types should be added to ResetReapplyExcludeType instead of here.
5891
"""
5992

6093
RESET_REAPPLY_TYPE_UNSPECIFIED: ResetReapplyType.ValueType # 0
6194
RESET_REAPPLY_TYPE_SIGNAL: ResetReapplyType.ValueType # 1
95+
"""Signals are reapplied when workflow is reset."""
6296
RESET_REAPPLY_TYPE_NONE: ResetReapplyType.ValueType # 2
97+
"""No events are reapplied when workflow is reset."""
98+
RESET_REAPPLY_TYPE_ALL_ELIGIBLE: ResetReapplyType.ValueType # 3
99+
"""All eligible events are reapplied when workflow is reset."""
63100
global___ResetReapplyType = ResetReapplyType
64101

65102
class _ResetType:

temporalio/api/enums/v1/update_pb2.py

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

temporalio/api/enums/v1/update_pb2.pyi

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,37 @@ UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED: UpdateWorkflowExecutionLife
9696
on a worker and has either been rejected or returned a value or an error.
9797
"""
9898
global___UpdateWorkflowExecutionLifecycleStage = UpdateWorkflowExecutionLifecycleStage
99+
100+
class _UpdateRequestedEventOrigin:
101+
ValueType = typing.NewType("ValueType", builtins.int)
102+
V: typing_extensions.TypeAlias = ValueType
103+
104+
class _UpdateRequestedEventOriginEnumTypeWrapper(
105+
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[
106+
_UpdateRequestedEventOrigin.ValueType
107+
],
108+
builtins.type,
109+
): # noqa: F821
110+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
111+
UPDATE_REQUESTED_EVENT_ORIGIN_UNSPECIFIED: _UpdateRequestedEventOrigin.ValueType # 0
112+
UPDATE_REQUESTED_EVENT_ORIGIN_REAPPLY: _UpdateRequestedEventOrigin.ValueType # 1
113+
"""The UpdateRequested event was created when reapplying events during reset
114+
or replication. I.e. an accepted update on one branch of workflow history
115+
was converted into a requested update on a different branch.
116+
"""
117+
118+
class UpdateRequestedEventOrigin(
119+
_UpdateRequestedEventOrigin, metaclass=_UpdateRequestedEventOriginEnumTypeWrapper
120+
):
121+
"""UpdateRequestedEventOrigin records why an
122+
WorkflowExecutionUpdateRequestedEvent was written to history. Note that not
123+
all update requests result in a WorkflowExecutionUpdateRequestedEvent.
124+
"""
125+
126+
UPDATE_REQUESTED_EVENT_ORIGIN_UNSPECIFIED: UpdateRequestedEventOrigin.ValueType # 0
127+
UPDATE_REQUESTED_EVENT_ORIGIN_REAPPLY: UpdateRequestedEventOrigin.ValueType # 1
128+
"""The UpdateRequested event was created when reapplying events during reset
129+
or replication. I.e. an accepted update on one branch of workflow history
130+
was converted into a requested update on a different branch.
131+
"""
132+
global___UpdateRequestedEventOrigin = UpdateRequestedEventOrigin

0 commit comments

Comments
 (0)