Skip to content

Commit 9fbf414

Browse files
authored
Add Request ID to nexus completion events (#432)
* Add VersionedTransition to nexus completion events * Use request ID instead of versioned transition
1 parent 6cd92a2 commit 9fbf414

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

openapi/openapiv2.json

+16
Original file line numberDiff line numberDiff line change
@@ -8336,6 +8336,10 @@
83368336
"failure": {
83378337
"$ref": "#/definitions/apifailurev1Failure",
83388338
"description": "Cancellation details."
8339+
},
8340+
"requestId": {
8341+
"type": "string",
8342+
"description": "The request ID allocated at schedule time."
83398343
}
83408344
},
83418345
"description": "Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow."
@@ -8397,6 +8401,10 @@
83978401
"result": {
83988402
"$ref": "#/definitions/v1Payload",
83998403
"description": "Serialized result of the Nexus operation. The response of the Nexus handler.\nDelivered either via a completion callback or as a response to a synchronous operation."
8404+
},
8405+
"requestId": {
8406+
"type": "string",
8407+
"description": "The request ID allocated at schedule time."
84008408
}
84018409
},
84028410
"description": "Nexus operation completed successfully."
@@ -8412,6 +8420,10 @@
84128420
"failure": {
84138421
"$ref": "#/definitions/apifailurev1Failure",
84148422
"description": "Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo."
8423+
},
8424+
"requestId": {
8425+
"type": "string",
8426+
"description": "The request ID allocated at schedule time."
84158427
}
84168428
},
84178429
"description": "Nexus operation failed."
@@ -8514,6 +8526,10 @@
85148526
"failure": {
85158527
"$ref": "#/definitions/apifailurev1Failure",
85168528
"description": "Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo."
8529+
},
8530+
"requestId": {
8531+
"type": "string",
8532+
"description": "The request ID allocated at schedule time."
85178533
}
85188534
},
85198535
"description": "Nexus operation timed out."

openapi/openapiv3.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -6121,6 +6121,9 @@ components:
61216121
allOf:
61226122
- $ref: '#/components/schemas/Failure'
61236123
description: Cancellation details.
6124+
requestId:
6125+
type: string
6126+
description: The request ID allocated at schedule time.
61246127
description: Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow.
61256128
NexusOperationCancellationInfo:
61266129
type: object
@@ -6170,6 +6173,9 @@ components:
61706173
description: |-
61716174
Serialized result of the Nexus operation. The response of the Nexus handler.
61726175
Delivered either via a completion callback or as a response to a synchronous operation.
6176+
requestId:
6177+
type: string
6178+
description: The request ID allocated at schedule time.
61736179
description: Nexus operation completed successfully.
61746180
NexusOperationFailedEventAttributes:
61756181
type: object
@@ -6181,6 +6187,9 @@ components:
61816187
allOf:
61826188
- $ref: '#/components/schemas/Failure'
61836189
description: Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo.
6190+
requestId:
6191+
type: string
6192+
description: The request ID allocated at schedule time.
61846193
description: Nexus operation failed.
61856194
NexusOperationFailureInfo:
61866195
type: object
@@ -6277,6 +6286,9 @@ components:
62776286
allOf:
62786287
- $ref: '#/components/schemas/Failure'
62796288
description: Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
6289+
requestId:
6290+
type: string
6291+
description: The request ID allocated at schedule time.
62806292
description: Nexus operation timed out.
62816293
Outcome:
62826294
type: object

temporal/api/common/v1/message.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,4 @@ message Callback {
195195
oneof variant {
196196
Nexus nexus = 2;
197197
}
198-
}
198+
}

temporal/api/history/v1/message.proto

+12
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,9 @@ message NexusOperationCompletedEventAttributes {
848848
// Serialized result of the Nexus operation. The response of the Nexus handler.
849849
// Delivered either via a completion callback or as a response to a synchronous operation.
850850
temporal.api.common.v1.Payload result = 2;
851+
852+
// The request ID allocated at schedule time.
853+
string request_id = 3;
851854
}
852855

853856
// Nexus operation failed.
@@ -856,6 +859,9 @@ message NexusOperationFailedEventAttributes {
856859
int64 scheduled_event_id = 1;
857860
// Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo.
858861
temporal.api.failure.v1.Failure failure = 2;
862+
863+
// The request ID allocated at schedule time.
864+
string request_id = 3;
859865
}
860866

861867
// Nexus operation timed out.
@@ -864,6 +870,9 @@ message NexusOperationTimedOutEventAttributes {
864870
int64 scheduled_event_id = 1;
865871
// Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
866872
temporal.api.failure.v1.Failure failure = 2;
873+
874+
// The request ID allocated at schedule time.
875+
string request_id = 3;
867876
}
868877

869878
// Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow.
@@ -872,6 +881,9 @@ message NexusOperationCanceledEventAttributes {
872881
int64 scheduled_event_id = 1;
873882
// Cancellation details.
874883
temporal.api.failure.v1.Failure failure = 2;
884+
885+
// The request ID allocated at schedule time.
886+
string request_id = 3;
875887
}
876888

877889
message NexusOperationCancelRequestedEventAttributes {

0 commit comments

Comments
 (0)