Skip to content

Commit 6a52386

Browse files
committed
add tq to SourceWorkflowVersioningInfo, don't populate prev_info if Cron
1 parent 350edeb commit 6a52386

5 files changed

Lines changed: 82 additions & 54 deletions

File tree

openapi/openapiv2.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7182,6 +7182,10 @@
71827182
},
71837183
"behavior": {
71847184
"$ref": "#/definitions/v1VersioningBehavior"
7185+
},
7186+
"taskQueue": {
7187+
"type": "string",
7188+
"description": "Task queue name of source workflow if different from started workflow."
71857189
}
71867190
}
71877191
},
@@ -9736,7 +9740,7 @@
97369740
},
97379741
"inheritBuildId": {
97389742
"type": "boolean",
9739-
"description": "If this is set, the new execution inherits the Build ID of the current execution. Otherwise,\nthe assignment rules will be used to independently assign a Build ID to the new execution."
9743+
"description": "If this is set, the new execution inherits the Build ID of the current execution. Otherwise,\nthe assignment rules will be used to independently assign a Build ID to the new execution.\nDeprecated. Only considered for versioning v0.2."
97409744
}
97419745
}
97429746
},
@@ -13720,7 +13724,7 @@
1372013724
},
1372113725
"inheritBuildId": {
1372213726
"type": "boolean",
13723-
"description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it."
13727+
"description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it.\nDeprecated. Only considered for versioning v0.2."
1372413728
},
1372513729
"priority": {
1372613730
"$ref": "#/definitions/v1Priority",
@@ -13841,7 +13845,7 @@
1384113845
},
1384213846
"inheritBuildId": {
1384313847
"type": "boolean",
13844-
"description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it."
13848+
"description": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\nrules of the child's Task Queue will be used to independently assign a Build ID to it.\nDeprecated. Only considered for versioning v0.2."
1384513849
},
1384613850
"priority": {
1384713851
"$ref": "#/definitions/v1Priority",
@@ -14876,7 +14880,7 @@
1487614880
"description": "Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`.\nIdentifies the worker deployment version to pin the workflow to, in the format\n\"<deployment_name>.<build_id>\".\nDeprecated. Use `override.pinned.version`."
1487714881
}
1487814882
},
14879-
"description": "Used to override the versioning behavior (and pinned deployment version, if applicable) of a\nspecific workflow execution. If set, takes precedence over the worker-sent values. See\n`WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call\n`UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask`\nto indicate that it should be mutated."
14883+
"description": "Used to override the versioning behavior (and pinned deployment version, if applicable) of a\nspecific workflow execution. If set, takes precedence over the worker-sent values. See\n`WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call\n`UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask`\nto indicate that it should be mutated.\nPinned overrides are automatically inherited by child workflows, continue-as-new workflows,\nworkflow retries, and cron workflows."
1488014884
},
1488114885
"v1WaitPolicy": {
1488214886
"type": "object",
@@ -15474,7 +15478,7 @@
1547415478
},
1547515479
"continuedExecutionRunId": {
1547615480
"type": "string",
15477-
"description": "Run id of the previous workflow which continued-as-new or retired or cron executed into this\nworkflow."
15481+
"description": "Run id of the previous workflow which continued-as-new or retried or cron executed into this\nworkflow."
1547815482
},
1547915483
"initiator": {
1548015484
"$ref": "#/definitions/v1ContinueAsNewInitiator"
@@ -15561,7 +15565,7 @@
1556115565
},
1556215566
"versioningOverride": {
1556315567
"$ref": "#/definitions/v1VersioningOverride",
15564-
"description": "Versioning override applied to this workflow when it was started."
15568+
"description": "Versioning override applied to this workflow when it was started.\nPinned overrides are automatically inherited by child workflows,\ncontinue-as-new workflows, workflow retries, and cron workflows."
1556515569
},
1556615570
"parentPinnedWorkerDeploymentVersion": {
1556715571
"type": "string",
@@ -15571,13 +15575,13 @@
1557115575
"$ref": "#/definitions/v1Priority",
1557215576
"title": "Priority metadata"
1557315577
},
15574-
"parentVersioningInfo": {
15578+
"previousRunVersioningInfo": {
1557515579
"$ref": "#/definitions/WorkflowExecutionStartedEventAttributesSourceWorkflowVersioningInfo",
15576-
"description": "When present, this is a child workflow of a versioned parent.\nIf the parent's effective behavior is PINNED, and the child's Task Queue belongs to the\nparent's Version, the child workflow will inherit the parent's Version.\n\nIf a versioning override is present, it will take precedence over the inherited base version."
15580+
"description": "When present, this workflow is part of a retry and/or ContinueAsNew chain, and the previous run in the\nchain was versioned. The `initiator` field of this event specifies why this new workflow was initiated.\nIf present, and the previous run's effective behavior is PINNED, and the new run's Task Queue belongs\nto the previous run's Version, the new run will inherit the previous run's Version.\n\nIf initiated by a workflow ContinueAsNew, always populate.\n\nIf initiated by a workflow Cron, never populate, because new cron workflows should start their own version chain.\n\nIf initiated by a workflow retry, pass the retried run's `previous_run_versioning_info`, because a retry of a\nroot workflow or Cron workflow should not inherit the Pinned Version, but if the retried workflow has a PINNED\nparent or is part of a Pinned continue-as-new chain, the the new workflow should inherit the version of the\nexisting tree or chain.\n\nIf a versioning override is present, it will take precedence over the inherited base version."
1557715581
},
15578-
"previousRunVersioningInfo": {
15582+
"parentVersioningInfo": {
1557915583
"$ref": "#/definitions/WorkflowExecutionStartedEventAttributesSourceWorkflowVersioningInfo",
15580-
"description": "When present, this workflow is part of a chain, and the previous workflow in the chain was versioned.\nThe `initiator` field of this event specifies why this new workflow was initiated.\n\nIf initiated by a workflow ContinueAsNew, and the previous workflow's effective behavior is PINNED,\nand the new workflow's Task Queue belongs to the previous workflow's Version, the new workflow will\ninherit the previous workflow's version.\n\nIf initiated by a workflow retry on a root workflow execution, the new workflow will not inherit the\nprevious workflow's Version, but, if the retried workflow has a Pinned parent or is part of a Pinned\nContinueAsNew chain, then the new workflow will inherit the version of the existing tree or chain\n\nIf initiated by a workflow Cron, the new workflow will never inherit the previous workflow's Version.\n\nIf a versioning override is present, it will take precedence over the inherited base version."
15584+
"description": "When present, this is a child workflow of a versioned parent.\nIf the parent's effective behavior is PINNED, and the child's Task Queue belongs to the\nparent's Version, the child workflow will inherit the parent's Version.\n\nIf `versioning_override` is present, it will take precedence over the inherited base version.\nIf `previous_run_versioning_info` is present, it will take precedence over `parent_versioning_info`."
1558115585
}
1558215586
},
1558315587
"title": "Always the first event in workflow history"
@@ -15725,7 +15729,7 @@
1572515729
},
1572615730
"versioningOverride": {
1572715731
"$ref": "#/definitions/v1VersioningOverride",
15728-
"description": "Present if user has set an execution-specific versioning override. This override takes\nprecedence over SDK-sent `behavior` (and `version` when override is PINNED). An\noverride can be set when starting a new execution, as well as afterwards by calling the\n`UpdateWorkflowExecutionOptions` API.\nPinned overrides are automatically inherited by child workflows, continue-as-new workflows, and workflow retries."
15732+
"description": "Present if user has set an execution-specific versioning override. This override takes\nprecedence over SDK-sent `behavior` (and `version` when override is PINNED). An\noverride can be set when starting a new execution, as well as afterwards by calling the\n`UpdateWorkflowExecutionOptions` API.\nPinned overrides are automatically inherited by child workflows, continue-as-new workflows,\nworkflow retries, and cron workflows."
1572915733
},
1573015734
"deploymentTransition": {
1573115735
"$ref": "#/definitions/v1DeploymentTransition",

openapi/openapiv3.yaml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11082,6 +11082,7 @@ components:
1108211082
description: |-
1108311083
If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment
1108411084
rules of the child's Task Queue will be used to independently assign a Build ID to it.
11085+
Deprecated. Only considered for versioning v0.2.
1108511086
priority:
1108611087
allOf:
1108711088
- $ref: '#/components/schemas/Priority'
@@ -12148,6 +12149,8 @@ components:
1214812149
`WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call
1214912150
`UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask`
1215012151
to indicate that it should be mutated.
12152+
Pinned overrides are automatically inherited by child workflows, continue-as-new workflows,
12153+
workflow retries, and cron workflows.
1215112154
VersioningOverride_PinnedOverride:
1215212155
type: object
1215312156
properties:
@@ -12967,7 +12970,7 @@ components:
1296712970
continuedExecutionRunId:
1296812971
type: string
1296912972
description: |-
12970-
Run id of the previous workflow which continued-as-new or retired or cron executed into this
12973+
Run id of the previous workflow which continued-as-new or retried or cron executed into this
1297112974
workflow.
1297212975
initiator:
1297312976
enum:
@@ -13082,7 +13085,10 @@ components:
1308213085
versioningOverride:
1308313086
allOf:
1308413087
- $ref: '#/components/schemas/VersioningOverride'
13085-
description: Versioning override applied to this workflow when it was started.
13088+
description: |-
13089+
Versioning override applied to this workflow when it was started.
13090+
Pinned overrides are automatically inherited by child workflows,
13091+
continue-as-new workflows, workflow retries, and cron workflows.
1308613092
parentPinnedWorkerDeploymentVersion:
1308713093
type: string
1308813094
description: |-
@@ -13096,33 +13102,35 @@ components:
1309613102
allOf:
1309713103
- $ref: '#/components/schemas/Priority'
1309813104
description: Priority metadata
13099-
parentVersioningInfo:
13100-
allOf:
13101-
- $ref: '#/components/schemas/WorkflowExecutionStartedEventAttributes_SourceWorkflowVersioningInfo'
13102-
description: |-
13103-
When present, this is a child workflow of a versioned parent.
13104-
If the parent's effective behavior is PINNED, and the child's Task Queue belongs to the
13105-
parent's Version, the child workflow will inherit the parent's Version.
13106-
13107-
If a versioning override is present, it will take precedence over the inherited base version.
1310813105
previousRunVersioningInfo:
1310913106
allOf:
1311013107
- $ref: '#/components/schemas/WorkflowExecutionStartedEventAttributes_SourceWorkflowVersioningInfo'
1311113108
description: |-
13112-
When present, this workflow is part of a chain, and the previous workflow in the chain was versioned.
13113-
The `initiator` field of this event specifies why this new workflow was initiated.
13109+
When present, this workflow is part of a retry and/or ContinueAsNew chain, and the previous run in the
13110+
chain was versioned. The `initiator` field of this event specifies why this new workflow was initiated.
13111+
If present, and the previous run's effective behavior is PINNED, and the new run's Task Queue belongs
13112+
to the previous run's Version, the new run will inherit the previous run's Version.
1311413113

13115-
If initiated by a workflow ContinueAsNew, and the previous workflow's effective behavior is PINNED,
13116-
and the new workflow's Task Queue belongs to the previous workflow's Version, the new workflow will
13117-
inherit the previous workflow's version.
13114+
If initiated by a workflow ContinueAsNew, always populate.
1311813115

13119-
If initiated by a workflow retry on a root workflow execution, the new workflow will not inherit the
13120-
previous workflow's Version, but, if the retried workflow has a Pinned parent or is part of a Pinned
13121-
ContinueAsNew chain, then the new workflow will inherit the version of the existing tree or chain
13116+
If initiated by a workflow Cron, never populate, because new cron workflows should start their own version chain.
1312213117

13123-
If initiated by a workflow Cron, the new workflow will never inherit the previous workflow's Version.
13118+
If initiated by a workflow retry, pass the retried run's `previous_run_versioning_info`, because a retry of a
13119+
root workflow or Cron workflow should not inherit the Pinned Version, but if the retried workflow has a PINNED
13120+
parent or is part of a Pinned continue-as-new chain, the the new workflow should inherit the version of the
13121+
existing tree or chain.
1312413122

1312513123
If a versioning override is present, it will take precedence over the inherited base version.
13124+
parentVersioningInfo:
13125+
allOf:
13126+
- $ref: '#/components/schemas/WorkflowExecutionStartedEventAttributes_SourceWorkflowVersioningInfo'
13127+
description: |-
13128+
When present, this is a child workflow of a versioned parent.
13129+
If the parent's effective behavior is PINNED, and the child's Task Queue belongs to the
13130+
parent's Version, the child workflow will inherit the parent's Version.
13131+
13132+
If `versioning_override` is present, it will take precedence over the inherited base version.
13133+
If `previous_run_versioning_info` is present, it will take precedence over `parent_versioning_info`.
1312613134
description: Always the first event in workflow history
1312713135
WorkflowExecutionStartedEventAttributes_SourceWorkflowVersioningInfo:
1312813136
type: object
@@ -13136,6 +13144,9 @@ components:
1313613144
- VERSIONING_BEHAVIOR_AUTO_UPGRADE
1313713145
type: string
1313813146
format: enum
13147+
taskQueue:
13148+
type: string
13149+
description: Task queue name of source workflow if different from started workflow.
1313913150
WorkflowExecutionTerminatedEventAttributes:
1314013151
type: object
1314113152
properties:
@@ -13296,7 +13307,8 @@ components:
1329613307
precedence over SDK-sent `behavior` (and `version` when override is PINNED). An
1329713308
override can be set when starting a new execution, as well as afterwards by calling the
1329813309
`UpdateWorkflowExecutionOptions` API.
13299-
Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, and workflow retries.
13310+
Pinned overrides are automatically inherited by child workflows, continue-as-new workflows,
13311+
workflow retries, and cron workflows.
1330013312
deploymentTransition:
1330113313
allOf:
1330213314
- $ref: '#/components/schemas/DeploymentTransition'

temporal/api/command/v1/message.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ message ContinueAsNewWorkflowExecutionCommandAttributes {
176176
temporal.api.common.v1.SearchAttributes search_attributes = 14;
177177
// If this is set, the new execution inherits the Build ID of the current execution. Otherwise,
178178
// the assignment rules will be used to independently assign a Build ID to the new execution.
179-
bool inherit_build_id = 15;
179+
// Deprecated. Only considered for versioning v0.2.
180+
bool inherit_build_id = 15 [deprecated = true];
180181

181182
// `workflow_execution_timeout` is omitted as it shouldn't be overridden from within a workflow.
182183
}
@@ -206,7 +207,8 @@ message StartChildWorkflowExecutionCommandAttributes {
206207
temporal.api.common.v1.SearchAttributes search_attributes = 16;
207208
// If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment
208209
// rules of the child's Task Queue will be used to independently assign a Build ID to it.
209-
bool inherit_build_id = 17;
210+
// Deprecated. Only considered for versioning v0.2.
211+
bool inherit_build_id = 17 [deprecated = true];
210212
// Priority metadata. If this message is not present, or any fields are not
211213
// present, they inherit the values from the workflow.
212214
temporal.api.common.v1.Priority priority = 18;

0 commit comments

Comments
 (0)