From 052f0298625f83b3facbf6c12e64084249528ca2 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 23 Apr 2025 15:23:56 -0700 Subject: [PATCH 1/2] add routing_config_propagation_state --- temporal/api/deployment/v1/message.proto | 4 ++++ temporal/api/enums/v1/task_queue.proto | 11 +++++++++++ temporal/api/workflowservice/v1/service.proto | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index e31c45bb6..9645cf707 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -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; + // 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`. diff --git a/temporal/api/enums/v1/task_queue.proto b/temporal/api/enums/v1/task_queue.proto index c6b6f934c..05f15caaa 100644 --- a/temporal/api/enums/v1/task_queue.proto +++ b/temporal/api/enums/v1/task_queue.proto @@ -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; +} \ No newline at end of file diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 18dacc1bf..f09fc3690 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -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) = { @@ -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) = { From af66aed59796ca65ce14e309f1ea694c477a2456 Mon Sep 17 00:00:00 2001 From: Carly de Frondeville Date: Wed, 23 Apr 2025 15:24:36 -0700 Subject: [PATCH 2/2] make proto --- openapi/openapiv2.json | 22 ++++++++++++++++++---- openapi/openapiv3.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index f62324e59..714972b6e 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -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": { @@ -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": { @@ -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": { @@ -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": { @@ -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": { @@ -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`." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 24aa63f88..458cbb63f 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: |-