From 56cd186148193d362716ecf6781426322f17c75e Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Mon, 6 Apr 2026 17:57:34 -0700 Subject: [PATCH 01/17] add CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION --- openapi/openapiv2.json | 5 +++-- openapi/openapiv3.yaml | 1 + temporal/api/enums/v1/workflow.proto | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 74f2dfb28..3136fd4d6 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12548,10 +12548,11 @@ "type": "string", "enum": [ "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE", + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" ], "default": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\nbehavior, the base version of the new run will be the Target Version as described above, but the\neffective version will be whatever is specified by the Versioning Override until the override is removed." + "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\nbehavior, the base version of the new run will be the Target Version as described above, but the\neffective version will be whatever is specified by the Versioning Override until the override is removed.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nuse whatever Versioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\nbehavior, the base version of the new run will be the Target Version as described above, but the\neffective version will be whatever is specified by the Versioning Override until the override is removed." }, "v1CountActivityExecutionsResponse": { "type": "object", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 93f3a1075..385eb53b6 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -16764,6 +16764,7 @@ components: enum: - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION type: string description: |- Experimental. Optionally decide the versioning behavior that the first task of the new run should use. diff --git a/temporal/api/enums/v1/workflow.proto b/temporal/api/enums/v1/workflow.proto index b48441c05..d41c7601e 100644 --- a/temporal/api/enums/v1/workflow.proto +++ b/temporal/api/enums/v1/workflow.proto @@ -188,6 +188,17 @@ enum ContinueAsNewVersioningBehavior { // behavior, the base version of the new run will be the Target Version as described above, but the // effective version will be whatever is specified by the Versioning Override until the override is removed. CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE = 1; + + // Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's + // Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, + // use whatever Versioning Behavior the workflow is annotated with in the workflow code. + // + // Note that if the previous workflow had a Pinned override, that override will be inherited by the + // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new + // command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade + // behavior, the base version of the new run will be the Target Version as described above, but the + // effective version will be whatever is specified by the Versioning Override until the override is removed. + CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION = 2; } // SuggestContinueAsNewReason specifies why SuggestContinueAsNew is true. From aa42a1eb6a027c924f3e63535dd7d2a97c58ac89 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Mon, 6 Apr 2026 18:04:31 -0700 Subject: [PATCH 02/17] add use_ramping_version to InheritedAutoUpgradeInfo --- openapi/openapiv2.json | 6 +++++- openapi/openapiv3.yaml | 4 ++++ temporal/api/deployment/v1/message.proto | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 3136fd4d6..c6fc0e6a2 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13907,9 +13907,13 @@ "type": "string", "format": "int64", "description": "The revision number of the source deployment version of the parent/previous workflow." + }, + "useRampingVersion": { + "type": "boolean", + "description": "Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage)." } }, - "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior." + "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." }, "v1Input": { "type": "object", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 385eb53b6..4345a157f 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10868,9 +10868,13 @@ components: sourceDeploymentRevisionNumber: type: string description: The revision number of the source deployment version of the parent/previous workflow. + useRampingVersion: + type: boolean + description: Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. + Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion. Input: type: object properties: diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index 1632a784e..fbfd4a5d6 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -316,9 +316,12 @@ message RoutingConfig { // Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version // to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. +// Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion. message InheritedAutoUpgradeInfo { // The source deployment version of the parent/previous workflow. temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1; // The revision number of the source deployment version of the parent/previous workflow. int64 source_deployment_revision_number = 2; + // Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). + bool use_ramping_version = 3; } From 14c6baef226077082128729bf93db382bdb7d06e Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Mon, 6 Apr 2026 18:15:35 -0700 Subject: [PATCH 03/17] RampPolicy with use_ramping_version option --- openapi/openapiv2.json | 20 +++++++++++++++++--- openapi/openapiv3.yaml | 20 +++++++++++++++++--- temporal/api/deployment/v1/message.proto | 13 +++++++++++-- temporal/api/workflow/v1/message.proto | 2 ++ 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index c6fc0e6a2..196a90d54 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13908,9 +13908,9 @@ "format": "int64", "description": "The revision number of the source deployment version of the parent/previous workflow." }, - "useRampingVersion": { - "type": "boolean", - "description": "Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage)." + "rampPolicy": { + "$ref": "#/definitions/v1RampPolicy", + "description": "If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id." } }, "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." @@ -15361,6 +15361,16 @@ } } }, + "v1RampPolicy": { + "type": "object", + "properties": { + "useRampingVersion": { + "type": "boolean", + "description": "Always use the ramping version of the workflow's task queue." + } + }, + "description": "Defines how to determine whether a workflow should use the Ramping Version or the Current Version of its Task Queue.\nDefault Ramp Policy is simply f(workflow_id, ramp_percentage)." + }, "v1Range": { "type": "object", "properties": { @@ -18703,6 +18713,10 @@ "type": "string", "format": "int64", "description": "Monotonic counter reflecting the latest routing decision for this workflow execution.\nUsed for staleness detection between history and matching when dispatching tasks to workers.\nIncremented when a workflow execution routes to a new deployment version, which happens\nwhen a worker of the new deployment version completes a workflow task.\nNote: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not\nface the problem of inconsistent dispatching that arises from eventual consistency between\ntask queues and their partitions." + }, + "rampPolicy": { + "$ref": "#/definitions/v1RampPolicy", + "description": "If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id." } }, "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 4345a157f..b8db556d6 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10868,9 +10868,10 @@ components: sourceDeploymentRevisionNumber: type: string description: The revision number of the source deployment version of the parent/previous workflow. - useRampingVersion: - type: boolean - description: Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). + rampPolicy: + allOf: + - $ref: '#/components/schemas/RampPolicy' + description: If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. @@ -12431,6 +12432,15 @@ components: type: number description: Acceptable range is [0,100). format: float + RampPolicy: + type: object + properties: + useRampingVersion: + type: boolean + description: Always use the ramping version of the workflow's task queue. + description: |- + Defines how to determine whether a workflow should use the Ramping Version or the Current Version of its Task Queue. + Default Ramp Policy is simply f(workflow_id, ramp_percentage). Range: type: object properties: @@ -17543,6 +17553,10 @@ components: Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not face the problem of inconsistent dispatching that arises from eventual consistency between task queues and their partitions. + rampPolicy: + allOf: + - $ref: '#/components/schemas/RampPolicy' + description: If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. description: |- Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index fbfd4a5d6..a8cc838e9 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -322,6 +322,15 @@ message InheritedAutoUpgradeInfo { temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1; // The revision number of the source deployment version of the parent/previous workflow. int64 source_deployment_revision_number = 2; - // Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). - bool use_ramping_version = 3; + // If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. + temporal.api.deployment.v1.RampPolicy ramp_policy = 9; +} + +// Defines how to determine whether a workflow should use the Ramping Version or the Current Version of its Task Queue. +// Default Ramp Policy is simply f(workflow_id, ramp_percentage). +message RampPolicy { + oneof value { + // Always use the ramping version of the workflow's task queue. + bool use_ramping_version = 1; + } } diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 908290476..11ff4ef84 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -231,6 +231,8 @@ message WorkflowExecutionVersioningInfo { // face the problem of inconsistent dispatching that arises from eventual consistency between // task queues and their partitions. int64 revision_number = 8; + // If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. + temporal.api.deployment.v1.RampPolicy ramp_policy = 9; } // Holds information about ongoing transition of a workflow execution from one deployment to another. From 0e5e13609655fbe12b4083c7be73ab05d980e292 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 09:16:48 -0700 Subject: [PATCH 04/17] Revert "RampPolicy with use_ramping_version option" This reverts commit 14c6baef226077082128729bf93db382bdb7d06e. --- openapi/openapiv2.json | 20 +++----------------- openapi/openapiv3.yaml | 20 +++----------------- temporal/api/deployment/v1/message.proto | 13 ++----------- temporal/api/workflow/v1/message.proto | 2 -- 4 files changed, 8 insertions(+), 47 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 196a90d54..c6fc0e6a2 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13908,9 +13908,9 @@ "format": "int64", "description": "The revision number of the source deployment version of the parent/previous workflow." }, - "rampPolicy": { - "$ref": "#/definitions/v1RampPolicy", - "description": "If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id." + "useRampingVersion": { + "type": "boolean", + "description": "Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage)." } }, "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." @@ -15361,16 +15361,6 @@ } } }, - "v1RampPolicy": { - "type": "object", - "properties": { - "useRampingVersion": { - "type": "boolean", - "description": "Always use the ramping version of the workflow's task queue." - } - }, - "description": "Defines how to determine whether a workflow should use the Ramping Version or the Current Version of its Task Queue.\nDefault Ramp Policy is simply f(workflow_id, ramp_percentage)." - }, "v1Range": { "type": "object", "properties": { @@ -18713,10 +18703,6 @@ "type": "string", "format": "int64", "description": "Monotonic counter reflecting the latest routing decision for this workflow execution.\nUsed for staleness detection between history and matching when dispatching tasks to workers.\nIncremented when a workflow execution routes to a new deployment version, which happens\nwhen a worker of the new deployment version completes a workflow task.\nNote: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not\nface the problem of inconsistent dispatching that arises from eventual consistency between\ntask queues and their partitions." - }, - "rampPolicy": { - "$ref": "#/definitions/v1RampPolicy", - "description": "If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id." } }, "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 b8db556d6..4345a157f 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10868,10 +10868,9 @@ components: sourceDeploymentRevisionNumber: type: string description: The revision number of the source deployment version of the parent/previous workflow. - rampPolicy: - allOf: - - $ref: '#/components/schemas/RampPolicy' - description: If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. + useRampingVersion: + type: boolean + description: Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. @@ -12432,15 +12431,6 @@ components: type: number description: Acceptable range is [0,100). format: float - RampPolicy: - type: object - properties: - useRampingVersion: - type: boolean - description: Always use the ramping version of the workflow's task queue. - description: |- - Defines how to determine whether a workflow should use the Ramping Version or the Current Version of its Task Queue. - Default Ramp Policy is simply f(workflow_id, ramp_percentage). Range: type: object properties: @@ -17553,10 +17543,6 @@ components: Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not face the problem of inconsistent dispatching that arises from eventual consistency between task queues and their partitions. - rampPolicy: - allOf: - - $ref: '#/components/schemas/RampPolicy' - description: If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. description: |- Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index a8cc838e9..fbfd4a5d6 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -322,15 +322,6 @@ message InheritedAutoUpgradeInfo { temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1; // The revision number of the source deployment version of the parent/previous workflow. int64 source_deployment_revision_number = 2; - // If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. - temporal.api.deployment.v1.RampPolicy ramp_policy = 9; -} - -// Defines how to determine whether a workflow should use the Ramping Version or the Current Version of its Task Queue. -// Default Ramp Policy is simply f(workflow_id, ramp_percentage). -message RampPolicy { - oneof value { - // Always use the ramping version of the workflow's task queue. - bool use_ramping_version = 1; - } + // Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). + bool use_ramping_version = 3; } diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 11ff4ef84..908290476 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -231,8 +231,6 @@ message WorkflowExecutionVersioningInfo { // face the problem of inconsistent dispatching that arises from eventual consistency between // task queues and their partitions. int64 revision_number = 8; - // If not present, workflow follows default ramp policy which is simply based on ramp percentage and workflow id. - temporal.api.deployment.v1.RampPolicy ramp_policy = 9; } // Holds information about ongoing transition of a workflow execution from one deployment to another. From 7008fb6bdc27f73f196af7d1cf04b6f8b3ec9dab Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 09:21:34 -0700 Subject: [PATCH 05/17] clarify comments --- openapi/openapiv2.json | 2 +- temporal/api/enums/v1/workflow.proto | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index c6fc0e6a2..451f7728b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12552,7 +12552,7 @@ "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" ], "default": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\nbehavior, the base version of the new run will be the Target Version as described above, but the\neffective version will be whatever is specified by the Versioning Override until the override is removed.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nuse whatever Versioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\nbehavior, the base version of the new run will be the Target Version as described above, but the\neffective version will be whatever is specified by the Versioning Override until the override is removed." + "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Experimental.\nStart the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Experimental.\nUse the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nuse whatever Versioning Behavior the workflow is annotated with in the workflow code.\n\nIt is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\nthis setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\nis AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\nmay be the Current Version instead of the Ramping Version.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions." }, "v1CountActivityExecutionsResponse": { "type": "object", diff --git a/temporal/api/enums/v1/workflow.proto b/temporal/api/enums/v1/workflow.proto index d41c7601e..2314cecc7 100644 --- a/temporal/api/enums/v1/workflow.proto +++ b/temporal/api/enums/v1/workflow.proto @@ -178,26 +178,29 @@ enum VersioningBehavior { enum ContinueAsNewVersioningBehavior { CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED = 0; + // Experimental. // Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at // start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever // Versioning Behavior the workflow is annotated with in the workflow code. // // Note that if the previous workflow had a Pinned override, that override will be inherited by the // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new - // command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade - // behavior, the base version of the new run will be the Target Version as described above, but the - // effective version will be whatever is specified by the Versioning Override until the override is removed. + // command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE = 1; + // Experimental. // Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's // Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, // use whatever Versioning Behavior the workflow is annotated with in the workflow code. // + // It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because + // this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow + // is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which + // may be the Current Version instead of the Ramping Version. + // // Note that if the previous workflow had a Pinned override, that override will be inherited by the // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new - // command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade - // behavior, the base version of the new run will be the Target Version as described above, but the - // effective version will be whatever is specified by the Versioning Override until the override is removed. + // command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION = 2; } From 13e36304da0321b07cbf6090d3f50cea7f99a542 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 09:31:13 -0700 Subject: [PATCH 06/17] change from bool to enum in InheritedAutoUpgradeInfo --- openapi/openapiv2.json | 6 +++--- openapi/openapiv3.yaml | 13 ++++++++++--- temporal/api/deployment/v1/message.proto | 6 ++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 451f7728b..2a4248c68 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13908,9 +13908,9 @@ "format": "int64", "description": "The revision number of the source deployment version of the parent/previous workflow." }, - "useRampingVersion": { - "type": "boolean", - "description": "Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage)." + "initialVersioningBehavior": { + "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", + "description": "The initial continue-as-new versioning behavior.\nNot passed to children or to future continue-as-new." } }, "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 4345a157f..556bb3dca 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10868,9 +10868,16 @@ components: sourceDeploymentRevisionNumber: type: string description: The revision number of the source deployment version of the parent/previous workflow. - useRampingVersion: - type: boolean - description: Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). + initialVersioningBehavior: + enum: + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION + type: string + description: |- + The initial continue-as-new versioning behavior. + Not passed to children or to future continue-as-new. + format: enum description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index fbfd4a5d6..de36ee9f5 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -11,6 +11,7 @@ option csharp_namespace = "Temporalio.Api.Deployment.V1"; import "google/protobuf/timestamp.proto"; +import "temporal/api/enums/v1/workflow.proto"; import "temporal/api/enums/v1/deployment.proto"; import "temporal/api/enums/v1/task_queue.proto"; import "temporal/api/common/v1/message.proto"; @@ -322,6 +323,7 @@ message InheritedAutoUpgradeInfo { temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1; // The revision number of the source deployment version of the parent/previous workflow. int64 source_deployment_revision_number = 2; - // Use the ramping version of the workflow's task queue regardless of Target Version = f(workflow_id, ramp_percentage). - bool use_ramping_version = 3; + // The initial continue-as-new versioning behavior. + // Not passed to children or to future continue-as-new. + temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 3; } From fed3723ad8c62621e863d5973ab743746617414d Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 09:32:51 -0700 Subject: [PATCH 07/17] more comment --- openapi/openapiv2.json | 2 +- openapi/openapiv3.yaml | 1 + temporal/api/deployment/v1/message.proto | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 2a4248c68..350f6cc51 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13910,7 +13910,7 @@ }, "initialVersioningBehavior": { "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", - "description": "The initial continue-as-new versioning behavior.\nNot passed to children or to future continue-as-new." + "description": "The initial continue-as-new versioning behavior.\nNot passed to children or to future continue-as-new.\nOnly used for the initial task of this run and the initial task of any retries of this run." } }, "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 556bb3dca..aa93505de 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10877,6 +10877,7 @@ components: description: |- The initial continue-as-new versioning behavior. Not passed to children or to future continue-as-new. + Only used for the initial task of this run and the initial task of any retries of this run. format: enum description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index de36ee9f5..c1dc71a17 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -325,5 +325,6 @@ message InheritedAutoUpgradeInfo { int64 source_deployment_revision_number = 2; // The initial continue-as-new versioning behavior. // Not passed to children or to future continue-as-new. + // Only used for the initial task of this run and the initial task of any retries of this run. temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 3; } From 633e7f52bdc6d4780a8707ec033f5ea5f0183cce Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 09:34:30 -0700 Subject: [PATCH 08/17] more comment --- openapi/openapiv2.json | 2 +- temporal/api/enums/v1/workflow.proto | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 350f6cc51..d1a083285 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12552,7 +12552,7 @@ "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" ], "default": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Experimental.\nStart the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Experimental.\nUse the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nuse whatever Versioning Behavior the workflow is annotated with in the workflow code.\n\nIt is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\nthis setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\nis AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\nmay be the Current Version instead of the Ramping Version.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions." + "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Experimental.\nStart the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Experimental.\nUse the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nuse whatever Versioning Behavior the workflow is annotated with in the workflow code. If there is no Ramping\nVersion by the time that the first workflow task is dispatched, it will be sent to the Current Version.\n\nIt is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\nthis setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\nis AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\nmay be the Current Version instead of the Ramping Version.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions." }, "v1CountActivityExecutionsResponse": { "type": "object", diff --git a/temporal/api/enums/v1/workflow.proto b/temporal/api/enums/v1/workflow.proto index 2314cecc7..06ac41c02 100644 --- a/temporal/api/enums/v1/workflow.proto +++ b/temporal/api/enums/v1/workflow.proto @@ -191,7 +191,8 @@ enum ContinueAsNewVersioningBehavior { // Experimental. // Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's // Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, - // use whatever Versioning Behavior the workflow is annotated with in the workflow code. + // use whatever Versioning Behavior the workflow is annotated with in the workflow code. If there is no Ramping + // Version by the time that the first workflow task is dispatched, it will be sent to the Current Version. // // It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because // this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow From a6772e2bc780ca53bcdd21e9265ab4091fdfe9c8 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 16:37:59 -0700 Subject: [PATCH 09/17] Apply suggestions from code review Co-authored-by: Spencer Judge --- temporal/api/enums/v1/workflow.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/temporal/api/enums/v1/workflow.proto b/temporal/api/enums/v1/workflow.proto index 06ac41c02..779c48b9f 100644 --- a/temporal/api/enums/v1/workflow.proto +++ b/temporal/api/enums/v1/workflow.proto @@ -191,7 +191,7 @@ enum ContinueAsNewVersioningBehavior { // Experimental. // Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's // Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, - // use whatever Versioning Behavior the workflow is annotated with in the workflow code. If there is no Ramping + // the workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping // Version by the time that the first workflow task is dispatched, it will be sent to the Current Version. // // It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because @@ -199,7 +199,7 @@ enum ContinueAsNewVersioningBehavior { // is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which // may be the Current Version instead of the Ramping Version. // - // Note that if the previous workflow had a Pinned override, that override will be inherited by the + // Note that if the workflow being continued has a Pinned override, that override will be inherited by the // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new // command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION = 2; From 4d6c720f2170c7150318174778fbe0381e66ee05 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 16:42:21 -0700 Subject: [PATCH 10/17] comment changes --- openapi/openapiv2.json | 2 +- temporal/api/enums/v1/workflow.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index d1a083285..051da2680 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12552,7 +12552,7 @@ "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" ], "default": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Experimental.\nStart the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Experimental.\nUse the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nuse whatever Versioning Behavior the workflow is annotated with in the workflow code. If there is no Ramping\nVersion by the time that the first workflow task is dispatched, it will be sent to the Current Version.\n\nIt is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\nthis setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\nis AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\nmay be the Current Version instead of the Ramping Version.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions." + "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Experimental.\nStart the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the workflow being continued has a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Experimental.\nUse the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nthe workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping\nVersion by the time that the first workflow task is dispatched, it will be sent to the Current Version.\n\nIt is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\nthis setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\nis AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\nmay be the Current Version instead of the Ramping Version.\n\nNote that if the workflow being continued has a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions." }, "v1CountActivityExecutionsResponse": { "type": "object", diff --git a/temporal/api/enums/v1/workflow.proto b/temporal/api/enums/v1/workflow.proto index 779c48b9f..a9ac3fc33 100644 --- a/temporal/api/enums/v1/workflow.proto +++ b/temporal/api/enums/v1/workflow.proto @@ -183,7 +183,7 @@ enum ContinueAsNewVersioningBehavior { // start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever // Versioning Behavior the workflow is annotated with in the workflow code. // - // Note that if the previous workflow had a Pinned override, that override will be inherited by the + // Note that if the workflow being continued has a Pinned override, that override will be inherited by the // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new // command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE = 1; From 2a78fb9ef08f175b2104a9cd5ce8737f70ab3189 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 8 Apr 2026 22:38:31 -0700 Subject: [PATCH 11/17] add initial_versioning_behavior to WorkflowExecutionVersioningInfo --- openapi/openapiv2.json | 4 ++++ openapi/openapiv3.yaml | 13 +++++++++++++ temporal/api/workflow/v1/message.proto | 6 ++++++ 3 files changed, 23 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 051da2680..099a16e26 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -18703,6 +18703,10 @@ "type": "string", "format": "int64", "description": "Monotonic counter reflecting the latest routing decision for this workflow execution.\nUsed for staleness detection between history and matching when dispatching tasks to workers.\nIncremented when a workflow execution routes to a new deployment version, which happens\nwhen a worker of the new deployment version completes a workflow task.\nNote: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not\nface the problem of inconsistent dispatching that arises from eventual consistency between\ntask queues and their partitions." + }, + "initialVersioningBehavior": { + "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", + "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new." } }, "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 aa93505de..d712e1290 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -17551,6 +17551,19 @@ components: Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not face the problem of inconsistent dispatching that arises from eventual consistency between task queues and their partitions. + initialVersioningBehavior: + enum: + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION + type: string + description: |- + Experimental. + If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + specified in that command. + Only used for the initial task of this run and the initial task of any retries of this run. + Not passed to children or to future continue-as-new. + format: enum description: |- Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 908290476..b59da8cc9 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -231,6 +231,12 @@ message WorkflowExecutionVersioningInfo { // face the problem of inconsistent dispatching that arises from eventual consistency between // task queues and their partitions. int64 revision_number = 8; + // Experimental. + // If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + // specified in that command. + // Only used for the initial task of this run and the initial task of any retries of this run. + // Not passed to children or to future continue-as-new. + temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 9; } // Holds information about ongoing transition of a workflow execution from one deployment to another. From b96a45f5b95e93c44640f3f89dfe1e08e412b69e Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Thu, 9 Apr 2026 00:16:49 -0700 Subject: [PATCH 12/17] rename initial_versioning_behavior -> continue_as_new_initial_versioning_behavior in versioning info and autoupgradeinfo --- openapi/openapiv2.json | 6 +++--- openapi/openapiv3.yaml | 10 ++++++---- temporal/api/deployment/v1/message.proto | 8 +++++--- temporal/api/workflow/v1/message.proto | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 099a16e26..a9fbfc6a8 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13908,9 +13908,9 @@ "format": "int64", "description": "The revision number of the source deployment version of the parent/previous workflow." }, - "initialVersioningBehavior": { + "continueAsNewInitialVersioningBehavior": { "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", - "description": "The initial continue-as-new versioning behavior.\nNot passed to children or to future continue-as-new.\nOnly used for the initial task of this run and the initial task of any retries of this run." + "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new." } }, "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." @@ -18704,7 +18704,7 @@ "format": "int64", "description": "Monotonic counter reflecting the latest routing decision for this workflow execution.\nUsed for staleness detection between history and matching when dispatching tasks to workers.\nIncremented when a workflow execution routes to a new deployment version, which happens\nwhen a worker of the new deployment version completes a workflow task.\nNote: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not\nface the problem of inconsistent dispatching that arises from eventual consistency between\ntask queues and their partitions." }, - "initialVersioningBehavior": { + "continueAsNewInitialVersioningBehavior": { "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new." } diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index d712e1290..1f6ca73a0 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10868,16 +10868,18 @@ components: sourceDeploymentRevisionNumber: type: string description: The revision number of the source deployment version of the parent/previous workflow. - initialVersioningBehavior: + continueAsNewInitialVersioningBehavior: enum: - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION type: string description: |- - The initial continue-as-new versioning behavior. - Not passed to children or to future continue-as-new. + Experimental. + If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. + Not passed to children or to future continue-as-new. format: enum description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version @@ -17551,7 +17553,7 @@ components: Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not face the problem of inconsistent dispatching that arises from eventual consistency between task queues and their partitions. - initialVersioningBehavior: + continueAsNewInitialVersioningBehavior: enum: - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index c1dc71a17..e2f387574 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -323,8 +323,10 @@ message InheritedAutoUpgradeInfo { temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1; // The revision number of the source deployment version of the parent/previous workflow. int64 source_deployment_revision_number = 2; - // The initial continue-as-new versioning behavior. - // Not passed to children or to future continue-as-new. + // Experimental. + // If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + // specified in that command. // Only used for the initial task of this run and the initial task of any retries of this run. - temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 3; + // Not passed to children or to future continue-as-new. + temporal.api.enums.v1.ContinueAsNewVersioningBehavior continue_as_new_initial_versioning_behavior = 3; } diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index b59da8cc9..d0d5db30e 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -236,7 +236,7 @@ message WorkflowExecutionVersioningInfo { // specified in that command. // Only used for the initial task of this run and the initial task of any retries of this run. // Not passed to children or to future continue-as-new. - temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 9; + temporal.api.enums.v1.ContinueAsNewVersioningBehavior continue_as_new_initial_versioning_behavior = 9; } // Holds information about ongoing transition of a workflow execution from one deployment to another. From ac2db0e1fb20838eb83766770c90e7dbf3f86660 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Thu, 9 Apr 2026 10:36:36 -0700 Subject: [PATCH 13/17] Revert "Merge branch 'master' of github.com:temporalio/api into can-behavior-use-ramping-version" This reverts commit 4449f8743cb34c9dfd0f541b6f06ac2f5f96a0ae, reversing changes made to 633e7f52bdc6d4780a8707ec033f5ea5f0183cce. --- nexus-rpc/temporal-proto-models-nexusrpc.yaml | 32 ------------------- .../workerservice/v1/request_response.proto | 27 ---------------- temporal/api/worker/v1/message.proto | 24 -------------- 3 files changed, 83 deletions(-) delete mode 100644 nexus-rpc/temporal-proto-models-nexusrpc.yaml delete mode 100644 temporal/api/nexusservices/workerservice/v1/request_response.proto diff --git a/nexus-rpc/temporal-proto-models-nexusrpc.yaml b/nexus-rpc/temporal-proto-models-nexusrpc.yaml deleted file mode 100644 index cb49cb118..000000000 --- a/nexus-rpc/temporal-proto-models-nexusrpc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nexus-rpc/nexus-rpc-gen/main/schemas/nexus-rpc-gen.json -# -# Nexus service definition for server-to-worker communication. -# See request_response.proto for message definitions. -# -# Task queue format: /temporal-sys/worker-commands/{namespace}/{worker_grouping_key} - -nexusrpc: 1.0.0 - -services: - temporal.api.nexusservices.workerservice.v1.WorkerService: - description: > - Internal Nexus service for server-to-worker communication. - Used by the Temporal server to send commands to workers. - operations: - ExecuteCommands: - description: Executes worker commands sent by the server. - input: - $goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsRequest" - $javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsRequest" - $pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsRequest" - $typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsRequest" - $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsRequest" - $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsRequest" - output: - $goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsResponse" - $javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsResponse" - $pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsResponse" - $typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsResponse" - $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsResponse" - $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsResponse" - diff --git a/temporal/api/nexusservices/workerservice/v1/request_response.proto b/temporal/api/nexusservices/workerservice/v1/request_response.proto deleted file mode 100644 index e5b46e7ce..000000000 --- a/temporal/api/nexusservices/workerservice/v1/request_response.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package temporal.api.nexusservices.workerservice.v1; - -option go_package = "go.temporal.io/api/nexusservices/workerservice/v1;workerservice"; -option java_package = "io.temporal.api.nexusservices.workerservice.v1"; -option java_multiple_files = true; -option java_outer_classname = "RequestResponseProto"; -option ruby_package = "Temporalio::Api::Nexusservices::Workerservice::V1"; -option csharp_namespace = "Temporalio.Api.Nexusservices.Workerservice.V1"; - -import "temporal/api/worker/v1/message.proto"; - -// (-- -// Internal Nexus service for server-to-worker communication. -// --) - -// Request payload for the "ExecuteCommands" Nexus operation. -message ExecuteCommandsRequest { - repeated temporal.api.worker.v1.WorkerCommand commands = 1; -} - -// Response payload for the "ExecuteCommands" Nexus operation. -// The results list must be 1:1 with the commands list in the request (same size and order). -message ExecuteCommandsResponse { - repeated temporal.api.worker.v1.WorkerCommandResult results = 1; -} diff --git a/temporal/api/worker/v1/message.proto b/temporal/api/worker/v1/message.proto index a87142c78..b65faeb29 100644 --- a/temporal/api/worker/v1/message.proto +++ b/temporal/api/worker/v1/message.proto @@ -193,27 +193,3 @@ message StorageDriverInfo { // The type of the driver, required. string type = 1; } - -// A command sent from the server to a worker. -message WorkerCommand { - oneof type { - CancelActivityCommand cancel_activity = 1; - } -} - -// Cancel an activity if it is still running. Otherwise, do nothing. -message CancelActivityCommand { - bytes task_token = 1; -} - -// The result of executing a WorkerCommand. -message WorkerCommandResult { - oneof type { - CancelActivityResult cancel_activity = 1; - } -} - -// Result of a CancelActivityCommand. -// Treat both successful cancellation and no-op (activity is no longer running) as success. -message CancelActivityResult { -} From d521fd88eef25ee8755069ef7abe85b66c33bee0 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Thu, 9 Apr 2026 10:55:12 -0700 Subject: [PATCH 14/17] Put backwards compat note on continue_as_new_initial_versioning_behavior --- openapi/openapiv2.json | 4 ++-- openapi/openapiv3.yaml | 10 ++++++++++ temporal/api/deployment/v1/message.proto | 5 +++++ temporal/api/workflow/v1/message.proto | 5 +++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index a9fbfc6a8..bf8692b66 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13910,7 +13910,7 @@ }, "continueAsNewInitialVersioningBehavior": { "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", - "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new." + "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new.\n\nNote: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\na non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\nwith history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade\nvalue if the InheritedAutoUpgradeInfo is non-empty." } }, "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." @@ -18706,7 +18706,7 @@ }, "continueAsNewInitialVersioningBehavior": { "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", - "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new." + "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new.\n\nNote: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\na non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\nwith ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent\nto ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade." } }, "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 1f6ca73a0..c4ee8a0b6 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10880,6 +10880,11 @@ components: specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. Not passed to children or to future continue-as-new. + + Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade + value if the InheritedAutoUpgradeInfo is non-empty. format: enum description: |- Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version @@ -17565,6 +17570,11 @@ components: specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. Not passed to children or to future continue-as-new. + + Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent + to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. format: enum description: |- Holds all the information about worker versioning for a particular workflow execution. diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index e2f387574..25227df39 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -328,5 +328,10 @@ message InheritedAutoUpgradeInfo { // specified in that command. // Only used for the initial task of this run and the initial task of any retries of this run. // Not passed to children or to future continue-as-new. + // + // Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + // a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + // with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade + // value if the InheritedAutoUpgradeInfo is non-empty. temporal.api.enums.v1.ContinueAsNewVersioningBehavior continue_as_new_initial_versioning_behavior = 3; } diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index d0d5db30e..e7a00156b 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -236,6 +236,11 @@ message WorkflowExecutionVersioningInfo { // specified in that command. // Only used for the initial task of this run and the initial task of any retries of this run. // Not passed to children or to future continue-as-new. + // + // Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + // a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + // with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent + // to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. temporal.api.enums.v1.ContinueAsNewVersioningBehavior continue_as_new_initial_versioning_behavior = 9; } From 3aa95b89c557ce27b04c37b98dcc6eec4fe05ad6 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Thu, 9 Apr 2026 14:23:24 -0700 Subject: [PATCH 15/17] restore accidentally-deleted files --- nexus-rpc/temporal-proto-models-nexusrpc.yaml | 33 +++++++++++++++++++ .../workerservice/v1/request_response.proto | 27 +++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 nexus-rpc/temporal-proto-models-nexusrpc.yaml create mode 100644 temporal/api/nexusservices/workerservice/v1/request_response.proto diff --git a/nexus-rpc/temporal-proto-models-nexusrpc.yaml b/nexus-rpc/temporal-proto-models-nexusrpc.yaml new file mode 100644 index 000000000..1ceb56ad1 --- /dev/null +++ b/nexus-rpc/temporal-proto-models-nexusrpc.yaml @@ -0,0 +1,33 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nexus-rpc/nexus-rpc-gen/main/schemas/nexus-rpc-gen.json +# +# Nexus service definition for server-to-worker communication. +# See request_response.proto for message definitions. +# +# Task queue format: /temporal-sys/worker-commands/{namespace}/{worker_grouping_key} + +nexusrpc: 1.0.0 + +services: + temporal.api.nexusservices.workerservice.v1.WorkerService: + description: > + Internal Nexus service for server-to-worker communication. + Used by the Temporal server to send commands to workers. + operations: + ExecuteCommands: + description: Executes worker commands sent by the server. + input: + $goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsRequest" + $javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsRequest" + $pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsRequest" + $typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsRequest" + $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsRequest" + $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsRequest" + output: + $goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsResponse" + $javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsResponse" + $pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsResponse" + $typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsResponse" + $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsResponse" + $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsResponse" + + diff --git a/temporal/api/nexusservices/workerservice/v1/request_response.proto b/temporal/api/nexusservices/workerservice/v1/request_response.proto new file mode 100644 index 000000000..e5b46e7ce --- /dev/null +++ b/temporal/api/nexusservices/workerservice/v1/request_response.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package temporal.api.nexusservices.workerservice.v1; + +option go_package = "go.temporal.io/api/nexusservices/workerservice/v1;workerservice"; +option java_package = "io.temporal.api.nexusservices.workerservice.v1"; +option java_multiple_files = true; +option java_outer_classname = "RequestResponseProto"; +option ruby_package = "Temporalio::Api::Nexusservices::Workerservice::V1"; +option csharp_namespace = "Temporalio.Api.Nexusservices.Workerservice.V1"; + +import "temporal/api/worker/v1/message.proto"; + +// (-- +// Internal Nexus service for server-to-worker communication. +// --) + +// Request payload for the "ExecuteCommands" Nexus operation. +message ExecuteCommandsRequest { + repeated temporal.api.worker.v1.WorkerCommand commands = 1; +} + +// Response payload for the "ExecuteCommands" Nexus operation. +// The results list must be 1:1 with the commands list in the request (same size and order). +message ExecuteCommandsResponse { + repeated temporal.api.worker.v1.WorkerCommandResult results = 1; +} From c3552cb1c733f6c132eadd7164bb08f2c9844c6c Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Thu, 9 Apr 2026 14:24:58 -0700 Subject: [PATCH 16/17] Reapply "Merge branch 'master' of github.com:temporalio/api into can-behavior-use-ramping-version" This reverts commit ac2db0e1fb20838eb83766770c90e7dbf3f86660. --- nexus-rpc/temporal-proto-models-nexusrpc.yaml | 3 +++ temporal/api/worker/v1/message.proto | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/nexus-rpc/temporal-proto-models-nexusrpc.yaml b/nexus-rpc/temporal-proto-models-nexusrpc.yaml index 1ceb56ad1..01a012e7c 100644 --- a/nexus-rpc/temporal-proto-models-nexusrpc.yaml +++ b/nexus-rpc/temporal-proto-models-nexusrpc.yaml @@ -30,4 +30,7 @@ services: $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsResponse" $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsResponse" +<<<<<<< HEAD +======= +>>>>>>> parent of ac2db0e (Revert "Merge branch 'master' of github.com:temporalio/api into can-behavior-use-ramping-version") diff --git a/temporal/api/worker/v1/message.proto b/temporal/api/worker/v1/message.proto index b65faeb29..a87142c78 100644 --- a/temporal/api/worker/v1/message.proto +++ b/temporal/api/worker/v1/message.proto @@ -193,3 +193,27 @@ message StorageDriverInfo { // The type of the driver, required. string type = 1; } + +// A command sent from the server to a worker. +message WorkerCommand { + oneof type { + CancelActivityCommand cancel_activity = 1; + } +} + +// Cancel an activity if it is still running. Otherwise, do nothing. +message CancelActivityCommand { + bytes task_token = 1; +} + +// The result of executing a WorkerCommand. +message WorkerCommandResult { + oneof type { + CancelActivityResult cancel_activity = 1; + } +} + +// Result of a CancelActivityCommand. +// Treat both successful cancellation and no-op (activity is no longer running) as success. +message CancelActivityResult { +} From e769cab93de6ef4bfebc3c9d38a11c1caa5e621c Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Thu, 9 Apr 2026 14:26:15 -0700 Subject: [PATCH 17/17] revert --- nexus-rpc/temporal-proto-models-nexusrpc.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nexus-rpc/temporal-proto-models-nexusrpc.yaml b/nexus-rpc/temporal-proto-models-nexusrpc.yaml index 01a012e7c..cb49cb118 100644 --- a/nexus-rpc/temporal-proto-models-nexusrpc.yaml +++ b/nexus-rpc/temporal-proto-models-nexusrpc.yaml @@ -30,7 +30,3 @@ services: $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsResponse" $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsResponse" -<<<<<<< HEAD - -======= ->>>>>>> parent of ac2db0e (Revert "Merge branch 'master' of github.com:temporalio/api into can-behavior-use-ramping-version")