diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index cec4dbdf..5e0c615a 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -1732,7 +1732,7 @@ ] } }, - "/api/v1/namespaces/{namespace}/worker-deployment-versions/{version}": { + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}": { "get": { "summary": "Describes a worker deployment version.\nExperimental. This API might significantly change or be removed in a future release.", "operationId": "DescribeWorkerDeploymentVersion2", @@ -1758,11 +1758,25 @@ "type": "string" }, { - "name": "version", - "description": "Deployment Version identifier in the form \".\".", + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", "in": "path", "required": true, "type": "string" + }, + { + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1794,12 +1808,26 @@ "type": "string" }, { - "name": "version", - "description": "Deployment Version identifier in the form \".\".", + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", "in": "path", "required": true, "type": "string" }, + { + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" + }, { "name": "skipDrainage", "description": "Pass to force deletion even if the Version is draining. In this case the open pinned\nworkflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.", @@ -1820,7 +1848,7 @@ ] } }, - "/api/v1/namespaces/{namespace}/worker-deployment-versions/{version}/update-metadata": { + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-metadata": { "post": { "summary": "Updates the user-given metadata attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", "operationId": "UpdateWorkerDeploymentVersionMetadata2", @@ -1846,8 +1874,15 @@ "type": "string" }, { - "name": "version", - "description": "Deployment Version identifier in the form \".\".", + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", "in": "path", "required": true, "type": "string" @@ -5206,7 +5241,7 @@ ] } }, - "/namespaces/{namespace}/worker-deployment-versions/{version}": { + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}": { "get": { "summary": "Describes a worker deployment version.\nExperimental. This API might significantly change or be removed in a future release.", "operationId": "DescribeWorkerDeploymentVersion", @@ -5232,11 +5267,25 @@ "type": "string" }, { - "name": "version", - "description": "Deployment Version identifier in the form \".\".", + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", "in": "path", "required": true, "type": "string" + }, + { + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -5268,12 +5317,26 @@ "type": "string" }, { - "name": "version", - "description": "Deployment Version identifier in the form \".\".", + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", "in": "path", "required": true, "type": "string" }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" + }, { "name": "skipDrainage", "description": "Pass to force deletion even if the Version is draining. In this case the open pinned\nworkflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.", @@ -5294,7 +5357,7 @@ ] } }, - "/namespaces/{namespace}/worker-deployment-versions/{version}/update-metadata": { + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-metadata": { "post": { "summary": "Updates the user-given metadata attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", "operationId": "UpdateWorkerDeploymentVersionMetadata", @@ -5320,8 +5383,15 @@ "type": "string" }, { - "name": "version", - "description": "Deployment Version identifier in the form \".\".", + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", "in": "path", "required": true, "type": "string" @@ -6996,12 +7066,38 @@ }, "description": "Replaces the routing rule with the given source Build ID." }, + "VersioningOverridePinnedOverride": { + "type": "object", + "properties": { + "behavior": { + "$ref": "#/definitions/VersioningOverridePinnedOverrideBehavior", + "description": "Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED.\nSee `PinnedOverrideBehavior` for details." + }, + "version": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "Required." + } + } + }, + "VersioningOverridePinnedOverrideBehavior": { + "type": "string", + "enum": [ + "PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED", + "PINNED_OVERRIDE_BEHAVIOR_PINNED" + ], + "default": "PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED", + "description": "Used to specify different sub-types of Pinned override that we plan to add in the future.\n\n - PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: Unspecified.\n - PINNED_OVERRIDE_BEHAVIOR_PINNED: Override workflow behavior to be Pinned." + }, "WorkerDeploymentInfoWorkerDeploymentVersionSummary": { "type": "object", "properties": { "version": { "type": "string", - "description": "The fully-qualified string representation of the version, in the form \".\"." + "description": "Deprecated. Use `deployment_version`." + }, + "deploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "Required." }, "createTime": { "type": "string", @@ -7378,7 +7474,7 @@ }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment` instead." + "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment_options` instead." }, "deployment": { "$ref": "#/definitions/v1Deployment", @@ -7412,6 +7508,10 @@ "identity": { "type": "string", "title": "The identity of the worker/client" + }, + "deploymentOptions": { + "$ref": "#/definitions/v1WorkerDeploymentOptions", + "description": "Worker deployment options that user has set in the worker." } } }, @@ -7433,7 +7533,7 @@ }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment` instead." + "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment_options` instead." }, "deployment": { "$ref": "#/definitions/v1Deployment", @@ -7492,7 +7592,7 @@ }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment` instead." + "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment_options` instead." }, "deployment": { "$ref": "#/definitions/v1Deployment", @@ -7562,7 +7662,11 @@ "properties": { "version": { "type": "string", - "title": "Required. Can be one of the following:\n- A Deployment Version identifier in the form \".\".\n- Or, the \"__unversioned__\" special value, to represent all the unversioned workers (those\n with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)" + "description": "Deprecated. Use `build_id`." + }, + "buildId": { + "type": "string", + "title": "The build id of the Version that you want to set as Current.\nPass an empty value to set the Current Version to nil.\nA nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)" }, "conflictToken": { "type": "string", @@ -7585,7 +7689,11 @@ "properties": { "version": { "type": "string", - "title": "Can be one of the following:\n- Absent/empty value to unset the Ramping Version. Must be paired with `percentage=0`.\n- A Deployment Version identifier in the form \".\".\n- Or, the \"__unversioned__\" special value, to represent all the unversioned workers (those\n with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)" + "description": "Deprecated. Use `build_id`." + }, + "buildId": { + "type": "string", + "title": "The build id of the Version that you want to ramp traffic to.\nPass an empty value to set the Ramping Version to nil.\nA nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)" }, "percentage": { "type": "number", @@ -8092,6 +8200,15 @@ "WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody": { "type": "object", "properties": { + "version": { + "type": "string", + "description": "Deprecated. Use `deployment_version`." + }, + "deploymentVersion": { + "type": "object", + "description": "Required.", + "title": "Required." + }, "upsertEntries": { "type": "object", "additionalProperties": { @@ -8461,7 +8578,7 @@ }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "title": "Version info of the worker who processed this workflow task.\nDeprecated. Use the info inside the corresponding ActivityTaskStartedEvent" + "title": "Version info of the worker who processed this workflow task.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" } } }, @@ -8488,7 +8605,7 @@ }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "title": "Version info of the worker who processed this workflow task.\nDeprecated. Use the info inside the corresponding ActivityTaskStartedEvent" + "title": "Version info of the worker who processed this workflow task.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" } } }, @@ -8518,7 +8635,7 @@ }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "title": "Version info of the worker who processed this workflow task.\nDeprecated. Use the info inside the corresponding ActivityTaskStartedEvent" + "title": "Version info of the worker who processed this workflow task.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" } } }, @@ -8568,7 +8685,7 @@ }, "useWorkflowBuildId": { "type": "boolean", - "description": "If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,\nAssignment rules of the activity's Task Queue will be used to determine the Build ID." + "title": "If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,\nAssignment rules of the activity's Task Queue will be used to determine the Build ID.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" }, "priority": { "$ref": "#/definitions/v1Priority", @@ -9767,7 +9884,11 @@ "properties": { "version": { "type": "string", - "description": "Required. The target Version of the transition. May be `__unversioned__` which means a\nso-far-versioned workflow is transitioning to unversioned workers." + "description": "Deprecated. Use `deployment_version`." + }, + "deploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The target Version of the transition.\nIf nil, a so-far-versioned workflow is transitioning to unversioned workers." } }, "description": "Holds information about ongoing transition of a workflow execution from one worker\ndeployment version to another.\nExperimental. Might change in the future." @@ -11759,11 +11880,15 @@ }, "lastDeployment": { "$ref": "#/definitions/v1Deployment", - "description": "The deployment this activity was dispatched to most recently. Present only if the activity\nwas dispatched to a versioned worker.\nDeprecated. Use `last_worker_deployment_version`." + "description": "The deployment this activity was dispatched to most recently. Present only if the activity\nwas dispatched to a versioned worker.\nDeprecated. Use `last_deployment_version`." }, "lastWorkerDeploymentVersion": { "type": "string", - "description": "The Worker Deployment Version this activity was dispatched to most recently." + "description": "The Worker Deployment Version this activity was dispatched to most recently.\nDeprecated. Use `last_deployment_version`." + }, + "lastDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The Worker Deployment Version this activity was dispatched to most recently.\nIf nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker." }, "priority": { "$ref": "#/definitions/v1Priority", @@ -12814,18 +12939,26 @@ "v1RoutingConfig": { "type": "object", "properties": { + "currentDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "Specifies which Deployment Version should receive new workflow executions and tasks of\nexisting unversioned or AutoUpgrade workflows.\nNil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). \nNote: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\nis non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." + }, "currentVersion": { "type": "string", - "title": "Always present. Specifies which Deployment Version should should receive new workflow\nexecutions and tasks of existing unversioned or AutoUpgrade workflows.\nCan be one of the following:\n- A Deployment Version identifier in the form \".\".\n- Or, the \"__unversioned__\" special value, to represent all the unversioned workers (those\n with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp\nis set (see `ramping_version`.)" + "description": "Deprecated. Use `current_deployment_version`." + }, + "rampingDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version.\nMust always be different from `current_deployment_version` unless both are nil.\nNil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote that it is possible to ramp from one Version to another Version, or from unversioned\nworkers to a particular Version, or from a particular Version to unversioned workers." }, "rampingVersion": { "type": "string", - "description": "When present, it means the traffic is being shifted from the Current Version to the Ramping\nVersion.\nMust always be different from Current Version. Can be one of the following:\n- A Deployment Version identifier in the form \".\".\n- Or, the \"__unversioned__\" special value, to represent all the unversioned workers (those\n with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote that it is possible to ramp from one Version to another Version, or from unversioned\nworkers to a particular Version, or from a particular Version to unversioned workers." + "description": "Deprecated. Use `ramping_deployment_version`." }, "rampingVersionPercentage": { "type": "number", "format": "float", - "description": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\nValid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\nnot yet \"promoted\" to be the Current Version, likely due to pending validations." + "description": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\nValid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\nnot yet \"promoted\" to be the Current Version, likely due to pending validations.\nA 0% value means the Ramping Version is receiving no traffic." }, "currentVersionChangedTime": { "type": "string", @@ -13311,7 +13444,11 @@ }, "previousVersion": { "type": "string", - "description": "The version that was current before executing this operation, in the form\n\".\". Can also be the `__unversioned__` special value." + "description": "Deprecated. Use `previous_deployment_version`." + }, + "previousDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The version that was current before executing this operation." } } }, @@ -13325,7 +13462,11 @@ }, "previousVersion": { "type": "string", - "description": "The version that was ramping before executing this operation, in the form\n\".\". Can also be the `__unversioned__` special value." + "description": "Deprecated. Use `previous_deployment_version`." + }, + "previousDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The version that was ramping before executing this operation." }, "previousPercentage": { "type": "number", @@ -14171,18 +14312,26 @@ "v1TaskQueueVersioningInfo": { "type": "object", "properties": { + "currentDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "Specifies which Deployment Version should receive new workflow executions and tasks of\nexisting unversioned or AutoUpgrade workflows.\nNil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\nis non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." + }, "currentVersion": { "type": "string", - "title": "Always present. Specifies which Deployment Version should receive new workflow\nexecutions and tasks of existing unversioned or AutoUpgrade workflows.\nCan be one of the following:\n- A Deployment Version identifier in the form \".\".\n- Or, the \"__unversioned__\" special value, to represent all the unversioned workers (those\n with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp\nis set (see `ramping_version`.)" + "description": "Deprecated. Use `current_deployment_version`." + }, + "rampingDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version.\nMust always be different from `current_deployment_version` unless both are nil.\nNil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote that it is possible to ramp from one Version to another Version, or from unversioned\nworkers to a particular Version, or from a particular Version to unversioned workers." }, "rampingVersion": { "type": "string", - "description": "When present, it means the traffic is being shifted from the Current Version to the Ramping\nVersion.\nMust always be different from `current_version`. Can be one of the following:\n- A Deployment Version identifier in the form \".\".\n- Or, the \"__unversioned__\" special value, to represent all the unversioned workers (those\n with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\nNote that it is possible to ramp from one Version to another Version, or from unversioned\nworkers to a particular Version, or from a particular Version to unversioned workers." + "description": "Deprecated. Use `ramping_deployment_version`." }, "rampingVersionPercentage": { "type": "number", "format": "float", - "description": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\nValid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\nnot yet \"promoted\" to be the Current Version, likely due to pending validations." + "description": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\nValid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\nnot yet \"promoted\" to be the Current Version, likely due to pending validations.\nA 0% value means the Ramping Version is receiving no traffic." }, "updateTime": { "type": "string", @@ -14664,17 +14813,25 @@ "v1VersioningOverride": { "type": "object", "properties": { + "pinned": { + "$ref": "#/definitions/VersioningOverridePinnedOverride", + "description": "Send the next workflow task to the Version specified in the override." + }, + "autoUpgrade": { + "type": "boolean", + "description": "Send the next workflow task to the Current Deployment Version\nof its Task Queue when the next workflow task is dispatched." + }, "behavior": { "$ref": "#/definitions/v1VersioningBehavior", - "description": "Required." + "description": "Required.\nDeprecated. Use `override`." }, "deployment": { "$ref": "#/definitions/v1Deployment", - "description": "Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`.\nIdentifies the worker deployment to pin the workflow to.\nDeprecated. Use `pinned_version`." + "description": "Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`.\nIdentifies the worker deployment to pin the workflow to.\nDeprecated. Use `override.pinned.version`." }, "pinnedVersion": { "type": "string", - "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\".\"." + "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." @@ -14727,21 +14884,39 @@ }, "buildId": { "type": "string", - "description": "The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case,\nthe worker will be part of a Deployment Version identified by \".\"." + "description": "The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case,\nthe worker will be part of a Deployment Version." }, "workerVersioningMode": { "$ref": "#/definitions/v1WorkerVersioningMode", - "description": "Required. Versioning Mode for this worker. Must be the same for all workers with the\nsame `deployment_name` and `build_id` combination, across all Task Queues.\nWhen `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version\nidentified by \".\"." + "description": "Required. Versioning Mode for this worker. Must be the same for all workers with the\nsame `deployment_name` and `build_id` combination, across all Task Queues.\nWhen `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version." } }, "description": "Worker Deployment options set in SDK that need to be sent to server in every poll.\nExperimental. Worker Deployments are experimental and might significantly change in the future." }, + "v1WorkerDeploymentVersion": { + "type": "object", + "properties": { + "buildId": { + "type": "string", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace." + }, + "deploymentName": { + "type": "string", + "description": "Identifies the Worker Deployment this Version is part of." + } + }, + "description": "A Worker Deployment Version (Version, for short) represents a\nversion of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo)\nVersion records are created in Temporal server automatically when their\nfirst poller arrives to the server.\nExperimental. Worker Deployment Versions are experimental and might significantly change in the future." + }, "v1WorkerDeploymentVersionInfo": { "type": "object", "properties": { "version": { "type": "string", - "description": "The fully-qualified string representation of the version, in the form \".\"." + "description": "Deprecated. Use `deployment_version`." + }, + "deploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "Required." }, "deploymentName": { "type": "string" @@ -15338,6 +15513,10 @@ }, "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." }, "priority": { @@ -15478,11 +15657,15 @@ }, "deployment": { "$ref": "#/definitions/v1Deployment", - "description": "The worker deployment that completed the last workflow task of this workflow execution. Must\nbe present if `behavior` is set. Absent value means no workflow task is completed, or the\nlast workflow task was completed by an unversioned worker. Unversioned workers may still send\na deployment value which will be stored here, so the right way to check if an execution is\nversioned if an execution is versioned or not is via the `behavior` field.\nNote that `deployment` is overridden by `versioning_override` if the latter is present.\nDeprecated. Use `version`." + "description": "The worker deployment that completed the last workflow task of this workflow execution. Must\nbe present if `behavior` is set. Absent value means no workflow task is completed, or the\nlast workflow task was completed by an unversioned worker. Unversioned workers may still send\na deployment value which will be stored here, so the right way to check if an execution is\nversioned if an execution is versioned or not is via the `behavior` field.\nNote that `deployment` is overridden by `versioning_override` if the latter is present.\nDeprecated. Use `deployment_version`." }, "version": { "type": "string", - "description": "The Worker Deployment Version that completed the last workflow task of this workflow\nexecution, in the form \".\".\nMust be present if and only if `behavior` is set. An absent value means no workflow task is\ncompleted, or the workflow is unversioned.\nFor child workflows of Pinned parents, this will be set to parent's Pinned Version when the\nthe child starts so that child's first workflow task goes to the same Version as the parent.\nNote that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`\nwill override this value." + "description": "Deprecated. Use `deployment_version`." + }, + "deploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The Worker Deployment Version that completed the last workflow task of this workflow execution.\nAn absent value means no workflow task is completed, or the workflow is unversioned.\nIf present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed\nby a worker that is not using versioning but _is_ passing Deployment Name and Build ID.\n\nFor child workflows of Pinned parents, this will be set to the parent's Pinned Version when\nthe child starts, so that the child's first workflow task goes to the same Version as the parent.\nNote that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`\nwill override this value." }, "versioningOverride": { "$ref": "#/definitions/v1VersioningOverride", @@ -15681,11 +15864,11 @@ }, "binaryChecksum": { "type": "string", - "title": "Binary ID of the worker who completed this task" + "description": "Binary ID of the worker who completed this task\nDeprecated. Replaced with `deployment_version`." }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "description": "Version info of the worker who processed this workflow task. If present, the `build_id` field\nwithin is also used as `binary_checksum`, which may be omitted in that case (it may also be\npopulated to preserve compatibility).\nDeprecated. Use `deployment` and `versioning_behavior` instead." + "description": "Version info of the worker who processed this workflow task. If present, the `build_id` field\nwithin is also used as `binary_checksum`, which may be omitted in that case (it may also be\npopulated to preserve compatibility).\nDeprecated. Use `deployment_version` and `versioning_behavior` instead." }, "sdkMetadata": { "$ref": "#/definitions/v1WorkflowTaskCompletedMetadata", @@ -15697,7 +15880,7 @@ }, "deployment": { "$ref": "#/definitions/v1Deployment", - "description": "The deployment that completed this task. May or may not be set for unversioned workers,\ndepending on whether a value is sent by the SDK. This value updates workflow execution's\n`versioning_info.deployment`.\nDeprecated. Replaced with `worker_deployment_version`." + "description": "The deployment that completed this task. May or may not be set for unversioned workers,\ndepending on whether a value is sent by the SDK. This value updates workflow execution's\n`versioning_info.deployment`.\nDeprecated. Replaced with `deployment_version`." }, "versioningBehavior": { "$ref": "#/definitions/v1VersioningBehavior", @@ -15705,11 +15888,15 @@ }, "workerDeploymentVersion": { "type": "string", - "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.version`.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.version`.\nExperimental. Worker Deployments are experimental and might significantly change in the future.\nDeprecated. Replaced with `deployment_version`." }, "workerDeploymentName": { "type": "string", "description": "The name of Worker Deployment that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `worker_deployment_name`.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + }, + "deploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.deployment_version`.\nExperimental. Worker Deployments are experimental and might significantly change in the future." } } }, @@ -15825,11 +16012,11 @@ }, "binaryChecksum": { "type": "string", - "title": "DEPRECATED since 1.21 - use `worker_version` instead.\nIf a worker explicitly failed this task, its binary id" + "title": "DEPRECATED since 1.21 - This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]\nIf a worker explicitly failed this task, its binary id" }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", - "title": "Version info of the worker who processed this workflow task. If present, the `build_id` field\nwithin is also used as `binary_checksum`, which may be omitted in that case (it may also be\npopulated to preserve compatibility).\nDeprecated. Use the info inside the corresponding WorkflowTaskStartedEvent" + "title": "Version info of the worker who processed this workflow task. If present, the `build_id` field\nwithin is also used as `binary_checksum`, which may be omitted in that case (it may also be\npopulated to preserve compatibility).\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 48301cdb..28aab1cf 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -1537,7 +1537,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/worker-deployment-versions/{version}: + /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}: get: tags: - WorkflowService @@ -1551,12 +1551,35 @@ paths: required: true schema: type: string - - name: version + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id in: path - description: Deployment Version identifier in the form ".". required: true schema: type: string + - name: version + in: query + description: Deprecated. Use `deployment_version`. + schema: + type: string + - name: deploymentVersion.buildId + in: query + description: |- + A unique identifier for this Version within the Deployment it is a part of. + Not necessarily unique within the namespace. + The combination of `deployment_name` and `build_id` uniquely identifies this + Version within the namespace, because Deployment names are unique within a namespace. + schema: + type: string + - name: deploymentVersion.deploymentName + in: query + description: Identifies the Worker Deployment this Version is part of. + schema: + type: string responses: "200": description: OK @@ -1588,12 +1611,35 @@ paths: required: true schema: type: string - - name: version + - name: deployment_version.deployment_name in: path - description: Deployment Version identifier in the form ".". required: true schema: type: string + - name: deployment_version.build_id + in: path + required: true + schema: + type: string + - name: version + in: query + description: Deprecated. Use `deployment_version`. + schema: + type: string + - name: deploymentVersion.buildId + in: query + description: |- + A unique identifier for this Version within the Deployment it is a part of. + Not necessarily unique within the namespace. + The combination of `deployment_name` and `build_id` uniquely identifies this + Version within the namespace, because Deployment names are unique within a namespace. + schema: + type: string + - name: deploymentVersion.deploymentName + in: query + description: Identifies the Worker Deployment this Version is part of. + schema: + type: string - name: skipDrainage in: query description: |- @@ -1619,8 +1665,8 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/worker-deployment-versions/{version}/update-metadata: - post: + ? /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata + : post: tags: - WorkflowService description: |- @@ -1633,9 +1679,13 @@ paths: required: true schema: type: string - - name: version + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id in: path - description: Deployment Version identifier in the form ".". required: true schema: type: string @@ -4624,7 +4674,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/worker-deployment-versions/{version}: + /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}: get: tags: - WorkflowService @@ -4638,12 +4688,35 @@ paths: required: true schema: type: string - - name: version + - name: deployment_version.deployment_name in: path - description: Deployment Version identifier in the form ".". required: true schema: type: string + - name: deployment_version.build_id + in: path + required: true + schema: + type: string + - name: version + in: query + description: Deprecated. Use `deployment_version`. + schema: + type: string + - name: deploymentVersion.buildId + in: query + description: |- + A unique identifier for this Version within the Deployment it is a part of. + Not necessarily unique within the namespace. + The combination of `deployment_name` and `build_id` uniquely identifies this + Version within the namespace, because Deployment names are unique within a namespace. + schema: + type: string + - name: deploymentVersion.deploymentName + in: query + description: Identifies the Worker Deployment this Version is part of. + schema: + type: string responses: "200": description: OK @@ -4675,12 +4748,35 @@ paths: required: true schema: type: string - - name: version + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id in: path - description: Deployment Version identifier in the form ".". required: true schema: type: string + - name: version + in: query + description: Deprecated. Use `deployment_version`. + schema: + type: string + - name: deploymentVersion.buildId + in: query + description: |- + A unique identifier for this Version within the Deployment it is a part of. + Not necessarily unique within the namespace. + The combination of `deployment_name` and `build_id` uniquely identifies this + Version within the namespace, because Deployment names are unique within a namespace. + schema: + type: string + - name: deploymentVersion.deploymentName + in: query + description: Identifies the Worker Deployment this Version is part of. + schema: + type: string - name: skipDrainage in: query description: |- @@ -4706,8 +4802,8 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/worker-deployment-versions/{version}/update-metadata: - post: + ? /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata + : post: tags: - WorkflowService description: |- @@ -4720,9 +4816,13 @@ paths: required: true schema: type: string - - name: version + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id in: path - description: Deployment Version identifier in the form ".". required: true schema: type: string @@ -5963,7 +6063,7 @@ components: - $ref: '#/components/schemas/WorkerVersionStamp' description: |- Version info of the worker who processed this workflow task. - Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] ActivityTaskCompletedEventAttributes: type: object properties: @@ -5985,7 +6085,7 @@ components: - $ref: '#/components/schemas/WorkerVersionStamp' description: |- Version info of the worker who processed this workflow task. - Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] ActivityTaskFailedEventAttributes: type: object properties: @@ -6019,7 +6119,7 @@ components: - $ref: '#/components/schemas/WorkerVersionStamp' description: |- Version info of the worker who processed this workflow task. - Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] ActivityTaskScheduledEventAttributes: type: object properties: @@ -6083,6 +6183,7 @@ components: description: |- If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, Assignment rules of the activity's Task Queue will be used to determine the Build ID. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] priority: allOf: - $ref: '#/components/schemas/Priority' @@ -7070,9 +7171,13 @@ components: properties: version: type: string + description: Deprecated. Use `deployment_version`. + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' description: |- - Required. The target Version of the transition. May be `__unversioned__` which means a - so-far-versioned workflow is transitioning to unversioned workers. + The target Version of the transition. + If nil, a so-far-versioned workflow is transitioning to unversioned workers. description: |- Holds information about ongoing transition of a workflow execution from one worker deployment version to another. @@ -8849,10 +8954,18 @@ components: description: |- The deployment this activity was dispatched to most recently. Present only if the activity was dispatched to a versioned worker. - Deprecated. Use `last_worker_deployment_version`. + Deprecated. Use `last_deployment_version`. lastWorkerDeploymentVersion: type: string - description: The Worker Deployment Version this activity was dispatched to most recently. + description: |- + The Worker Deployment Version this activity was dispatched to most recently. + Deprecated. Use `last_deployment_version`. + lastDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: |- + The Worker Deployment Version this activity was dispatched to most recently. + If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. priority: allOf: - $ref: '#/components/schemas/Priority' @@ -9790,6 +9903,10 @@ components: identity: type: string description: The identity of the worker/client + deploymentOptions: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentOptions' + description: Worker deployment options that user has set in the worker. RespondActivityTaskCanceledByIdResponse: type: object properties: {} @@ -9816,7 +9933,7 @@ components: Version info of the worker who processed this task. This message's `build_id` field should always be set by SDKs. Workers opting into versioning will also set the `use_versioning` field to true. See message docstrings for more. - Deprecated. Use `deployment` instead. + Deprecated. Use `deployment_options` instead. deployment: allOf: - $ref: '#/components/schemas/Deployment' @@ -9879,7 +9996,7 @@ components: Version info of the worker who processed this task. This message's `build_id` field should always be set by SDKs. Workers opting into versioning will also set the `use_versioning` field to true. See message docstrings for more. - Deprecated. Use `deployment` instead. + Deprecated. Use `deployment_options` instead. deployment: allOf: - $ref: '#/components/schemas/Deployment' @@ -9957,7 +10074,7 @@ components: Version info of the worker who processed this task. This message's `build_id` field should always be set by SDKs. Workers opting into versioning will also set the `use_versioning` field to true. See message docstrings for more. - Deprecated. Use `deployment` instead. + Deprecated. Use `deployment_options` instead. deployment: allOf: - $ref: '#/components/schemas/Deployment' @@ -10016,34 +10133,32 @@ components: RoutingConfig: type: object properties: + currentDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: "Specifies which Deployment Version should receive new workflow executions and tasks of\n existing unversioned or AutoUpgrade workflows.\n Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). \n Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\n is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." currentVersion: type: string + description: Deprecated. Use `current_deployment_version`. + rampingDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' description: |- - Always present. Specifies which Deployment Version should should receive new workflow - executions and tasks of existing unversioned or AutoUpgrade workflows. - Can be one of the following: - - A Deployment Version identifier in the form ".". - - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp - is set (see `ramping_version`.) - rampingVersion: - type: string - description: |- - When present, it means the traffic is being shifted from the Current Version to the Ramping - Version. - Must always be different from Current Version. Can be one of the following: - - A Deployment Version identifier in the form ".". - - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. + Must always be different from `current_deployment_version` unless both are nil. + Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) Note that it is possible to ramp from one Version to another Version, or from unversioned workers to a particular Version, or from a particular Version to unversioned workers. + rampingVersion: + type: string + description: Deprecated. Use `ramping_deployment_version`. rampingVersionPercentage: type: number description: |- Percentage of tasks that are routed to the Ramping Version instead of the Current Version. Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but not yet "promoted" to be the Current Version, likely due to pending validations. + A 0% value means the Ramping Version is receiving no traffic. format: float currentVersionChangedTime: type: string @@ -10460,12 +10575,14 @@ components: deploymentName: type: string version: + type: string + description: Deprecated. Use `build_id`. + buildId: type: string description: |- - Required. Can be one of the following: - - A Deployment Version identifier in the form ".". - - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + The build id of the Version that you want to set as Current. + Pass an empty value to set the Current Version to nil. + A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) conflictToken: type: string description: |- @@ -10506,9 +10623,11 @@ components: format: bytes previousVersion: type: string - description: |- - The version that was current before executing this operation, in the form - ".". Can also be the `__unversioned__` special value. + description: Deprecated. Use `previous_deployment_version`. + previousDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: The version that was current before executing this operation. SetWorkerDeploymentRampingVersionRequest: type: object properties: @@ -10517,13 +10636,14 @@ components: deploymentName: type: string version: + type: string + description: Deprecated. Use `build_id`. + buildId: type: string description: |- - Can be one of the following: - - Absent/empty value to unset the Ramping Version. Must be paired with `percentage=0`. - - A Deployment Version identifier in the form ".". - - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + The build id of the Version that you want to ramp traffic to. + Pass an empty value to set the Ramping Version to nil. + A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) percentage: type: number description: 'Ramp percentage to set. Valid range: [0,100].' @@ -10571,9 +10691,11 @@ components: format: bytes previousVersion: type: string - description: |- - The version that was ramping before executing this operation, in the form - ".". Can also be the `__unversioned__` special value. + description: Deprecated. Use `previous_deployment_version`. + previousDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: The version that was ramping before executing this operation. previousPercentage: type: number description: The ramping version percentage before executing this operation. @@ -11383,34 +11505,37 @@ components: TaskQueueVersioningInfo: type: object properties: - currentVersion: - type: string + currentDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' description: |- - Always present. Specifies which Deployment Version should receive new workflow - executions and tasks of existing unversioned or AutoUpgrade workflows. - Can be one of the following: - - A Deployment Version identifier in the form ".". - - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp - is set (see `ramping_version`.) - rampingVersion: + Specifies which Deployment Version should receive new workflow executions and tasks of + existing unversioned or AutoUpgrade workflows. + Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage + is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). + currentVersion: type: string + description: Deprecated. Use `current_deployment_version`. + rampingDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' description: |- - When present, it means the traffic is being shifted from the Current Version to the Ramping - Version. - Must always be different from `current_version`. Can be one of the following: - - A Deployment Version identifier in the form ".". - - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. + Must always be different from `current_deployment_version` unless both are nil. + Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) Note that it is possible to ramp from one Version to another Version, or from unversioned workers to a particular Version, or from a particular Version to unversioned workers. + rampingVersion: + type: string + description: Deprecated. Use `ramping_deployment_version`. rampingVersionPercentage: type: number description: |- Percentage of tasks that are routed to the Ramping Version instead of the Current Version. Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but not yet "promoted" to be the Current Version, likely due to pending validations. + A 0% value means the Ramping Version is receiving no traffic. format: float updateTime: type: string @@ -11775,7 +11900,11 @@ components: type: string version: type: string - description: Deployment Version identifier in the form ".". + description: Deprecated. Use `deployment_version`. + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. upsertEntries: type: object additionalProperties: @@ -11977,13 +12106,24 @@ components: VersioningOverride: type: object properties: + pinned: + allOf: + - $ref: '#/components/schemas/VersioningOverride_PinnedOverride' + description: Send the next workflow task to the Version specified in the override. + autoUpgrade: + type: boolean + description: |- + Send the next workflow task to the Current Deployment Version + of its Task Queue when the next workflow task is dispatched. behavior: enum: - VERSIONING_BEHAVIOR_UNSPECIFIED - VERSIONING_BEHAVIOR_PINNED - VERSIONING_BEHAVIOR_AUTO_UPGRADE type: string - description: Required. + description: |- + Required. + Deprecated. Use `override`. format: enum deployment: allOf: @@ -11991,19 +12131,36 @@ components: description: |- Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. Identifies the worker deployment to pin the workflow to. - Deprecated. Use `pinned_version`. + Deprecated. Use `override.pinned.version`. pinnedVersion: type: string description: |- Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`. Identifies the worker deployment version to pin the workflow to, in the format ".". + Deprecated. Use `override.pinned.version`. description: |- Used to override the versioning behavior (and pinned deployment version, if applicable) of a specific workflow execution. If set, takes precedence over the worker-sent values. See `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. + VersioningOverride_PinnedOverride: + type: object + properties: + behavior: + enum: + - PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED + - PINNED_OVERRIDE_BEHAVIOR_PINNED + type: string + description: |- + Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED. + See `PinnedOverrideBehavior` for details. + format: enum + version: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. WaitPolicy: type: object properties: @@ -12050,7 +12207,11 @@ components: properties: version: type: string - description: The fully-qualified string representation of the version, in the form ".". + description: Deprecated. Use `deployment_version`. + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. createTime: type: string format: date-time @@ -12071,7 +12232,7 @@ components: type: string description: |- The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case, - the worker will be part of a Deployment Version identified by ".". + the worker will be part of a Deployment Version. workerVersioningMode: enum: - WORKER_VERSIONING_MODE_UNSPECIFIED @@ -12081,18 +12242,40 @@ components: description: |- Required. Versioning Mode for this worker. Must be the same for all workers with the same `deployment_name` and `build_id` combination, across all Task Queues. - When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version - identified by ".". + When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. format: enum description: |- Worker Deployment options set in SDK that need to be sent to server in every poll. Experimental. Worker Deployments are experimental and might significantly change in the future. + WorkerDeploymentVersion: + type: object + properties: + buildId: + type: string + description: |- + A unique identifier for this Version within the Deployment it is a part of. + Not necessarily unique within the namespace. + The combination of `deployment_name` and `build_id` uniquely identifies this + Version within the namespace, because Deployment names are unique within a namespace. + deploymentName: + type: string + description: Identifies the Worker Deployment this Version is part of. + description: |- + A Worker Deployment Version (Version, for short) represents a + version of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo) + Version records are created in Temporal server automatically when their + first poller arrives to the server. + Experimental. Worker Deployment Versions are experimental and might significantly change in the future. WorkerDeploymentVersionInfo: type: object properties: version: type: string - description: The fully-qualified string representation of the version, in the form ".". + description: Deprecated. Use `deployment_version`. + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. deploymentName: type: string createTime: @@ -12855,6 +13038,16 @@ components: description: Versioning override applied to this workflow when it was started. parentPinnedWorkerDeploymentVersion: type: string + 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_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 @@ -13001,16 +13194,21 @@ components: a deployment value which will be stored here, so the right way to check if an execution is versioned if an execution is versioned or not is via the `behavior` field. Note that `deployment` is overridden by `versioning_override` if the latter is present. - Deprecated. Use `version`. + Deprecated. Use `deployment_version`. version: type: string + description: Deprecated. Use `deployment_version`. + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' description: |- - The Worker Deployment Version that completed the last workflow task of this workflow - execution, in the form ".". - Must be present if and only if `behavior` is set. An absent value means no workflow task is - completed, or the workflow is unversioned. - For child workflows of Pinned parents, this will be set to parent's Pinned Version when the - the child starts so that child's first workflow task goes to the same Version as the parent. + The Worker Deployment Version that completed the last workflow task of this workflow execution. + An absent value means no workflow task is completed, or the workflow is unversioned. + If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed + by a worker that is not using versioning but _is_ passing Deployment Name and Build ID. + + For child workflows of Pinned parents, this will be set to the parent's Pinned Version when + the child starts, so that the child's first workflow task goes to the same Version as the parent. Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` will override this value. versioningOverride: @@ -13220,7 +13418,9 @@ components: description: Identity of the worker who completed this task binaryChecksum: type: string - description: Binary ID of the worker who completed this task + description: |- + Binary ID of the worker who completed this task + Deprecated. Replaced with `deployment_version`. workerVersion: allOf: - $ref: '#/components/schemas/WorkerVersionStamp' @@ -13228,7 +13428,7 @@ components: Version info of the worker who processed this workflow task. If present, the `build_id` field within is also used as `binary_checksum`, which may be omitted in that case (it may also be populated to preserve compatibility). - Deprecated. Use `deployment` and `versioning_behavior` instead. + Deprecated. Use `deployment_version` and `versioning_behavior` instead. sdkMetadata: allOf: - $ref: '#/components/schemas/WorkflowTaskCompletedMetadata' @@ -13246,7 +13446,7 @@ components: The deployment that completed this task. May or may not be set for unversioned workers, depending on whether a value is sent by the SDK. This value updates workflow execution's `versioning_info.deployment`. - Deprecated. Replaced with `worker_deployment_version`. + Deprecated. Replaced with `deployment_version`. versioningBehavior: enum: - VERSIONING_BEHAVIOR_UNSPECIFIED @@ -13264,12 +13464,20 @@ components: The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `versioning_info.version`. Experimental. Worker Deployments are experimental and might significantly change in the future. + Deprecated. Replaced with `deployment_version`. workerDeploymentName: type: string description: |- The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `worker_deployment_name`. Experimental. Worker Deployments are experimental and might significantly change in the future. + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: |- + The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` + is set. This value updates workflow execution's `versioning_info.deployment_version`. + Experimental. Worker Deployments are experimental and might significantly change in the future. WorkflowTaskCompletedMetadata: type: object properties: @@ -13393,7 +13601,7 @@ components: binaryChecksum: type: string description: |- - DEPRECATED since 1.21 - use `worker_version` instead. + DEPRECATED since 1.21 - This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] If a worker explicitly failed this task, its binary id workerVersion: allOf: @@ -13402,7 +13610,7 @@ components: Version info of the worker who processed this workflow task. If present, the `build_id` field within is also used as `binary_checksum`, which may be omitted in that case (it may also be populated to preserve compatibility). - Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] WorkflowTaskScheduledEventAttributes: type: object properties: diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index 143f8ce1..ead82fcd 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -21,12 +21,11 @@ message WorkerDeploymentOptions { // Required. Worker Deployment name. string deployment_name = 1; // The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case, - // the worker will be part of a Deployment Version identified by ".". + // the worker will be part of a Deployment Version. string build_id = 2; // Required. Versioning Mode for this worker. Must be the same for all workers with the // same `deployment_name` and `build_id` combination, across all Task Queues. - // When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version - // identified by ".". + // When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. temporal.api.enums.v1.WorkerVersioningMode worker_versioning_mode = 3; } @@ -95,8 +94,11 @@ message DeploymentListInfo { // their first poller arrives to the server. // Experimental. Worker Deployments are experimental and might significantly change in the future. message WorkerDeploymentVersionInfo { - // The fully-qualified string representation of the version, in the form ".". - string version = 1; + // Deprecated. Use `deployment_version`. + string version = 1 [deprecated = true]; + + // Required. + WorkerDeploymentVersion deployment_version = 11; string deployment_name = 2; google.protobuf.Timestamp create_time = 3; @@ -185,40 +187,60 @@ message WorkerDeploymentInfo { string last_modifier_identity = 5; message WorkerDeploymentVersionSummary { - // The fully-qualified string representation of the version, in the form ".". - string version = 1; + // Deprecated. Use `deployment_version`. + string version = 1 [deprecated = true]; + + // Required. + WorkerDeploymentVersion deployment_version = 4; google.protobuf.Timestamp create_time = 2; enums.v1.VersionDrainageStatus drainage_status = 3; } } +// A Worker Deployment Version (Version, for short) represents a +// version of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo) +// Version records are created in Temporal server automatically when their +// first poller arrives to the server. +// Experimental. Worker Deployment Versions are experimental and might significantly change in the future. +message WorkerDeploymentVersion { + // A unique identifier for this Version within the Deployment it is a part of. + // Not necessarily unique within the namespace. + // The combination of `deployment_name` and `build_id` uniquely identifies this + // Version within the namespace, because Deployment names are unique within a namespace. + string build_id = 1; + + // Identifies the Worker Deployment this Version is part of. + string deployment_name = 2; +} + message VersionMetadata { // Arbitrary key-values. map entries = 1; } message RoutingConfig { - // Always present. Specifies which Deployment Version should should receive new workflow - // executions and tasks of existing unversioned or AutoUpgrade workflows. - // Can be one of the following: - // - A Deployment Version identifier in the form ".". - // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - // Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp - // is set (see `ramping_version`.) - string current_version = 1; - // When present, it means the traffic is being shifted from the Current Version to the Ramping - // Version. - // Must always be different from Current Version. Can be one of the following: - // - A Deployment Version identifier in the form ".". - // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + // Specifies which Deployment Version should receive new workflow executions and tasks of + // existing unversioned or AutoUpgrade workflows. + // Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). + // Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage + // is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). + temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7; + // Deprecated. Use `current_deployment_version`. + string current_version = 1 [deprecated = true]; + + // When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. + // Must always be different from `current_deployment_version` unless both are nil. + // Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) // Note that it is possible to ramp from one Version to another Version, or from unversioned // workers to a particular Version, or from a particular Version to unversioned workers. - string ramping_version = 2; + temporal.api.deployment.v1.WorkerDeploymentVersion ramping_deployment_version = 9; + // Deprecated. Use `ramping_deployment_version`. + string ramping_version = 2 [deprecated = true]; + // Percentage of tasks that are routed to the Ramping Version instead of the Current Version. // Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but // not yet "promoted" to be the Current Version, likely due to pending validations. + // A 0% value means the Ramping Version is receiving no traffic. float ramping_version_percentage = 3; // Last time current version was changed. google.protobuf.Timestamp current_version_changed_time = 4; diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index e124e6c6..9c77ae45 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -125,7 +125,15 @@ message WorkflowExecutionStartedEventAttributes { // 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. - string parent_pinned_worker_deployment_version = 34; + // Deprecated. Use `parent_pinned_deployment_version`. + 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; @@ -216,11 +224,11 @@ message WorkflowTaskStartedEventAttributes { int64 history_size_bytes = 5; // Version info of the worker to whom this task was dispatched. // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true]; // Used by server internally to properly reapply build ID redirects to an execution // when rebuilding it from events. // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - int64 build_id_redirect_counter = 7; + int64 build_id_redirect_counter = 7 [deprecated = true]; } message WorkflowTaskCompletedEventAttributes { @@ -231,12 +239,13 @@ message WorkflowTaskCompletedEventAttributes { // Identity of the worker who completed this task string identity = 3; // Binary ID of the worker who completed this task - string binary_checksum = 4; + // Deprecated. Replaced with `deployment_version`. + string binary_checksum = 4 [deprecated = true]; // Version info of the worker who processed this workflow task. If present, the `build_id` field // within is also used as `binary_checksum`, which may be omitted in that case (it may also be // populated to preserve compatibility). - // Deprecated. Use `deployment` and `versioning_behavior` instead. - temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + // Deprecated. Use `deployment_version` and `versioning_behavior` instead. + temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true]; // Data the SDK wishes to record for itself, but server need not interpret, and does not // directly impact workflow state. temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 6; @@ -247,7 +256,7 @@ message WorkflowTaskCompletedEventAttributes { // The deployment that completed this task. May or may not be set for unversioned workers, // depending on whether a value is sent by the SDK. This value updates workflow execution's // `versioning_info.deployment`. - // Deprecated. Replaced with `worker_deployment_version`. + // Deprecated. Replaced with `deployment_version`. temporal.api.deployment.v1.Deployment deployment = 7 [deprecated = true]; // Versioning behavior sent by the worker that completed this task for this particular workflow // execution. UNSPECIFIED means the task was completed by an unversioned worker. This value @@ -256,11 +265,16 @@ message WorkflowTaskCompletedEventAttributes { // The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` // is set. This value updates workflow execution's `versioning_info.version`. // Experimental. Worker Deployments are experimental and might significantly change in the future. - string worker_deployment_version = 9; + // Deprecated. Replaced with `deployment_version`. + string worker_deployment_version = 9 [deprecated = true]; // The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` // is set. This value updates workflow execution's `worker_deployment_name`. // Experimental. Worker Deployments are experimental and might significantly change in the future. string worker_deployment_name = 10; + // The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` + // is set. This value updates workflow execution's `versioning_info.deployment_version`. + // Experimental. Worker Deployments are experimental and might significantly change in the future. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 11; } message WorkflowTaskTimedOutEventAttributes { @@ -287,14 +301,14 @@ message WorkflowTaskFailedEventAttributes { string new_run_id = 7; // TODO: ? int64 fork_event_version = 8; - // DEPRECATED since 1.21 - use `worker_version` instead. + // DEPRECATED since 1.21 - This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] // If a worker explicitly failed this task, its binary id - string binary_checksum = 9; + string binary_checksum = 9 [deprecated = true]; // Version info of the worker who processed this workflow task. If present, the `build_id` field // within is also used as `binary_checksum`, which may be omitted in that case (it may also be // populated to preserve compatibility). - // Deprecated. Use the info inside the corresponding WorkflowTaskStartedEvent - temporal.api.common.v1.WorkerVersionStamp worker_version = 10; + // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + temporal.api.common.v1.WorkerVersionStamp worker_version = 10 [deprecated = true]; } message ActivityTaskScheduledEventAttributes { @@ -337,7 +351,8 @@ message ActivityTaskScheduledEventAttributes { temporal.api.common.v1.RetryPolicy retry_policy = 12; // If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, // Assignment rules of the activity's Task Queue will be used to determine the Build ID. - bool use_workflow_build_id = 13; + // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + bool use_workflow_build_id = 13 [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 = 14; @@ -357,11 +372,11 @@ message ActivityTaskStartedEventAttributes { temporal.api.failure.v1.Failure last_failure = 5; // Version info of the worker to whom this task was dispatched. // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true]; // Used by server internally to properly reapply build ID redirects to an execution // when rebuilding it from events. // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - int64 build_id_redirect_counter = 7; + int64 build_id_redirect_counter = 7 [deprecated = true]; } message ActivityTaskCompletedEventAttributes { @@ -374,8 +389,8 @@ message ActivityTaskCompletedEventAttributes { // id of the worker that completed this task string identity = 4; // Version info of the worker who processed this workflow task. - // Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent - temporal.api.common.v1.WorkerVersionStamp worker_version = 5; + // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true]; } message ActivityTaskFailedEventAttributes { @@ -389,8 +404,8 @@ message ActivityTaskFailedEventAttributes { string identity = 4; temporal.api.enums.v1.RetryState retry_state = 5; // Version info of the worker who processed this workflow task. - // Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent - temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true]; } message ActivityTaskTimedOutEventAttributes { @@ -424,8 +439,8 @@ message ActivityTaskCanceledEventAttributes { // id of the worker who canceled this activity string identity = 5; // Version info of the worker who processed this workflow task. - // Deprecated. Use the info inside the corresponding ActivityTaskStartedEvent - temporal.api.common.v1.WorkerVersionStamp worker_version = 6; + // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];; } message TimerStartedEventAttributes { diff --git a/temporal/api/taskqueue/v1/message.proto b/temporal/api/taskqueue/v1/message.proto index ccbb6478..364c0059 100644 --- a/temporal/api/taskqueue/v1/message.proto +++ b/temporal/api/taskqueue/v1/message.proto @@ -35,27 +35,28 @@ message TaskQueueMetadata { // Experimental. Worker Deployments are experimental and might significantly change in the future. message TaskQueueVersioningInfo { - // Always present. Specifies which Deployment Version should receive new workflow - // executions and tasks of existing unversioned or AutoUpgrade workflows. - // Can be one of the following: - // - A Deployment Version identifier in the form ".". - // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - // Note: Current Version is overridden by the Ramping Version for a portion of traffic when a ramp - // is set (see `ramping_version`.) - string current_version = 1; - // When present, it means the traffic is being shifted from the Current Version to the Ramping - // Version. - // Must always be different from `current_version`. Can be one of the following: - // - A Deployment Version identifier in the form ".". - // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + // Specifies which Deployment Version should receive new workflow executions and tasks of + // existing unversioned or AutoUpgrade workflows. + // Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + // Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage + // is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). + temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7; + // Deprecated. Use `current_deployment_version`. + string current_version = 1 [deprecated = true]; + + // When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. + // Must always be different from `current_deployment_version` unless both are nil. + // Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) // Note that it is possible to ramp from one Version to another Version, or from unversioned // workers to a particular Version, or from a particular Version to unversioned workers. - string ramping_version = 2; + temporal.api.deployment.v1.WorkerDeploymentVersion ramping_deployment_version = 9; + // Deprecated. Use `ramping_deployment_version`. + string ramping_version = 2 [deprecated = true]; + // Percentage of tasks that are routed to the Ramping Version instead of the Current Version. // Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but // not yet "promoted" to be the Current Version, likely due to pending validations. + // A 0% value means the Ramping Version is receiving no traffic. float ramping_version_percentage = 3; // Last time versioning information of this Task Queue changed. google.protobuf.Timestamp update_time = 4; diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 96333c5b..98134eb1 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -74,11 +74,11 @@ message WorkflowExecutionInfo { // Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to // this execution. // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - string assigned_build_id = 19; + string assigned_build_id = 19 [deprecated = true]; // Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead // of using the assignment rules. // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - string inherited_build_id = 20; + string inherited_build_id = 20 [deprecated = true]; // The first run ID in the execution chain. // Executions created via the following operations are considered to be in the same chain // - ContinueAsNew @@ -149,17 +149,20 @@ message WorkflowExecutionVersioningInfo { // a deployment value which will be stored here, so the right way to check if an execution is // versioned if an execution is versioned or not is via the `behavior` field. // Note that `deployment` is overridden by `versioning_override` if the latter is present. - // Deprecated. Use `version`. + // Deprecated. Use `deployment_version`. temporal.api.deployment.v1.Deployment deployment = 2 [deprecated = true]; - // The Worker Deployment Version that completed the last workflow task of this workflow - // execution, in the form ".". - // Must be present if and only if `behavior` is set. An absent value means no workflow task is - // completed, or the workflow is unversioned. - // For child workflows of Pinned parents, this will be set to parent's Pinned Version when the - // the child starts so that child's first workflow task goes to the same Version as the parent. + // Deprecated. Use `deployment_version`. + string version = 5 [deprecated = true]; + // The Worker Deployment Version that completed the last workflow task of this workflow execution. + // An absent value means no workflow task is completed, or the workflow is unversioned. + // If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed + // by a worker that is not using versioning but _is_ passing Deployment Name and Build ID. + // + // For child workflows of Pinned parents, this will be set to the parent's Pinned Version when + // the child starts, so that the child's first workflow task goes to the same Version as the parent. // Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` // will override this value. - string version = 5; + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 7; // Present if user has set an execution-specific versioning override. This override takes // 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 @@ -220,9 +223,12 @@ message DeploymentTransition { // deployment version to another. // Experimental. Might change in the future. message DeploymentVersionTransition { - // Required. The target Version of the transition. May be `__unversioned__` which means a - // so-far-versioned workflow is transitioning to unversioned workers. - string version = 1; + // Deprecated. Use `deployment_version`. + string version = 1 [deprecated = true]; + + // The target Version of the transition. + // If nil, a so-far-versioned workflow is transitioning to unversioned workers. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 2; // Later: safe transition info } @@ -255,16 +261,16 @@ message PendingActivityInfo { // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] oneof assigned_build_id { // When present, it means this activity is assigned to the build ID of its workflow. - google.protobuf.Empty use_workflow_build_id = 13; + google.protobuf.Empty use_workflow_build_id = 13 [deprecated = true]; // This means the activity is independently versioned and not bound to the build ID of its workflow. // The activity will use the build id in this field instead. // If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning // rules. - string last_independently_assigned_build_id = 14; + string last_independently_assigned_build_id = 14 [deprecated = true]; } // The version stamp of the worker to whom this activity was most recently dispatched // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15; + temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15 [deprecated = true]; // The time activity will wait until the next retry. // If activity is currently running it will be next retry interval if activity failed. @@ -284,10 +290,15 @@ message PendingActivityInfo { // The deployment this activity was dispatched to most recently. Present only if the activity // was dispatched to a versioned worker. - // Deprecated. Use `last_worker_deployment_version`. + // Deprecated. Use `last_deployment_version`. temporal.api.deployment.v1.Deployment last_deployment = 20 [deprecated = true]; // The Worker Deployment Version this activity was dispatched to most recently. - string last_worker_deployment_version = 21; + // Deprecated. Use `last_deployment_version`. + string last_worker_deployment_version = 21 [deprecated = true]; + // The Worker Deployment Version this activity was dispatched to most recently. + // If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. + temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25; + // Priority metadata temporal.api.common.v1.Priority priority = 22; @@ -360,7 +371,7 @@ message ResetPointInfo { // Worker build id. string build_id = 7; // A worker binary version identifier (deprecated). - string binary_checksum = 1; + string binary_checksum = 1 [deprecated = true]; // The first run ID in the execution chain that was touched by this worker build. string run_id = 2; // Event ID of the first WorkflowTaskCompleted event processed by this worker build. @@ -525,18 +536,44 @@ message WorkflowExecutionOptions { // `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask` // to indicate that it should be mutated. message VersioningOverride { + // Indicates whether to override the workflow to be AutoUpgrade or Pinned. + oneof override { + // Send the next workflow task to the Version specified in the override. + PinnedOverride pinned = 3; + // Send the next workflow task to the Current Deployment Version + // of its Task Queue when the next workflow task is dispatched. + bool auto_upgrade = 4; + } // Required. - temporal.api.enums.v1.VersioningBehavior behavior = 1; + // Deprecated. Use `override`. + temporal.api.enums.v1.VersioningBehavior behavior = 1 [deprecated = true]; // Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. // Identifies the worker deployment to pin the workflow to. - // Deprecated. Use `pinned_version`. + // Deprecated. Use `override.pinned.version`. temporal.api.deployment.v1.Deployment deployment = 2 [deprecated = true]; // Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`. // Identifies the worker deployment version to pin the workflow to, in the format // ".". - string pinned_version = 9; + // Deprecated. Use `override.pinned.version`. + string pinned_version = 9 [deprecated = true]; + + message PinnedOverride { + // Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED. + // See `PinnedOverrideBehavior` for details. + PinnedOverrideBehavior behavior = 1; + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion version = 2; + } + + // Used to specify different sub-types of Pinned override that we plan to add in the future. + enum PinnedOverrideBehavior { + // Unspecified. + PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED = 0; + // Override workflow behavior to be Pinned. + PINNED_OVERRIDE_BEHAVIOR_PINNED = 1; + } } // When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index a0364f74..43993e24 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -254,10 +254,10 @@ message PollWorkflowTaskQueueRequest { temporal.api.taskqueue.v1.TaskQueue task_queue = 2; // The identity of the worker/client who is polling this task queue string identity = 3; - // DEPRECATED since 1.21 - use `worker_version_capabilities` instead. + // DEPRECATED since 1.21 - use `deployment_options` instead. // Each worker process should provide an ID unique to the specific set of code it is running // "checksum" in this field name isn't very accurate, it should be though of as an id. - string binary_checksum = 4; + string binary_checksum = 4 [deprecated = true]; // Information about this worker's build identifier and if it is choosing to use the versioning // feature. See the `WorkerVersionCapabilities` docstring for more. // Deprecated. Replaced by deployment_options. @@ -339,16 +339,16 @@ message RespondWorkflowTaskCompletedRequest { // something useful, but cannot complete it within the workflow task timeout. Local activities // which run for longer than the task timeout being the prime example. bool force_create_new_workflow_task = 6; - // DEPRECATED since 1.21 - use `worker_version_stamp` instead. + // DEPRECATED since 1.21 - use `deployment_options` instead. // Worker process' unique binary id - string binary_checksum = 7; + string binary_checksum = 7 [deprecated = true]; // Responses to the `queries` field in the task being responded to map query_results = 8; string namespace = 9; // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. - // Deprecated. Use `deployment` and `versioning_behavior` instead. + // Deprecated. Use `deployment_options` and `versioning_behavior` instead. temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10 [deprecated = true]; // Protocol messages piggybacking on a WFT as a transport repeated temporal.api.protocol.v1.Message messages = 11; @@ -402,21 +402,21 @@ message RespondWorkflowTaskFailedRequest { temporal.api.failure.v1.Failure failure = 3; // The identity of the worker/client string identity = 4; - // DEPRECATED since 1.21 - use `worker_version_stamp` instead. + // DEPRECATED since 1.21 - use `deployment_options` instead. // Worker process' unique binary id - string binary_checksum = 5; + string binary_checksum = 5 [deprecated = true]; string namespace = 6; // Protocol messages piggybacking on a WFT as a transport repeated temporal.api.protocol.v1.Message messages = 7; // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. - // Deprecated. Use `deployment` instead. + // Deprecated. Use `deployment_options` instead. temporal.api.common.v1.WorkerVersionStamp worker_version = 8 [deprecated = true]; // Deployment info of the worker that completed this task. Must be present if user has set // `WorkerDeploymentOptions` regardless of versioning being enabled or not. // Deprecated. Replaced with `deployment_options`. - temporal.api.deployment.v1.Deployment deployment = 9; + temporal.api.deployment.v1.Deployment deployment = 9 [deprecated = true]; // Worker deployment options that user has set in the worker. temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 10; } @@ -552,7 +552,7 @@ message RespondActivityTaskCompletedRequest { // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. - // Deprecated. Use `deployment` instead. + // Deprecated. Use `deployment_options` instead. temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true]; // Deployment info of the worker that completed this task. Must be present if user has set // `WorkerDeploymentOptions` regardless of versioning being enabled or not. @@ -596,7 +596,7 @@ message RespondActivityTaskFailedRequest { // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. - // Deprecated. Use `deployment` instead. + // Deprecated. Use `deployment_options` instead. temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true]; // Deployment info of the worker that completed this task. Must be present if user has set // `WorkerDeploymentOptions` regardless of versioning being enabled or not. @@ -646,7 +646,7 @@ message RespondActivityTaskCanceledRequest { // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. - // Deprecated. Use `deployment` instead. + // Deprecated. Use `deployment_options` instead. temporal.api.common.v1.WorkerVersionStamp worker_version = 5 [deprecated = true]; // Deployment info of the worker that completed this task. Must be present if user has set // `WorkerDeploymentOptions` regardless of versioning being enabled or not. @@ -672,6 +672,8 @@ message RespondActivityTaskCanceledByIdRequest { temporal.api.common.v1.Payloads details = 5; // The identity of the worker/client string identity = 6; + // Worker deployment options that user has set in the worker. + temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 7; } message RespondActivityTaskCanceledByIdResponse { @@ -1970,9 +1972,11 @@ message DescribeDeploymentResponse { } message DescribeWorkerDeploymentVersionRequest { - string namespace = 1; - // Deployment Version identifier in the form ".". - string version = 2; + string namespace = 1; + // Deprecated. Use `deployment_version`. + string version = 2 [deprecated = true]; + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 3; } message DescribeWorkerDeploymentVersionResponse { @@ -2029,11 +2033,14 @@ message SetCurrentDeploymentResponse { message SetWorkerDeploymentCurrentVersionRequest { string namespace = 1; string deployment_name = 2; - // Required. Can be one of the following: - // - A Deployment Version identifier in the form ".". - // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - string version = 3; + // Deprecated. Use `build_id`. + string version = 3 [deprecated = true]; + + // The build id of the Version that you want to set as Current. + // Pass an empty value to set the Current Version to nil. + // A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + string build_id = 7; + // Optional. This can be the value of conflict_token from a Describe, or another Worker // Deployment API. Passing a non-nil conflict token will cause this request to fail if the // Deployment's configuration has been modified between the API call that generated the @@ -2062,21 +2069,24 @@ message SetWorkerDeploymentCurrentVersionResponse { // that write to the Worker Deployment state to ensure that the state // did not change between this API call and a future write. bytes conflict_token = 1; - // The version that was current before executing this operation, in the form - // ".". Can also be the `__unversioned__` special value. - string previous_version = 2; + // Deprecated. Use `previous_deployment_version`. + string previous_version = 2 [deprecated = true]; + // The version that was current before executing this operation. + temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3; } // Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. message SetWorkerDeploymentRampingVersionRequest { string namespace = 1; string deployment_name = 2; - // Can be one of the following: - // - Absent/empty value to unset the Ramping Version. Must be paired with `percentage=0`. - // - A Deployment Version identifier in the form ".". - // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those - // with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) - string version = 3; + // Deprecated. Use `build_id`. + string version = 3 [deprecated = true]; + + // The build id of the Version that you want to ramp traffic to. + // Pass an empty value to set the Ramping Version to nil. + // A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) + string build_id = 8; + // Ramp percentage to set. Valid range: [0,100]. float percentage = 4; @@ -2111,9 +2121,10 @@ message SetWorkerDeploymentRampingVersionResponse { // that write to the Worker Deployment state to ensure that the state // did not change between this API call and a future write. bytes conflict_token = 1; - // The version that was ramping before executing this operation, in the form - // ".". Can also be the `__unversioned__` special value. - string previous_version = 2; + // Deprecated. Use `previous_deployment_version`. + string previous_version = 2 [deprecated = true]; + // The version that was ramping before executing this operation. + temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4; // The ramping version percentage before executing this operation. float previous_percentage = 3; } @@ -2146,8 +2157,10 @@ message ListWorkerDeploymentsResponse { // can be skipped by passing `skip-drainage=true`. message DeleteWorkerDeploymentVersionRequest { string namespace = 1; - // Deployment Version identifier in the form ".". - string version = 2; + // Deprecated. Use `deployment_version`. + string version = 2 [deprecated = true]; + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5; // Pass to force deletion even if the Version is draining. In this case the open pinned // workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. bool skip_drainage = 3; @@ -2173,8 +2186,10 @@ message DeleteWorkerDeploymentResponse { // Used to update the user-defined metadata of a Worker Deployment Version. message UpdateWorkerDeploymentVersionMetadataRequest { string namespace = 1; - // Deployment Version identifier in the form ".". - string version = 2; + // Deprecated. Use `deployment_version`. + string version = 2 [deprecated = true]; + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5; map upsert_entries = 3; // List of keys to remove from the metadata. repeated string remove_entries = 4; diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 352d9e4e..86538650 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -767,9 +767,9 @@ service WorkflowService { // Experimental. This API might significantly change or be removed in a future release. rpc DescribeWorkerDeploymentVersion (DescribeWorkerDeploymentVersionRequest) returns (DescribeWorkerDeploymentVersionResponse) { option (google.api.http) = { - get: "/namespaces/{namespace}/worker-deployment-versions/{version}" + get: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" additional_bindings { - get: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{version}" + get: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" } }; } @@ -878,9 +878,9 @@ service WorkflowService { // Experimental. This API might significantly change or be removed in a future release. rpc DeleteWorkerDeploymentVersion (DeleteWorkerDeploymentVersionRequest) returns (DeleteWorkerDeploymentVersionResponse) { option (google.api.http) = { - delete: "/namespaces/{namespace}/worker-deployment-versions/{version}" + delete: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" additional_bindings { - delete: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{version}" + delete: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" } }; } @@ -914,10 +914,10 @@ service WorkflowService { // Experimental. This API might significantly change or be removed in a future release. rpc UpdateWorkerDeploymentVersionMetadata (UpdateWorkerDeploymentVersionMetadataRequest) returns (UpdateWorkerDeploymentVersionMetadataResponse) { option (google.api.http) = { - post: "/namespaces/{namespace}/worker-deployment-versions/{version}/update-metadata" + post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata" body: "*" additional_bindings { - post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{version}/update-metadata" + post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata" body: "*" } };