Skip to content

Commit 72bdca7

Browse files
authored
Update core (#307)
1 parent 61166af commit 72bdca7

File tree

71 files changed

+2888
-1768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2888
-1768
lines changed

temporalio/api/command/v1/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
from .message_pb2 import (
2-
AcceptWorkflowUpdateCommandAttributes,
32
CancelTimerCommandAttributes,
43
CancelWorkflowExecutionCommandAttributes,
54
Command,
65
CompleteWorkflowExecutionCommandAttributes,
7-
CompleteWorkflowUpdateCommandAttributes,
86
ContinueAsNewWorkflowExecutionCommandAttributes,
97
FailWorkflowExecutionCommandAttributes,
108
ModifyWorkflowPropertiesCommandAttributes,
9+
ProtocolMessageCommandAttributes,
1110
RecordMarkerCommandAttributes,
12-
RejectWorkflowUpdateCommandAttributes,
1311
RequestCancelActivityTaskCommandAttributes,
1412
RequestCancelExternalWorkflowExecutionCommandAttributes,
1513
ScheduleActivityTaskCommandAttributes,
@@ -20,17 +18,15 @@
2018
)
2119

2220
__all__ = [
23-
"AcceptWorkflowUpdateCommandAttributes",
2421
"CancelTimerCommandAttributes",
2522
"CancelWorkflowExecutionCommandAttributes",
2623
"Command",
2724
"CompleteWorkflowExecutionCommandAttributes",
28-
"CompleteWorkflowUpdateCommandAttributes",
2925
"ContinueAsNewWorkflowExecutionCommandAttributes",
3026
"FailWorkflowExecutionCommandAttributes",
3127
"ModifyWorkflowPropertiesCommandAttributes",
28+
"ProtocolMessageCommandAttributes",
3229
"RecordMarkerCommandAttributes",
33-
"RejectWorkflowUpdateCommandAttributes",
3430
"RequestCancelActivityTaskCommandAttributes",
3531
"RequestCancelExternalWorkflowExecutionCommandAttributes",
3632
"ScheduleActivityTaskCommandAttributes",

temporalio/api/command/v1/message_pb2.py

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

temporalio/api/command/v1/message_pb2.pyi

Lines changed: 18 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import temporalio.api.common.v1.message_pb2
3434
import temporalio.api.enums.v1.command_type_pb2
3535
import temporalio.api.enums.v1.workflow_pb2
3636
import temporalio.api.failure.v1.message_pb2
37-
import temporalio.api.interaction.v1.message_pb2
3837
import temporalio.api.taskqueue.v1.message_pb2
3938

4039
if sys.version_info >= (3, 8):
@@ -855,83 +854,22 @@ global___StartChildWorkflowExecutionCommandAttributes = (
855854
StartChildWorkflowExecutionCommandAttributes
856855
)
857856

858-
class AcceptWorkflowUpdateCommandAttributes(google.protobuf.message.Message):
857+
class ProtocolMessageCommandAttributes(google.protobuf.message.Message):
859858
DESCRIPTOR: google.protobuf.descriptor.Descriptor
860859

861-
META_FIELD_NUMBER: builtins.int
862-
INPUT_FIELD_NUMBER: builtins.int
863-
@property
864-
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
865-
@property
866-
def input(self) -> temporalio.api.interaction.v1.message_pb2.Input: ...
867-
def __init__(
868-
self,
869-
*,
870-
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
871-
input: temporalio.api.interaction.v1.message_pb2.Input | None = ...,
872-
) -> None: ...
873-
def HasField(
874-
self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"]
875-
) -> builtins.bool: ...
876-
def ClearField(
877-
self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"]
878-
) -> None: ...
879-
880-
global___AcceptWorkflowUpdateCommandAttributes = AcceptWorkflowUpdateCommandAttributes
881-
882-
class CompleteWorkflowUpdateCommandAttributes(google.protobuf.message.Message):
883-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
884-
885-
META_FIELD_NUMBER: builtins.int
886-
OUTPUT_FIELD_NUMBER: builtins.int
887-
@property
888-
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
889-
@property
890-
def output(self) -> temporalio.api.interaction.v1.message_pb2.Output: ...
860+
MESSAGE_ID_FIELD_NUMBER: builtins.int
861+
message_id: builtins.str
862+
"""The message ID of the message to which this command is a pointer."""
891863
def __init__(
892864
self,
893865
*,
894-
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
895-
output: temporalio.api.interaction.v1.message_pb2.Output | None = ...,
866+
message_id: builtins.str = ...,
896867
) -> None: ...
897-
def HasField(
898-
self,
899-
field_name: typing_extensions.Literal["meta", b"meta", "output", b"output"],
900-
) -> builtins.bool: ...
901868
def ClearField(
902-
self,
903-
field_name: typing_extensions.Literal["meta", b"meta", "output", b"output"],
869+
self, field_name: typing_extensions.Literal["message_id", b"message_id"]
904870
) -> None: ...
905871

906-
global___CompleteWorkflowUpdateCommandAttributes = (
907-
CompleteWorkflowUpdateCommandAttributes
908-
)
909-
910-
class RejectWorkflowUpdateCommandAttributes(google.protobuf.message.Message):
911-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
912-
913-
META_FIELD_NUMBER: builtins.int
914-
FAILURE_FIELD_NUMBER: builtins.int
915-
@property
916-
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
917-
@property
918-
def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ...
919-
def __init__(
920-
self,
921-
*,
922-
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
923-
failure: temporalio.api.failure.v1.message_pb2.Failure | None = ...,
924-
) -> None: ...
925-
def HasField(
926-
self,
927-
field_name: typing_extensions.Literal["failure", b"failure", "meta", b"meta"],
928-
) -> builtins.bool: ...
929-
def ClearField(
930-
self,
931-
field_name: typing_extensions.Literal["failure", b"failure", "meta", b"meta"],
932-
) -> None: ...
933-
934-
global___RejectWorkflowUpdateCommandAttributes = RejectWorkflowUpdateCommandAttributes
872+
global___ProtocolMessageCommandAttributes = ProtocolMessageCommandAttributes
935873

936874
class Command(google.protobuf.message.Message):
937875
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -950,10 +888,8 @@ class Command(google.protobuf.message.Message):
950888
START_CHILD_WORKFLOW_EXECUTION_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
951889
SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
952890
UPSERT_WORKFLOW_SEARCH_ATTRIBUTES_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
953-
ACCEPT_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
954-
COMPLETE_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
891+
PROTOCOL_MESSAGE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
955892
MODIFY_WORKFLOW_PROPERTIES_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
956-
REJECT_WORKFLOW_UPDATE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
957893
command_type: temporalio.api.enums.v1.command_type_pb2.CommandType.ValueType
958894
@property
959895
def schedule_activity_task_command_attributes(
@@ -1008,21 +944,14 @@ class Command(google.protobuf.message.Message):
1008944
self,
1009945
) -> global___UpsertWorkflowSearchAttributesCommandAttributes: ...
1010946
@property
1011-
def accept_workflow_update_command_attributes(
947+
def protocol_message_command_attributes(
1012948
self,
1013-
) -> global___AcceptWorkflowUpdateCommandAttributes: ...
1014-
@property
1015-
def complete_workflow_update_command_attributes(
1016-
self,
1017-
) -> global___CompleteWorkflowUpdateCommandAttributes: ...
949+
) -> global___ProtocolMessageCommandAttributes: ...
1018950
@property
1019951
def modify_workflow_properties_command_attributes(
1020952
self,
1021-
) -> global___ModifyWorkflowPropertiesCommandAttributes: ...
1022-
@property
1023-
def reject_workflow_update_command_attributes(
1024-
self,
1025-
) -> global___RejectWorkflowUpdateCommandAttributes: ...
953+
) -> global___ModifyWorkflowPropertiesCommandAttributes:
954+
"""16 is available for use - it was used as part of a prototype that never made it into a release"""
1026955
def __init__(
1027956
self,
1028957
*,
@@ -1053,20 +982,14 @@ class Command(google.protobuf.message.Message):
1053982
| None = ...,
1054983
upsert_workflow_search_attributes_command_attributes: global___UpsertWorkflowSearchAttributesCommandAttributes
1055984
| None = ...,
1056-
accept_workflow_update_command_attributes: global___AcceptWorkflowUpdateCommandAttributes
1057-
| None = ...,
1058-
complete_workflow_update_command_attributes: global___CompleteWorkflowUpdateCommandAttributes
985+
protocol_message_command_attributes: global___ProtocolMessageCommandAttributes
1059986
| None = ...,
1060987
modify_workflow_properties_command_attributes: global___ModifyWorkflowPropertiesCommandAttributes
1061988
| None = ...,
1062-
reject_workflow_update_command_attributes: global___RejectWorkflowUpdateCommandAttributes
1063-
| None = ...,
1064989
) -> None: ...
1065990
def HasField(
1066991
self,
1067992
field_name: typing_extensions.Literal[
1068-
"accept_workflow_update_command_attributes",
1069-
b"accept_workflow_update_command_attributes",
1070993
"attributes",
1071994
b"attributes",
1072995
"cancel_timer_command_attributes",
@@ -1075,18 +998,16 @@ class Command(google.protobuf.message.Message):
1075998
b"cancel_workflow_execution_command_attributes",
1076999
"complete_workflow_execution_command_attributes",
10771000
b"complete_workflow_execution_command_attributes",
1078-
"complete_workflow_update_command_attributes",
1079-
b"complete_workflow_update_command_attributes",
10801001
"continue_as_new_workflow_execution_command_attributes",
10811002
b"continue_as_new_workflow_execution_command_attributes",
10821003
"fail_workflow_execution_command_attributes",
10831004
b"fail_workflow_execution_command_attributes",
10841005
"modify_workflow_properties_command_attributes",
10851006
b"modify_workflow_properties_command_attributes",
1007+
"protocol_message_command_attributes",
1008+
b"protocol_message_command_attributes",
10861009
"record_marker_command_attributes",
10871010
b"record_marker_command_attributes",
1088-
"reject_workflow_update_command_attributes",
1089-
b"reject_workflow_update_command_attributes",
10901011
"request_cancel_activity_task_command_attributes",
10911012
b"request_cancel_activity_task_command_attributes",
10921013
"request_cancel_external_workflow_execution_command_attributes",
@@ -1106,8 +1027,6 @@ class Command(google.protobuf.message.Message):
11061027
def ClearField(
11071028
self,
11081029
field_name: typing_extensions.Literal[
1109-
"accept_workflow_update_command_attributes",
1110-
b"accept_workflow_update_command_attributes",
11111030
"attributes",
11121031
b"attributes",
11131032
"cancel_timer_command_attributes",
@@ -1118,18 +1037,16 @@ class Command(google.protobuf.message.Message):
11181037
b"command_type",
11191038
"complete_workflow_execution_command_attributes",
11201039
b"complete_workflow_execution_command_attributes",
1121-
"complete_workflow_update_command_attributes",
1122-
b"complete_workflow_update_command_attributes",
11231040
"continue_as_new_workflow_execution_command_attributes",
11241041
b"continue_as_new_workflow_execution_command_attributes",
11251042
"fail_workflow_execution_command_attributes",
11261043
b"fail_workflow_execution_command_attributes",
11271044
"modify_workflow_properties_command_attributes",
11281045
b"modify_workflow_properties_command_attributes",
1046+
"protocol_message_command_attributes",
1047+
b"protocol_message_command_attributes",
11291048
"record_marker_command_attributes",
11301049
b"record_marker_command_attributes",
1131-
"reject_workflow_update_command_attributes",
1132-
b"reject_workflow_update_command_attributes",
11331050
"request_cancel_activity_task_command_attributes",
11341051
b"request_cancel_activity_task_command_attributes",
11351052
"request_cancel_external_workflow_execution_command_attributes",
@@ -1163,10 +1080,8 @@ class Command(google.protobuf.message.Message):
11631080
"start_child_workflow_execution_command_attributes",
11641081
"signal_external_workflow_execution_command_attributes",
11651082
"upsert_workflow_search_attributes_command_attributes",
1166-
"accept_workflow_update_command_attributes",
1167-
"complete_workflow_update_command_attributes",
1083+
"protocol_message_command_attributes",
11681084
"modify_workflow_properties_command_attributes",
1169-
"reject_workflow_update_command_attributes",
11701085
]
11711086
| None
11721087
): ...

temporalio/api/common/v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
DataBlob,
55
Header,
66
Memo,
7+
MeteringMetadata,
78
Payload,
89
Payloads,
910
RetryPolicy,
@@ -18,6 +19,7 @@
1819
"GrpcStatus",
1920
"Header",
2021
"Memo",
22+
"MeteringMetadata",
2123
"Payload",
2224
"Payloads",
2325
"RetryPolicy",

temporalio/api/common/v1/message_pb2.py

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

temporalio/api/common/v1/message_pb2.pyi

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,32 @@ class RetryPolicy(google.protobuf.message.Message):
408408
) -> None: ...
409409

410410
global___RetryPolicy = RetryPolicy
411+
412+
class MeteringMetadata(google.protobuf.message.Message):
413+
"""Metadata relevant for metering purposes"""
414+
415+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
416+
417+
NONFIRST_LOCAL_ACTIVITY_EXECUTION_ATTEMPTS_FIELD_NUMBER: builtins.int
418+
nonfirst_local_activity_execution_attempts: builtins.int
419+
"""Count of local activities which have begun an execution attempt during this workflow task,
420+
and whose first attempt occurred in some previous task. This is used for metering
421+
purposes, and does not affect workflow state.
422+
423+
(-- api-linter: core::0141::forbidden-types=disabled
424+
aip.dev/not-precedent: Negative values make no sense to represent. --)
425+
"""
426+
def __init__(
427+
self,
428+
*,
429+
nonfirst_local_activity_execution_attempts: builtins.int = ...,
430+
) -> None: ...
431+
def ClearField(
432+
self,
433+
field_name: typing_extensions.Literal[
434+
"nonfirst_local_activity_execution_attempts",
435+
b"nonfirst_local_activity_execution_attempts",
436+
],
437+
) -> None: ...
438+
439+
global___MeteringMetadata = MeteringMetadata

0 commit comments

Comments
 (0)