-
Notifications
You must be signed in to change notification settings - Fork 78
Add worker commands payloads #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ychebotarev
wants to merge
8
commits into
master
Choose a base branch
from
y_worker_commands
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2b204bb
Add worker commands payloads
ychebotarev b27a82f
work on comments
ychebotarev 38b899c
move payloads to the separate file, add conventions
ychebotarev b08ef43
work on comments
ychebotarev 4e1d0cc
extract DescribeWorker API into separate PR
ychebotarev 1753fef
remove extra line
ychebotarev ee2bd59
regenerate openapi files
ychebotarev 7fa5cdf
rename request/response to be different from API commands
ychebotarev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
temporal/api/worker/v1/worker_nexus_service_commands.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package temporal.api.worker.v1; | ||
|
|
||
| option go_package = "go.temporal.io/api/worker/v1;worker"; | ||
| option java_package = "io.temporal.api.worker.v1"; | ||
| option java_multiple_files = true; | ||
| option java_outer_classname = "WorkerNexusServiceCommandsProto"; | ||
| option ruby_package = "Temporalio::Api::Worker::V1"; | ||
| option csharp_namespace = "Temporalio.Api.Worker.V1"; | ||
|
|
||
| import "google/protobuf/field_mask.proto"; | ||
| import "temporal/api/sdk/v1/worker_config.proto"; | ||
|
|
||
| // (-- | ||
| ///////////////////////////////////////////////////////////////////// | ||
| // This file contains: | ||
| // - Conventions between server and worker. | ||
| // - Definitions for commands and payloads for server-worker communication via Nexus | ||
| // | ||
| // WORKER COMMANDS CONVENTIONS: | ||
| // | ||
| // Worker commands are used to manage worker configurations, operations, etc. | ||
| // Command names should match names defined in the server API. | ||
| // Command names are provided in StartOperationRequest.Operation field. | ||
| // | ||
| // PAYLOAD CONVENTIONS: | ||
| // | ||
| // In/out payloads namings follow the same convention as the regular API: | ||
| // - CommandNameRequest (input payload) | ||
| // - CommandNameResponse (output payload). | ||
| // - Empty payload if response is not needed/not expected | ||
| // | ||
| // COMMUNICATION PROTOCOL: | ||
| // - Transport: Nexus tasks on task queue | ||
| // - Server identifier: "sys-worker-service" | ||
| // - Task queue: "temporal-sys/worker-tq/{namespace_name}/{process_key}" | ||
| // --) | ||
|
|
||
| // Will be sent to the worker as a payload of the FetchWorkerConfig command. | ||
| message FetchWorkerConfigRequestPayload { | ||
| // List of worker identifiers. For now only a single worker instance key is supported. | ||
| repeated string worker_instance_key = 1; | ||
| } | ||
|
|
||
| message WorkerConfigEntry { | ||
| // Worker instance key the config is for. | ||
| string worker_instance_key = 1; | ||
|
|
||
| temporal.api.sdk.v1.WorkerConfig worker_config = 2; | ||
| } | ||
|
|
||
| message FetchWorkerConfigResponsePayload { | ||
| repeated WorkerConfigEntry worker_configs = 1; | ||
| } | ||
|
|
||
| // Will be sent to the worker as a payload of the UpdateWorkerConfig command. | ||
| message UpdateWorkerConfigRequestPayload { | ||
| // List of worker identifiers. | ||
| repeated string worker_instance_key = 1; | ||
|
|
||
| // The new worker config to be applied. | ||
| temporal.api.sdk.v1.WorkerConfig worker_config = 2; | ||
|
|
||
| // Controls which fields from `worker_config` will be applied | ||
| google.protobuf.FieldMask update_mask = 3; | ||
| } | ||
|
|
||
| message UpdateWorkerConfigResponsePayload { | ||
| repeated WorkerConfigEntry worker_configs = 1; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.