Skip to content

Commit

Permalink
Multiple History Replay support (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource committed Oct 19, 2022
1 parent 0dd2312 commit e436ecc
Show file tree
Hide file tree
Showing 57 changed files with 1,969 additions and 1,987 deletions.
12 changes: 6 additions & 6 deletions temporalio/api/batch/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 2 additions & 13 deletions temporalio/api/batch/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,8 @@ class BatchOperationTermination(google.protobuf.message.Message):

DESCRIPTOR: google.protobuf.descriptor.Descriptor

REASON_FIELD_NUMBER: builtins.int
DETAILS_FIELD_NUMBER: builtins.int
IDENTITY_FIELD_NUMBER: builtins.int
reason: builtins.str
"""Reason of terminate workflows"""
@property
def details(self) -> temporalio.api.common.v1.message_pb2.Payloads:
"""Serialized value(s) to provide to the termination event"""
Expand All @@ -106,7 +103,6 @@ class BatchOperationTermination(google.protobuf.message.Message):
def __init__(
self,
*,
reason: builtins.str = ...,
details: temporalio.api.common.v1.message_pb2.Payloads | None = ...,
identity: builtins.str = ...,
) -> None: ...
Expand All @@ -116,7 +112,7 @@ class BatchOperationTermination(google.protobuf.message.Message):
def ClearField(
self,
field_name: typing_extensions.Literal[
"details", b"details", "identity", b"identity", "reason", b"reason"
"details", b"details", "identity", b"identity"
],
) -> None: ...

Expand Down Expand Up @@ -181,23 +177,16 @@ class BatchOperationCancellation(google.protobuf.message.Message):

DESCRIPTOR: google.protobuf.descriptor.Descriptor

REASON_FIELD_NUMBER: builtins.int
IDENTITY_FIELD_NUMBER: builtins.int
reason: builtins.str
"""Reason of cancel workflows"""
identity: builtins.str
"""The identity of the worker/client"""
def __init__(
self,
*,
reason: builtins.str = ...,
identity: builtins.str = ...,
) -> None: ...
def ClearField(
self,
field_name: typing_extensions.Literal[
"identity", b"identity", "reason", b"reason"
],
self, field_name: typing_extensions.Literal["identity", b"identity"]
) -> None: ...

global___BatchOperationCancellation = BatchOperationCancellation
2 changes: 2 additions & 0 deletions temporalio/api/command/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
CompleteWorkflowUpdateCommandAttributes,
ContinueAsNewWorkflowExecutionCommandAttributes,
FailWorkflowExecutionCommandAttributes,
ModifyWorkflowPropertiesCommandAttributes,
RecordMarkerCommandAttributes,
RequestCancelActivityTaskCommandAttributes,
RequestCancelExternalWorkflowExecutionCommandAttributes,
Expand All @@ -26,6 +27,7 @@
"CompleteWorkflowUpdateCommandAttributes",
"ContinueAsNewWorkflowExecutionCommandAttributes",
"FailWorkflowExecutionCommandAttributes",
"ModifyWorkflowPropertiesCommandAttributes",
"RecordMarkerCommandAttributes",
"RequestCancelActivityTaskCommandAttributes",
"RequestCancelExternalWorkflowExecutionCommandAttributes",
Expand Down
32 changes: 17 additions & 15 deletions temporalio/api/command/v1/message_pb2.py

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions temporalio/api/command/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,32 @@ global___UpsertWorkflowSearchAttributesCommandAttributes = (
UpsertWorkflowSearchAttributesCommandAttributes
)

class ModifyWorkflowPropertiesCommandAttributes(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

UPSERTED_MEMO_FIELD_NUMBER: builtins.int
@property
def upserted_memo(self) -> temporalio.api.common.v1.message_pb2.Memo:
"""If set, update the workflow memo with the provided values. The values will be merged with
the existing memo. If the user wants to delete values, a default/empty Payload should be
used as the value for the key being deleted.
"""
def __init__(
self,
*,
upserted_memo: temporalio.api.common.v1.message_pb2.Memo | None = ...,
) -> None: ...
def HasField(
self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"]
) -> builtins.bool: ...
def ClearField(
self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"]
) -> None: ...

global___ModifyWorkflowPropertiesCommandAttributes = (
ModifyWorkflowPropertiesCommandAttributes
)

class RecordMarkerCommandAttributes(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand Down Expand Up @@ -922,6 +948,7 @@ class Command(google.protobuf.message.Message):
UPSERT_WORKFLOW_SEARCH_ATTRIBUTES_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
ACCEPT_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
COMPLETE_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
MODIFY_WORKFLOW_PROPERTIES_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
command_type: temporalio.api.enums.v1.command_type_pb2.CommandType.ValueType
@property
def schedule_activity_task_command_attributes(
Expand Down Expand Up @@ -983,6 +1010,10 @@ class Command(google.protobuf.message.Message):
def complete_workflow_update_command_attributes(
self,
) -> global___CompleteWorkflowUpdateCommandAttributes: ...
@property
def modify_workflow_properties_command_attributes(
self,
) -> global___ModifyWorkflowPropertiesCommandAttributes: ...
def __init__(
self,
*,
Expand Down Expand Up @@ -1017,6 +1048,8 @@ class Command(google.protobuf.message.Message):
| None = ...,
complete_workflow_update_command_attributes: global___CompleteWorkflowUpdateCommandAttributes
| None = ...,
modify_workflow_properties_command_attributes: global___ModifyWorkflowPropertiesCommandAttributes
| None = ...,
) -> None: ...
def HasField(
self,
Expand All @@ -1037,6 +1070,8 @@ class Command(google.protobuf.message.Message):
b"continue_as_new_workflow_execution_command_attributes",
"fail_workflow_execution_command_attributes",
b"fail_workflow_execution_command_attributes",
"modify_workflow_properties_command_attributes",
b"modify_workflow_properties_command_attributes",
"record_marker_command_attributes",
b"record_marker_command_attributes",
"request_cancel_activity_task_command_attributes",
Expand Down Expand Up @@ -1076,6 +1111,8 @@ class Command(google.protobuf.message.Message):
b"continue_as_new_workflow_execution_command_attributes",
"fail_workflow_execution_command_attributes",
b"fail_workflow_execution_command_attributes",
"modify_workflow_properties_command_attributes",
b"modify_workflow_properties_command_attributes",
"record_marker_command_attributes",
b"record_marker_command_attributes",
"request_cancel_activity_task_command_attributes",
Expand Down Expand Up @@ -1112,6 +1149,7 @@ class Command(google.protobuf.message.Message):
"upsert_workflow_search_attributes_command_attributes",
"accept_workflow_update_command_attributes",
"complete_workflow_update_command_attributes",
"modify_workflow_properties_command_attributes",
] | None: ...

global___Command = Command
2 changes: 0 additions & 2 deletions temporalio/api/enums/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .batch_operation_pb2 import BatchOperationState, BatchOperationType
from .cluster_pb2 import ClusterMemberRole
from .command_type_pb2 import CommandType
from .common_pb2 import EncodingType, IndexedValueType, Severity
from .event_type_pb2 import EventType
Expand Down Expand Up @@ -36,7 +35,6 @@
"BatchOperationState",
"BatchOperationType",
"CancelExternalWorkflowExecutionFailedCause",
"ClusterMemberRole",
"CommandType",
"ContinueAsNewInitiator",
"EncodingType",
Expand Down
29 changes: 0 additions & 29 deletions temporalio/api/enums/v1/cluster_pb2.py

This file was deleted.

65 changes: 0 additions & 65 deletions temporalio/api/enums/v1/cluster_pb2.pyi

This file was deleted.

3 changes: 0 additions & 3 deletions temporalio/api/enums/v1/cluster_pb2_grpc.py

This file was deleted.

25 changes: 0 additions & 25 deletions temporalio/api/enums/v1/cluster_pb2_grpc.pyi

This file was deleted.

4 changes: 2 additions & 2 deletions temporalio/api/enums/v1/command_type_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions temporalio/api/enums/v1/command_type_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class _CommandTypeEnumTypeWrapper(
"""Indicates that an update has completed and carries either the success or
failure outcome of said update.
"""
COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES: _CommandType.ValueType # 16

class CommandType(_CommandType, metaclass=_CommandTypeEnumTypeWrapper):
"""Whenever this list of command types is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering."""
Expand All @@ -89,4 +90,5 @@ COMMAND_TYPE_COMPLETE_WORKFLOW_UPDATE: CommandType.ValueType # 15
"""Indicates that an update has completed and carries either the success or
failure outcome of said update.
"""
COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES: CommandType.ValueType # 16
global___CommandType = CommandType
Loading

0 comments on commit e436ecc

Please sign in to comment.