Skip to content

Add request header annotation and resource-id fields#728

Open
tconley1428 wants to merge 6 commits intomasterfrom
request_header_support
Open

Add request header annotation and resource-id fields#728
tconley1428 wants to merge 6 commits intomasterfrom
request_header_support

Conversation

@tconley1428
Copy link
Contributor

@tconley1428 tconley1428 commented Mar 9, 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.

Adding a proto annotation to be used for automatically propagating message fields into headers. Will be accompanied by SDK changes to generate code for doing so based on the annotations. See temporalio/api-go#236 and temporalio/sdk-go#2226 for example.

Also adds additional resource-id fields to a number of messages for use in routing.

MCN support

Breaking changes

Server PR

tconley1428 and others added 4 commits March 10, 2026 11:10
Implements request header routing annotations and resource_id fields for:
- Workflow execution APIs (17 endpoints) - workflow:workflow_id
- Workflow task APIs (4 endpoints) - workflow:workflow_id
- Activity APIs (12 endpoints) - workflow:workflow_id or activity:activity_id
- Schedule APIs (6 endpoints) - schedule:schedule_id
- Batch operation APIs (3 endpoints) - batch:job_id
- Nexus task APIs (2 endpoints) - routingId:server_routing_id
- Task queue APIs (3 endpoints) - taskqueue:task_queue_name
- Worker APIs (4 endpoints) - worker:worker_grouping_key
- Worker deployment APIs (8 endpoints) - deployment:deployment_name

Added resource_id fields to request messages that use task tokens and
server_routing_id field to PollNexusTaskQueueResponse for proper routing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Corrected the field path from {workflow_execution.workflow_id} to
{update_ref.workflow_execution.workflow_id} since PollWorkflowExecutionUpdateRequest
uses update_ref field that contains the WorkflowExecution.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added resource_id fields to RecordWorkerHeartbeatRequest, FetchWorkerConfigRequest,
and UpdateWorkerConfigRequest for proper routing support. Updated annotations to
use {resource_id} instead of {worker_grouping_key} for consistency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Changed server_routing_id fields to resource_id in Nexus request/response
messages and updated annotations to use {resource_id} for consistency
with other APIs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@tconley1428 tconley1428 changed the title Add request header annotation Add request header annotation and resource-id fields Mar 11, 2026
Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Makes sense to me. I haven't meticulously checked that every path is valid.


import "google/protobuf/descriptor.proto";

// RequestHeaderAnnotation allows specifying that field values from a request
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// RequestHeaderAnnotation allows specifying that field values from a request
// Allows specifying that field values from a request

Go stuttering feels weird outside of Go (one of the variety of things I think is just silly in the language in general)

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.

3 participants