diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ea37162a0..03b236dd0 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -10953,6 +10953,10 @@ "rampingVersionSummary": { "$ref": "#/definitions/WorkerDeploymentInfoWorkerDeploymentVersionSummary", "description": "Summary of the ramping version of the Worker Deployment." + }, + "validationSummary": { + "$ref": "#/definitions/v1WorkerDeploymentValidationSummary", + "description": "Aggregated WCI validation status counts across all versions with compute config." } }, "title": "A subset of WorkerDeploymentInfo" @@ -11207,6 +11211,10 @@ }, "computeConfig": { "$ref": "#/definitions/v1ComputeConfigSummary" + }, + "validationStatus": { + "$ref": "#/definitions/v1WorkerDeploymentVersionValidationStatus", + "description": "The result of the most recent connectivity check for this version's compute resource.\nOnly populated for versions that have compute config." } } }, @@ -11221,6 +11229,15 @@ } } }, + "WorkerDeploymentVersionValidationStatusHealth": { + "type": "string", + "enum": [ + "HEALTH_UNSPECIFIED", + "HEALTH_OK", + "HEALTH_ERROR" + ], + "default": "HEALTH_UNSPECIFIED" + }, "WorkflowEventEventReference": { "type": "object", "properties": { @@ -20242,6 +20259,24 @@ }, "description": "Worker Deployment options set in SDK that need to be sent to server in every poll." }, + "v1WorkerDeploymentValidationSummary": { + "type": "object", + "properties": { + "connectedCount": { + "type": "integer", + "format": "int32" + }, + "failedCount": { + "type": "integer", + "format": "int32" + }, + "unknownCount": { + "type": "integer", + "format": "int32" + } + }, + "description": "WorkerDeploymentValidationSummary aggregates validation status counts across all\nversions in a Worker Deployment that have compute config configured." + }, "v1WorkerDeploymentVersion": { "type": "object", "properties": { @@ -20355,6 +20390,25 @@ "default": "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED", "description": "Specify the status of a Worker Deployment Version.\n\n - WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE: The Worker Deployment Version has been created inside the Worker Deployment but is not used by any\nworkflow executions. These Versions can still have workflows if they have an explicit Versioning Override targeting\nthis Version. Such Versioning Override could be set at workflow start time, or at a later time via `UpdateWorkflowExecutionOptions`.\n - WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT: The Worker Deployment Version is the current version of the Worker Deployment. All new workflow executions \nand tasks of existing unversioned or AutoUpgrade workflows are routed to this version.\n - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING: The Worker Deployment Version is the ramping version of the Worker Deployment. A subset of new Pinned workflow executions are \nrouted to this version. Moreover, a portion of existing unversioned or AutoUpgrade workflow executions are also routed to this version.\n - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING: The Worker Deployment Version is not used by new workflows but is still used by\nopen pinned workflows. The version cannot be decommissioned safely.\n - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED: The Worker Deployment Version is not used by new or open workflows, but might be still needed by\nQueries sent to closed workflows. The version can be decommissioned safely if user does\nnot query closed workflows. If the user does query closed workflows for some time x after\nworkflows are closed, they should decommission the version after it has been drained for that duration.\n - WORKER_DEPLOYMENT_VERSION_STATUS_CREATED: The Worker Deployment Version is created by user (via `CreateWorkerDeploymentVersion` API)\nbut server has not seen any poller for it yet." }, + "v1WorkerDeploymentVersionValidationStatus": { + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/WorkerDeploymentVersionValidationStatusHealth", + "description": "The health of the compute resource connection." + }, + "errorMessage": { + "type": "string", + "description": "Human-readable error message if health is HEALTH_ERROR." + }, + "lastCheckTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp of the last validation check." + } + }, + "description": "WorkerDeploymentVersionValidationStatus represents the result of the most\nrecent connectivity check between Temporal and a customer's compute resource." + }, "v1WorkerHeartbeat": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a2ec27cdd..f938515cc 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -12911,6 +12911,10 @@ components: allOf: - $ref: '#/components/schemas/WorkerDeploymentInfo_WorkerDeploymentVersionSummary' description: Summary of the ramping version of the Worker Deployment. + validationSummary: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentValidationSummary' + description: Aggregated WCI validation status counts across all versions with compute config. description: A subset of WorkerDeploymentInfo ListWorkersResponse: type: object @@ -18581,6 +18585,12 @@ components: format: date-time computeConfig: $ref: '#/components/schemas/ComputeConfigSummary' + validationStatus: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersionValidationStatus' + description: |- + The result of the most recent connectivity check for this version's compute resource. + Only populated for versions that have compute config. WorkerDeploymentOptions: type: object properties: @@ -18604,6 +18614,21 @@ components: 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. + WorkerDeploymentValidationSummary: + type: object + properties: + connectedCount: + type: integer + format: int32 + failedCount: + type: integer + format: int32 + unknownCount: + type: integer + format: int32 + description: |- + WorkerDeploymentValidationSummary aggregates validation status counts across all + versions in a Worker Deployment that have compute config configured. WorkerDeploymentVersion: type: object properties: @@ -18753,6 +18778,27 @@ components: - TASK_QUEUE_TYPE_NEXUS type: string format: enum + WorkerDeploymentVersionValidationStatus: + type: object + properties: + health: + enum: + - HEALTH_UNSPECIFIED + - HEALTH_OK + - HEALTH_ERROR + type: string + description: The health of the compute resource connection. + format: enum + errorMessage: + type: string + description: Human-readable error message if health is HEALTH_ERROR. + lastCheckTime: + type: string + description: Timestamp of the last validation check. + format: date-time + description: |- + WorkerDeploymentVersionValidationStatus represents the result of the most + recent connectivity check between Temporal and a customer's compute resource. WorkerHeartbeat: type: object properties: diff --git a/temporal/api/compute/v1/validation.proto b/temporal/api/compute/v1/validation.proto new file mode 100644 index 000000000..904198c0c --- /dev/null +++ b/temporal/api/compute/v1/validation.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package temporal.api.compute.v1; + +option go_package = "go.temporal.io/api/compute/v1;compute"; +option java_package = "io.temporal.api.compute.v1"; +option java_multiple_files = true; +option java_outer_classname = "ValidationProto"; +option ruby_package = "Temporalio::Api::Compute::V1"; +option csharp_namespace = "Temporalio.Api.Compute.V1"; + +import "google/protobuf/timestamp.proto"; + +// WorkerDeploymentValidationSummary aggregates validation status counts across all +// versions in a Worker Deployment that have compute config configured. +message WorkerDeploymentValidationSummary { + int32 connected_count = 1; + int32 failed_count = 2; + int32 unknown_count = 3; +} + +// WorkerDeploymentVersionValidationStatus represents the result of the most +// recent connectivity check between Temporal and a customer's compute resource. +message WorkerDeploymentVersionValidationStatus { + enum Health { + HEALTH_UNSPECIFIED = 0; + HEALTH_OK = 1; + HEALTH_ERROR = 2; + } + // The health of the compute resource connection. + Health health = 1; + // Human-readable error message if health is HEALTH_ERROR. + string error_message = 2; + // Timestamp of the last validation check. + google.protobuf.Timestamp last_check_time = 3; +} diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index 25227df39..154f7c977 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -16,6 +16,7 @@ import "temporal/api/enums/v1/deployment.proto"; import "temporal/api/enums/v1/task_queue.proto"; import "temporal/api/common/v1/message.proto"; import "temporal/api/compute/v1/config.proto"; +import "temporal/api/compute/v1/validation.proto"; // Worker Deployment options set in SDK that need to be sent to server in every poll. message WorkerDeploymentOptions { @@ -255,6 +256,9 @@ message WorkerDeploymentInfo { // Cleared if the version becomes current or ramping again. google.protobuf.Timestamp last_deactivation_time = 10; temporal.api.compute.v1.ComputeConfigSummary compute_config = 13; + // The result of the most recent connectivity check for this version's compute resource. + // Only populated for versions that have compute config. + temporal.api.compute.v1.WorkerDeploymentVersionValidationStatus validation_status = 14; } } diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 263c3c8a0..02a86f869 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -27,6 +27,7 @@ import "temporal/api/history/v1/message.proto"; import "temporal/api/workflow/v1/message.proto"; import "temporal/api/command/v1/message.proto"; import "temporal/api/compute/v1/config.proto"; +import "temporal/api/compute/v1/validation.proto"; import "temporal/api/deployment/v1/message.proto"; import "temporal/api/failure/v1/message.proto"; import "temporal/api/filter/v1/message.proto"; @@ -2641,6 +2642,8 @@ message ListWorkerDeploymentsResponse { temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary current_version_summary = 5; // Summary of the ramping version of the Worker Deployment. temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary ramping_version_summary = 6; + // Aggregated WCI validation status counts across all versions with compute config. + temporal.api.compute.v1.WorkerDeploymentValidationSummary validation_summary = 7; } }