Skip to content

Commit 2b204bb

Browse files
committed
Add worker commands payloads
1 parent d96bd55 commit 2b204bb

File tree

5 files changed

+199
-1
lines changed

5 files changed

+199
-1
lines changed

openapi/openapiv2.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,6 +2455,52 @@
24552455
]
24562456
}
24572457
},
2458+
"/api/v1/namespaces/{namespace}/workers/{workerInstanceKey}": {
2459+
"get": {
2460+
"summary": "DescribeWorker returns information about the specified worker execution.",
2461+
"operationId": "DescribeWorker2",
2462+
"responses": {
2463+
"200": {
2464+
"description": "A successful response.",
2465+
"schema": {
2466+
"$ref": "#/definitions/v1DescribeWorkerResponse"
2467+
}
2468+
},
2469+
"default": {
2470+
"description": "An unexpected error response.",
2471+
"schema": {
2472+
"$ref": "#/definitions/rpcStatus"
2473+
}
2474+
}
2475+
},
2476+
"parameters": [
2477+
{
2478+
"name": "namespace",
2479+
"description": "Namespace this worker belongs to.",
2480+
"in": "path",
2481+
"required": true,
2482+
"type": "string"
2483+
},
2484+
{
2485+
"name": "workerInstanceKey",
2486+
"description": "Worker instance key to describe.",
2487+
"in": "path",
2488+
"required": true,
2489+
"type": "string"
2490+
},
2491+
{
2492+
"name": "identity",
2493+
"description": "The identity of the client who initiated this request.",
2494+
"in": "query",
2495+
"required": false,
2496+
"type": "string"
2497+
}
2498+
],
2499+
"tags": [
2500+
"WorkflowService"
2501+
]
2502+
}
2503+
},
24582504
"/api/v1/namespaces/{namespace}/workflow-count": {
24592505
"get": {
24602506
"summary": "CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.",
@@ -6235,6 +6281,52 @@
62356281
]
62366282
}
62376283
},
6284+
"/namespaces/{namespace}/workers/{workerInstanceKey}": {
6285+
"get": {
6286+
"summary": "DescribeWorker returns information about the specified worker execution.",
6287+
"operationId": "DescribeWorker",
6288+
"responses": {
6289+
"200": {
6290+
"description": "A successful response.",
6291+
"schema": {
6292+
"$ref": "#/definitions/v1DescribeWorkerResponse"
6293+
}
6294+
},
6295+
"default": {
6296+
"description": "An unexpected error response.",
6297+
"schema": {
6298+
"$ref": "#/definitions/rpcStatus"
6299+
}
6300+
}
6301+
},
6302+
"parameters": [
6303+
{
6304+
"name": "namespace",
6305+
"description": "Namespace this worker belongs to.",
6306+
"in": "path",
6307+
"required": true,
6308+
"type": "string"
6309+
},
6310+
{
6311+
"name": "workerInstanceKey",
6312+
"description": "Worker instance key to describe.",
6313+
"in": "path",
6314+
"required": true,
6315+
"type": "string"
6316+
},
6317+
{
6318+
"name": "identity",
6319+
"description": "The identity of the client who initiated this request.",
6320+
"in": "query",
6321+
"required": false,
6322+
"type": "string"
6323+
}
6324+
],
6325+
"tags": [
6326+
"WorkflowService"
6327+
]
6328+
}
6329+
},
62386330
"/namespaces/{namespace}/workflow-count": {
62396331
"get": {
62406332
"summary": "CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.",

openapi/openapiv3.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,6 +2218,43 @@ paths:
22182218
application/json:
22192219
schema:
22202220
$ref: '#/components/schemas/Status'
2221+
/api/v1/namespaces/{namespace}/workers/{workerInstanceKey}:
2222+
get:
2223+
tags:
2224+
- WorkflowService
2225+
description: DescribeWorker returns information about the specified worker execution.
2226+
operationId: DescribeWorker
2227+
parameters:
2228+
- name: namespace
2229+
in: path
2230+
description: Namespace this worker belongs to.
2231+
required: true
2232+
schema:
2233+
type: string
2234+
- name: workerInstanceKey
2235+
in: path
2236+
description: Worker instance key to describe.
2237+
required: true
2238+
schema:
2239+
type: string
2240+
- name: identity
2241+
in: query
2242+
description: The identity of the client who initiated this request.
2243+
schema:
2244+
type: string
2245+
responses:
2246+
"200":
2247+
description: OK
2248+
content:
2249+
application/json:
2250+
schema:
2251+
$ref: '#/components/schemas/DescribeWorkerResponse'
2252+
default:
2253+
description: Default error response
2254+
content:
2255+
application/json:
2256+
schema:
2257+
$ref: '#/components/schemas/Status'
22212258
/api/v1/namespaces/{namespace}/workflow-count:
22222259
get:
22232260
tags:
@@ -5601,6 +5638,43 @@ paths:
56015638
application/json:
56025639
schema:
56035640
$ref: '#/components/schemas/Status'
5641+
/namespaces/{namespace}/workers/{workerInstanceKey}:
5642+
get:
5643+
tags:
5644+
- WorkflowService
5645+
description: DescribeWorker returns information about the specified worker execution.
5646+
operationId: DescribeWorker
5647+
parameters:
5648+
- name: namespace
5649+
in: path
5650+
description: Namespace this worker belongs to.
5651+
required: true
5652+
schema:
5653+
type: string
5654+
- name: workerInstanceKey
5655+
in: path
5656+
description: Worker instance key to describe.
5657+
required: true
5658+
schema:
5659+
type: string
5660+
- name: identity
5661+
in: query
5662+
description: The identity of the client who initiated this request.
5663+
schema:
5664+
type: string
5665+
responses:
5666+
"200":
5667+
description: OK
5668+
content:
5669+
application/json:
5670+
schema:
5671+
$ref: '#/components/schemas/DescribeWorkerResponse'
5672+
default:
5673+
description: Default error response
5674+
content:
5675+
application/json:
5676+
schema:
5677+
$ref: '#/components/schemas/Status'
56045678
/namespaces/{namespace}/workflow-count:
56055679
get:
56065680
tags:

temporal/api/worker/v1/message.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ option csharp_namespace = "Temporalio.Api.Worker.V1";
1111

1212
import "google/protobuf/duration.proto";
1313
import "google/protobuf/timestamp.proto";
14+
import "google/protobuf/field_mask.proto";
15+
1416
import "temporal/api/deployment/v1/message.proto";
1517
import "temporal/api/enums/v1/common.proto";
18+
import "temporal/api/sdk/v1/worker_config.proto";
1619

1720
message WorkerPollerInfo {
1821
// Number of polling RPCs that are currently in flight.
@@ -142,3 +145,21 @@ message PluginInfo {
142145
// The version of the plugin, may be empty.
143146
string version = 2;
144147
}
148+
149+
// Will be send to the worker as a payload of the FetchWorkerConfig command.
150+
message FetchWorkerConfigCommandPayload {
151+
// Worker identifier, should be unique for the namespace.
152+
string worker_instance_key = 1;
153+
}
154+
155+
// Will be send to the worker as a payload of the UpdateWorkerConfig command.
156+
message UpdateWorkerConfigCommandPayload {
157+
// Worker identifier, should be unique for the namespace.
158+
string worker_instance_key = 1;
159+
160+
// The new worker config to be applied.
161+
temporal.api.sdk.v1.WorkerConfig worker_config = 2;
162+
163+
// Controls which fields from `worker_config` will be applied
164+
google.protobuf.FieldMask update_mask = 3;
165+
}

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2550,4 +2550,5 @@ message DescribeWorkerRequest {
25502550

25512551
message DescribeWorkerResponse {
25522552
temporal.api.worker.v1.WorkerInfo worker_info = 1;
2553-
}
2553+
}
2554+

temporal/api/workflowservice/v1/service.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,13 +1236,23 @@ service WorkflowService {
12361236
};
12371237
}
12381238

1239+
<<<<<<< HEAD
12391240
// DescribeWorker returns information about the specified worker.
12401241
rpc DescribeWorker (DescribeWorkerRequest) returns (DescribeWorkerResponse) {
12411242
option (google.api.http) = {
12421243
get: "/namespaces/{namespace}/workers/describe/{worker_instance_key}"
12431244
additional_bindings {
12441245
get: "/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}"
1246+
=======
1247+
// DescribeWorker returns information about the specified worker execution.
1248+
rpc DescribeWorker (DescribeWorkerRequest) returns (DescribeWorkerResponse) {
1249+
option (google.api.http) = {
1250+
get: "/namespaces/{namespace}/workers/{worker_instance_key}"
1251+
additional_bindings {
1252+
get: "/api/v1/namespaces/{namespace}/workers/{worker_instance_key}"
1253+
>>>>>>> 0aaab48 (Add worker commands payloads)
12451254
}
12461255
};
12471256
}
12481257
}
1258+

0 commit comments

Comments
 (0)