diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 69b673c81..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 { @@ -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; } message ShutdownWorkerResponse { @@ -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 { @@ -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 {