From 526c9a2b570d1eb4cfbbb23ca07f638be7bf8060 Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Tue, 9 Dec 2025 10:58:20 -0500 Subject: [PATCH 1/3] add comments --- temporal/api/workflowservice/v1/request_response.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 69b673c81..a8d8ac9d8 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -999,10 +999,15 @@ 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; + // WorkerHeartbeat contains a list of Worker Instance Keys for all workers + // that are shutting down. temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 5; } From eb9b3215b2c50d89ffcf04dc327d321ec1e1da39 Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Wed, 10 Dec 2025 12:45:47 -0500 Subject: [PATCH 2/3] Add new worker_instance_key field --- temporal/api/workflowservice/v1/request_response.proto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index a8d8ac9d8..ae29d8554 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1005,10 +1005,11 @@ message ShutdownWorkerRequest { string sticky_task_queue = 2; string identity = 3; string reason = 4; - - // WorkerHeartbeat contains a list of Worker Instance Keys for all workers - // that are shutting down. 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; } message ShutdownWorkerResponse { From b6c0b5352453e65fc7d12ea242e1109a37e9d035 Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Thu, 22 Jan 2026 11:38:39 -0800 Subject: [PATCH 3/3] add worker_instance_key fields to poll calls --- temporal/api/workflowservice/v1/request_response.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index ae29d8554..aba42496d 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -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 { @@ -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 { @@ -1767,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 { @@ -1805,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 {