Skip to content

Commit afa3cce

Browse files
authored
Add identity to TerminatedFailureInfo + CanceledFailureInfo (#745)
<!-- Describe what has changed in this PR --> **What changed?** Add `identity` field to `TerminatedFailureInfo` and `CanceledFailureInfo`. <!-- Tell your future self why have you made these changes --> **Why?** To allow storing the identity of the caller that requested the cancellation/termination; and allow clients to retrieve it. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** No <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> **Server PR** NA - usage example: ``` &nexusoperationpb.OperationOutcome_Failed{ Failure: &failurepb.Failure{ Message: event.Reason, FailureInfo: &failurepb.Failure_TerminatedFailureInfo{ TerminatedFailureInfo: &failurepb.TerminatedFailureInfo{ identity: event.Identity, }, }, }, } ```
1 parent 438a038 commit afa3cce

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

openapi/openapiv2.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12162,6 +12162,10 @@
1216212162
"properties": {
1216312163
"details": {
1216412164
"$ref": "#/definitions/v1Payloads"
12165+
},
12166+
"identity": {
12167+
"type": "string",
12168+
"description": "The identity of the worker or client that requested the cancellation."
1216512169
}
1216612170
}
1216712171
},
@@ -16887,7 +16891,13 @@
1688716891
"type": "object"
1688816892
},
1688916893
"v1TerminatedFailureInfo": {
16890-
"type": "object"
16894+
"type": "object",
16895+
"properties": {
16896+
"identity": {
16897+
"type": "string",
16898+
"description": "The identity of the worker or client that requested the termination."
16899+
}
16900+
}
1689116901
},
1689216902
"v1TimeSkippingConfig": {
1689316903
"type": "object",

openapi/openapiv3.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9144,6 +9144,9 @@ components:
91449144
properties:
91459145
details:
91469146
$ref: '#/components/schemas/Payloads'
9147+
identity:
9148+
type: string
9149+
description: The identity of the worker or client that requested the cancellation.
91479150
ChildWorkflowExecutionCanceledEventAttributes:
91489151
type: object
91499152
properties:
@@ -14957,7 +14960,10 @@ components:
1495714960
properties: {}
1495814961
TerminatedFailureInfo:
1495914962
type: object
14960-
properties: {}
14963+
properties:
14964+
identity:
14965+
type: string
14966+
description: The identity of the worker or client that requested the termination.
1496114967
TimeSkippingConfig:
1496214968
type: object
1496314969
properties:

temporal/api/failure/v1/message.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ message TimeoutFailureInfo {
3535

3636
message CanceledFailureInfo {
3737
temporal.api.common.v1.Payloads details = 1;
38+
// The identity of the worker or client that requested the cancellation.
39+
string identity = 2;
3840
}
3941

4042
message TerminatedFailureInfo {
43+
// The identity of the worker or client that requested the termination.
44+
string identity = 1;
4145
}
4246

4347
message ServerFailureInfo {

0 commit comments

Comments
 (0)