Skip to content

Commit 96fb607

Browse files
authored
Add compute provider validation to worker deployment version summary (#810)
**What changed?** Added `ComputeStatus` to the Worker Deployment API with a `ProviderValidationStatus` that tracks the result of the most recent connectivity check between Temporal and a customer's compute resource. An empty error message means validation passed; a non-empty message describes what failed. **Why?** Enables surfacing the connectivity health between Temporal and a customer's compute resource (e.g. Lambda) through the Worker Deployment API, so the UI can show ongoing validations status of compute configs without additional queries. **Breaking changes** None. All additions are new optional fields; existing clients are unaffected. **Server PR** temporalio/temporal#10778
1 parent e88aaf2 commit 96fb607

3 files changed

Lines changed: 82 additions & 10 deletions

File tree

‎openapi/openapiv2.json‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10757,6 +10757,21 @@
1075710757
}
1075810758
}
1075910759
},
10760+
"ComputeStatusProviderValidationStatus": {
10761+
"type": "object",
10762+
"properties": {
10763+
"errorMessage": {
10764+
"type": "string",
10765+
"description": "Human-readable error message if connectivity validation failed.\nAn empty string means validation passed."
10766+
},
10767+
"lastCheckTime": {
10768+
"type": "string",
10769+
"format": "date-time",
10770+
"description": "Timestamp of the last validation check."
10771+
}
10772+
},
10773+
"description": "ProviderValidationStatus represents the result of the most recent\nconnectivity check between Temporal and a customer's compute provider."
10774+
},
1076010775
"DeploymentInfoTaskQueueInfo": {
1076110776
"type": "object",
1076210777
"properties": {
@@ -11207,6 +11222,10 @@
1120711222
},
1120811223
"computeConfig": {
1120911224
"$ref": "#/definitions/v1ComputeConfigSummary"
11225+
},
11226+
"computeStatus": {
11227+
"$ref": "#/definitions/v1ComputeStatus",
11228+
"description": "ComputeStatus represents compute-related configuration and healthchecks."
1121011229
}
1121111230
}
1121211231
},
@@ -14692,6 +14711,16 @@
1469214711
},
1469314712
"description": "ComputeScaler instructs the Temporal Service when to scale up or down the number of\nWorkers that comprise a WorkerDeployment."
1469414713
},
14714+
"v1ComputeStatus": {
14715+
"type": "object",
14716+
"properties": {
14717+
"providerValidation": {
14718+
"$ref": "#/definitions/ComputeStatusProviderValidationStatus",
14719+
"description": "provider_validation encapsulates the health signal for validating the compute provider."
14720+
}
14721+
},
14722+
"description": "A Worker Deployment (Deployment, for short) represents all workers serving\na shared set of Task Queues. Typically, a Deployment represents one service or\napplication.\nA Deployment contains multiple Deployment Versions, each representing a different\nversion of workers. (see documentation of WorkerDeploymentVersionInfo)\nDeployment records are created in Temporal server automatically when their\nfirst poller arrives to the server.\nComputeStatus represents compute-related configuration and health checks."
14723+
},
1469514724
"v1ConfigMetadata": {
1469614725
"type": "object",
1469714726
"properties": {
@@ -20221,8 +20250,7 @@
2022120250
"$ref": "#/definitions/v1RoutingConfigUpdateState",
2022220251
"description": "Indicates whether the routing_config has been fully propagated to all\nrelevant task queues and their partitions."
2022320252
}
20224-
},
20225-
"description": "A Worker Deployment (Deployment, for short) represents all workers serving\na shared set of Task Queues. Typically, a Deployment represents one service or\napplication.\nA Deployment contains multiple Deployment Versions, each representing a different\nversion of workers. (see documentation of WorkerDeploymentVersionInfo)\nDeployment records are created in Temporal server automatically when their\nfirst poller arrives to the server."
20253+
}
2022620254
},
2022720255
"v1WorkerDeploymentOptions": {
2022820256
"type": "object",

‎openapi/openapiv3.yaml‎

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11111,6 +11111,37 @@ components:
1111111111
description: |-
1111211112
ComputeScaler instructs the Temporal Service when to scale up or down the number of
1111311113
Workers that comprise a WorkerDeployment.
11114+
ComputeStatus:
11115+
type: object
11116+
properties:
11117+
providerValidation:
11118+
allOf:
11119+
- $ref: '#/components/schemas/ComputeStatus_ProviderValidationStatus'
11120+
description: provider_validation encapsulates the health signal for validating the compute provider.
11121+
description: |-
11122+
A Worker Deployment (Deployment, for short) represents all workers serving
11123+
a shared set of Task Queues. Typically, a Deployment represents one service or
11124+
application.
11125+
A Deployment contains multiple Deployment Versions, each representing a different
11126+
version of workers. (see documentation of WorkerDeploymentVersionInfo)
11127+
Deployment records are created in Temporal server automatically when their
11128+
first poller arrives to the server.
11129+
ComputeStatus represents compute-related configuration and health checks.
11130+
ComputeStatus_ProviderValidationStatus:
11131+
type: object
11132+
properties:
11133+
errorMessage:
11134+
type: string
11135+
description: |-
11136+
Human-readable error message if connectivity validation failed.
11137+
An empty string means validation passed.
11138+
lastCheckTime:
11139+
type: string
11140+
description: Timestamp of the last validation check.
11141+
format: date-time
11142+
description: |-
11143+
ProviderValidationStatus represents the result of the most recent
11144+
connectivity check between Temporal and a customer's compute provider.
1111411145
ConfigMetadata:
1111511146
type: object
1111611147
properties:
@@ -18498,14 +18529,6 @@ components:
1849818529
Indicates whether the routing_config has been fully propagated to all
1849918530
relevant task queues and their partitions.
1850018531
format: enum
18501-
description: |-
18502-
A Worker Deployment (Deployment, for short) represents all workers serving
18503-
a shared set of Task Queues. Typically, a Deployment represents one service or
18504-
application.
18505-
A Deployment contains multiple Deployment Versions, each representing a different
18506-
version of workers. (see documentation of WorkerDeploymentVersionInfo)
18507-
Deployment records are created in Temporal server automatically when their
18508-
first poller arrives to the server.
1850918532
WorkerDeploymentInfo_WorkerDeploymentVersionSummary:
1851018533
type: object
1851118534
properties:
@@ -18581,6 +18604,10 @@ components:
1858118604
format: date-time
1858218605
computeConfig:
1858318606
$ref: '#/components/schemas/ComputeConfigSummary'
18607+
computeStatus:
18608+
allOf:
18609+
- $ref: '#/components/schemas/ComputeStatus'
18610+
description: ComputeStatus represents compute-related configuration and healthchecks.
1858418611
WorkerDeploymentOptions:
1858518612
type: object
1858618613
properties:

‎temporal/api/deployment/v1/message.proto‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,21 @@ message VersionDrainageInfo {
191191
// version of workers. (see documentation of WorkerDeploymentVersionInfo)
192192
// Deployment records are created in Temporal server automatically when their
193193
// first poller arrives to the server.
194+
// ComputeStatus represents compute-related configuration and health checks.
195+
message ComputeStatus {
196+
// ProviderValidationStatus represents the result of the most recent
197+
// connectivity check between Temporal and a customer's compute provider.
198+
message ProviderValidationStatus {
199+
// Human-readable error message if connectivity validation failed.
200+
// An empty string means validation passed.
201+
string error_message = 1;
202+
// Timestamp of the last validation check.
203+
google.protobuf.Timestamp last_check_time = 2;
204+
}
205+
// provider_validation encapsulates the health signal for validating the compute provider.
206+
ProviderValidationStatus provider_validation = 1;
207+
}
208+
194209
message WorkerDeploymentInfo {
195210
// Identifies a Worker Deployment. Must be unique within the namespace.
196211
string name = 1;
@@ -255,6 +270,8 @@ message WorkerDeploymentInfo {
255270
// Cleared if the version becomes current or ramping again.
256271
google.protobuf.Timestamp last_deactivation_time = 10;
257272
temporal.api.compute.v1.ComputeConfigSummary compute_config = 13;
273+
// ComputeStatus represents compute-related configuration and healthchecks.
274+
ComputeStatus compute_status = 14;
258275
}
259276
}
260277

0 commit comments

Comments
 (0)