diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 8247cd4b..8f9389d7 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -9749,7 +9749,7 @@ }, "inheritBuildId": { "type": "boolean", - "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." + "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." } } }, @@ -13733,7 +13733,7 @@ }, "inheritBuildId": { "type": "boolean", - "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." + "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." }, "priority": { "$ref": "#/definitions/v1Priority", @@ -13854,7 +13854,7 @@ }, "inheritBuildId": { "type": "boolean", - "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." + "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." }, "priority": { "$ref": "#/definitions/v1Priority", @@ -14889,7 +14889,7 @@ "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\".\".\nDeprecated. Use `override.pinned.version`." } }, - "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." + "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." }, "v1WaitPolicy": { "type": "object", @@ -15228,7 +15228,7 @@ }, "inheritBuildId": { "type": "boolean", - "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." + "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." } } }, @@ -15504,7 +15504,7 @@ }, "continuedExecutionRunId": { "type": "string", - "description": "Run id of the previous workflow which continued-as-new or retired or cron executed into this\nworkflow." + "description": "Run id of the previous workflow which continued-as-new or retried or cron executed into this\nworkflow." }, "initiator": { "$ref": "#/definitions/v1ContinueAsNewInitiator" @@ -15591,19 +15591,19 @@ }, "versioningOverride": { "$ref": "#/definitions/v1VersioningOverride", - "description": "Versioning override applied to this workflow when it was started." + "description": "Versioning override applied to this workflow when it was started.\nChildren, crons, retries, and continue-as-new will inherit source run's override if pinned\nand if the new workflow's Task Queue belongs to the override version." }, "parentPinnedWorkerDeploymentVersion": { "type": "string", - "description": "When present, it means this is a child workflow of a parent that is Pinned to this Worker\nDeployment Version. In this case, child workflow will start as Pinned to this Version instead\nof starting on the Current Version of its Task Queue.\nThis is set only if the child workflow is starting on a Task Queue belonging to the same\nWorker Deployment Version.\nDeprecated. Use `parent_pinned_deployment_version`." - }, - "parentPinnedDeploymentVersion": { - "$ref": "#/definitions/v1WorkerDeploymentVersion", - "description": "When present, it means this is a child workflow of a parent that is Pinned to this Worker\nDeployment Version. In this case, child workflow will start as Pinned to this Version instead\nof starting on the Current Version of its Task Queue.\nThis is set only if the child workflow is starting on a Task Queue belonging to the same\nWorker Deployment Version." + "description": "When present, it means this is a child workflow of a parent that is Pinned to this Worker\nDeployment Version. In this case, child workflow will start as Pinned to this Version instead\nof starting on the Current Version of its Task Queue.\nThis is set only if the child workflow is starting on a Task Queue belonging to the same\nWorker Deployment Version.\nDeprecated. Use `parent_versioning_info`." }, "priority": { "$ref": "#/definitions/v1Priority", "title": "Priority metadata" + }, + "inheritedPinnedVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "If present, the new workflow should start on this version with pinned base behavior.\nChild of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.\n\nNew run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the\nnew run's Task Queue belongs to that version.\n\nNew run initiated by workflow Cron will never inherit.\n\nNew run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time\nof retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned\nparent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).\n\nPinned override is inherited if Task Queue of new run is compatible with the override version.\nOverride is inherited separately and takes precedence over inherited base version." } }, "title": "Always the first event in workflow history" @@ -15735,7 +15735,7 @@ "properties": { "behavior": { "$ref": "#/definitions/v1VersioningBehavior", - "description": "Versioning behavior determines how the server should treat this execution when workers are\nupgraded. When present it means this workflow execution is versioned; UNSPECIFIED means\nunversioned. See the comments in `VersioningBehavior` enum for more info about different\nbehaviors.\nThis field is first set after an execution completes its first workflow task on a versioned\nworker, and set again on completion of every subsequent workflow task.\nFor child workflows of Pinned parents, this will be set to Pinned (along with `version`) when\nthe the child starts so that child's first workflow task goes to the same Version as the\nparent. After the first workflow task, it depends on the child workflow itself if it wants\nto stay pinned or become unpinned (according to Versioning Behavior set in the worker).\nNote that `behavior` is overridden by `versioning_override` if the latter is present." + "description": "Versioning behavior determines how the server should treat this execution when workers are\nupgraded. When present it means this workflow execution is versioned; UNSPECIFIED means\nunversioned. See the comments in `VersioningBehavior` enum for more info about different\nbehaviors.\nThis field is first set after an execution completes its first workflow task on a versioned\nworker, and set again on completion of every subsequent workflow task.\nFor child workflows of Pinned parents, this will be set to Pinned (along with `deployment_version`) when\nthe the child starts so that child's first workflow task goes to the same Version as the\nparent. After the first workflow task, it depends on the child workflow itself if it wants\nto stay pinned or become unpinned (according to Versioning Behavior set in the worker).\nNote that `behavior` is overridden by `versioning_override` if the latter is present." }, "deployment": { "$ref": "#/definitions/v1Deployment", @@ -15751,7 +15751,7 @@ }, "versioningOverride": { "$ref": "#/definitions/v1VersioningOverride", - "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." + "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." }, "deploymentTransition": { "$ref": "#/definitions/v1DeploymentTransition", @@ -15759,7 +15759,7 @@ }, "versionTransition": { "$ref": "#/definitions/v1DeploymentVersionTransition", - "description": "When present, indicates the workflow is transitioning to a different deployment version\n(which may belong to the same deployment name or another). Can indicate one of the following\ntransitions: unversioned -> versioned, versioned -> versioned\non a different deployment version, or versioned -> unversioned.\nNot applicable to workflows with PINNED behavior.\nWhen a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically\nstart a transition to the task queue's current version if the task queue's current version is\ndifferent from the workflow's current deployment version.\nIf the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those\ntasks will be redirected to the task queue's current version. As soon as a poller from\nthat deployment version is available to receive the task, the workflow will automatically\nstart a transition to that version and continue execution there.\nA version transition can only exist while there is a pending or started workflow task.\nOnce the pending workflow task completes on the transition's target version, the\ntransition completes and the workflow's `behavior`, and `version` fields are updated per the\nworker's task completion response.\nPending activities will not start new attempts during a transition. Once the transition is\ncompleted, pending activities will start their next attempt on the new version." + "description": "When present, indicates the workflow is transitioning to a different deployment version\n(which may belong to the same deployment name or another). Can indicate one of the following\ntransitions: unversioned -> versioned, versioned -> versioned\non a different deployment version, or versioned -> unversioned.\nNot applicable to workflows with PINNED behavior.\nWhen a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically\nstart a transition to the task queue's current version if the task queue's current version is\ndifferent from the workflow's current deployment version.\nIf the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those\ntasks will be redirected to the task queue's current version. As soon as a poller from\nthat deployment version is available to receive the task, the workflow will automatically\nstart a transition to that version and continue execution there.\nA version transition can only exist while there is a pending or started workflow task.\nOnce the pending workflow task completes on the transition's target version, the\ntransition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the\nworker's task completion response.\nPending activities will not start new attempts during a transition. Once the transition is\ncompleted, pending activities will start their next attempt on the new version." } }, "description": "Holds all the information about worker versioning for a particular workflow execution.\nExperimental. Versioning info is experimental and might change in the future." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 81cdef7d..ba83e4b3 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11100,6 +11100,7 @@ components: description: |- If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment rules of the child's Task Queue will be used to independently assign a Build ID to it. + Deprecated. Only considered for versioning v0.2. priority: allOf: - $ref: '#/components/schemas/Priority' @@ -12174,6 +12175,8 @@ components: `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated. + Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, + workflow retries, and cron workflows. VersioningOverride_PinnedOverride: type: object properties: @@ -12732,6 +12735,7 @@ components: description: |- If this is set, the new execution inherits the Build ID of the current execution. Otherwise, the assignment rules will be used to independently assign a Build ID to the new execution. + Deprecated. Only considered for versioning v0.2. WorkflowExecutionExtendedInfo: type: object properties: @@ -13014,7 +13018,7 @@ components: continuedExecutionRunId: type: string description: |- - Run id of the previous workflow which continued-as-new or retired or cron executed into this + Run id of the previous workflow which continued-as-new or retried or cron executed into this workflow. initiator: enum: @@ -13129,7 +13133,10 @@ components: versioningOverride: allOf: - $ref: '#/components/schemas/VersioningOverride' - description: Versioning override applied to this workflow when it was started. + description: |- + Versioning override applied to this workflow when it was started. + Children, crons, retries, and continue-as-new will inherit source run's override if pinned + and if the new workflow's Task Queue belongs to the override version. parentPinnedWorkerDeploymentVersion: type: string description: |- @@ -13138,20 +13145,29 @@ components: of starting on the Current Version of its Task Queue. This is set only if the child workflow is starting on a Task Queue belonging to the same Worker Deployment Version. - Deprecated. Use `parent_pinned_deployment_version`. - parentPinnedDeploymentVersion: - allOf: - - $ref: '#/components/schemas/WorkerDeploymentVersion' - description: |- - When present, it means this is a child workflow of a parent that is Pinned to this Worker - Deployment Version. In this case, child workflow will start as Pinned to this Version instead - of starting on the Current Version of its Task Queue. - This is set only if the child workflow is starting on a Task Queue belonging to the same - Worker Deployment Version. + Deprecated. Use `parent_versioning_info`. priority: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata + inheritedPinnedVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: |- + If present, the new workflow should start on this version with pinned base behavior. + Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version. + + New run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the + new run's Task Queue belongs to that version. + + New run initiated by workflow Cron will never inherit. + + New run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time + of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned + parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version). + + Pinned override is inherited if Task Queue of new run is compatible with the override version. + Override is inherited separately and takes precedence over inherited base version. description: Always the first event in workflow history WorkflowExecutionTerminatedEventAttributes: type: object @@ -13272,7 +13288,7 @@ components: behaviors. This field is first set after an execution completes its first workflow task on a versioned worker, and set again on completion of every subsequent workflow task. - For child workflows of Pinned parents, this will be set to Pinned (along with `version`) when + For child workflows of Pinned parents, this will be set to Pinned (along with `deployment_version`) when the the child starts so that child's first workflow task goes to the same Version as the parent. After the first workflow task, it depends on the child workflow itself if it wants to stay pinned or become unpinned (according to Versioning Behavior set in the worker). @@ -13313,7 +13329,8 @@ components: precedence over SDK-sent `behavior` (and `version` when override is PINNED). An override can be set when starting a new execution, as well as afterwards by calling the `UpdateWorkflowExecutionOptions` API. - Pinned overrides are automatically inherited by child workflows. + Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, + workflow retries, and cron workflows. deploymentTransition: allOf: - $ref: '#/components/schemas/DeploymentTransition' @@ -13354,7 +13371,7 @@ components: start a transition to that version and continue execution there. A version transition can only exist while there is a pending or started workflow task. Once the pending workflow task completes on the transition's target version, the - transition completes and the workflow's `behavior`, and `version` fields are updated per the + transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the worker's task completion response. Pending activities will not start new attempts during a transition. Once the transition is completed, pending activities will start their next attempt on the new version. diff --git a/temporal/api/command/v1/message.proto b/temporal/api/command/v1/message.proto index 6d8ecf52..d5ccaefc 100644 --- a/temporal/api/command/v1/message.proto +++ b/temporal/api/command/v1/message.proto @@ -176,7 +176,8 @@ message ContinueAsNewWorkflowExecutionCommandAttributes { temporal.api.common.v1.SearchAttributes search_attributes = 14; // If this is set, the new execution inherits the Build ID of the current execution. Otherwise, // the assignment rules will be used to independently assign a Build ID to the new execution. - bool inherit_build_id = 15; + // Deprecated. Only considered for versioning v0.2. + bool inherit_build_id = 15 [deprecated = true]; // `workflow_execution_timeout` is omitted as it shouldn't be overridden from within a workflow. } @@ -206,7 +207,8 @@ message StartChildWorkflowExecutionCommandAttributes { temporal.api.common.v1.SearchAttributes search_attributes = 16; // If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment // rules of the child's Task Queue will be used to independently assign a Build ID to it. - bool inherit_build_id = 17; + // Deprecated. Only considered for versioning v0.2. + bool inherit_build_id = 17 [deprecated = true]; // Priority metadata. If this message is not present, or any fields are not // present, they inherit the values from the workflow. temporal.api.common.v1.Priority priority = 18; diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index b9e258fd..2c77ba90 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -46,7 +46,7 @@ message WorkflowExecutionStartedEventAttributes { google.protobuf.Duration workflow_run_timeout = 8; // Timeout of a single workflow task. google.protobuf.Duration workflow_task_timeout = 9; - // Run id of the previous workflow which continued-as-new or retired or cron executed into this + // Run id of the previous workflow which continued-as-new or retried or cron executed into this // workflow. string continued_execution_run_id = 10; temporal.api.enums.v1.ContinueAsNewInitiator initiator = 11; @@ -119,24 +119,38 @@ message WorkflowExecutionStartedEventAttributes { // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] string inherited_build_id = 32 [deprecated = true]; // Versioning override applied to this workflow when it was started. + // Children, crons, retries, and continue-as-new will inherit source run's override if pinned + // and if the new workflow's Task Queue belongs to the override version. temporal.api.workflow.v1.VersioningOverride versioning_override = 33; // When present, it means this is a child workflow of a parent that is Pinned to this Worker // Deployment Version. In this case, child workflow will start as Pinned to this Version instead // of starting on the Current Version of its Task Queue. // This is set only if the child workflow is starting on a Task Queue belonging to the same // Worker Deployment Version. - // Deprecated. Use `parent_pinned_deployment_version`. + // Deprecated. Use `parent_versioning_info`. string parent_pinned_worker_deployment_version = 34 [deprecated = true]; - // When present, it means this is a child workflow of a parent that is Pinned to this Worker - // Deployment Version. In this case, child workflow will start as Pinned to this Version instead - // of starting on the Current Version of its Task Queue. - // This is set only if the child workflow is starting on a Task Queue belonging to the same - // Worker Deployment Version. - temporal.api.deployment.v1.WorkerDeploymentVersion parent_pinned_deployment_version = 36; - // Priority metadata temporal.api.common.v1.Priority priority = 35; + + reserved 36; + reserved "parent_pinned_deployment_version"; + + // If present, the new workflow should start on this version with pinned base behavior. + // Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version. + // + // New run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the + // new run's Task Queue belongs to that version. + // + // New run initiated by workflow Cron will never inherit. + // + // New run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time + // of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned + // parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version). + // + // Pinned override is inherited if Task Queue of new run is compatible with the override version. + // Override is inherited separately and takes precedence over inherited base version. + temporal.api.deployment.v1.WorkerDeploymentVersion inherited_pinned_version = 37; } message WorkflowExecutionCompletedEventAttributes { @@ -191,7 +205,8 @@ message WorkflowExecutionContinuedAsNewEventAttributes { temporal.api.common.v1.SearchAttributes search_attributes = 14; // If this is set, the new execution inherits the Build ID of the current execution. Otherwise, // the assignment rules will be used to independently assign a Build ID to the new execution. - bool inherit_build_id = 15; + // Deprecated. Only considered for versioning v0.2. + bool inherit_build_id = 15 [deprecated = true]; // workflow_execution_timeout is omitted as it shouldn't be overridden from within a workflow. } @@ -662,7 +677,8 @@ message StartChildWorkflowExecutionInitiatedEventAttributes { temporal.api.common.v1.SearchAttributes search_attributes = 17; // If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment // rules of the child's Task Queue will be used to independently assign a Build ID to it. - bool inherit_build_id = 19; + // Deprecated. Only considered for versioning v0.2. + bool inherit_build_id = 19 [deprecated = true]; // Priority metadata temporal.api.common.v1.Priority priority = 20; } diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 73748710..1d5737c7 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -137,7 +137,7 @@ message WorkflowExecutionVersioningInfo { // behaviors. // This field is first set after an execution completes its first workflow task on a versioned // worker, and set again on completion of every subsequent workflow task. - // For child workflows of Pinned parents, this will be set to Pinned (along with `version`) when + // For child workflows of Pinned parents, this will be set to Pinned (along with `deployment_version`) when // the the child starts so that child's first workflow task goes to the same Version as the // parent. After the first workflow task, it depends on the child workflow itself if it wants // to stay pinned or become unpinned (according to Versioning Behavior set in the worker). @@ -167,7 +167,8 @@ message WorkflowExecutionVersioningInfo { // precedence over SDK-sent `behavior` (and `version` when override is PINNED). An // override can be set when starting a new execution, as well as afterwards by calling the // `UpdateWorkflowExecutionOptions` API. - // Pinned overrides are automatically inherited by child workflows. + // Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, + // workflow retries, and cron workflows. VersioningOverride versioning_override = 3; // When present, indicates the workflow is transitioning to a different deployment. Can // indicate one of the following transitions: unversioned -> versioned, versioned -> versioned @@ -202,7 +203,7 @@ message WorkflowExecutionVersioningInfo { // start a transition to that version and continue execution there. // A version transition can only exist while there is a pending or started workflow task. // Once the pending workflow task completes on the transition's target version, the - // transition completes and the workflow's `behavior`, and `version` fields are updated per the + // transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the // worker's task completion response. // Pending activities will not start new attempts during a transition. Once the transition is // completed, pending activities will start their next attempt on the new version. @@ -535,6 +536,8 @@ message WorkflowExecutionOptions { // `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call // `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask` // to indicate that it should be mutated. +// Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, +// workflow retries, and cron workflows. message VersioningOverride { // Indicates whether to override the workflow to be AutoUpgrade or Pinned. oneof override {