Skip to content

Commit bfe8090

Browse files
committed
Add temporal.api.nexusoperation.v1.OnConflictOptions to start SANO request
1 parent a344fad commit bfe8090

4 files changed

Lines changed: 44 additions & 3 deletions

File tree

openapi/openapiv2.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12460,6 +12460,10 @@
1246012460
"$ref": "#/definitions/v1NexusOperationIdConflictPolicy",
1246112461
"description": "Defines how to resolve an operation id conflict with a *running* operation.\nThe default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL."
1246212462
},
12463+
"onConflictOptions": {
12464+
"$ref": "#/definitions/apiNexusoperationV1OnConflictOptions",
12465+
"description": "Defines actions to be done to the existing running standalone Nexus when the conflict policy\nNEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set or set to a empty object\n(all options with default value), it won't do modify running operation."
12466+
},
1246312467
"searchAttributes": {
1246412468
"$ref": "#/definitions/v1SearchAttributes",
1246512469
"description": "Search attributes for indexing."
@@ -13288,6 +13292,20 @@
1328813292
}
1328913293
}
1329013294
},
13295+
"apiNexusoperationV1OnConflictOptions": {
13296+
"type": "object",
13297+
"properties": {
13298+
"attachCompletionCallbacks": {
13299+
"type": "boolean",
13300+
"description": "Attaches the completion callbacks to the running operation."
13301+
},
13302+
"attachLinks": {
13303+
"type": "boolean",
13304+
"description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event."
13305+
}
13306+
},
13307+
"description": "When StartNexusOperationExecutionRequest uses the conflict policy NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING\nand there is already an existing, running standalone Nexus operation, OnConflictOptions defines actions to be\ntaken."
13308+
},
1329113309
"apiWorkflowV1CallbackInfo": {
1329213310
"type": "object",
1329313311
"properties": {
@@ -14496,7 +14514,7 @@
1449614514
},
1449714515
"service": {
1449814516
"type": "string",
14499-
"description": "Target Nexus service, e.g. \"HTTPAdaptor\"."
14517+
"description": "Target Nexus service, e.g. \"HTTPAdapter\"."
1450014518
},
1450114519
"operation": {
1450214520
"type": "string",

openapi/openapiv3.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10850,7 +10850,7 @@ components:
1085010850
NOTE: This is not a temporal.api.taskqueue.v1.TaskQueue to avoid a circular dependency.
1085110851
service:
1085210852
type: string
10853-
description: Target Nexus service, e.g. "HTTPAdaptor".
10853+
description: Target Nexus service, e.g. "HTTPAdapter".
1085410854
operation:
1085510855
type: string
1085610856
description: Target operation, e.g. "DeliverAsWebhook".
@@ -17114,6 +17114,13 @@ components:
1711417114
Defines how to resolve an operation id conflict with a *running* operation.
1711517115
The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL.
1711617116
format: enum
17117+
onConflictOptions:
17118+
allOf:
17119+
- $ref: '#/components/schemas/OnConflictOptions'
17120+
description: |-
17121+
Defines actions to be done to the existing running standalone Nexus when the conflict policy
17122+
NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set or set to a empty object
17123+
(all options with default value), it won't do modify running operation.
1711717124
searchAttributes:
1711817125
allOf:
1711917126
- $ref: '#/components/schemas/SearchAttributes'

temporal/api/nexusoperation/v1/message.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,15 @@ message CallbackInfo {
2828
// Common callback info.
2929
temporal.api.callback.v1.CallbackInfo info = 2;
3030
}
31+
32+
// When StartNexusOperationExecutionRequest uses the conflict policy NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING
33+
// and there is already an existing, running standalone Nexus operation, OnConflictOptions defines actions to be
34+
// taken.
35+
message OnConflictOptions {
36+
// Attaches the request ID to the running operation.
37+
bool attach_request_id = 1;
38+
// Attaches the completion callbacks to the running operation.
39+
bool attach_completion_callbacks = 2;
40+
// Attaches any new links to the running operation.
41+
bool attach_links = 3;
42+
}

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3382,6 +3382,10 @@ message StartNexusOperationExecutionRequest {
33823382
// Defines how to resolve an operation id conflict with a *running* operation.
33833383
// The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL.
33843384
temporal.api.enums.v1.NexusOperationIdConflictPolicy id_conflict_policy = 13;
3385+
// Defines actions to be done to the existing running standalone Nexus when the conflict policy
3386+
// NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set or set to a empty object
3387+
// (all options with default value), it won't do modify running operation.
3388+
temporal.api.nexusoperation.v1.OnConflictOptions on_conflict_options = 17;
33853389

33863390
// Search attributes for indexing.
33873391
temporal.api.common.v1.SearchAttributes search_attributes = 14;
@@ -3396,7 +3400,7 @@ message StartNexusOperationExecutionRequest {
33963400
temporal.api.sdk.v1.UserMetadata user_metadata = 16;
33973401

33983402
// Completion callbacks to be invoked once the Nexus operation reaches a terminal state.
3399-
repeated temporal.api.common.v1.Callback completion_callbacks = 17;
3403+
repeated temporal.api.common.v1.Callback completion_callbacks = 18;
34003404
}
34013405

34023406
message StartNexusOperationExecutionResponse {

0 commit comments

Comments
 (0)