Skip to content

Commit 11be549

Browse files
committed
Address PR feedback
1 parent 6ff325e commit 11be549

File tree

8 files changed

+919
-105
lines changed

8 files changed

+919
-105
lines changed

openapi/openapiv2.json

Lines changed: 444 additions & 24 deletions
Large diffs are not rendered by default.

openapi/openapiv3.yaml

Lines changed: 390 additions & 32 deletions
Large diffs are not rendered by default.

temporal/api/compute/v1/config.proto

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,31 @@ import "temporal/api/enums/v1/task_queue.proto";
1717
// controller understand *when* and *how* to respond to worker lifecycle
1818
// events.
1919
message ComputeConfig {
20-
message ComputeConfigEntry {
21-
// The set of task queue types this compute config serves.
20+
message ScalingGroup {
21+
// Optional. The set of task queue types this scaling group serves.
22+
// If not provided, this scaling group serves all not otherwise defined
23+
// task types.
2224
repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 1;
2325

26+
// Optional. The region of the temporal server this scaling group serves.
27+
// In a replicated setup allows for configuration of scaling groups for both regions,
28+
// and seamless transition of the scaling activity together with the namespace failover.
29+
// If not provided, this scaling group serves all not otherwise defined regions.
30+
string region = 2;
31+
2432
// Stores instructions for a worker control plane controller how to respond
2533
// to worker lifeycle events.
26-
temporal.api.compute.v1.ComputeProvider provider = 2;
34+
temporal.api.compute.v1.ComputeProvider provider = 3;
2735

2836
// Informs a worker lifecycle controller *when* and *how often* to perform
2937
// certain worker lifecycle actions like starting a serverless worker.
30-
temporal.api.compute.v1.ComputeScaler scaler = 3;
38+
temporal.api.compute.v1.ComputeScaler scaler = 4;
3139
}
3240

33-
// Each entry describes a compute config for a specific subset of the deployment's scope.
34-
// Entries might be seperated by different task queue types.
35-
repeated ComputeConfigEntry entries = 1;
41+
// Each scaling group describes a compute config for a specific subset of the worker
42+
// deployment version: covering a specific set of task types and/or regions.
43+
// Having different configurations for different task types, allows independent
44+
// tuning of activity and workflow task processing (for example).
45+
repeated ScalingGroup scaling_groups = 1;
3646
}
3747

temporal/api/compute/v1/provider.proto

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ message ComputeProvider {
2323
string type = 1;
2424
// Contains provider-specific instructions and configuration.
2525
oneof detail {
26-
// will be an unencrypted, JSON-encoded object of provider-specific
27-
// information
26+
// Unencrypted, JSON-encoded object of provider-specific information
2827
// (-- api-linter: core::0146::any=disabled
2928
// aip.dev/not-precedent: This needs to be extensible to
3029
// externally-written compute providers --)
3130
string detail_json = 2;
32-
// will be an encrypted, encoded bytestring containing
33-
// provider-specific information. The implementation must understand
34-
// how to decrypt the payload.
31+
// Encrypted, encoded bytestring containing provider-specific
32+
// information. The implementation must understand how to decrypt the payload.
3533
temporal.api.common.v1.Payload detail_payload = 3;
3634
}
3735
// Optional. If the compute provider is a Nexus service, this should point

temporal/api/compute/v1/scaler.proto

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,21 @@ import "temporal/api/common/v1/message.proto";
1414
// ComputeScaler instructs the Temporal Service when to scale up or down the number of
1515
// Workers that comprise a WorkerDeployment.
1616
message ComputeScaler {
17-
// type of the compute scaler. this string is implementation-specific and
17+
// Type of the compute scaler. this string is implementation-specific and
1818
// can be used by implementations to understand how to interpret the
1919
// contents of the scaler_details field.
2020
string type = 1;
2121

2222
// Contains scaler-specific instructions and configuration.
2323
oneof detail {
24-
// will be an unencrypted, JSON-encoded object of scaler-specific
25-
// information
24+
// Unencrypted, JSON-encoded object of scaler-specific information
2625
// (-- api-linter: core::0146::any=disabled
2726
// aip.dev/not-precedent: This needs to be extensible to
2827
// externally-written compute scalers --)
2928
string detail_json = 2;
3029

31-
// will be an encrypted, encoded bytestring containing
32-
// scaler-specific information. The implementation must understand
33-
// how to decrypt the payload.
30+
// Encrypted, encoded bytestring containing scaler-specific
31+
// information. The implementation must understand how to decrypt the payload.
3432
temporal.api.common.v1.Payload detail_payload = 3;
3533
}
3634
}

temporal/api/deployment/v1/message.proto

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,6 @@ message WorkerDeploymentInfo {
216216
// relevant task queues and their partitions.
217217
temporal.api.enums.v1.RoutingConfigUpdateState routing_config_update_state = 7;
218218

219-
// Contains information used by worker control plane controllers to handle
220-
// scale events.
221-
temporal.api.compute.v1.ComputeConfig compute_config = 20;
222-
223219
message WorkerDeploymentVersionSummary {
224220
// Deprecated. Use `deployment_version`.
225221
string version = 1 [deprecated = true];

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,10 +1268,10 @@ message GetSystemInfoResponse {
12681268
// This flag is dependent both on server version and for Nexus to be enabled via server configuration.
12691269
bool nexus = 11;
12701270

1271-
// True if the server supports serverless deployments.
1272-
// This flag is dependent both on server version and for serverless deployments
1271+
// True if the server supports server-scaled deployments.
1272+
// This flag is dependent both on server version and for server-scaled deployments
12731273
// to be enabled via server configuration.
1274-
bool serverless_deployments = 12;
1274+
bool server_scaled_deployments = 12;
12751275

12761276
}
12771277
}
@@ -2353,10 +2353,6 @@ message CreateWorkerDeploymentRequest {
23532353
// this name already exists, an error will be returned.
23542354
string deployment_name = 2;
23552355

2356-
// Optional. Contains the new worker compute configuration for the Worker
2357-
// Deployment. Used for worker scale management.
2358-
temporal.api.compute.v1.ComputeConfig compute_config = 3;
2359-
23602356
// Optional. The identity of the client who initiated this request.
23612357
string identity = 4;
23622358
// A unique identifier for this create request for idempotence. Typically UUIDv4.
@@ -2402,19 +2398,12 @@ message CreateWorkerDeploymentVersionRequest {
24022398
// Required.
24032399
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 2;
24042400

2405-
// All the Task Queues that will be polled from this Deployment version.
2406-
repeated VersionTaskQueueInfo task_queue_infos = 6;
2407-
message VersionTaskQueueInfo {
2408-
string name = 1;
2409-
temporal.api.enums.v1.TaskQueueType type = 2;
2410-
}
2411-
24122401
// Optional. Contains the new worker compute configuration for the Worker
24132402
// Deployment. Used for worker scale management.
2414-
temporal.api.compute.v1.ComputeConfig compute_config = 3;
2403+
temporal.api.compute.v1.ComputeConfig compute_config = 4;
24152404

24162405
// Optional. The identity of the client who initiated this request.
2417-
string identity = 4;
2406+
string identity = 3;
24182407
// A unique identifier for this create request for idempotence. Typically UUIDv4.
24192408
string request_id = 5;
24202409
}
@@ -2460,22 +2449,54 @@ message DeleteWorkerDeploymentRequest {
24602449
message DeleteWorkerDeploymentResponse {
24612450
}
24622451

2463-
// Used to update the compute provider of a Worker Deployment Version.
2464-
message UpdateWorkerDeploymentVersionComputeProviderRequest {
2452+
// Used to update the compute config of a Worker Deployment Version.
2453+
message UpdateWorkerDeploymentVersionComputeConfigRequest {
24652454
string namespace = 1;
24662455

24672456
// Required.
24682457
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 2;
24692458

2470-
// Optional. Contains the new worker compute configuration for the Worker
2471-
// Deployment. Used for worker scale management.
2472-
temporal.api.compute.v1.ComputeConfig compute_config = 3;
2459+
// Optional. Contains the compute config scaling groups to add or updated for the Worker
2460+
// Deployment.
2461+
repeated temporal.api.compute.v1.ComputeConfig.ScalingGroup compute_config_scaling_groups = 6;
2462+
2463+
// Optional. Contains the compute config scaling groups to remove from the Worker Deployment.
2464+
repeated temporal.api.compute.v1.ComputeConfig.ScalingGroup remove_compute_config_scaling_groups = 7;
24732465

24742466
// Optional. The identity of the client who initiated this request.
2475-
string identity = 4;
2467+
string identity = 3;
2468+
2469+
// A unique identifier for this create request for idempotence. Typically UUIDv4.
2470+
string request_id = 4;
2471+
2472+
// This value is returned so that it can be optionally passed to APIs
2473+
// that write to the Worker Deployment state to ensure that the state
2474+
// did not change between this API call and a future write.
2475+
bytes conflict_token = 5;
2476+
}
2477+
2478+
message UpdateWorkerDeploymentVersionComputeConfigResponse {
2479+
// This value is returned so that it can be optionally passed to APIs that
2480+
// write to the WorkerDeployment state to ensure that the state did not
2481+
// change between this API call and a future write.
2482+
bytes conflict_token = 1;
2483+
}
2484+
2485+
// Used to validate the compute config without attaching it to a Worker Deployment Version.
2486+
message ValidateWorkerDeploymentVersionComputeConfigRequest {
2487+
string namespace = 1;
2488+
2489+
// Required.
2490+
string deployment_name = 2;
2491+
2492+
// Required. Contains the new worker compute configuration for the Worker Deployment.
2493+
temporal.api.compute.v1.ComputeConfig compute_config = 4;
2494+
2495+
// Optional. The identity of the client who initiated this request.
2496+
string identity = 3;
24762497
}
24772498

2478-
message UpdateWorkerDEploymentVersionComputeProviderResponse {
2499+
message ValidateWorkerDeploymentVersionComputeConfigResponse {
24792500
}
24802501

24812502
// Used to update the user-defined metadata of a Worker Deployment Version.

temporal/api/workflowservice/v1/service.proto

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,14 +1146,27 @@ service WorkflowService {
11461146
};
11471147
}
11481148

1149-
// Updates the compute provider attached to a Worker Deployment Version.
1149+
// Updates the compute config attached to a Worker Deployment Version.
11501150
// Experimental. This API might significantly change or be removed in a future release.
1151-
rpc UpdateWorkerDeploymentVersionComputeProvider (UpdateWorkerDeploymentVersionComputeProviderRequest) returns (UpdateWorkerDEploymentVersionComputeProviderResponse) {
1151+
rpc UpdateWorkerDeploymentVersionComputeConfig (UpdateWorkerDeploymentVersionComputeConfigRequest) returns (UpdateWorkerDeploymentVersionComputeConfigResponse) {
11521152
option (google.api.http) = {
1153-
post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute"
1153+
post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute-config"
11541154
body: "*"
11551155
additional_bindings {
1156-
post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute"
1156+
post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute-config"
1157+
body: "*"
1158+
}
1159+
};
1160+
}
1161+
1162+
// Validates the compute config without attaching it to a Worker Deployment Version.
1163+
// Experimental. This API might significantly change or be removed in a future release.
1164+
rpc ValidateWorkerDeploymentVersionComputeConfig (ValidateWorkerDeploymentVersionComputeConfigRequest) returns (ValidateWorkerDeploymentVersionComputeConfigResponse) {
1165+
option (google.api.http) = {
1166+
post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_name}/validate-compute-config"
1167+
body: "*"
1168+
additional_bindings {
1169+
post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_name}/validate-compute-config"
11571170
body: "*"
11581171
}
11591172
};

0 commit comments

Comments
 (0)