Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ message PollWorkflowTaskQueueRequest {
// Worker deployment options that user has set in the worker.
// Experimental. Worker Deployments are experimental and might significantly change in the future.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6;
// A unique key for this worker instance, used for tracking worker lifecycle.
string worker_instance_key = 7;
}

message PollWorkflowTaskQueueResponse {
Expand Down Expand Up @@ -440,6 +442,8 @@ message PollActivityTaskQueueRequest {
temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5 [deprecated = true];
// Worker deployment options that user has set in the worker.
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6;
// A unique key for this worker instance, used for tracking worker lifecycle.
string worker_instance_key = 7;
}

message PollActivityTaskQueueResponse {
Expand Down Expand Up @@ -999,11 +1003,17 @@ message ResetStickyTaskQueueResponse {

message ShutdownWorkerRequest {
string namespace = 1;
// sticky_task_queue may not always be populated. We want to ensure all workers
// send a shutdown request to update worker state for heartbeating, as well
// as cancel pending poll calls early, instead of waiting for timeouts.
string sticky_task_queue = 2;
string identity = 3;
string reason = 4;

temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 5;
// Technically this is also sent in the WorkerHeartbeat, but
// since worker heartbeating can be turned off, this needs
// to be a separate, top-level field.
string worker_instance_key = 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're here, can you go ahead and add this to every task poll call (and get server approval to do so)? Even if server doesn't do anything with it today, I suspect it's harmless to get into SDKs as soon as we can.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

}

message ShutdownWorkerResponse {
Expand Down Expand Up @@ -1761,6 +1771,8 @@ message PollWorkflowExecutionUpdateRequest {
// Specifies client's intent to wait for Update results.
// Omit to request a non-blocking poll.
temporal.api.update.v1.WaitPolicy wait_policy = 4;
// A unique key for this worker instance, used for tracking worker lifecycle.
string worker_instance_key = 8;
}

message PollWorkflowExecutionUpdateResponse {
Expand Down Expand Up @@ -1799,6 +1811,8 @@ message PollNexusTaskQueueRequest {

// Worker info to be sent to the server.
repeated temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 7;
// A unique key for this worker instance, used for tracking worker lifecycle.
string worker_instance_key = 8;
}

message PollNexusTaskQueueResponse {
Expand Down
Loading