Skip to content

Async SetRampingVersion and SetCurrentVersion #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: versioning-3.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@
},
"/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-current-version": {
"post": {
"summary": "Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping\nVersion if it is the Version being set as Current.\nExperimental. This API might significantly change or be removed in a future release.",
"summary": "Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping\nVersion if it is the Version being set as Current.\nThis API is eventually consistent. When it returns success, we guarantee that the new\nRoutingConfig has been committed durably to the Worker Deployment Manager. The relevant\ntask queues will receive the new configuration in the background. To check whether all\ntask queue partitions have the latest config, see `routing_config_propagation_state`.\nExperimental. This API might significantly change or be removed in a future release.",
"operationId": "SetWorkerDeploymentCurrentVersion2",
"responses": {
"200": {
Expand Down Expand Up @@ -2037,7 +2037,7 @@
},
"/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-ramping-version": {
"post": {
"summary": "Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for\ngradual ramp to unversioned workers too.\nExperimental. This API might significantly change or be removed in a future release.",
"summary": "Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for\ngradual ramp to unversioned workers too.\nThis API is eventually consistent. When it returns success, we guarantee that the new\nRoutingConfig has been committed durably to the Worker Deployment Manager. The relevant\ntask queues will receive the new configuration in the background. To check whether all\ntask queue partitions have the latest config, see `routing_config_propagation_state`.\nExperimental. This API might significantly change or be removed in a future release.",
"operationId": "SetWorkerDeploymentRampingVersion2",
"responses": {
"200": {
Expand Down Expand Up @@ -5466,7 +5466,7 @@
},
"/namespaces/{namespace}/worker-deployments/{deploymentName}/set-current-version": {
"post": {
"summary": "Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping\nVersion if it is the Version being set as Current.\nExperimental. This API might significantly change or be removed in a future release.",
"summary": "Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping\nVersion if it is the Version being set as Current.\nThis API is eventually consistent. When it returns success, we guarantee that the new\nRoutingConfig has been committed durably to the Worker Deployment Manager. The relevant\ntask queues will receive the new configuration in the background. To check whether all\ntask queue partitions have the latest config, see `routing_config_propagation_state`.\nExperimental. This API might significantly change or be removed in a future release.",
"operationId": "SetWorkerDeploymentCurrentVersion",
"responses": {
"200": {
Expand Down Expand Up @@ -5511,7 +5511,7 @@
},
"/namespaces/{namespace}/worker-deployments/{deploymentName}/set-ramping-version": {
"post": {
"summary": "Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for\ngradual ramp to unversioned workers too.\nExperimental. This API might significantly change or be removed in a future release.",
"summary": "Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for\ngradual ramp to unversioned workers too.\nThis API is eventually consistent. When it returns success, we guarantee that the new\nRoutingConfig has been committed durably to the Worker Deployment Manager. The relevant\ntask queues will receive the new configuration in the background. To check whether all\ntask queue partitions have the latest config, see `routing_config_propagation_state`.\nExperimental. This API might significantly change or be removed in a future release.",
"operationId": "SetWorkerDeploymentRampingVersion",
"responses": {
"200": {
Expand Down Expand Up @@ -13918,6 +13918,16 @@
}
}
},
"v1TaskQueuePropagation": {
"type": "string",
"enum": [
"TASK_QUEUE_PROPAGATION_UNSPECIFIED",
"TASK_QUEUE_PROPAGATION_IN_PROGRESS",
"TASK_QUEUE_PROPAGATION_COMPLETED"
],
"default": "TASK_QUEUE_PROPAGATION_UNSPECIFIED",
"description": "Indicates whether a change to the Task Queue User Data has been\npropagated to all relevant Task Queues and their partitions.\n\n - TASK_QUEUE_PROPAGATION_UNSPECIFIED: Task Queue Propagation unspecified.\n - TASK_QUEUE_PROPAGATION_IN_PROGRESS: Task Queue Propagation is currently in progress.\n - TASK_QUEUE_PROPAGATION_COMPLETED: Task Queue Propagation has completed successfully."
},
"v1TaskQueueReachability": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -14591,6 +14601,10 @@
"routingConfig": {
"$ref": "#/definitions/v1RoutingConfig"
},
"routingConfigPropagationState": {
"$ref": "#/definitions/v1TaskQueuePropagation",
"description": "Indicates whether the routing_config has been fully propagated to all\nrelevant task queues and partitions."
},
"lastModifierIdentity": {
"type": "string",
"description": "Identity of the last client who modified the configuration of this Deployment. Set to the\n`identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and\n`SetWorkerDeploymentRampingVersion`."
Expand Down
26 changes: 26 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,10 @@ paths:
description: |-
Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping
Version if it is the Version being set as Current.
This API is eventually consistent. When it returns success, we guarantee that the new
RoutingConfig has been committed durably to the Worker Deployment Manager. The relevant
task queues will receive the new configuration in the background. To check whether all
task queue partitions have the latest config, see `routing_config_propagation_state`.
Experimental. This API might significantly change or be removed in a future release.
operationId: SetWorkerDeploymentCurrentVersion
parameters:
Expand Down Expand Up @@ -1810,6 +1814,10 @@ paths:
description: |-
Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for
gradual ramp to unversioned workers too.
This API is eventually consistent. When it returns success, we guarantee that the new
RoutingConfig has been committed durably to the Worker Deployment Manager. The relevant
task queues will receive the new configuration in the background. To check whether all
task queue partitions have the latest config, see `routing_config_propagation_state`.
Experimental. This API might significantly change or be removed in a future release.
operationId: SetWorkerDeploymentRampingVersion
parameters:
Expand Down Expand Up @@ -4858,6 +4866,10 @@ paths:
description: |-
Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping
Version if it is the Version being set as Current.
This API is eventually consistent. When it returns success, we guarantee that the new
RoutingConfig has been committed durably to the Worker Deployment Manager. The relevant
task queues will receive the new configuration in the background. To check whether all
task queue partitions have the latest config, see `routing_config_propagation_state`.
Experimental. This API might significantly change or be removed in a future release.
operationId: SetWorkerDeploymentCurrentVersion
parameters:
Expand Down Expand Up @@ -4897,6 +4909,10 @@ paths:
description: |-
Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for
gradual ramp to unversioned workers too.
This API is eventually consistent. When it returns success, we guarantee that the new
RoutingConfig has been committed durably to the Worker Deployment Manager. The relevant
task queues will receive the new configuration in the background. To check whether all
task queue partitions have the latest config, see `routing_config_propagation_state`.
Experimental. This API might significantly change or be removed in a future release.
operationId: SetWorkerDeploymentRampingVersion
parameters:
Expand Down Expand Up @@ -11906,6 +11922,16 @@ components:
format: date-time
routingConfig:
$ref: '#/components/schemas/RoutingConfig'
routingConfigPropagationState:
enum:
- TASK_QUEUE_PROPAGATION_UNSPECIFIED
- TASK_QUEUE_PROPAGATION_IN_PROGRESS
- TASK_QUEUE_PROPAGATION_COMPLETED
type: string
description: |-
Indicates whether the routing_config has been fully propagated to all
relevant task queues and partitions.
format: enum
lastModifierIdentity:
type: string
description: |-
Expand Down
4 changes: 4 additions & 0 deletions temporal/api/deployment/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ message WorkerDeploymentInfo {

RoutingConfig routing_config = 4;

// Indicates whether the routing_config has been fully propagated to all
// relevant task queues and partitions.
enums.v1.TaskQueuePropagation routing_config_propagation_state = 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if even saying "task queue" and "propagation" is too much detail / too specific? Maybe something like "update state": "pending" or "completed"

Copy link
Member

@Shivs11 Shivs11 Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

routing_config_propagation_state is something that's related to the routing information of a worker deployment info and I wonder if it's better suited to be present inside routing_config?


// Identity of the last client who modified the configuration of this Deployment. Set to the
// `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and
// `SetWorkerDeploymentRampingVersion`.
Expand Down
11 changes: 11 additions & 0 deletions temporal/api/enums/v1/task_queue.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,14 @@ enum DescribeTaskQueueMode {
// Enhanced mode reports aggregated results for all partitions, supports Build IDs, and reports richer info.
DESCRIBE_TASK_QUEUE_MODE_ENHANCED = 1;
}

// Indicates whether a change to the Task Queue User Data has been
// propagated to all relevant Task Queues and their partitions.
enum TaskQueuePropagation {
// Task Queue Propagation unspecified.
TASK_QUEUE_PROPAGATION_UNSPECIFIED = 0;
// Task Queue Propagation is currently in progress.
TASK_QUEUE_PROPAGATION_IN_PROGRESS = 1;
// Task Queue Propagation has completed successfully.
TASK_QUEUE_PROPAGATION_COMPLETED = 2;
}
8 changes: 8 additions & 0 deletions temporal/api/workflowservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,10 @@ service WorkflowService {

// Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping
// Version if it is the Version being set as Current.
// This API is eventually consistent. When it returns success, we guarantee that the new
// RoutingConfig has been committed durably to the Worker Deployment Manager. The relevant
// task queues will receive the new configuration in the background. To check whether all
// task queue partitions have the latest config, see `routing_config_propagation_state`.
// Experimental. This API might significantly change or be removed in a future release.
rpc SetWorkerDeploymentCurrentVersion (SetWorkerDeploymentCurrentVersionRequest) returns (SetWorkerDeploymentCurrentVersionResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -909,6 +913,10 @@ service WorkflowService {

// Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for
// gradual ramp to unversioned workers too.
// This API is eventually consistent. When it returns success, we guarantee that the new
// RoutingConfig has been committed durably to the Worker Deployment Manager. The relevant
// task queues will receive the new configuration in the background. To check whether all
// task queue partitions have the latest config, see `routing_config_propagation_state`.
// Experimental. This API might significantly change or be removed in a future release.
rpc SetWorkerDeploymentRampingVersion (SetWorkerDeploymentRampingVersionRequest) returns (SetWorkerDeploymentRampingVersionResponse) {
option (google.api.http) = {
Expand Down
Loading