-
Notifications
You must be signed in to change notification settings - Fork 75
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
base: master
Are you sure you want to change the base?
Conversation
temporal/api/worker/v1/message.proto
Outdated
// Will be send to the worker as a payload of the UpdateWorkerConfig command. | ||
message UpdateWorkerConfigCommandPayload { | ||
// Worker identifier, should be unique for the namespace. | ||
repeated string worker_instance_key = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To confirm, you can only update worker config if the server knows about the worker. So if you say "update worker config for every worker on X process", if a specific worker on that process hasn't heartbeat, it doesn't get the update? I think this is probably ok, just want to confirm that is the expected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it doesn't get an update.
But that will be very weird situation - heartbeats are coming via the same nexus poll request...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All LGTM. Only wanting to wait for approval pending the server and ideally SDK use of this (basically can we have both just referencing this branch while they develop this new Nexus service?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree w/ Chad that let's not merge this until we have something working in branches w/ both your and Andrew's code
<!-- Describe what has changed in this PR --> **What changed?** Add DescribeWorker API. Extracted from [this PR](#622). <!-- Tell your future self why have you made these changes --> DescribeWorker - will be needed to get all the heartbeat information from the worker. Partially this can be covered by "ListWorkers" with query "WorkerInstanceKey = 'xxx'", but this is a dedicated API that doesn't require query processing. Extracting into separate PR so that one is concentrated on worker payload only. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** Introduce new API <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> [Server PR](temporalio/temporal#8094)
<!-- Describe what has changed in this PR --> **What changed?** Add DescribeWorker API. Extracted from [this PR](temporalio/api#622). <!-- Tell your future self why have you made these changes --> DescribeWorker - will be needed to get all the heartbeat information from the worker. Partially this can be covered by "ListWorkers" with query "WorkerInstanceKey = 'xxx'", but this is a dedicated API that doesn't require query processing. Extracting into separate PR so that one is concentrated on worker payload only. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** Introduce new API <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> [Server PR](temporalio/temporal#8094)
56400c8
to
a96cd01
Compare
## What changed? * Add implementation for DescribeWorker API (to both frontend and matching) * Add feature flag * Add all quotas/etc. * Add unit tests * Add functional tests ## Why? Part of worker commands work. Users should be able to directly get worker info for the worker they need. Corresponding API PR: temporalio/api#622 ## How did you test it? - [X] add unit tests - [X] add functional tests ## Potential risks None, behind feature flag
a96cd01
to
ee2bd59
Compare
// --) | ||
|
||
// Will be sent to the worker as a payload of the FetchWorkerConfig command. | ||
message FetchWorkerConfigRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it's a little confusing that these are named the exact same name as the request they're used for, could we differentiate them slightly? Maybe add in Command
, Payload
, or Nexus
into the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need "Request/Response" pair. "Command" is fine for "Request", but what about "Response"?
Or you mean we should name them
FetchWorkerConfigCommand[Request/Resonse]
? If so I'm fine with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or FetchWorkerConfig[Request|Response]Payload
? Which is exactly what it is
What changed?
Add payloads for worker commands:
FetchWorkerConfig
UpdateWorkerConfig
Also add DescribeWorker API.
Why?
payloads - we need to align with SDK on command payload schemas.
DescribeWorker - will be needed to get all the heartbeat information from the worker.
Partially this can be covered by "ListWorkers" with query "WorkerInstanceKey = 'xxx'", but this is a dedicated API that doesn't require query processing.
Breaking changes
Yes (new API)
Server PR