Skip to content

Commit a3503b4

Browse files
committed
update protos
1 parent 9c31edc commit a3503b4

File tree

9 files changed

+506
-116
lines changed

9 files changed

+506
-116
lines changed

temporalio/bridge/proto/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ActivitySlotInfo,
44
ActivityTaskCompletion,
55
LocalActivitySlotInfo,
6+
NexusSlotInfo,
67
WorkflowSlotInfo,
78
)
89

@@ -11,5 +12,6 @@
1112
"ActivitySlotInfo",
1213
"ActivityTaskCompletion",
1314
"LocalActivitySlotInfo",
15+
"NexusSlotInfo",
1416
"WorkflowSlotInfo",
1517
]

temporalio/bridge/proto/core_interface_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/bridge/proto/core_interface_pb2.pyi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,27 @@ class LocalActivitySlotInfo(google.protobuf.message.Message):
141141
) -> None: ...
142142

143143
global___LocalActivitySlotInfo = LocalActivitySlotInfo
144+
145+
class NexusSlotInfo(google.protobuf.message.Message):
146+
"""Info about nexus task slot usage"""
147+
148+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
149+
150+
SERVICE_FIELD_NUMBER: builtins.int
151+
OPERATION_FIELD_NUMBER: builtins.int
152+
service: builtins.str
153+
operation: builtins.str
154+
def __init__(
155+
self,
156+
*,
157+
service: builtins.str = ...,
158+
operation: builtins.str = ...,
159+
) -> None: ...
160+
def ClearField(
161+
self,
162+
field_name: typing_extensions.Literal[
163+
"operation", b"operation", "service", b"service"
164+
],
165+
) -> None: ...
166+
167+
global___NexusSlotInfo = NexusSlotInfo

temporalio/bridge/proto/workflow_activation/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
ResolveChildWorkflowExecutionStartCancelled,
1313
ResolveChildWorkflowExecutionStartFailure,
1414
ResolveChildWorkflowExecutionStartSuccess,
15+
ResolveNexusOperation,
16+
ResolveNexusOperationStart,
1517
ResolveRequestCancelExternalWorkflow,
1618
ResolveSignalExternalWorkflow,
1719
SignalWorkflow,
@@ -34,6 +36,8 @@
3436
"ResolveChildWorkflowExecutionStartCancelled",
3537
"ResolveChildWorkflowExecutionStartFailure",
3638
"ResolveChildWorkflowExecutionStartSuccess",
39+
"ResolveNexusOperation",
40+
"ResolveNexusOperationStart",
3741
"ResolveRequestCancelExternalWorkflow",
3842
"ResolveSignalExternalWorkflow",
3943
"SignalWorkflow",

temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.py

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

temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.pyi

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import temporalio.api.update.v1.message_pb2
2525
import temporalio.bridge.proto.activity_result.activity_result_pb2
2626
import temporalio.bridge.proto.child_workflow.child_workflow_pb2
2727
import temporalio.bridge.proto.common.common_pb2
28+
import temporalio.bridge.proto.nexus.nexus_pb2
2829

2930
if sys.version_info >= (3, 10):
3031
import typing as typing_extensions
@@ -186,6 +187,8 @@ class WorkflowActivationJob(google.protobuf.message.Message):
186187
RESOLVE_SIGNAL_EXTERNAL_WORKFLOW_FIELD_NUMBER: builtins.int
187188
RESOLVE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_FIELD_NUMBER: builtins.int
188189
DO_UPDATE_FIELD_NUMBER: builtins.int
190+
RESOLVE_NEXUS_OPERATION_START_FIELD_NUMBER: builtins.int
191+
RESOLVE_NEXUS_OPERATION_FIELD_NUMBER: builtins.int
189192
REMOVE_FROM_CACHE_FIELD_NUMBER: builtins.int
190193
@property
191194
def initialize_workflow(self) -> global___InitializeWorkflow:
@@ -240,6 +243,12 @@ class WorkflowActivationJob(google.protobuf.message.Message):
240243
def do_update(self) -> global___DoUpdate:
241244
"""A request to handle a workflow update."""
242245
@property
246+
def resolve_nexus_operation_start(self) -> global___ResolveNexusOperationStart:
247+
"""A nexus operation started."""
248+
@property
249+
def resolve_nexus_operation(self) -> global___ResolveNexusOperation:
250+
"""A nexus operation resolved."""
251+
@property
243252
def remove_from_cache(self) -> global___RemoveFromCache:
244253
"""Remove the workflow identified by the [WorkflowActivation] containing this job from the
245254
cache after performing the activation. It is guaranteed that this will be the only job
@@ -265,6 +274,8 @@ class WorkflowActivationJob(google.protobuf.message.Message):
265274
resolve_request_cancel_external_workflow: global___ResolveRequestCancelExternalWorkflow
266275
| None = ...,
267276
do_update: global___DoUpdate | None = ...,
277+
resolve_nexus_operation_start: global___ResolveNexusOperationStart | None = ...,
278+
resolve_nexus_operation: global___ResolveNexusOperation | None = ...,
268279
remove_from_cache: global___RemoveFromCache | None = ...,
269280
) -> None: ...
270281
def HasField(
@@ -290,6 +301,10 @@ class WorkflowActivationJob(google.protobuf.message.Message):
290301
b"resolve_child_workflow_execution",
291302
"resolve_child_workflow_execution_start",
292303
b"resolve_child_workflow_execution_start",
304+
"resolve_nexus_operation",
305+
b"resolve_nexus_operation",
306+
"resolve_nexus_operation_start",
307+
b"resolve_nexus_operation_start",
293308
"resolve_request_cancel_external_workflow",
294309
b"resolve_request_cancel_external_workflow",
295310
"resolve_signal_external_workflow",
@@ -325,6 +340,10 @@ class WorkflowActivationJob(google.protobuf.message.Message):
325340
b"resolve_child_workflow_execution",
326341
"resolve_child_workflow_execution_start",
327342
b"resolve_child_workflow_execution_start",
343+
"resolve_nexus_operation",
344+
b"resolve_nexus_operation",
345+
"resolve_nexus_operation_start",
346+
b"resolve_nexus_operation_start",
328347
"resolve_request_cancel_external_workflow",
329348
b"resolve_request_cancel_external_workflow",
330349
"resolve_signal_external_workflow",
@@ -354,6 +373,8 @@ class WorkflowActivationJob(google.protobuf.message.Message):
354373
"resolve_signal_external_workflow",
355374
"resolve_request_cancel_external_workflow",
356375
"do_update",
376+
"resolve_nexus_operation_start",
377+
"resolve_nexus_operation",
357378
"remove_from_cache",
358379
]
359380
| None
@@ -1240,6 +1261,105 @@ class DoUpdate(google.protobuf.message.Message):
12401261

12411262
global___DoUpdate = DoUpdate
12421263

1264+
class ResolveNexusOperationStart(google.protobuf.message.Message):
1265+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1266+
1267+
SEQ_FIELD_NUMBER: builtins.int
1268+
OPERATION_ID_FIELD_NUMBER: builtins.int
1269+
STARTED_SYNC_FIELD_NUMBER: builtins.int
1270+
CANCELLED_BEFORE_START_FIELD_NUMBER: builtins.int
1271+
seq: builtins.int
1272+
"""Sequence number as provided by lang in the corresponding ScheduleNexusOperation command"""
1273+
operation_id: builtins.str
1274+
"""The operation started asynchronously. Contains an ID that can be used to perform
1275+
operations on the started operation by, ex, clients. A `ResolveNexusOperation` job will
1276+
follow at some point.
1277+
"""
1278+
started_sync: builtins.bool
1279+
"""If true the operation "started" but only because it's also already resolved. A
1280+
`ResolveNexusOperation` job will be in the same activation.
1281+
"""
1282+
@property
1283+
def cancelled_before_start(self) -> temporalio.api.failure.v1.message_pb2.Failure:
1284+
"""The operation was cancelled before it was ever sent to server (same WFT).
1285+
Note that core will still send a `ResolveNexusOperation` job in the same activation, so
1286+
there does not need to be an exceptional case for this in lang.
1287+
"""
1288+
def __init__(
1289+
self,
1290+
*,
1291+
seq: builtins.int = ...,
1292+
operation_id: builtins.str = ...,
1293+
started_sync: builtins.bool = ...,
1294+
cancelled_before_start: temporalio.api.failure.v1.message_pb2.Failure
1295+
| None = ...,
1296+
) -> None: ...
1297+
def HasField(
1298+
self,
1299+
field_name: typing_extensions.Literal[
1300+
"cancelled_before_start",
1301+
b"cancelled_before_start",
1302+
"operation_id",
1303+
b"operation_id",
1304+
"started_sync",
1305+
b"started_sync",
1306+
"status",
1307+
b"status",
1308+
],
1309+
) -> builtins.bool: ...
1310+
def ClearField(
1311+
self,
1312+
field_name: typing_extensions.Literal[
1313+
"cancelled_before_start",
1314+
b"cancelled_before_start",
1315+
"operation_id",
1316+
b"operation_id",
1317+
"seq",
1318+
b"seq",
1319+
"started_sync",
1320+
b"started_sync",
1321+
"status",
1322+
b"status",
1323+
],
1324+
) -> None: ...
1325+
def WhichOneof(
1326+
self, oneof_group: typing_extensions.Literal["status", b"status"]
1327+
) -> (
1328+
typing_extensions.Literal[
1329+
"operation_id", "started_sync", "cancelled_before_start"
1330+
]
1331+
| None
1332+
): ...
1333+
1334+
global___ResolveNexusOperationStart = ResolveNexusOperationStart
1335+
1336+
class ResolveNexusOperation(google.protobuf.message.Message):
1337+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1338+
1339+
SEQ_FIELD_NUMBER: builtins.int
1340+
RESULT_FIELD_NUMBER: builtins.int
1341+
seq: builtins.int
1342+
"""Sequence number as provided by lang in the corresponding ScheduleNexusOperation command"""
1343+
@property
1344+
def result(
1345+
self,
1346+
) -> temporalio.bridge.proto.nexus.nexus_pb2.NexusOperationResult: ...
1347+
def __init__(
1348+
self,
1349+
*,
1350+
seq: builtins.int = ...,
1351+
result: temporalio.bridge.proto.nexus.nexus_pb2.NexusOperationResult
1352+
| None = ...,
1353+
) -> None: ...
1354+
def HasField(
1355+
self, field_name: typing_extensions.Literal["result", b"result"]
1356+
) -> builtins.bool: ...
1357+
def ClearField(
1358+
self, field_name: typing_extensions.Literal["result", b"result", "seq", b"seq"]
1359+
) -> None: ...
1360+
1361+
global___ResolveNexusOperation = ResolveNexusOperation
1362+
12431363
class RemoveFromCache(google.protobuf.message.Message):
12441364
DESCRIPTOR: google.protobuf.descriptor.Descriptor
12451365

temporalio/bridge/proto/workflow_commands/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
RequestCancelActivity,
1414
RequestCancelExternalWorkflowExecution,
1515
RequestCancelLocalActivity,
16+
RequestCancelNexusOperation,
1617
ScheduleActivity,
1718
ScheduleLocalActivity,
19+
ScheduleNexusOperation,
1820
SetPatchMarker,
1921
SignalExternalWorkflowExecution,
2022
StartChildWorkflowExecution,
@@ -39,8 +41,10 @@
3941
"RequestCancelActivity",
4042
"RequestCancelExternalWorkflowExecution",
4143
"RequestCancelLocalActivity",
44+
"RequestCancelNexusOperation",
4245
"ScheduleActivity",
4346
"ScheduleLocalActivity",
47+
"ScheduleNexusOperation",
4448
"SetPatchMarker",
4549
"SignalExternalWorkflowExecution",
4650
"StartChildWorkflowExecution",

0 commit comments

Comments
 (0)