Skip to content

Commit 2c1176c

Browse files
authored
Add VersioningBehaviorOverride to StartWorkflowExecutionRequest (#477)
* add VersioningBehaviorOverride to StartWorkflowExecutionRequest, schedules, signal with start
1 parent 21d7a2f commit 2c1176c

File tree

5 files changed

+59
-10
lines changed

5 files changed

+59
-10
lines changed

openapi/openapiv2.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6059,6 +6059,10 @@
60596059
"$ref": "#/definitions/apicommonv1Link"
60606060
},
60616061
"description": "Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events."
6062+
},
6063+
"versioningOverride": {
6064+
"$ref": "#/definitions/v1VersioningOverride",
6065+
"description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions."
60626066
}
60636067
}
60646068
},
@@ -6244,6 +6248,10 @@
62446248
"$ref": "#/definitions/apicommonv1Link"
62456249
},
62466250
"description": "Links to be associated with the workflow."
6251+
},
6252+
"versioningOverride": {
6253+
"$ref": "#/definitions/v1VersioningOverride",
6254+
"description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions."
62476255
}
62486256
}
62496257
},
@@ -9393,6 +9401,10 @@
93939401
"userMetadata": {
93949402
"$ref": "#/definitions/v1UserMetadata",
93959403
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig\nfor use by user interfaces to display the fixed as-of-start summary and details of the\nworkflow."
9404+
},
9405+
"versioningOverride": {
9406+
"$ref": "#/definitions/v1VersioningOverride",
9407+
"description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions."
93969408
}
93979409
},
93989410
"description": "NewWorkflowExecutionInfo is a shared message that encapsulates all the\nrequired arguments to starting a workflow in different contexts."
@@ -11616,6 +11628,10 @@
1161611628
"$ref": "#/definitions/apicommonv1Link"
1161711629
},
1161811630
"description": "Links to be associated with the workflow."
11631+
},
11632+
"versioningOverride": {
11633+
"$ref": "#/definitions/v1VersioningOverride",
11634+
"description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions."
1161911635
}
1162011636
}
1162111637
},
@@ -12646,15 +12662,15 @@
1264612662
"properties": {
1264712663
"versioningOverride": {
1264812664
"$ref": "#/definitions/v1VersioningOverride",
12649-
"description": "If set, takes precedence over the sdk-sent Versioning Behavior for the specific Workflow\nExecution it is set on."
12665+
"description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion."
1265012666
}
1265112667
}
1265212668
},
1265312669
"v1WorkflowExecutionOptionsUpdatedEventAttributes": {
1265412670
"type": "object",
1265512671
"properties": {
1265612672
"versioningOverride": {
12657-
"$ref": "#/definitions/v1VersioningBehaviorOverride",
12673+
"$ref": "#/definitions/v1VersioningOverride",
1265812674
"description": "Versioning override in the mutable state after event has been applied."
1265912675
}
1266012676
}
@@ -12815,6 +12831,10 @@
1281512831
"inheritedBuildId": {
1281612832
"type": "string",
1281712833
"title": "When present, this execution is assigned to the build ID of its parent or previous execution.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]"
12834+
},
12835+
"versioningOverride": {
12836+
"$ref": "#/definitions/v1VersioningOverride",
12837+
"description": "Versioning override applied to this workflow when it was started."
1281812838
}
1281912839
},
1282012840
"title": "Always the first event in workflow history"

openapi/openapiv3.yaml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6976,6 +6976,12 @@ components:
69766976
Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
69776977
for use by user interfaces to display the fixed as-of-start summary and details of the
69786978
workflow.
6979+
versioningOverride:
6980+
allOf:
6981+
- $ref: '#/components/schemas/VersioningOverride'
6982+
description: |-
6983+
If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
6984+
To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
69796985
description: |-
69806986
NewWorkflowExecutionInfo is a shared message that encapsulates all the
69816987
required arguments to starting a workflow in different contexts.
@@ -8662,6 +8668,12 @@ components:
86628668
items:
86638669
$ref: '#/components/schemas/Link'
86648670
description: Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events.
8671+
versioningOverride:
8672+
allOf:
8673+
- $ref: '#/components/schemas/VersioningOverride'
8674+
description: |-
8675+
If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
8676+
To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
86658677
SignalWithStartWorkflowExecutionResponse:
86668678
type: object
86678679
properties:
@@ -8978,6 +8990,12 @@ components:
89788990
items:
89798991
$ref: '#/components/schemas/Link'
89808992
description: Links to be associated with the workflow.
8993+
versioningOverride:
8994+
allOf:
8995+
- $ref: '#/components/schemas/VersioningOverride'
8996+
description: |-
8997+
If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
8998+
To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
89818999
StartWorkflowExecutionResponse:
89829000
type: object
89839001
properties:
@@ -10140,15 +10158,13 @@ components:
1014010158
versioningOverride:
1014110159
allOf:
1014210160
- $ref: '#/components/schemas/VersioningOverride'
10143-
description: |-
10144-
If set, takes precedence over the sdk-sent Versioning Behavior for the specific Workflow
10145-
Execution it is set on.
10161+
description: If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
1014610162
WorkflowExecutionOptionsUpdatedEventAttributes:
1014710163
type: object
1014810164
properties:
1014910165
versioningOverride:
1015010166
allOf:
10151-
- $ref: '#/components/schemas/VersioningBehaviorOverride'
10167+
- $ref: '#/components/schemas/VersioningOverride'
1015210168
description: Versioning override in the mutable state after event has been applied.
1015310169
WorkflowExecutionSignaledEventAttributes:
1015410170
type: object
@@ -10319,6 +10335,10 @@ components:
1031910335
description: |-
1032010336
When present, this execution is assigned to the build ID of its parent or previous execution.
1032110337
Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
10338+
versioningOverride:
10339+
allOf:
10340+
- $ref: '#/components/schemas/VersioningOverride'
10341+
description: Versioning override applied to this workflow when it was started.
1032210342
description: Always the first event in workflow history
1032310343
WorkflowExecutionTerminatedEventAttributes:
1032410344
type: object

temporal/api/history/v1/message.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ message WorkflowExecutionStartedEventAttributes {
131131
// When present, this execution is assigned to the build ID of its parent or previous execution.
132132
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
133133
string inherited_build_id = 32;
134+
// Versioning override applied to this workflow when it was started.
135+
temporal.api.workflow.v1.VersioningOverride versioning_override = 33;
134136
}
135137

136138
message WorkflowExecutionCompletedEventAttributes {
@@ -759,7 +761,7 @@ message ChildWorkflowExecutionTerminatedEventAttributes {
759761

760762
message WorkflowExecutionOptionsUpdatedEventAttributes {
761763
// Versioning override in the mutable state after event has been applied.
762-
temporal.api.common.v1.VersioningBehaviorOverride versioning_override = 1;
764+
temporal.api.workflow.v1.VersioningOverride versioning_override = 1;
763765
}
764766

765767
// Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes

temporal/api/workflow/v1/message.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ message NewWorkflowExecutionInfo {
267267
// for use by user interfaces to display the fixed as-of-start summary and details of the
268268
// workflow.
269269
temporal.api.sdk.v1.UserMetadata user_metadata = 14;
270+
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
271+
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
272+
VersioningOverride versioning_override = 15;
270273
}
271274

272275
// CallbackInfo contains the state of an attached workflow callback.
@@ -362,8 +365,7 @@ message NexusOperationCancellationInfo {
362365
}
363366

364367
message WorkflowExecutionOptions {
365-
// If set, takes precedence over the sdk-sent Versioning Behavior for the specific Workflow
366-
// Execution it is set on.
368+
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
367369
VersioningOverride versioning_override = 1;
368370
}
369371

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ message StartWorkflowExecutionRequest {
203203
temporal.api.sdk.v1.UserMetadata user_metadata = 23;
204204
// Links to be associated with the workflow.
205205
repeated temporal.api.common.v1.Link links = 24;
206+
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
207+
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
208+
temporal.api.workflow.v1.VersioningOverride versioning_override = 25;
206209
}
207210

208211
message StartWorkflowExecutionResponse {
@@ -712,9 +715,11 @@ message SignalWithStartWorkflowExecutionRequest {
712715
// for use by user interfaces to display the fixed as-of-start summary and details of the
713716
// workflow.
714717
temporal.api.sdk.v1.UserMetadata user_metadata = 23;
715-
716718
// Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events.
717719
repeated temporal.api.common.v1.Link links = 24;
720+
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
721+
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
722+
temporal.api.workflow.v1.VersioningOverride versioning_override = 25;
718723
}
719724

720725
message SignalWithStartWorkflowExecutionResponse {

0 commit comments

Comments
 (0)