From caa054b917ec7a0ae238e6a65427e27d063b9124 Mon Sep 17 00:00:00 2001 From: yux0 Date: Wed, 18 Mar 2026 11:52:29 -0700 Subject: [PATCH 1/7] Add routing id for respondnexustask* operation --- temporal/api/nexus/v1/message.proto | 3 +++ temporal/api/workflowservice/v1/request_response.proto | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/temporal/api/nexus/v1/message.proto b/temporal/api/nexus/v1/message.proto index 552b75c26..215199793 100644 --- a/temporal/api/nexus/v1/message.proto +++ b/temporal/api/nexus/v1/message.proto @@ -76,6 +76,8 @@ message CancelOperationRequest { // Operation token as originally generated by a Handler. string operation_token = 4; + // The identity to route the request to the correct task owner. + string server_routing_id = 5; } // A Nexus request. @@ -122,6 +124,7 @@ message StartOperationResponse { string operation_id = 1 [deprecated = true]; repeated Link links = 2; string operation_token = 3; + string server_routing_id = 4; } oneof variant { diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 2d9dd7b83..453600af8 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1902,6 +1902,8 @@ message RespondNexusTaskCompletedRequest { bytes task_token = 3; // Embedded response to be translated into a frontend response. temporal.api.nexus.v1.Response response = 4; + // The identity to route the request to the correct task owner. + string server_routing_id = 5; } message RespondNexusTaskCompletedResponse { @@ -1917,6 +1919,8 @@ message RespondNexusTaskFailedRequest { temporal.api.nexus.v1.HandlerError error = 4 [deprecated = true]; // The error the handler failed with. Must contain a NexusHandlerFailureInfo object. temporal.api.failure.v1.Failure failure = 5; + // The identity to route the request to the correct task owner. + string server_routing_id = 6; } message RespondNexusTaskFailedResponse { From d00fa2ac5132e6cabf07f0dd459d87c880270be5 Mon Sep 17 00:00:00 2001 From: yux0 Date: Wed, 18 Mar 2026 18:16:30 -0700 Subject: [PATCH 2/7] update to poller-group-id --- temporal/api/nexus/v1/message.proto | 2 -- .../api/workflowservice/v1/request_response.proto | 7 +++---- temporal/api/workflowservice/v1/service.proto | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/temporal/api/nexus/v1/message.proto b/temporal/api/nexus/v1/message.proto index 215199793..2f2b57a4d 100644 --- a/temporal/api/nexus/v1/message.proto +++ b/temporal/api/nexus/v1/message.proto @@ -76,8 +76,6 @@ message CancelOperationRequest { // Operation token as originally generated by a Handler. string operation_token = 4; - // The identity to route the request to the correct task owner. - string server_routing_id = 5; } // A Nexus request. diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 453600af8..9f3718d95 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1028,6 +1028,7 @@ message RespondQueryTaskCompletedRequest { // Why did the task fail? It's important to note that many of the variants in this enum cannot // apply to worker responses. See the type's doc for more. temporal.api.enums.v1.WorkflowTaskFailedCause cause = 8; + string poller_group_id = 9; } message RespondQueryTaskCompletedResponse { @@ -1902,8 +1903,7 @@ message RespondNexusTaskCompletedRequest { bytes task_token = 3; // Embedded response to be translated into a frontend response. temporal.api.nexus.v1.Response response = 4; - // The identity to route the request to the correct task owner. - string server_routing_id = 5; + string poller_group_id = 5; } message RespondNexusTaskCompletedResponse { @@ -1919,8 +1919,7 @@ message RespondNexusTaskFailedRequest { temporal.api.nexus.v1.HandlerError error = 4 [deprecated = true]; // The error the handler failed with. Must contain a NexusHandlerFailureInfo object. temporal.api.failure.v1.Failure failure = 5; - // The identity to route the request to the correct task owner. - string server_routing_id = 6; + string poller_group_id = 6; } message RespondNexusTaskFailedResponse { diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index cbd71e2ba..d7a799e21 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -618,7 +618,12 @@ service WorkflowService { // // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) - rpc RespondQueryTaskCompleted (RespondQueryTaskCompletedRequest) returns (RespondQueryTaskCompletedResponse) {} + rpc RespondQueryTaskCompleted (RespondQueryTaskCompletedRequest) returns (RespondQueryTaskCompletedResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-poller-group-id" + value: "poller_group_id:{poller_group_id}" + }; + } // ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of // a given workflow. This is prudent for workers to perform if a workflow has been paged out of @@ -1246,12 +1251,20 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondNexusTaskCompleted(RespondNexusTaskCompletedRequest) returns (RespondNexusTaskCompletedResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-poller-group-id" + value: "poller_group_id:{poller_group_id}" + }; } // RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondNexusTaskFailed(RespondNexusTaskFailedRequest) returns (RespondNexusTaskFailedResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-poller-group-id" + value: "poller_group_id:{poller_group_id}" + }; } // UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. From 86bfcd4bab5bf69ee943db9dd8d326976cd957bc Mon Sep 17 00:00:00 2001 From: yux0 Date: Wed, 18 Mar 2026 18:27:27 -0700 Subject: [PATCH 3/7] add group id in poll*task --- openapi/openapiv2.json | 4 ++++ openapi/openapiv3.yaml | 3 +++ temporal/api/workflowservice/v1/request_response.proto | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ddbc48c61..2dd81a32d 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -14588,6 +14588,10 @@ "pollerScalingDecision": { "$ref": "#/definitions/v1PollerScalingDecision", "description": "Server-advised information the SDK may use to adjust its poller count." + }, + "pollerGroupId": { + "type": "string", + "description": "The identity of the poller group." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index cd503dccd..79b18466b 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11647,6 +11647,9 @@ components: allOf: - $ref: '#/components/schemas/PollerScalingDecision' description: Server-advised information the SDK may use to adjust its poller count. + pollerGroupId: + type: string + description: The identity of the poller group. PollerInfo: type: object properties: diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 9f3718d95..b73d50eb6 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -331,6 +331,8 @@ message PollWorkflowTaskQueueResponse { repeated temporal.api.protocol.v1.Message messages = 15; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 16; + // The identity of the poller group. + string poller_group_id = 17; } message RespondWorkflowTaskCompletedRequest { @@ -516,6 +518,8 @@ message PollActivityTaskQueueResponse { temporal.api.common.v1.Priority priority = 19; // The run ID of the activity execution, only set for standalone activities. string activity_run_id = 20; + // The identity of the poller group. + string poller_group_id = 21; } message RecordActivityTaskHeartbeatRequest { @@ -1893,6 +1897,8 @@ message PollNexusTaskQueueResponse { temporal.api.nexus.v1.Request request = 2; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3; + // The identity of the poller group. + string poller_group_id = 4; } message RespondNexusTaskCompletedRequest { From 1d62836ddf4aa565f6a22c28f25db9e6fe690600 Mon Sep 17 00:00:00 2001 From: yux0 Date: Thu, 19 Mar 2026 10:25:50 -0700 Subject: [PATCH 4/7] remove group id from poll apis --- openapi/openapiv2.json | 4 ---- openapi/openapiv3.yaml | 3 --- temporal/api/nexus/v1/message.proto | 1 - temporal/api/workflowservice/v1/request_response.proto | 6 ------ 4 files changed, 14 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 2dd81a32d..ddbc48c61 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -14588,10 +14588,6 @@ "pollerScalingDecision": { "$ref": "#/definitions/v1PollerScalingDecision", "description": "Server-advised information the SDK may use to adjust its poller count." - }, - "pollerGroupId": { - "type": "string", - "description": "The identity of the poller group." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 79b18466b..cd503dccd 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11647,9 +11647,6 @@ components: allOf: - $ref: '#/components/schemas/PollerScalingDecision' description: Server-advised information the SDK may use to adjust its poller count. - pollerGroupId: - type: string - description: The identity of the poller group. PollerInfo: type: object properties: diff --git a/temporal/api/nexus/v1/message.proto b/temporal/api/nexus/v1/message.proto index 2f2b57a4d..552b75c26 100644 --- a/temporal/api/nexus/v1/message.proto +++ b/temporal/api/nexus/v1/message.proto @@ -122,7 +122,6 @@ message StartOperationResponse { string operation_id = 1 [deprecated = true]; repeated Link links = 2; string operation_token = 3; - string server_routing_id = 4; } oneof variant { diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index b73d50eb6..9f3718d95 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -331,8 +331,6 @@ message PollWorkflowTaskQueueResponse { repeated temporal.api.protocol.v1.Message messages = 15; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 16; - // The identity of the poller group. - string poller_group_id = 17; } message RespondWorkflowTaskCompletedRequest { @@ -518,8 +516,6 @@ message PollActivityTaskQueueResponse { temporal.api.common.v1.Priority priority = 19; // The run ID of the activity execution, only set for standalone activities. string activity_run_id = 20; - // The identity of the poller group. - string poller_group_id = 21; } message RecordActivityTaskHeartbeatRequest { @@ -1897,8 +1893,6 @@ message PollNexusTaskQueueResponse { temporal.api.nexus.v1.Request request = 2; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3; - // The identity of the poller group. - string poller_group_id = 4; } message RespondNexusTaskCompletedRequest { From 7e2f2414b0b0353c8e504f547f444326300c5b82 Mon Sep 17 00:00:00 2001 From: yux0 Date: Thu, 19 Mar 2026 11:55:47 -0700 Subject: [PATCH 5/7] use resource id with prefix --- temporal/api/workflowservice/v1/service.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index d7a799e21..84214abdf 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -620,8 +620,8 @@ service WorkflowService { // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondQueryTaskCompleted (RespondQueryTaskCompletedRequest) returns (RespondQueryTaskCompletedResponse) { option (temporal.api.protometa.v1.request_header) = { - header: "temporal-poller-group-id" - value: "poller_group_id:{poller_group_id}" + header: "temporal-resource-id" + value: "poller:{poller_group_id}" }; } @@ -1252,8 +1252,8 @@ service WorkflowService { // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondNexusTaskCompleted(RespondNexusTaskCompletedRequest) returns (RespondNexusTaskCompletedResponse) { option (temporal.api.protometa.v1.request_header) = { - header: "temporal-poller-group-id" - value: "poller_group_id:{poller_group_id}" + header: "temporal-resource-id" + value: "poller:{poller_group_id}" }; } @@ -1262,8 +1262,8 @@ service WorkflowService { // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondNexusTaskFailed(RespondNexusTaskFailedRequest) returns (RespondNexusTaskFailedResponse) { option (temporal.api.protometa.v1.request_header) = { - header: "temporal-poller-group-id" - value: "poller_group_id:{poller_group_id}" + header: "temporal-resource-id" + value: "poller:{poller_group_id}" }; } From 3e95b11ffb2f969dcfc68f3b2982910c67da283c Mon Sep 17 00:00:00 2001 From: yux0 Date: Thu, 19 Mar 2026 17:02:42 -0700 Subject: [PATCH 6/7] add group id in poll workflow task and nexus task --- openapi/openapiv2.json | 4 ++++ openapi/openapiv3.yaml | 3 +++ temporal/api/workflowservice/v1/request_response.proto | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ddbc48c61..2dd81a32d 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -14588,6 +14588,10 @@ "pollerScalingDecision": { "$ref": "#/definitions/v1PollerScalingDecision", "description": "Server-advised information the SDK may use to adjust its poller count." + }, + "pollerGroupId": { + "type": "string", + "description": "The identity of the poller group." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index cd503dccd..79b18466b 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11647,6 +11647,9 @@ components: allOf: - $ref: '#/components/schemas/PollerScalingDecision' description: Server-advised information the SDK may use to adjust its poller count. + pollerGroupId: + type: string + description: The identity of the poller group. PollerInfo: type: object properties: diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 9f3718d95..f5e2dd707 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -331,6 +331,8 @@ message PollWorkflowTaskQueueResponse { repeated temporal.api.protocol.v1.Message messages = 15; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 16; + // The identity of the poller group. + string poller_group_id = 17; } message RespondWorkflowTaskCompletedRequest { @@ -1893,6 +1895,8 @@ message PollNexusTaskQueueResponse { temporal.api.nexus.v1.Request request = 2; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3; + // The identity of the poller group. + string poller_group_id = 4; } message RespondNexusTaskCompletedRequest { From a29b1bf526b7382222d08cfe8560671d2154dcc9 Mon Sep 17 00:00:00 2001 From: yux0 Date: Sun, 22 Mar 2026 21:25:14 -0700 Subject: [PATCH 7/7] add comment --- openapi/openapiv2.json | 2 +- openapi/openapiv3.yaml | 2 +- .../api/workflowservice/v1/request_response.proto | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 2dd81a32d..9490580bc 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -14591,7 +14591,7 @@ }, "pollerGroupId": { "type": "string", - "description": "The identity of the poller group." + "description": "This poller group ID identifies the owner of the workflow task." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 79b18466b..f9fc7d2fc 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -11649,7 +11649,7 @@ components: description: Server-advised information the SDK may use to adjust its poller count. pollerGroupId: type: string - description: The identity of the poller group. + description: This poller group ID identifies the owner of the workflow task. PollerInfo: type: object properties: diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index f5e2dd707..08c0a3dfa 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -331,7 +331,7 @@ message PollWorkflowTaskQueueResponse { repeated temporal.api.protocol.v1.Message messages = 15; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 16; - // The identity of the poller group. + // This poller group ID identifies the owner of the workflow task. string poller_group_id = 17; } @@ -1030,6 +1030,8 @@ message RespondQueryTaskCompletedRequest { // Why did the task fail? It's important to note that many of the variants in this enum cannot // apply to worker responses. See the type's doc for more. temporal.api.enums.v1.WorkflowTaskFailedCause cause = 8; + // This poller group ID identifies the owner of the query task. + // This Id should be set in the request header. string poller_group_id = 9; } @@ -1895,7 +1897,8 @@ message PollNexusTaskQueueResponse { temporal.api.nexus.v1.Request request = 2; // Server-advised information the SDK may use to adjust its poller count. temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3; - // The identity of the poller group. + // This poller group ID identifies the owner of the nexus task. + // This Id should be set in RespondNexusTaskCompletedRequest or RespondNexusTaskFailedRequest. string poller_group_id = 4; } @@ -1907,6 +1910,8 @@ message RespondNexusTaskCompletedRequest { bytes task_token = 3; // Embedded response to be translated into a frontend response. temporal.api.nexus.v1.Response response = 4; + // This poller group ID identifies the owner of the nexus task. + // This Id should be set in the request header. string poller_group_id = 5; } @@ -1923,6 +1928,8 @@ message RespondNexusTaskFailedRequest { temporal.api.nexus.v1.HandlerError error = 4 [deprecated = true]; // The error the handler failed with. Must contain a NexusHandlerFailureInfo object. temporal.api.failure.v1.Failure failure = 5; + // This poller group ID identifies the owner of the nexus task. + // This Id should be set in the request header. string poller_group_id = 6; }