Skip to content

Add group id for respond*task* operation and poll task response#735

Open
yux0 wants to merge 7 commits intotemporalio:masterfrom
yux0:yx/routing-id-nexus
Open

Add group id for respond*task* operation and poll task response#735
yux0 wants to merge 7 commits intotemporalio:masterfrom
yux0:yx/routing-id-nexus

Conversation

@yux0
Copy link
Contributor

@yux0 yux0 commented Mar 18, 2026

READ BEFORE MERGING: All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted.

What changed?
Add group id for respondtask operation and poll task response

Why?
We need a way to route request to the correct owner of the nexus task.

@yux0 yux0 requested review from a team as code owners March 18, 2026 18:58
@yux0
Copy link
Contributor Author

yux0 commented Mar 18, 2026

I don't see those APIs are in open api files. I am not sure if I missed them. I can borrow a second pair of eyes on this.

@yux0 yux0 requested review from bergundy and tconley1428 March 18, 2026 18:59
@yux0 yux0 changed the title Add routing id for respondnexustask* operation Add group id for respond*task* operation Mar 19, 2026
@yux0 yux0 changed the title Add group id for respond*task* operation Add group id for respond*task* operation and poll task response Mar 19, 2026
// 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"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we still want it to propagate to the temporal-resource-id header, right @ShahabT ?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I don't think we need resource id anymore.

// 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;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think PollActivityTaskQueueResponse needs this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed from Poll*TaskQueueResponse.

// 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;
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants