Skip to content

Commit

Permalink
Update core (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Mar 30, 2023
1 parent 61166af commit 72bdca7
Show file tree
Hide file tree
Showing 71 changed files with 2,888 additions and 1,768 deletions.
8 changes: 2 additions & 6 deletions temporalio/api/command/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
from .message_pb2 import (
AcceptWorkflowUpdateCommandAttributes,
CancelTimerCommandAttributes,
CancelWorkflowExecutionCommandAttributes,
Command,
CompleteWorkflowExecutionCommandAttributes,
CompleteWorkflowUpdateCommandAttributes,
ContinueAsNewWorkflowExecutionCommandAttributes,
FailWorkflowExecutionCommandAttributes,
ModifyWorkflowPropertiesCommandAttributes,
ProtocolMessageCommandAttributes,
RecordMarkerCommandAttributes,
RejectWorkflowUpdateCommandAttributes,
RequestCancelActivityTaskCommandAttributes,
RequestCancelExternalWorkflowExecutionCommandAttributes,
ScheduleActivityTaskCommandAttributes,
Expand All @@ -20,17 +18,15 @@
)

__all__ = [
"AcceptWorkflowUpdateCommandAttributes",
"CancelTimerCommandAttributes",
"CancelWorkflowExecutionCommandAttributes",
"Command",
"CompleteWorkflowExecutionCommandAttributes",
"CompleteWorkflowUpdateCommandAttributes",
"ContinueAsNewWorkflowExecutionCommandAttributes",
"FailWorkflowExecutionCommandAttributes",
"ModifyWorkflowPropertiesCommandAttributes",
"ProtocolMessageCommandAttributes",
"RecordMarkerCommandAttributes",
"RejectWorkflowUpdateCommandAttributes",
"RequestCancelActivityTaskCommandAttributes",
"RequestCancelExternalWorkflowExecutionCommandAttributes",
"ScheduleActivityTaskCommandAttributes",
Expand Down
119 changes: 42 additions & 77 deletions temporalio/api/command/v1/message_pb2.py

Large diffs are not rendered by default.

121 changes: 18 additions & 103 deletions temporalio/api/command/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import temporalio.api.common.v1.message_pb2
import temporalio.api.enums.v1.command_type_pb2
import temporalio.api.enums.v1.workflow_pb2
import temporalio.api.failure.v1.message_pb2
import temporalio.api.interaction.v1.message_pb2
import temporalio.api.taskqueue.v1.message_pb2

if sys.version_info >= (3, 8):
Expand Down Expand Up @@ -855,83 +854,22 @@ global___StartChildWorkflowExecutionCommandAttributes = (
StartChildWorkflowExecutionCommandAttributes
)

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

META_FIELD_NUMBER: builtins.int
INPUT_FIELD_NUMBER: builtins.int
@property
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
@property
def input(self) -> temporalio.api.interaction.v1.message_pb2.Input: ...
def __init__(
self,
*,
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
input: temporalio.api.interaction.v1.message_pb2.Input | None = ...,
) -> None: ...
def HasField(
self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"]
) -> builtins.bool: ...
def ClearField(
self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"]
) -> None: ...

global___AcceptWorkflowUpdateCommandAttributes = AcceptWorkflowUpdateCommandAttributes

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

META_FIELD_NUMBER: builtins.int
OUTPUT_FIELD_NUMBER: builtins.int
@property
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
@property
def output(self) -> temporalio.api.interaction.v1.message_pb2.Output: ...
MESSAGE_ID_FIELD_NUMBER: builtins.int
message_id: builtins.str
"""The message ID of the message to which this command is a pointer."""
def __init__(
self,
*,
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
output: temporalio.api.interaction.v1.message_pb2.Output | None = ...,
message_id: builtins.str = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal["meta", b"meta", "output", b"output"],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal["meta", b"meta", "output", b"output"],
self, field_name: typing_extensions.Literal["message_id", b"message_id"]
) -> None: ...

global___CompleteWorkflowUpdateCommandAttributes = (
CompleteWorkflowUpdateCommandAttributes
)

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

META_FIELD_NUMBER: builtins.int
FAILURE_FIELD_NUMBER: builtins.int
@property
def meta(self) -> temporalio.api.interaction.v1.message_pb2.Meta: ...
@property
def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ...
def __init__(
self,
*,
meta: temporalio.api.interaction.v1.message_pb2.Meta | None = ...,
failure: temporalio.api.failure.v1.message_pb2.Failure | None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal["failure", b"failure", "meta", b"meta"],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal["failure", b"failure", "meta", b"meta"],
) -> None: ...

global___RejectWorkflowUpdateCommandAttributes = RejectWorkflowUpdateCommandAttributes
global___ProtocolMessageCommandAttributes = ProtocolMessageCommandAttributes

class Command(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
Expand All @@ -950,10 +888,8 @@ class Command(google.protobuf.message.Message):
START_CHILD_WORKFLOW_EXECUTION_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
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
PROTOCOL_MESSAGE_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
MODIFY_WORKFLOW_PROPERTIES_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int
REJECT_WORKFLOW_UPDATE_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 @@ -1008,21 +944,14 @@ class Command(google.protobuf.message.Message):
self,
) -> global___UpsertWorkflowSearchAttributesCommandAttributes: ...
@property
def accept_workflow_update_command_attributes(
def protocol_message_command_attributes(
self,
) -> global___AcceptWorkflowUpdateCommandAttributes: ...
@property
def complete_workflow_update_command_attributes(
self,
) -> global___CompleteWorkflowUpdateCommandAttributes: ...
) -> global___ProtocolMessageCommandAttributes: ...
@property
def modify_workflow_properties_command_attributes(
self,
) -> global___ModifyWorkflowPropertiesCommandAttributes: ...
@property
def reject_workflow_update_command_attributes(
self,
) -> global___RejectWorkflowUpdateCommandAttributes: ...
) -> global___ModifyWorkflowPropertiesCommandAttributes:
"""16 is available for use - it was used as part of a prototype that never made it into a release"""
def __init__(
self,
*,
Expand Down Expand Up @@ -1053,20 +982,14 @@ class Command(google.protobuf.message.Message):
| None = ...,
upsert_workflow_search_attributes_command_attributes: global___UpsertWorkflowSearchAttributesCommandAttributes
| None = ...,
accept_workflow_update_command_attributes: global___AcceptWorkflowUpdateCommandAttributes
| None = ...,
complete_workflow_update_command_attributes: global___CompleteWorkflowUpdateCommandAttributes
protocol_message_command_attributes: global___ProtocolMessageCommandAttributes
| None = ...,
modify_workflow_properties_command_attributes: global___ModifyWorkflowPropertiesCommandAttributes
| None = ...,
reject_workflow_update_command_attributes: global___RejectWorkflowUpdateCommandAttributes
| None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal[
"accept_workflow_update_command_attributes",
b"accept_workflow_update_command_attributes",
"attributes",
b"attributes",
"cancel_timer_command_attributes",
Expand All @@ -1075,18 +998,16 @@ class Command(google.protobuf.message.Message):
b"cancel_workflow_execution_command_attributes",
"complete_workflow_execution_command_attributes",
b"complete_workflow_execution_command_attributes",
"complete_workflow_update_command_attributes",
b"complete_workflow_update_command_attributes",
"continue_as_new_workflow_execution_command_attributes",
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",
"protocol_message_command_attributes",
b"protocol_message_command_attributes",
"record_marker_command_attributes",
b"record_marker_command_attributes",
"reject_workflow_update_command_attributes",
b"reject_workflow_update_command_attributes",
"request_cancel_activity_task_command_attributes",
b"request_cancel_activity_task_command_attributes",
"request_cancel_external_workflow_execution_command_attributes",
Expand All @@ -1106,8 +1027,6 @@ class Command(google.protobuf.message.Message):
def ClearField(
self,
field_name: typing_extensions.Literal[
"accept_workflow_update_command_attributes",
b"accept_workflow_update_command_attributes",
"attributes",
b"attributes",
"cancel_timer_command_attributes",
Expand All @@ -1118,18 +1037,16 @@ class Command(google.protobuf.message.Message):
b"command_type",
"complete_workflow_execution_command_attributes",
b"complete_workflow_execution_command_attributes",
"complete_workflow_update_command_attributes",
b"complete_workflow_update_command_attributes",
"continue_as_new_workflow_execution_command_attributes",
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",
"protocol_message_command_attributes",
b"protocol_message_command_attributes",
"record_marker_command_attributes",
b"record_marker_command_attributes",
"reject_workflow_update_command_attributes",
b"reject_workflow_update_command_attributes",
"request_cancel_activity_task_command_attributes",
b"request_cancel_activity_task_command_attributes",
"request_cancel_external_workflow_execution_command_attributes",
Expand Down Expand Up @@ -1163,10 +1080,8 @@ class Command(google.protobuf.message.Message):
"start_child_workflow_execution_command_attributes",
"signal_external_workflow_execution_command_attributes",
"upsert_workflow_search_attributes_command_attributes",
"accept_workflow_update_command_attributes",
"complete_workflow_update_command_attributes",
"protocol_message_command_attributes",
"modify_workflow_properties_command_attributes",
"reject_workflow_update_command_attributes",
]
| None
): ...
Expand Down
2 changes: 2 additions & 0 deletions temporalio/api/common/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
DataBlob,
Header,
Memo,
MeteringMetadata,
Payload,
Payloads,
RetryPolicy,
Expand All @@ -18,6 +19,7 @@
"GrpcStatus",
"Header",
"Memo",
"MeteringMetadata",
"Payload",
"Payloads",
"RetryPolicy",
Expand Down
16 changes: 15 additions & 1 deletion temporalio/api/common/v1/message_pb2.py

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

29 changes: 29 additions & 0 deletions temporalio/api/common/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,32 @@ class RetryPolicy(google.protobuf.message.Message):
) -> None: ...

global___RetryPolicy = RetryPolicy

class MeteringMetadata(google.protobuf.message.Message):
"""Metadata relevant for metering purposes"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

NONFIRST_LOCAL_ACTIVITY_EXECUTION_ATTEMPTS_FIELD_NUMBER: builtins.int
nonfirst_local_activity_execution_attempts: builtins.int
"""Count of local activities which have begun an execution attempt during this workflow task,
and whose first attempt occurred in some previous task. This is used for metering
purposes, and does not affect workflow state.
(-- api-linter: core::0141::forbidden-types=disabled
aip.dev/not-precedent: Negative values make no sense to represent. --)
"""
def __init__(
self,
*,
nonfirst_local_activity_execution_attempts: builtins.int = ...,
) -> None: ...
def ClearField(
self,
field_name: typing_extensions.Literal[
"nonfirst_local_activity_execution_attempts",
b"nonfirst_local_activity_execution_attempts",
],
) -> None: ...

global___MeteringMetadata = MeteringMetadata
Loading

0 comments on commit 72bdca7

Please sign in to comment.