From 64818c9879c2b6b47bd8f34db9461d4db2e834b6 Mon Sep 17 00:00:00 2001 From: jiechenz Date: Fri, 2 Oct 2026 09:43:56 -0700 Subject: [PATCH] Add resource id annotation for standalone Nexus operations Annotate the standalone Nexus operation RPCs (Start, Describe, Poll, RequestCancel, Terminate, Delete) with a temporal-resource-id request header of "nexus-operation:{operation_id}", and add the missing "activity:{activity_id}" annotation to DeleteActivityExecution so it matches the rest of the standalone activity RPCs. Co-Authored-By: Claude Opus 5.5 --- temporal/api/workflowservice/v1/service.proto | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 34f6a73f6..3999887a7 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1704,6 +1704,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "nexus-operation:{operation_id}" + }; } // DescribeActivityExecution returns information about an activity execution. @@ -1736,6 +1740,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "nexus-operation:{operation_id}" + }; } // PollActivityExecution long-polls for an activity execution to complete and returns the @@ -1762,6 +1770,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/poll" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "nexus-operation:{operation_id}" + }; } // ListActivityExecutions is a visibility API to list activity executions in a specific namespace. @@ -1839,6 +1851,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "nexus-operation:{operation_id}" + }; } // TerminateActivityExecution terminates an existing activity execution immediately. @@ -1867,7 +1883,12 @@ service WorkflowService { // // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) - rpc DeleteActivityExecution (DeleteActivityExecutionRequest) returns (DeleteActivityExecutionResponse) {} + rpc DeleteActivityExecution (DeleteActivityExecutionRequest) returns (DeleteActivityExecutionResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "activity:{activity_id}" + }; + } // PauseActivityExecution pauses the execution of an activity specified by its ID. // This API can be used to target a workflow activity or a standalone activity @@ -2017,6 +2038,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "nexus-operation:{operation_id}" + }; } // DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when @@ -2025,7 +2050,12 @@ service WorkflowService { // // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --) - rpc DeleteNexusOperationExecution (DeleteNexusOperationExecutionRequest) returns (DeleteNexusOperationExecutionResponse) {} + rpc DeleteNexusOperationExecution (DeleteNexusOperationExecutionRequest) returns (DeleteNexusOperationExecutionResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "nexus-operation:{operation_id}" + }; + } rpc PollWorkflowExecutionTimeSkipping (PollWorkflowExecutionTimeSkippingRequest) returns (PollWorkflowExecutionTimeSkippingResponse) { option (google.api.http) = {