Skip to content

Commit eb533ff

Browse files
committed
Merge remote-tracking branch 'origin/master' into standalone-nexus-op
2 parents 57248b1 + 43b4618 commit eb533ff

13 files changed

Lines changed: 224 additions & 57 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nexus-rpc/nexus-rpc-gen/main/schemas/nexus-rpc-gen.json
2+
#
3+
# Nexus service definition for server-to-worker communication.
4+
# See request_response.proto for message definitions.
5+
#
6+
# Task queue format: /temporal-sys/worker-commands/{namespace}/{worker_grouping_key}
7+
8+
nexusrpc: 1.0.0
9+
10+
services:
11+
temporal.api.nexusservices.workerservice.v1.WorkerService:
12+
description: >
13+
Internal Nexus service for server-to-worker communication.
14+
Used by the Temporal server to send commands to workers.
15+
operations:
16+
ExecuteCommands:
17+
description: Executes worker commands sent by the server.
18+
input:
19+
$goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsRequest"
20+
$javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsRequest"
21+
$pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsRequest"
22+
$typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsRequest"
23+
$dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsRequest"
24+
$rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsRequest"
25+
output:
26+
$goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsResponse"
27+
$javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsResponse"
28+
$pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsResponse"
29+
$typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsResponse"
30+
$dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsResponse"
31+
$rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsResponse"
32+

openapi/openapiv2.json

Lines changed: 45 additions & 17 deletions
Large diffs are not rendered by default.

openapi/openapiv3.yaml

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10019,7 +10019,14 @@ components:
1001910019
type: object
1002010020
additionalProperties:
1002110021
$ref: '#/components/schemas/ComputeConfigScalingGroup'
10022-
description: "Each scaling group describes a compute config for a specific subset of the worker \n deployment version: covering a specific set of task types and/or regions.\n Having different configurations for different task types, allows independent\n tuning of activity and workflow task processing (for example).\n\n The key of the map is the ID of the scaling group used to reference it in subsequent\n update calls."
10022+
description: |-
10023+
Each scaling group describes a compute config for a specific subset of the worker
10024+
deployment version: covering a specific set of task types and/or regions.
10025+
Having different configurations for different task types, allows independent
10026+
tuning of activity and workflow task processing (for example).
10027+
10028+
The key of the map is the ID of the scaling group used to reference it in subsequent
10029+
update calls.
1002310030
description: |-
1002410031
ComputeConfig stores configuration that helps a worker control plane
1002510032
controller understand *when* and *how* to respond to worker lifecycle
@@ -10037,7 +10044,10 @@ components:
1003710044
- TASK_QUEUE_TYPE_NEXUS
1003810045
type: string
1003910046
format: enum
10040-
description: "Optional. The set of task queue types this scaling group serves. \n If not provided, this scaling group serves all not otherwise defined\n task types."
10047+
description: |-
10048+
Optional. The set of task queue types this scaling group serves.
10049+
If not provided, this scaling group serves all not otherwise defined
10050+
task types.
1004110051
provider:
1004210052
allOf:
1004310053
- $ref: '#/components/schemas/ComputeProvider'
@@ -10050,6 +10060,21 @@ components:
1005010060
description: |-
1005110061
Informs a worker lifecycle controller *when* and *how often* to perform
1005210062
certain worker lifecycle actions like starting a serverless worker.
10063+
ComputeConfigScalingGroupSummary:
10064+
type: object
10065+
properties:
10066+
taskQueueTypes:
10067+
type: array
10068+
items:
10069+
enum:
10070+
- TASK_QUEUE_TYPE_UNSPECIFIED
10071+
- TASK_QUEUE_TYPE_WORKFLOW
10072+
- TASK_QUEUE_TYPE_ACTIVITY
10073+
- TASK_QUEUE_TYPE_NEXUS
10074+
type: string
10075+
format: enum
10076+
providerType:
10077+
type: string
1005310078
ComputeConfigScalingGroupUpdate:
1005410079
type: object
1005510080
properties:
@@ -10066,6 +10091,14 @@ components:
1006610091
- Accepted paths: "task_queue_types", "provider", "provider.type", "provider.details",
1006710092
"provider.nexus_endpoint", "scaler", "scaler.type", "scaler.details"
1006810093
format: field-mask
10094+
ComputeConfigSummary:
10095+
type: object
10096+
properties:
10097+
scalingGroups:
10098+
type: object
10099+
additionalProperties:
10100+
$ref: '#/components/schemas/ComputeConfigScalingGroupSummary'
10101+
description: A subset of information in ComputeConfig optimized for list views.
1006910102
ComputeProvider:
1007010103
type: object
1007110104
properties:
@@ -11532,7 +11565,9 @@ components:
1153211565
sourceDeploymentRevisionNumber:
1153311566
type: string
1153411567
description: The revision number of the source deployment version of the parent/previous workflow.
11535-
description: "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version \n to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior."
11568+
description: |-
11569+
Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version
11570+
to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.
1153611571
Input:
1153711572
type: object
1153811573
properties:
@@ -15994,7 +16029,6 @@ components:
1599416029
type: string
1599516030
description: Last time versioning information of this Task Queue changed.
1599616031
format: date-time
15997-
description: Experimental. Worker Deployments are experimental and might significantly change in the future.
1599816032
TerminateActivityExecutionRequest:
1599916033
type: object
1600016034
properties:
@@ -16830,7 +16864,6 @@ components:
1683016864
description: |-
1683116865
Information about workflow drainage to help the user determine when it is safe
1683216866
to decommission a Version. Not present while version is current or ramping.
16833-
Experimental. Worker Deployments are experimental and might significantly change in the future.
1683416867
VersionInfo:
1683516868
type: object
1683616869
properties:
@@ -17021,7 +17054,14 @@ components:
1702117054
Indicates whether the routing_config has been fully propagated to all
1702217055
relevant task queues and their partitions.
1702317056
format: enum
17024-
description: "A Worker Deployment (Deployment, for short) represents all workers serving \n a shared set of Task Queues. Typically, a Deployment represents one service or \n application.\n A Deployment contains multiple Deployment Versions, each representing a different \n version of workers. (see documentation of WorkerDeploymentVersionInfo)\n Deployment records are created in Temporal server automatically when their\n first poller arrives to the server.\n Experimental. Worker Deployments are experimental and might significantly change in the future."
17057+
description: |-
17058+
A Worker Deployment (Deployment, for short) represents all workers serving
17059+
a shared set of Task Queues. Typically, a Deployment represents one service or
17060+
application.
17061+
A Deployment contains multiple Deployment Versions, each representing a different
17062+
version of workers. (see documentation of WorkerDeploymentVersionInfo)
17063+
Deployment records are created in Temporal server automatically when their
17064+
first poller arrives to the server.
1702517065
WorkerDeploymentInfo_WorkerDeploymentVersionSummary:
1702617066
type: object
1702717067
properties:
@@ -17095,6 +17135,8 @@ components:
1709517135
Timestamp when this version last stopped being current or ramping.
1709617136
Cleared if the version becomes current or ramping again.
1709717137
format: date-time
17138+
computeConfig:
17139+
$ref: '#/components/schemas/ComputeConfigSummary'
1709817140
WorkerDeploymentOptions:
1709917141
type: object
1710017142
properties:
@@ -17117,9 +17159,7 @@ components:
1711717159
same `deployment_name` and `build_id` combination, across all Task Queues.
1711817160
When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version.
1711917161
format: enum
17120-
description: |-
17121-
Worker Deployment options set in SDK that need to be sent to server in every poll.
17122-
Experimental. Worker Deployments are experimental and might significantly change in the future.
17162+
description: Worker Deployment options set in SDK that need to be sent to server in every poll.
1712317163
WorkerDeploymentVersion:
1712417164
type: object
1712517165
properties:
@@ -17249,7 +17289,13 @@ components:
1724917289
- `CreateWorkerDeploymentVersion`
1725017290
- `UpdateWorkerDeploymentVersionComputeConfig`
1725117291
- `UpdateWorkerDeploymentVersionMetadata`
17252-
description: "A Worker Deployment Version (Version, for short) represents all workers of the same \n code and config within a Deployment. Workers of the same Version are expected to \n behave exactly the same so when executions move between them there are no \n non-determinism issues.\n Worker Deployment Versions are created in Temporal server automatically when \n their first poller arrives to the server.\n Experimental. Worker Deployments are experimental and might significantly change in the future."
17292+
description: |-
17293+
A Worker Deployment Version (Version, for short) represents all workers of the same
17294+
code and config within a Deployment. Workers of the same Version are expected to
17295+
behave exactly the same so when executions move between them there are no
17296+
non-determinism issues.
17297+
Worker Deployment Versions are created in Temporal server automatically when
17298+
their first poller arrives to the server.
1725317299
WorkerDeploymentVersionInfo_VersionTaskQueueInfo:
1725417300
type: object
1725517301
properties:
@@ -18015,9 +18061,7 @@ components:
1801518061
Experimental. Versioning info is experimental and might change in the future.
1801618062
workerDeploymentName:
1801718063
type: string
18018-
description: |-
18019-
The name of Worker Deployment that completed the most recent workflow task.
18020-
Experimental. Worker Deployments are experimental and might change in the future.
18064+
description: The name of Worker Deployment that completed the most recent workflow task.
1802118065
priority:
1802218066
allOf:
1802318067
- $ref: '#/components/schemas/Priority'
@@ -18804,21 +18848,18 @@ components:
1880418848
description: |-
1880518849
The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`
1880618850
is set. This value updates workflow execution's `versioning_info.version`.
18807-
Experimental. Worker Deployments are experimental and might significantly change in the future.
1880818851
Deprecated. Replaced with `deployment_version`.
1880918852
workerDeploymentName:
1881018853
type: string
1881118854
description: |-
1881218855
The name of Worker Deployment that completed this task. Must be set if `versioning_behavior`
1881318856
is set. This value updates workflow execution's `worker_deployment_name`.
18814-
Experimental. Worker Deployments are experimental and might significantly change in the future.
1881518857
deploymentVersion:
1881618858
allOf:
1881718859
- $ref: '#/components/schemas/WorkerDeploymentVersion'
1881818860
description: |-
1881918861
The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`
1882018862
is set. This value updates workflow execution's `versioning_info.deployment_version`.
18821-
Experimental. Worker Deployments are experimental and might significantly change in the future.
1882218863
WorkflowTaskCompletedMetadata:
1882318864
type: object
1882418865
properties:

temporal/api/compute/v1/config.proto

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import "temporal/api/enums/v1/task_queue.proto";
1515
import "google/protobuf/field_mask.proto";
1616

1717
message ComputeConfigScalingGroup {
18-
// Optional. The set of task queue types this scaling group serves.
18+
// Optional. The set of task queue types this scaling group serves.
1919
// If not provided, this scaling group serves all not otherwise defined
2020
// task types.
2121
repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 1;
@@ -34,7 +34,7 @@ message ComputeConfigScalingGroup {
3434
// events.
3535
message ComputeConfig {
3636

37-
// Each scaling group describes a compute config for a specific subset of the worker
37+
// Each scaling group describes a compute config for a specific subset of the worker
3838
// deployment version: covering a specific set of task types and/or regions.
3939
// Having different configurations for different task types, allows independent
4040
// tuning of activity and workflow task processing (for example).
@@ -56,3 +56,13 @@ message ComputeConfigScalingGroupUpdate {
5656
// "provider.nexus_endpoint", "scaler", "scaler.type", "scaler.details"
5757
google.protobuf.FieldMask update_mask = 2;
5858
}
59+
60+
// A subset of information in ComputeConfig optimized for list views.
61+
message ComputeConfigSummary {
62+
map<string, ComputeConfigScalingGroupSummary> scaling_groups = 1;
63+
}
64+
65+
message ComputeConfigScalingGroupSummary {
66+
repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 1;
67+
string provider_type = 2;
68+
}

temporal/api/deployment/v1/message.proto

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import "temporal/api/common/v1/message.proto";
1717
import "temporal/api/compute/v1/config.proto";
1818

1919
// Worker Deployment options set in SDK that need to be sent to server in every poll.
20-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
2120
message WorkerDeploymentOptions {
2221
// Required when `worker_versioning_mode==VERSIONED`.
2322
string deployment_name = 1;
@@ -87,13 +86,12 @@ message DeploymentListInfo {
8786
}
8887

8988

90-
// A Worker Deployment Version (Version, for short) represents all workers of the same
91-
// code and config within a Deployment. Workers of the same Version are expected to
92-
// behave exactly the same so when executions move between them there are no
89+
// A Worker Deployment Version (Version, for short) represents all workers of the same
90+
// code and config within a Deployment. Workers of the same Version are expected to
91+
// behave exactly the same so when executions move between them there are no
9392
// non-determinism issues.
94-
// Worker Deployment Versions are created in Temporal server automatically when
93+
// Worker Deployment Versions are created in Temporal server automatically when
9594
// their first poller arrives to the server.
96-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
9795
message WorkerDeploymentVersionInfo {
9896
// Deprecated. Use `deployment_version`.
9997
string version = 1 [deprecated = true];
@@ -175,7 +173,6 @@ message WorkerDeploymentVersionInfo {
175173

176174
// Information about workflow drainage to help the user determine when it is safe
177175
// to decommission a Version. Not present while version is current or ramping.
178-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
179176
message VersionDrainageInfo {
180177
// Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping).
181178
// Set to DRAINED when no more open pinned workflows exist on this version.
@@ -186,14 +183,13 @@ message VersionDrainageInfo {
186183
google.protobuf.Timestamp last_checked_time = 3;
187184
}
188185

189-
// A Worker Deployment (Deployment, for short) represents all workers serving
190-
// a shared set of Task Queues. Typically, a Deployment represents one service or
186+
// A Worker Deployment (Deployment, for short) represents all workers serving
187+
// a shared set of Task Queues. Typically, a Deployment represents one service or
191188
// application.
192-
// A Deployment contains multiple Deployment Versions, each representing a different
189+
// A Deployment contains multiple Deployment Versions, each representing a different
193190
// version of workers. (see documentation of WorkerDeploymentVersionInfo)
194191
// Deployment records are created in Temporal server automatically when their
195192
// first poller arrives to the server.
196-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
197193
message WorkerDeploymentInfo {
198194
// Identifies a Worker Deployment. Must be unique within the namespace.
199195
string name = 1;
@@ -257,6 +253,7 @@ message WorkerDeploymentInfo {
257253
// Timestamp when this version last stopped being current or ramping.
258254
// Cleared if the version becomes current or ramping again.
259255
google.protobuf.Timestamp last_deactivation_time = 10;
256+
temporal.api.compute.v1.ComputeConfigSummary compute_config = 13;
260257
}
261258
}
262259

@@ -317,7 +314,7 @@ message RoutingConfig {
317314
int64 revision_number = 10;
318315
}
319316

320-
// Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version
317+
// Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version
321318
// to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.
322319
message InheritedAutoUpgradeInfo {
323320
// The source deployment version of the parent/previous workflow.

temporal/api/enums/v1/deployment.proto

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ enum DeploymentReachability {
3030
// aip.dev/not-precedent: Call this status because it is . --)
3131
// Specify the drainage status for a Worker Deployment Version so users can decide whether they
3232
// can safely decommission the version.
33-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
3433
enum VersionDrainageStatus {
3534
// Drainage Status is not specified.
3635
VERSION_DRAINAGE_STATUS_UNSPECIFIED = 0;
@@ -49,7 +48,6 @@ enum VersionDrainageStatus {
4948
// - Whether or not Temporal Server considers this worker's version (Build ID) when dispatching
5049
// tasks to it.
5150
// - Whether or not the workflows processed by this worker are versioned using the worker's version.
52-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
5351
enum WorkerVersioningMode {
5452
WORKER_VERSIONING_MODE_UNSPECIFIED = 0;
5553
// Workers with this mode are not distinguished from each other for task routing, even if they
@@ -76,7 +74,6 @@ enum WorkerVersioningMode {
7674
// (-- api-linter: core::0216::synonyms=disabled
7775
// aip.dev/not-precedent: Call this status because it is . --)
7876
// Specify the status of a Worker Deployment Version.
79-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
8077
enum WorkerDeploymentVersionStatus {
8178
WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED = 0;
8279
// The Worker Deployment Version has been created inside the Worker Deployment but is not used by any

temporal/api/enums/v1/workflow.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ enum TimeoutType {
128128
// Versions. The Versioning Behavior of a workflow execution is typically specified by the worker
129129
// who completes the first task of the execution, but is also overridable manually for new and
130130
// existing workflows (see VersioningOverride).
131-
// Experimental. Worker Deployments are experimental and might significantly change in the future.
132131
enum VersioningBehavior {
133132
// Workflow execution does not have a Versioning Behavior and is called Unversioned. This is the
134133
// legacy behavior. An Unversioned workflow's task can go to any Unversioned worker (see

0 commit comments

Comments
 (0)