Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "This poller group ID identifies the owner of the workflow task."
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: This poller group ID identifies the owner of the workflow task.
PollerInfo:
type: object
properties:
Expand Down
14 changes: 14 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
// This poller group ID identifies the owner of the workflow task.
string poller_group_id = 17;
}

message RespondWorkflowTaskCompletedRequest {
Expand Down Expand Up @@ -1028,6 +1030,9 @@ 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;
Copy link
Member

@Sushisource Sushisource Mar 20, 2026

Choose a reason for hiding this comment

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

Everything should get a comment. Applies to other spot too.

In addition, the comments aren't particularly helpful. They should explain the semantics the SDK is expected to adhere to when setting/reading these fields.

}

message RespondQueryTaskCompletedResponse {
Expand Down Expand Up @@ -1892,6 +1897,9 @@ 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;
// 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;
}

message RespondNexusTaskCompletedRequest {
Expand All @@ -1902,6 +1910,9 @@ 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;
}

message RespondNexusTaskCompletedResponse {
Expand All @@ -1917,6 +1928,9 @@ 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;
}

message RespondNexusTaskFailedResponse {
Expand Down
15 changes: 14 additions & 1 deletion temporal/api/workflowservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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-resource-id"
value: "poller:{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
Expand Down Expand Up @@ -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-resource-id"
value: "poller:{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-resource-id"
value: "poller:{poller_group_id}"
};
}

// UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.
Expand Down
Loading