diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ea5c6c69a..411449204 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -9183,6 +9183,10 @@ "selector": { "$ref": "#/definitions/v1WorkerSelector", "description": "Defines which workers should receive this command.\nonly single worker is supported at this time." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the worker grouping key." } } }, @@ -9296,6 +9300,10 @@ "identity": { "type": "string", "title": "The identity of the worker/client" + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." } } }, @@ -9313,6 +9321,10 @@ "identity": { "type": "string", "title": "The identity of the worker/client" + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." } } }, @@ -9329,6 +9341,10 @@ "type": "object", "$ref": "#/definitions/v1WorkerHeartbeat" } + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the worker grouping key." } } }, @@ -9498,6 +9514,10 @@ "type": "string", "title": "The identity of the worker/client" }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment_options` instead." @@ -9530,6 +9550,10 @@ "deploymentOptions": { "$ref": "#/definitions/v1WorkerDeploymentOptions", "description": "Worker deployment options that user has set in the worker." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." } } }, @@ -9549,6 +9573,10 @@ "type": "string", "title": "The identity of the worker/client" }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + }, "workerVersion": { "$ref": "#/definitions/v1WorkerVersionStamp", "description": "Version info of the worker who processed this task. This message's `build_id` field should\nalways be set by SDKs. Workers opting into versioning will also set the `use_versioning`\nfield to true. See message docstrings for more.\nDeprecated. Use `deployment_options` instead." @@ -9577,6 +9605,10 @@ "identity": { "type": "string", "title": "The identity of the worker/client" + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." } } }, @@ -9596,6 +9628,10 @@ "type": "string", "title": "The identity of the worker/client" }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + }, "lastHeartbeatDetails": { "$ref": "#/definitions/v1Payloads", "title": "Additional details to be stored as last activity heartbeat" @@ -9632,6 +9668,10 @@ "lastHeartbeatDetails": { "$ref": "#/definitions/v1Payloads", "title": "Additional details to be stored as last activity heartbeat" + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." } } }, @@ -10416,6 +10456,10 @@ "selector": { "$ref": "#/definitions/v1WorkerSelector", "description": "Defines which workers should receive this command." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the worker grouping key." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 4ccc94584..9e6d7662d 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9843,6 +9843,9 @@ components: description: |- Defines which workers should receive this command. only single worker is supported at this time. + resourceId: + type: string + description: Resource ID for routing. Contains the worker grouping key. FetchWorkerConfigResponse: type: object properties: @@ -11911,6 +11914,9 @@ components: identity: type: string description: The identity of the worker/client + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. RecordActivityTaskHeartbeatByIdResponse: type: object properties: @@ -11943,6 +11949,9 @@ components: description: The identity of the worker/client namespace: type: string + resourceId: + type: string + description: Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. RecordActivityTaskHeartbeatResponse: type: object properties: @@ -11972,6 +11981,9 @@ components: type: array items: $ref: '#/components/schemas/WorkerHeartbeat' + resourceId: + type: string + description: Resource ID for routing. Contains the worker grouping key. RecordWorkerHeartbeatResponse: type: object properties: {} @@ -12461,6 +12473,9 @@ components: allOf: - $ref: '#/components/schemas/WorkerDeploymentOptions' description: Worker deployment options that user has set in the worker. + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. RespondActivityTaskCanceledByIdResponse: type: object properties: {} @@ -12480,6 +12495,9 @@ components: description: The identity of the worker/client namespace: type: string + resourceId: + type: string + description: Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. workerVersion: allOf: - $ref: '#/components/schemas/WorkerVersionStamp' @@ -12526,6 +12544,9 @@ components: identity: type: string description: The identity of the worker/client + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. RespondActivityTaskCompletedByIdResponse: type: object properties: {} @@ -12545,6 +12566,9 @@ components: description: The identity of the worker/client namespace: type: string + resourceId: + type: string + description: Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. workerVersion: allOf: - $ref: '#/components/schemas/WorkerVersionStamp' @@ -12595,6 +12619,9 @@ components: allOf: - $ref: '#/components/schemas/Payloads' description: Additional details to be stored as last activity heartbeat + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. RespondActivityTaskFailedByIdResponse: type: object properties: @@ -12621,6 +12648,9 @@ components: description: The identity of the worker/client namespace: type: string + resourceId: + type: string + description: Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. lastHeartbeatDetails: allOf: - $ref: '#/components/schemas/Payloads' @@ -14833,6 +14863,9 @@ components: allOf: - $ref: '#/components/schemas/WorkerSelector' description: Defines which workers should receive this command. + resourceId: + type: string + description: Resource ID for routing. Contains the worker grouping key. UpdateWorkerConfigResponse: type: object properties: diff --git a/temporal/api/protometa/v1/annotations.proto b/temporal/api/protometa/v1/annotations.proto new file mode 100644 index 000000000..483ffd676 --- /dev/null +++ b/temporal/api/protometa/v1/annotations.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package temporal.api.protometa.v1; + +option go_package = "go.temporal.io/api/protometa/v1;protometa"; +option java_package = "io.temporal.api.protometa.v1"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option ruby_package = "Temporalio::Api::Protometa::V1"; +option csharp_namespace = "Temporalio.Api.Protometa.V1"; + +import "google/protobuf/descriptor.proto"; + +// RequestHeaderAnnotation allows specifying that field values from a request +// should be propagated as outbound headers. +// +// The value field supports template interpolation where field paths enclosed +// in braces will be replaced with the actual field values from the request. +// For example: +// value: "{workflow_execution.workflow_id}" +// value: "workflow-{workflow_execution.workflow_id}" +// value: "{namespace}/{workflow_execution.workflow_id}" +message RequestHeaderAnnotation { + // The name of the header to set (e.g., "temporal-resource-id") + string header = 1; + + // A template string that may contain field paths in braces. + // Field paths use dot notation to traverse nested messages. + // Example: "{workflow_execution.workflow_id}" + string value = 2; +} + +// Extension to add request-header annotations to RPC methods. +// Multiple headers can be set by repeating this option. +extend google.protobuf.MethodOptions { + repeated RequestHeaderAnnotation request_header = 7234001; +} \ No newline at end of file diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 651816e37..2d9dd7b83 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -357,6 +357,8 @@ message RespondWorkflowTaskCompletedRequest { // Responses to the `queries` field in the task being responded to map query_results = 8; string namespace = 9; + // Resource ID for routing. Contains the workflow ID from the original task. + string resource_id = 18; // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. @@ -418,6 +420,8 @@ message RespondWorkflowTaskFailedRequest { // Worker process' unique binary id string binary_checksum = 5 [deprecated = true]; string namespace = 6; + // Resource ID for routing. Contains the workflow ID from the original task. + string resource_id = 11; // Protocol messages piggybacking on a WFT as a transport repeated temporal.api.protocol.v1.Message messages = 7; // Version info of the worker who processed this task. This message's `build_id` field should @@ -522,6 +526,8 @@ message RecordActivityTaskHeartbeatRequest { // The identity of the worker/client string identity = 3; string namespace = 4; + // Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. + string resource_id = 5; } message RecordActivityTaskHeartbeatResponse { @@ -551,6 +557,8 @@ message RecordActivityTaskHeartbeatByIdRequest { temporal.api.common.v1.Payloads details = 5; // The identity of the worker/client string identity = 6; + // Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. + string resource_id = 7; } message RecordActivityTaskHeartbeatByIdResponse { @@ -574,6 +582,8 @@ message RespondActivityTaskCompletedRequest { // The identity of the worker/client string identity = 3; string namespace = 4; + // Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. + string resource_id = 8; // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. @@ -604,6 +614,8 @@ message RespondActivityTaskCompletedByIdRequest { temporal.api.common.v1.Payloads result = 5; // The identity of the worker/client string identity = 6; + // Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. + string resource_id = 7; } message RespondActivityTaskCompletedByIdResponse { @@ -617,6 +629,8 @@ message RespondActivityTaskFailedRequest { // The identity of the worker/client string identity = 3; string namespace = 4; + // Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. + string resource_id = 9; // Additional details to be stored as last activity heartbeat temporal.api.common.v1.Payloads last_heartbeat_details = 5; // Version info of the worker who processed this task. This message's `build_id` field should @@ -654,6 +668,8 @@ message RespondActivityTaskFailedByIdRequest { string identity = 6; // Additional details to be stored as last activity heartbeat temporal.api.common.v1.Payloads last_heartbeat_details = 7; + // Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. + string resource_id = 8; } message RespondActivityTaskFailedByIdResponse { @@ -670,6 +686,8 @@ message RespondActivityTaskCanceledRequest { // The identity of the worker/client string identity = 3; string namespace = 4; + // Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. + string resource_id = 8; // Version info of the worker who processed this task. This message's `build_id` field should // always be set by SDKs. Workers opting into versioning will also set the `use_versioning` // field to true. See message docstrings for more. @@ -702,6 +720,8 @@ message RespondActivityTaskCanceledByIdRequest { string identity = 6; // Worker deployment options that user has set in the worker. temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 7; + // Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. + string resource_id = 8; } message RespondActivityTaskCanceledByIdResponse { @@ -1915,6 +1935,9 @@ message ExecuteMultiOperationRequest { // Note that additional operation-specific restrictions have to be considered. repeated Operation operations = 2; + // Resource ID for routing. Should match operations[0].start_workflow.workflow_id + string resource_id = 3; + message Operation { oneof operation { // Additional restrictions: @@ -2549,6 +2572,9 @@ message RecordWorkerHeartbeatRequest { string identity = 2; repeated temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 3; + + // Resource ID for routing. Contains the worker grouping key. + string resource_id = 4; } message RecordWorkerHeartbeatResponse { @@ -2635,6 +2661,8 @@ message FetchWorkerConfigRequest { // Defines which workers should receive this command. // only single worker is supported at this time. temporal.api.common.v1.WorkerSelector selector = 6; + // Resource ID for routing. Contains the worker grouping key. + string resource_id = 7; } message FetchWorkerConfigResponse { @@ -2661,6 +2689,8 @@ message UpdateWorkerConfigRequest { // Defines which workers should receive this command. temporal.api.common.v1.WorkerSelector selector = 6; + // Resource ID for routing. Contains the worker grouping key. + string resource_id = 7; } message UpdateWorkerConfigResponse { diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index c67a2717b..cbd71e2ba 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -12,6 +12,7 @@ option csharp_namespace = "Temporalio.Api.WorkflowService.V1"; import "temporal/api/workflowservice/v1/request_response.proto"; import "google/api/annotations.proto"; +import "temporal/api/protometa/v1/annotations.proto"; // WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server // to create and interact with workflows and activities. @@ -101,6 +102,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_id}" + }; } // ExecuteMultiOperation executes multiple operations within a single workflow. @@ -114,6 +119,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: To be exposed over HTTP in the future. --) rpc ExecuteMultiOperation (ExecuteMultiOperationRequest) returns (ExecuteMultiOperationResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{resource_id}" + }; } // GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with @@ -125,6 +134,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse @@ -137,6 +150,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // PollWorkflowTaskQueue is called by workers to make progress on workflows. @@ -161,6 +178,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondWorkflowTaskCompleted (RespondWorkflowTaskCompletedRequest) returns (RespondWorkflowTaskCompletedResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{resource_id}" + }; } // RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task @@ -176,6 +197,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc RespondWorkflowTaskFailed (RespondWorkflowTaskFailedRequest) returns (RespondWorkflowTaskFailedResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{resource_id}" + }; } // PollActivityTaskQueue is called by workers to process activity tasks from a specific task @@ -218,6 +243,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by @@ -245,6 +274,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // RespondActivityTaskCompleted is called by workers when they successfully complete an activity @@ -262,6 +295,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // See `RespondActivityTaskCompleted`. This version allows clients to record completions by @@ -289,6 +326,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // RespondActivityTaskFailed is called by workers when processing an activity task fails. @@ -305,6 +346,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // See `RecordActivityTaskFailed`. This version allows clients to record failures by @@ -332,6 +377,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // RespondActivityTaskFailed is called by workers when processing an activity task fails. @@ -348,6 +397,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // See `RespondActivityTaskCanceled`. This version allows clients to record failures by @@ -375,6 +428,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; } // RequestCancelWorkflowExecution is called by workers when they want to request cancellation of @@ -392,6 +449,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; } // SignalWorkflowExecution is used to send a signal to a running workflow execution. @@ -407,6 +468,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; } // SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if @@ -430,6 +495,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_id}" + }; } // ResetWorkflowExecution will reset an existing workflow execution to a specified @@ -446,6 +515,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; } // TerminateWorkflowExecution terminates an existing workflow execution by recording a @@ -460,6 +533,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; } // DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when @@ -469,7 +546,12 @@ service WorkflowService { // // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) - rpc DeleteWorkflowExecution (DeleteWorkflowExecutionRequest) returns (DeleteWorkflowExecutionResponse) {} + rpc DeleteWorkflowExecution (DeleteWorkflowExecutionRequest) returns (DeleteWorkflowExecutionResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; + } // ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace. // @@ -553,6 +635,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc ResetStickyTaskQueue (ResetStickyTaskQueueRequest) returns (ResetStickyTaskQueueResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // ShutdownWorker is used to indicate that the given sticky task @@ -581,6 +667,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // DescribeWorkflowExecution returns information about the specified workflow execution. @@ -591,6 +681,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: @@ -604,6 +698,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue.name}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "taskqueue:{task_queue.name}" + }; } // GetClusterInfo returns information about temporal cluster @@ -629,6 +727,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) rpc ListTaskQueuePartitions(ListTaskQueuePartitionsRequest) returns (ListTaskQueuePartitionsResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "taskqueue:{task_queue.name}" + }; } // Creates a new schedule. @@ -641,6 +743,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "schedule:{schedule_id}" + }; } // Returns the schedule description and current state of an existing schedule. @@ -651,6 +757,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "schedule:{schedule_id}" + }; } // Changes the configuration or state of an existing schedule. @@ -663,6 +773,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "schedule:{schedule_id}" + }; } // Makes a specific change to a schedule or triggers an immediate action. @@ -675,6 +789,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "schedule:{schedule_id}" + }; } // Lists matching times within a range. @@ -685,6 +803,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "schedule:{schedule_id}" + }; } // Deletes a schedule, removing it from the system. @@ -695,6 +817,10 @@ service WorkflowService { delete: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "schedule:{schedule_id}" + }; } // List all schedules in a namespace. @@ -828,6 +954,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_version.deployment_name}" + }; } // Lists worker deployments in the namespace. Optionally can filter based on deployment series @@ -899,6 +1029,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_name}" + }; } // Describes a Worker Deployment. @@ -910,6 +1044,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_name}" + }; } // Deletes records of (an old) Deployment. A deployment can only be deleted if @@ -922,6 +1060,10 @@ service WorkflowService { delete: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_name}" + }; } @@ -939,6 +1081,10 @@ service WorkflowService { delete: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_version.deployment_name}" + }; } // Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for @@ -953,6 +1099,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_name}" + }; } // Lists all Worker Deployments that are tracked in the Namespace. @@ -977,6 +1127,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_version.deployment_name}" + }; } // Set/unset the ManagerIdentity of a Worker Deployment. @@ -990,6 +1144,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "deployment:{deployment_name}" + }; } // Invokes the specified Update function on user Workflow code. @@ -1002,6 +1160,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; } // Polls a Workflow Execution for the outcome of a Workflow Update @@ -1012,6 +1174,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) rpc PollWorkflowExecutionUpdate(PollWorkflowExecutionUpdateRequest) returns (PollWorkflowExecutionUpdateResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{update_ref.workflow_execution.workflow_id}" + }; } // StartBatchOperation starts a new batch operation @@ -1024,6 +1190,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "batch:{job_id}" + }; } // StopBatchOperation stops a batch operation @@ -1036,6 +1206,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "batch:{job_id}" + }; } // DescribeBatchOperation returns the information about a batch operation @@ -1046,6 +1220,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "batch:{job_id}" + }; } // ListBatchOperations returns a list of batch operations @@ -1089,6 +1267,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution. @@ -1101,6 +1283,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_execution.workflow_id}" + }; } // PauseActivity pauses the execution of an activity specified by its ID or type. @@ -1130,6 +1316,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // UnpauseActivity unpauses the execution of an activity specified by its ID or type. @@ -1156,6 +1346,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // ResetActivity resets the execution of an activity specified by its ID or type. @@ -1186,6 +1380,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // Create a new workflow rule. The rules are used to control the workflow execution. @@ -1260,6 +1458,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "worker:{resource_id}" + }; }; // ListWorkers is a visibility API to list worker status information in a specific namespace. @@ -1285,6 +1487,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "taskqueue:{task_queue}" + }; } // FetchWorkerConfig returns the worker configuration for a specific worker. @@ -1297,6 +1503,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "worker:{resource_id}" + }; } // UpdateWorkerConfig updates the worker configuration of one or more workers. @@ -1311,6 +1521,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "worker:{resource_id}" + }; } // DescribeWorker returns information about the specified worker. @@ -1321,6 +1535,10 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "worker:{worker_instance_key}" + }; } // Note: This is an experimental API and the behavior may change in a future release. @@ -1340,6 +1558,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_id}" + }; } // Note: This is an experimental API and the behavior may change in a future release. @@ -1356,6 +1578,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{workflow_id}" + }; } // StartActivityExecution starts a new activity execution.