Skip to content

Commit 8449a35

Browse files
authored
Add application category (#853)
* update core * add category to application error, do not log on benign errors for activities * formatting * implement missing wf service calls * address pr review * alphabetically order new wf service calls, convert category in default failure converter * formatting * remove 0 from category conversion * commenting out test, checking for CI flake * uncomment test * format
1 parent 51af3e6 commit 8449a35

34 files changed

+2197
-484
lines changed

temporalio/api/batch/v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
BatchOperationReset,
66
BatchOperationSignal,
77
BatchOperationTermination,
8+
BatchOperationTriggerWorkflowRule,
89
BatchOperationUnpauseActivities,
910
BatchOperationUpdateWorkflowExecutionOptions,
1011
)
@@ -16,6 +17,7 @@
1617
"BatchOperationReset",
1718
"BatchOperationSignal",
1819
"BatchOperationTermination",
20+
"BatchOperationTriggerWorkflowRule",
1921
"BatchOperationUnpauseActivities",
2022
"BatchOperationUpdateWorkflowExecutionOptions",
2123
]

temporalio/api/batch/v1/message_pb2.py

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

temporalio/api/batch/v1/message_pb2.pyi

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import google.protobuf.timestamp_pb2
3636
import temporalio.api.common.v1.message_pb2
3737
import temporalio.api.enums.v1.batch_operation_pb2
3838
import temporalio.api.enums.v1.reset_pb2
39+
import temporalio.api.rules.v1.message_pb2
3940
import temporalio.api.workflow.v1.message_pb2
4041

4142
if sys.version_info >= (3, 8):
@@ -392,3 +393,43 @@ class BatchOperationUnpauseActivities(google.protobuf.message.Message):
392393
) -> typing_extensions.Literal["type", "match_all"] | None: ...
393394

394395
global___BatchOperationUnpauseActivities = BatchOperationUnpauseActivities
396+
397+
class BatchOperationTriggerWorkflowRule(google.protobuf.message.Message):
398+
"""BatchOperationTriggerWorkflowRule sends TriggerWorkflowRule requests to batch workflows."""
399+
400+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
401+
402+
IDENTITY_FIELD_NUMBER: builtins.int
403+
ID_FIELD_NUMBER: builtins.int
404+
SPEC_FIELD_NUMBER: builtins.int
405+
identity: builtins.str
406+
"""The identity of the worker/client."""
407+
id: builtins.str
408+
"""ID of existing rule."""
409+
@property
410+
def spec(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec:
411+
"""Rule specification to be applied to the workflow without creating a new rule."""
412+
def __init__(
413+
self,
414+
*,
415+
identity: builtins.str = ...,
416+
id: builtins.str = ...,
417+
spec: temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec | None = ...,
418+
) -> None: ...
419+
def HasField(
420+
self,
421+
field_name: typing_extensions.Literal[
422+
"id", b"id", "rule", b"rule", "spec", b"spec"
423+
],
424+
) -> builtins.bool: ...
425+
def ClearField(
426+
self,
427+
field_name: typing_extensions.Literal[
428+
"id", b"id", "identity", b"identity", "rule", b"rule", "spec", b"spec"
429+
],
430+
) -> None: ...
431+
def WhichOneof(
432+
self, oneof_group: typing_extensions.Literal["rule", b"rule"]
433+
) -> typing_extensions.Literal["id", "spec"] | None: ...
434+
435+
global___BatchOperationTriggerWorkflowRule = BatchOperationTriggerWorkflowRule

temporalio/api/enums/v1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
from .batch_operation_pb2 import BatchOperationState, BatchOperationType
22
from .command_type_pb2 import CommandType
33
from .common_pb2 import (
4+
ApplicationErrorCategory,
45
CallbackState,
56
EncodingType,
67
IndexedValueType,
78
NexusOperationCancellationState,
89
PendingNexusOperationState,
910
Severity,
11+
WorkflowRuleActionScope,
1012
)
1113
from .deployment_pb2 import (
1214
DeploymentReachability,
@@ -50,6 +52,7 @@
5052
)
5153

5254
__all__ = [
55+
"ApplicationErrorCategory",
5356
"ArchivalState",
5457
"BatchOperationState",
5558
"BatchOperationType",
@@ -96,5 +99,6 @@
9699
"WorkflowExecutionStatus",
97100
"WorkflowIdConflictPolicy",
98101
"WorkflowIdReusePolicy",
102+
"WorkflowRuleActionScope",
99103
"WorkflowTaskFailedCause",
100104
]

temporalio/api/enums/v1/common_pb2.py

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

0 commit comments

Comments
 (0)