From 88d203985cbf12baa06ceb41bc872070c130b170 Mon Sep 17 00:00:00 2001 From: jmaeagle99 <44687433+jmaeagle99@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:21:52 -0700 Subject: [PATCH 1/2] Update api_upstream to v1.62.11 --- .../.github/PULL_REQUEST_TEMPLATE.md | 2 - .../workflows/trigger-api-go-update.yml | 2 +- crates/common/protos/api_upstream/.gitignore | 4 +- .../temporal-proto-models-nexusrpc.yaml | 32 + .../api_upstream/openapi/openapiv2.json | 3756 +++++++++++++---- .../api_upstream/openapi/openapiv3.yaml | 2387 ++++++++++- .../temporal/api/activity/v1/message.proto | 24 + .../temporal/api/callback/v1/message.proto | 37 + .../temporal/api/command/v1/message.proto | 9 +- .../temporal/api/common/v1/message.proto | 36 + .../temporal/api/compute/v1/config.proto | 68 + .../temporal/api/compute/v1/provider.proto | 35 + .../temporal/api/compute/v1/scaler.proto | 28 + .../temporal/api/deployment/v1/message.proto | 57 +- .../temporal/api/enums/v1/deployment.proto | 6 +- .../temporal/api/enums/v1/event_type.proto | 2 + .../temporal/api/enums/v1/nexus.proto | 60 + .../temporal/api/enums/v1/task_queue.proto | 5 + .../temporal/api/enums/v1/workflow.proto | 24 +- .../api/errordetails/v1/message.proto | 8 + .../temporal/api/failure/v1/message.proto | 4 + .../temporal/api/history/v1/message.proto | 55 +- .../temporal/api/nexus/v1/message.proto | 151 +- .../workerservice/v1/request_response.proto | 27 + .../api/sdk/v1/external_storage.proto | 20 + .../temporal/api/taskqueue/v1/message.proto | 6 +- .../temporal/api/worker/v1/message.proto | 24 + .../temporal/api/workflow/v1/message.proto | 64 +- .../workflowservice/v1/request_response.proto | 443 +- .../api/workflowservice/v1/service.proto | 214 +- 30 files changed, 6560 insertions(+), 1030 deletions(-) create mode 100644 crates/common/protos/api_upstream/nexus-rpc/temporal-proto-models-nexusrpc.yaml create mode 100644 crates/common/protos/api_upstream/temporal/api/callback/v1/message.proto create mode 100644 crates/common/protos/api_upstream/temporal/api/compute/v1/config.proto create mode 100644 crates/common/protos/api_upstream/temporal/api/compute/v1/provider.proto create mode 100644 crates/common/protos/api_upstream/temporal/api/compute/v1/scaler.proto create mode 100644 crates/common/protos/api_upstream/temporal/api/nexusservices/workerservice/v1/request_response.proto create mode 100644 crates/common/protos/api_upstream/temporal/api/sdk/v1/external_storage.proto diff --git a/crates/common/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md b/crates/common/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md index 5d6bf3cab..c26236805 100644 --- a/crates/common/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +++ b/crates/common/protos/api_upstream/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,3 @@ -_**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?** diff --git a/crates/common/protos/api_upstream/.github/workflows/trigger-api-go-update.yml b/crates/common/protos/api_upstream/.github/workflows/trigger-api-go-update.yml index e5424cd54..7a23b3c73 100644 --- a/crates/common/protos/api_upstream/.github/workflows/trigger-api-go-update.yml +++ b/crates/common/protos/api_upstream/.github/workflows/trigger-api-go-update.yml @@ -56,7 +56,7 @@ jobs: esac gh workflow run update-proto.yml -R https://github.com/temporalio/api-go \ - -r master \ + -r "${BRANCH}" \ -f branch="${BRANCH}" \ -f commit_author="${COMMIT_AUTHOR}" \ -f commit_author_email="${COMMIT_AUTHOR_EMAIL}" \ diff --git a/crates/common/protos/api_upstream/.gitignore b/crates/common/protos/api_upstream/.gitignore index 8655883e5..efbf7b661 100644 --- a/crates/common/protos/api_upstream/.gitignore +++ b/crates/common/protos/api_upstream/.gitignore @@ -2,4 +2,6 @@ /.gen /.vscode /.stamp -*~ \ No newline at end of file +*~ +*.swp +*.swo diff --git a/crates/common/protos/api_upstream/nexus-rpc/temporal-proto-models-nexusrpc.yaml b/crates/common/protos/api_upstream/nexus-rpc/temporal-proto-models-nexusrpc.yaml new file mode 100644 index 000000000..cb49cb118 --- /dev/null +++ b/crates/common/protos/api_upstream/nexus-rpc/temporal-proto-models-nexusrpc.yaml @@ -0,0 +1,32 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nexus-rpc/nexus-rpc-gen/main/schemas/nexus-rpc-gen.json +# +# Nexus service definition for server-to-worker communication. +# See request_response.proto for message definitions. +# +# Task queue format: /temporal-sys/worker-commands/{namespace}/{worker_grouping_key} + +nexusrpc: 1.0.0 + +services: + temporal.api.nexusservices.workerservice.v1.WorkerService: + description: > + Internal Nexus service for server-to-worker communication. + Used by the Temporal server to send commands to workers. + operations: + ExecuteCommands: + description: Executes worker commands sent by the server. + input: + $goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsRequest" + $javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsRequest" + $pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsRequest" + $typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsRequest" + $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsRequest" + $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsRequest" + output: + $goRef: "go.temporal.io/api/nexusservices/workerservice/v1.ExecuteCommandsResponse" + $javaRef: "io.temporal.api.nexusservices.workerservice.v1.ExecuteCommandsResponse" + $pythonRef: "temporalio.api.nexusservices.workerservice.v1.ExecuteCommandsResponse" + $typescriptRef: "@temporalio/api/nexusservices/workerservice/v1.ExecuteCommandsResponse" + $dotnetRef: "Temporalio.Api.Nexusservices.Workerservice.V1.ExecuteCommandsResponse" + $rubyRef: "Temporalio::Api::Nexusservices::Workerservice::V1::ExecuteCommandsResponse" + diff --git a/crates/common/protos/api_upstream/openapi/openapiv2.json b/crates/common/protos/api_upstream/openapi/openapiv2.json index ebcbea209..6544ba8a4 100644 --- a/crates/common/protos/api_upstream/openapi/openapiv2.json +++ b/crates/common/protos/api_upstream/openapi/openapiv2.json @@ -1462,15 +1462,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/schedule-count": { + "/api/v1/namespaces/{namespace}/nexus-operation-count": { "get": { - "summary": "CountSchedules is a visibility API to count schedules in a specific namespace.", - "operationId": "CountSchedules2", + "summary": "CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.", + "operationId": "CountNexusOperationExecutions2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CountSchedulesResponse" + "$ref": "#/definitions/v1CountNexusOperationExecutionsResponse" } }, "default": { @@ -1489,7 +1489,7 @@ }, { "name": "query", - "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.\nSee also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations.", "in": "query", "required": false, "type": "string" @@ -1500,15 +1500,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/schedules": { + "/api/v1/namespaces/{namespace}/nexus-operations": { "get": { - "summary": "List all schedules in a namespace.", - "operationId": "ListSchedules2", + "summary": "ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace.", + "operationId": "ListNexusOperationExecutions2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListSchedulesResponse" + "$ref": "#/definitions/v1ListNexusOperationExecutionsResponse" } }, "default": { @@ -1521,14 +1521,13 @@ "parameters": [ { "name": "namespace", - "description": "The namespace to list schedules in.", "in": "path", "required": true, "type": "string" }, { - "name": "maximumPageSize", - "description": "How many to return at once.", + "name": "pageSize", + "description": "Max number of operations to return per page.", "in": "query", "required": false, "type": "integer", @@ -1536,7 +1535,7 @@ }, { "name": "nextPageToken", - "description": "Token to get the next page of results.", + "description": "Token returned in ListNexusOperationExecutionsResponse.", "in": "query", "required": false, "type": "string", @@ -1544,7 +1543,7 @@ }, { "name": "query", - "description": "Query to filter schedules.", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.\nSearch attributes that are avaialble for Nexus operations include:\n- OperationId\n- RunId\n- Endpoint\n- Service\n- Operation\n- RequestId\n- StartTime\n- ExecutionTime\n- CloseTime\n- ExecutionStatus\n- ExecutionDuration\n- StateTransitionCount", "in": "query", "required": false, "type": "string" @@ -1555,15 +1554,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/schedules/{scheduleId}": { + "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}": { "get": { - "summary": "Returns the schedule description and current state of an existing schedule.", - "operationId": "DescribeSchedule2", + "summary": "DescribeNexusOperationExecution returns information about a Nexus operation.\nSupported use cases include:\n- Get current operation info without waiting\n- Long-poll for next state change and return new operation info\nResponse can optionally include operation input or outcome (if the operation has completed).", + "operationId": "DescribeNexusOperationExecution2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DescribeScheduleResponse" + "$ref": "#/definitions/v1DescribeNexusOperationExecutionResponse" } }, "default": { @@ -1576,31 +1575,59 @@ "parameters": [ { "name": "namespace", - "description": "The namespace of the schedule to describe.", "in": "path", "required": true, "type": "string" }, { - "name": "scheduleId", - "description": "The id of the schedule to describe.", + "name": "operationId", "in": "path", "required": true, "type": "string" + }, + { + "name": "runId", + "description": "Operation run ID. If empty the request targets the latest run.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeInput", + "description": "Include the input field in the response.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includeOutcome", + "description": "Include the outcome (result/failure) in the response if the operation has completed.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "longPollToken", + "description": "Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation\nstate changes from the state encoded in this token. If absent, return current state immediately.\nIf present, run_id must also be present.\nNote that operation state may change multiple times between requests, therefore it is not\nguaranteed that a client making a sequence of long-poll requests will see a complete\nsequence of state changes.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" } ], "tags": [ "WorkflowService" ] }, - "delete": { - "summary": "Deletes a schedule, removing it from the system.", - "operationId": "DeleteSchedule2", + "post": { + "summary": "StartNexusOperationExecution starts a new Nexus operation.", + "description": "Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this\nnamespace unless permitted by the specified ID conflict policy.", + "operationId": "StartNexusOperationExecution2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeleteScheduleResponse" + "$ref": "#/definitions/v1StartNexusOperationExecutionResponse" } }, "default": { @@ -1613,38 +1640,41 @@ "parameters": [ { "name": "namespace", - "description": "The namespace of the schedule to delete.", "in": "path", "required": true, "type": "string" }, { - "name": "scheduleId", - "description": "The id of the schedule to delete.", + "name": "operationId", + "description": "Identifier for this operation. This is a caller-side ID, distinct from any internal\noperation identifiers generated by the handler. Must be unique among operations in the\nsame namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy.", "in": "path", "required": true, "type": "string" }, { - "name": "identity", - "description": "The identity of the client who initiated this request.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceStartNexusOperationExecutionBody" + } } ], "tags": [ "WorkflowService" ] - }, + } + }, + "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/cancel": { "post": { - "summary": "Creates a new schedule.", - "operationId": "CreateSchedule2", + "summary": "RequestCancelNexusOperationExecution requests cancellation of a Nexus operation.", + "description": "Requesting to cancel an operation does not automatically transition the operation to canceled status.\nThe operation will only transition to canceled status if it supports cancellation and the handler\nprocesses the cancellation request.", + "operationId": "RequestCancelNexusOperationExecution2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateScheduleResponse" + "$ref": "#/definitions/v1RequestCancelNexusOperationExecutionResponse" } }, "default": { @@ -1657,14 +1687,12 @@ "parameters": [ { "name": "namespace", - "description": "The namespace the schedule should be created in.", "in": "path", "required": true, "type": "string" }, { - "name": "scheduleId", - "description": "The id of the new schedule.", + "name": "operationId", "in": "path", "required": true, "type": "string" @@ -1674,7 +1702,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceCreateScheduleBody" + "$ref": "#/definitions/WorkflowServiceRequestCancelNexusOperationExecutionBody" } } ], @@ -1683,15 +1711,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/matching-times": { + "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/poll": { "get": { - "summary": "Lists matching times within a range.", - "operationId": "ListScheduleMatchingTimes2", + "summary": "PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns\nthe outcome (result or failure).", + "operationId": "PollNexusOperationExecution2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListScheduleMatchingTimesResponse" + "$ref": "#/definitions/v1PollNexusOperationExecutionResponse" } }, "default": { @@ -1704,32 +1732,35 @@ "parameters": [ { "name": "namespace", - "description": "The namespace of the schedule to query.", "in": "path", "required": true, "type": "string" }, { - "name": "scheduleId", - "description": "The id of the schedule to query.", + "name": "operationId", "in": "path", "required": true, "type": "string" }, { - "name": "startTime", - "description": "Time range to query.", + "name": "runId", + "description": "Operation run ID. If empty the request targets the latest run.", "in": "query", "required": false, - "type": "string", - "format": "date-time" + "type": "string" }, { - "name": "endTime", + "name": "waitStage", + "description": "Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked.\n\n - NEXUS_OPERATION_WAIT_STAGE_STARTED: Wait for the operation to be started.\n - NEXUS_OPERATION_WAIT_STAGE_CLOSED: Wait for the operation to be in a terminal state, either successful or unsuccessful.", "in": "query", "required": false, "type": "string", - "format": "date-time" + "enum": [ + "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED", + "NEXUS_OPERATION_WAIT_STAGE_STARTED", + "NEXUS_OPERATION_WAIT_STAGE_CLOSED" + ], + "default": "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED" } ], "tags": [ @@ -1737,15 +1768,16 @@ ] } }, - "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/patch": { + "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/terminate": { "post": { - "summary": "Makes a specific change to a schedule or triggers an immediate action.", - "operationId": "PatchSchedule2", + "summary": "TerminateNexusOperationExecution terminates an existing Nexus operation immediately.", + "description": "Termination happens immediately and the operation handler cannot react to it. A terminated operation will have\nits outcome set to a failure with a termination reason.", + "operationId": "TerminateNexusOperationExecution2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PatchScheduleResponse" + "$ref": "#/definitions/v1TerminateNexusOperationExecutionResponse" } }, "default": { @@ -1758,14 +1790,12 @@ "parameters": [ { "name": "namespace", - "description": "The namespace of the schedule to patch.", "in": "path", "required": true, "type": "string" }, { - "name": "scheduleId", - "description": "The id of the schedule to patch.", + "name": "operationId", "in": "path", "required": true, "type": "string" @@ -1775,7 +1805,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServicePatchScheduleBody" + "$ref": "#/definitions/WorkflowServiceTerminateNexusOperationExecutionBody" } } ], @@ -1784,15 +1814,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/update": { - "post": { - "summary": "Changes the configuration or state of an existing schedule.", - "operationId": "UpdateSchedule2", + "/api/v1/namespaces/{namespace}/schedule-count": { + "get": { + "summary": "CountSchedules is a visibility API to count schedules in a specific namespace.", + "operationId": "CountSchedules2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateScheduleResponse" + "$ref": "#/definitions/v1CountSchedulesResponse" } }, "default": { @@ -1805,25 +1835,16 @@ "parameters": [ { "name": "namespace", - "description": "The namespace of the schedule to update.", "in": "path", "required": true, "type": "string" }, { - "name": "scheduleId", - "description": "The id of the schedule to update.", - "in": "path", - "required": true, + "name": "query", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.", + "in": "query", + "required": false, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateScheduleBody" - } } ], "tags": [ @@ -1831,15 +1852,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/search-attributes": { + "/api/v1/namespaces/{namespace}/schedules": { "get": { - "summary": "ListSearchAttributes returns comprehensive information about search attributes.", - "operationId": "ListSearchAttributes2", + "summary": "List all schedules in a namespace.", + "operationId": "ListSchedules2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListSearchAttributesResponse" + "$ref": "#/definitions/v1ListSchedulesResponse" } }, "default": { @@ -1852,25 +1873,49 @@ "parameters": [ { "name": "namespace", + "description": "The namespace to list schedules in.", "in": "path", "required": true, "type": "string" + }, + { + "name": "maximumPageSize", + "description": "How many to return at once.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "nextPageToken", + "description": "Token to get the next page of results.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "query", + "description": "Query to filter schedules.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "OperatorService" + "WorkflowService" ] } }, - "/api/v1/namespaces/{namespace}/task-queues/{taskQueue.name}": { + "/api/v1/namespaces/{namespace}/schedules/{scheduleId}": { "get": { - "summary": "DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID:\n - List of pollers\n - Workflow Reachability status\n - Backlog info for Workflow and/or Activity tasks", - "operationId": "DescribeTaskQueue2", + "summary": "Returns the schedule description and current state of an existing schedule.", + "operationId": "DescribeSchedule2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DescribeTaskQueueResponse" + "$ref": "#/definitions/v1DescribeScheduleResponse" } }, "default": { @@ -1883,52 +1928,360 @@ "parameters": [ { "name": "namespace", + "description": "The namespace of the schedule to describe.", "in": "path", "required": true, "type": "string" }, { - "name": "taskQueue.name", + "name": "scheduleId", + "description": "The id of the schedule to describe.", "in": "path", "required": true, "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + }, + "delete": { + "summary": "Deletes a schedule, removing it from the system.", + "operationId": "DeleteSchedule2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteScheduleResponse" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ { - "name": "taskQueue.kind", - "description": "Default: TASK_QUEUE_KIND_NORMAL.\n\n - TASK_QUEUE_KIND_UNSPECIFIED: Tasks from any non workflow task may be unspecified.\n\nTask queue kind is used to differentiate whether a workflow task queue is sticky or \nnormal. If a task is not a workflow task, Task queue kind will sometimes be \nunspecified.\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "TASK_QUEUE_KIND_UNSPECIFIED", - "TASK_QUEUE_KIND_NORMAL", - "TASK_QUEUE_KIND_STICKY" - ], - "default": "TASK_QUEUE_KIND_UNSPECIFIED" + "name": "namespace", + "description": "The namespace of the schedule to delete.", + "in": "path", + "required": true, + "type": "string" }, { - "name": "taskQueue.normalName", - "description": "Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of\nthe normal task queue that the sticky worker is running on.", - "in": "query", - "required": false, + "name": "scheduleId", + "description": "The id of the schedule to delete.", + "in": "path", + "required": true, "type": "string" }, { - "name": "taskQueueType", - "description": "If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\nOnly supported in default mode (use `task_queue_types` in ENHANCED mode instead).\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.", + "name": "identity", + "description": "The identity of the client who initiated this request.", "in": "query", "required": false, - "type": "string", - "enum": [ - "TASK_QUEUE_TYPE_UNSPECIFIED", - "TASK_QUEUE_TYPE_WORKFLOW", - "TASK_QUEUE_TYPE_ACTIVITY", - "TASK_QUEUE_TYPE_NEXUS" - ], - "default": "TASK_QUEUE_TYPE_UNSPECIFIED" + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + }, + "post": { + "summary": "Creates a new schedule.", + "operationId": "CreateSchedule2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateScheduleResponse" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ { - "name": "reportStats", + "name": "namespace", + "description": "The namespace the schedule should be created in.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "scheduleId", + "description": "The id of the new schedule.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceCreateScheduleBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/matching-times": { + "get": { + "summary": "Lists matching times within a range.", + "operationId": "ListScheduleMatchingTimes2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListScheduleMatchingTimesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "The namespace of the schedule to query.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "scheduleId", + "description": "The id of the schedule to query.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "description": "Time range to query.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTime", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/patch": { + "post": { + "summary": "Makes a specific change to a schedule or triggers an immediate action.", + "operationId": "PatchSchedule2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PatchScheduleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "The namespace of the schedule to patch.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "scheduleId", + "description": "The id of the schedule to patch.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServicePatchScheduleBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/update": { + "post": { + "summary": "Changes the configuration or state of an existing schedule.", + "operationId": "UpdateSchedule2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateScheduleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "The namespace of the schedule to update.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "scheduleId", + "description": "The id of the schedule to update.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateScheduleBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/search-attributes": { + "get": { + "summary": "ListSearchAttributes returns comprehensive information about search attributes.", + "operationId": "ListSearchAttributes2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListSearchAttributesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "OperatorService" + ] + } + }, + "/api/v1/namespaces/{namespace}/task-queues/{taskQueue.name}": { + "get": { + "summary": "DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID:\n - List of pollers\n - Workflow Reachability status\n - Backlog info for Workflow and/or Activity tasks", + "operationId": "DescribeTaskQueue2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DescribeTaskQueueResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "taskQueue.name", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "taskQueue.kind", + "description": "Default: TASK_QUEUE_KIND_NORMAL.\n\n - TASK_QUEUE_KIND_UNSPECIFIED: Tasks from any non workflow task may be unspecified.\n\nTask queue kind is used to differentiate whether a workflow task queue is sticky or \nnormal. If a task is not a workflow task, Task queue kind will sometimes be \nunspecified.\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.\n - TASK_QUEUE_KIND_WORKER_COMMANDS: A worker-commands task queue is used for server-to-worker communication (e.g. activity\ncancellations). These queues are ephemeral and per-worker-process — they exist only for\nthe lifetime of the worker process. Used with TASK_QUEUE_TYPE_NEXUS and polled via\nPollNexusTaskQueue.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "TASK_QUEUE_KIND_UNSPECIFIED", + "TASK_QUEUE_KIND_NORMAL", + "TASK_QUEUE_KIND_STICKY", + "TASK_QUEUE_KIND_WORKER_COMMANDS" + ], + "default": "TASK_QUEUE_KIND_UNSPECIFIED" + }, + { + "name": "taskQueue.normalName", + "description": "Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of\nthe normal task queue that the sticky worker is running on.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "taskQueueType", + "description": "If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\nOnly supported in default mode (use `task_queue_types` in ENHANCED mode instead).\n\n - TASK_QUEUE_TYPE_WORKFLOW: Workflow type of task queue.\n - TASK_QUEUE_TYPE_ACTIVITY: Activity type of task queue.\n - TASK_QUEUE_TYPE_NEXUS: Task queue type for dispatching Nexus requests.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "TASK_QUEUE_TYPE_UNSPECIFIED", + "TASK_QUEUE_TYPE_WORKFLOW", + "TASK_QUEUE_TYPE_ACTIVITY", + "TASK_QUEUE_TYPE_NEXUS" + ], + "default": "TASK_QUEUE_TYPE_UNSPECIFIED" + }, + { + "name": "reportStats", "description": "Report stats for the requested task queue type(s).", "in": "query", "required": false, @@ -2190,6 +2543,53 @@ ] } }, + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}": { + "post": { + "summary": "Creates a new Worker Deployment Version.", + "description": "Experimental. This API might significantly change or be removed in a\nfuture release.", + "operationId": "CreateWorkerDeploymentVersion2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateWorkerDeploymentVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceCreateWorkerDeploymentVersionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}": { "get": { "summary": "Describes a worker deployment version.\nExperimental. This API might significantly change or be removed in a future release.", @@ -2287,25 +2687,131 @@ "type": "string" }, { - "name": "version", - "description": "Deprecated. Use `deployment_version`.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "skipDrainage", - "description": "Pass to force deletion even if the Version is draining. In this case the open pinned\nworkflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "identity", - "description": "Optional. The identity of the client who initiated this request.", - "in": "query", - "required": false, - "type": "string" + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "skipDrainage", + "description": "Pass to force deletion even if the Version is draining. In this case the open pinned\nworkflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "identity", + "description": "Optional. The identity of the client who initiated this request.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-compute-config": { + "post": { + "summary": "Updates the compute config attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "UpdateWorkerDeploymentVersionComputeConfig2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateWorkerDeploymentVersionComputeConfigResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionComputeConfigBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-metadata": { + "post": { + "summary": "Updates the user-given metadata attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "UpdateWorkerDeploymentVersionMetadata2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateWorkerDeploymentVersionMetadataResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody" + } } ], "tags": [ @@ -2313,15 +2819,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-metadata": { + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/validate-compute-config": { "post": { - "summary": "Updates the user-given metadata attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", - "operationId": "UpdateWorkerDeploymentVersionMetadata2", + "summary": "Validates the compute config without attaching it to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "ValidateWorkerDeploymentVersionComputeConfig2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateWorkerDeploymentVersionMetadataResponse" + "$ref": "#/definitions/v1ValidateWorkerDeploymentVersionComputeConfigResponse" } }, "default": { @@ -2357,7 +2863,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody" + "$ref": "#/definitions/WorkflowServiceValidateWorkerDeploymentVersionComputeConfigBody" } } ], @@ -2488,6 +2994,51 @@ "tags": [ "WorkflowService" ] + }, + "post": { + "summary": "Creates a new Worker Deployment.", + "description": "Experimental. This API might significantly change or be removed in a\nfuture release.", + "operationId": "CreateWorkerDeployment2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateWorkerDeploymentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentName", + "description": "The name of the Worker Deployment to create. If a Worker Deployment with\nthis name already exists, an error will be returned.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceCreateWorkerDeploymentBody" + } + } + ], + "tags": [ + "WorkflowService" + ] } }, "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-current-version": { @@ -4567,32 +5118,230 @@ }, { "name": "nextPageToken", - "description": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\nresponse, the token will be empty if there's no other page.\nNote: the last page may be empty if the total number of endpoints registered is a multiple of the page size.", + "description": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\nresponse, the token will be empty if there's no other page.\nNote: the last page may be empty if the total number of endpoints registered is a multiple of the page size.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "name", + "description": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "OperatorService" + ] + }, + "post": { + "summary": "Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of\nALREADY_EXISTS.\nReturns the created endpoint with its initial version. You may use this version for subsequent updates.", + "operationId": "CreateNexusEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateNexusEndpointResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateNexusEndpointRequest" + } + } + ], + "tags": [ + "OperatorService" + ] + } + }, + "/cluster/nexus/endpoints/{id}": { + "get": { + "summary": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.", + "operationId": "GetNexusEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetNexusEndpointResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "Server-generated unique endpoint ID.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "OperatorService" + ] + }, + "delete": { + "summary": "Delete an incoming Nexus service by ID.", + "operationId": "DeleteNexusEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteNexusEndpointResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "Server-generated unique endpoint ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Data version for this endpoint. Must match current version.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "OperatorService" + ] + } + }, + "/cluster/nexus/endpoints/{id}/update": { + "post": { + "summary": "Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or\n`ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not\nmatch.\nReturns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't\nneed to increment the version yourself. The server will increment the version for you after each update.", + "operationId": "UpdateNexusEndpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateNexusEndpointResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "Server-generated unique endpoint ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/OperatorServiceUpdateNexusEndpointBody" + } + } + ], + "tags": [ + "OperatorService" + ] + } + }, + "/namespaces/{namespace}/activities": { + "get": { + "summary": "ListActivityExecutions is a visibility API to list activity executions in a specific namespace.", + "operationId": "ListActivityExecutions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListActivityExecutionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pageSize", + "description": "Max number of executions to return per page.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "nextPageToken", + "description": "Token returned in ListActivityExecutionsResponse.", "in": "query", "required": false, "type": "string", "format": "byte" }, { - "name": "name", - "description": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.", + "name": "query", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.", "in": "query", "required": false, "type": "string" } ], "tags": [ - "OperatorService" + "WorkflowService" ] - }, + } + }, + "/namespaces/{namespace}/activities-deprecated/pause": { "post": { - "summary": "Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of\nALREADY_EXISTS.\nReturns the created endpoint with its initial version. You may use this version for subsequent updates.", - "operationId": "CreateNexusEndpoint", + "summary": "PauseActivity pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and\nstructured to work well for standalone activities.", + "operationId": "PauseActivity", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreateNexusEndpointResponse" + "$ref": "#/definitions/v1PauseActivityResponse" } }, "default": { @@ -4603,29 +5352,37 @@ } }, "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateNexusEndpointRequest" + "$ref": "#/definitions/WorkflowServicePauseActivityBody" } } ], "tags": [ - "OperatorService" + "WorkflowService" ] } }, - "/cluster/nexus/endpoints/{id}": { - "get": { - "summary": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.", - "operationId": "GetNexusEndpoint", + "/namespaces/{namespace}/activities-deprecated/reset": { + "post": { + "summary": "ResetActivity resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.\nThis API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and\nstructured to work well for standalone activities.", + "operationId": "ResetActivity", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetNexusEndpointResponse" + "$ref": "#/definitions/v1ResetActivityResponse" } }, "default": { @@ -4637,25 +5394,36 @@ }, "parameters": [ { - "name": "id", - "description": "Server-generated unique endpoint ID.", + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceResetActivityBody" + } } ], "tags": [ - "OperatorService" + "WorkflowService" ] - }, - "delete": { - "summary": "Delete an incoming Nexus service by ID.", - "operationId": "DeleteNexusEndpoint", + } + }, + "/namespaces/{namespace}/activities-deprecated/unpause": { + "post": { + "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", + "operationId": "UnpauseActivity", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeleteNexusEndpointResponse" + "$ref": "#/definitions/v1UnpauseActivityResponse" } }, "default": { @@ -4667,35 +5435,35 @@ }, "parameters": [ { - "name": "id", - "description": "Server-generated unique endpoint ID.", + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { - "name": "version", - "description": "Data version for this endpoint. Must match current version.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUnpauseActivityBody" + } } ], "tags": [ - "OperatorService" + "WorkflowService" ] } }, - "/cluster/nexus/endpoints/{id}/update": { + "/namespaces/{namespace}/activities-deprecated/update-options": { "post": { - "summary": "Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or\n`ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not\nmatch.\nReturns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't\nneed to increment the version yourself. The server will increment the version for you after each update.", - "operationId": "UpdateNexusEndpoint", + "summary": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.\nThis API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and\nstructured to work well for standalone activities.", + "operationId": "UpdateActivityOptions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateNexusEndpointResponse" + "$ref": "#/definitions/v1UpdateActivityOptionsResponse" } }, "default": { @@ -4707,8 +5475,8 @@ }, "parameters": [ { - "name": "id", - "description": "Server-generated unique endpoint ID.", + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" @@ -4718,24 +5486,24 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/OperatorServiceUpdateNexusEndpointBody" + "$ref": "#/definitions/WorkflowServiceUpdateActivityOptionsBody" } } ], "tags": [ - "OperatorService" + "WorkflowService" ] } }, - "/namespaces/{namespace}/activities": { + "/namespaces/{namespace}/activities/{activityId}": { "get": { - "summary": "ListActivityExecutions is a visibility API to list activity executions in a specific namespace.", - "operationId": "ListActivityExecutions", + "summary": "DescribeActivityExecution returns information about an activity execution.\nIt can be used to:\n- Get current activity info without waiting\n- Long-poll for next state change and return new activity info\nResponse can optionally include activity input or outcome (if the activity has completed).", + "operationId": "DescribeActivityExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListActivityExecutionsResponse" + "$ref": "#/definitions/v1DescribeActivityExecutionResponse" } }, "default": { @@ -4753,27 +5521,84 @@ "type": "string" }, { - "name": "pageSize", - "description": "Max number of executions to return per page.", + "name": "activityId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "runId", + "description": "Activity run ID. If empty the request targets the latest run.", "in": "query", "required": false, - "type": "integer", - "format": "int32" + "type": "string" }, { - "name": "nextPageToken", - "description": "Token returned in ListActivityExecutionsResponse.", + "name": "includeInput", + "description": "Include the input field in the response.", "in": "query", "required": false, - "type": "string", - "format": "byte" + "type": "boolean" }, { - "name": "query", - "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.", + "name": "includeOutcome", + "description": "Include the outcome (result/failure) in the response if the activity has completed.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "longPollToken", + "description": "Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity\nstate changes from the state encoded in this token. If absent, return current state immediately.\nIf present, run_id must also be present.\nNote that activity state may change multiple times between requests, therefore it is not\nguaranteed that a client making a sequence of long-poll requests will see a complete\nsequence of state changes.", "in": "query", "required": false, + "type": "string", + "format": "byte" + } + ], + "tags": [ + "WorkflowService" + ] + }, + "post": { + "summary": "StartActivityExecution starts a new activity execution.", + "description": "Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace\nunless permitted by the specified ID conflict policy.", + "operationId": "StartActivityExecution", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Identifier for this activity. Required. This identifier should be meaningful in the user's\nown system. It must be unique among activities in the same namespace, subject to the rules\nimposed by id_reuse_policy and id_conflict_policy.", + "in": "path", + "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceStartActivityExecutionBody" + } } ], "tags": [ @@ -4781,16 +5606,16 @@ ] } }, - "/namespaces/{namespace}/activities-deprecated/pause": { + "/namespaces/{namespace}/activities/{activityId}/cancel": { "post": { - "summary": "PauseActivity pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and\nstructured to work well for standalone activities.", - "operationId": "PauseActivity", + "summary": "RequestCancelActivityExecution requests cancellation of an activity execution.", + "description": "Cancellation is cooperative: this call records the request, but the activity must detect and\nacknowledge it for the activity to reach CANCELED status. The cancellation signal is\ndelivered via `cancel_requested` in the heartbeat response; SDKs surface this via\nlanguage-idiomatic mechanisms (context cancellation, exceptions, abort signals).", + "operationId": "RequestCancelActivityExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PauseActivityResponse" + "$ref": "#/definitions/v1RequestCancelActivityExecutionResponse" } }, "default": { @@ -4803,7 +5628,12 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", "in": "path", "required": true, "type": "string" @@ -4813,7 +5643,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServicePauseActivityBody" + "$ref": "#/definitions/WorkflowServiceRequestCancelActivityExecutionBody" } } ], @@ -4822,16 +5652,15 @@ ] } }, - "/namespaces/{namespace}/activities-deprecated/reset": { + "/namespaces/{namespace}/activities/{activityId}/complete": { "post": { - "summary": "ResetActivity resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.\nThis API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and\nstructured to work well for standalone activities.", - "operationId": "ResetActivity", + "summary": "See `RespondActivityTaskCompleted`. This version allows clients to record completions by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskCompletedById", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ResetActivityResponse" + "$ref": "#/definitions/v1RespondActivityTaskCompletedByIdResponse" } }, "default": { @@ -4844,7 +5673,14 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Id of the activity to complete", "in": "path", "required": true, "type": "string" @@ -4854,7 +5690,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceResetActivityBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCompletedByIdBody" } } ], @@ -4863,16 +5699,15 @@ ] } }, - "/namespaces/{namespace}/activities-deprecated/unpause": { + "/namespaces/{namespace}/activities/{activityId}/fail": { "post": { - "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", - "operationId": "UnpauseActivity", + "summary": "See `RecordActivityTaskFailed`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskFailedById", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UnpauseActivityResponse" + "$ref": "#/definitions/v1RespondActivityTaskFailedByIdResponse" } }, "default": { @@ -4885,7 +5720,14 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Id of the activity to fail", "in": "path", "required": true, "type": "string" @@ -4895,7 +5737,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUnpauseActivityBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskFailedByIdBody" } } ], @@ -4904,15 +5746,15 @@ ] } }, - "/namespaces/{namespace}/activities-deprecated/update-options": { + "/namespaces/{namespace}/activities/{activityId}/heartbeat": { "post": { - "summary": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.\nThis API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and\nstructured to work well for standalone activities.", - "operationId": "UpdateActivityOptions", + "summary": "See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RecordActivityTaskHeartbeatById", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateActivityOptionsResponse" + "$ref": "#/definitions/v1RecordActivityTaskHeartbeatByIdResponse" } }, "default": { @@ -4930,12 +5772,19 @@ "required": true, "type": "string" }, + { + "name": "activityId", + "description": "Id of the activity we're heartbeating", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateActivityOptionsBody" + "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatByIdBody" } } ], @@ -4944,15 +5793,15 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}": { + "/namespaces/{namespace}/activities/{activityId}/outcome": { "get": { - "summary": "DescribeActivityExecution returns information about an activity execution.\nIt can be used to:\n- Get current activity info without waiting\n- Long-poll for next state change and return new activity info\nResponse can optionally include activity input or outcome (if the activity has completed).", - "operationId": "DescribeActivityExecution", + "summary": "PollActivityExecution long-polls for an activity execution to complete and returns the\noutcome (result or failure).", + "operationId": "PollActivityExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DescribeActivityExecutionResponse" + "$ref": "#/definitions/v1PollActivityExecutionResponse" } }, "default": { @@ -4981,43 +5830,22 @@ "in": "query", "required": false, "type": "string" - }, - { - "name": "includeInput", - "description": "Include the input field in the response.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "includeOutcome", - "description": "Include the outcome (result/failure) in the response if the activity has completed.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "longPollToken", - "description": "Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity\nstate changes from the state encoded in this token. If absent, return current state immediately.\nIf present, run_id must also be present.\nNote that activity state may change multiple times between requests, therefore it is not\nguaranteed that a client making a sequence of long-poll requests will see a complete\nsequence of state changes.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" } ], "tags": [ "WorkflowService" ] - }, + } + }, + "/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled": { "post": { - "summary": "StartActivityExecution starts a new activity execution.", - "description": "Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace\nunless permitted by the specified ID conflict policy.", - "operationId": "StartActivityExecution", + "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskCanceledById", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1StartActivityExecutionResponse" + "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" } }, "default": { @@ -5030,13 +5858,14 @@ "parameters": [ { "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" }, { "name": "activityId", - "description": "Identifier for this activity. Required. This identifier should be meaningful in the user's\nown system. It must be unique among activities in the same namespace, subject to the rules\nimposed by id_reuse_policy and id_conflict_policy.", + "description": "Id of the activity to confirm is cancelled", "in": "path", "required": true, "type": "string" @@ -5046,7 +5875,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceStartActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" } } ], @@ -5055,16 +5884,16 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/cancel": { + "/namespaces/{namespace}/activities/{activityId}/terminate": { "post": { - "summary": "RequestCancelActivityExecution requests cancellation of an activity execution.", - "description": "Cancellation is cooperative: this call records the request, but the activity must detect and\nacknowledge it for the activity to reach CANCELED status. The cancellation signal is\ndelivered via `cancel_requested` in the heartbeat response; SDKs surface this via\nlanguage-idiomatic mechanisms (context cancellation, exceptions, abort signals).", - "operationId": "RequestCancelActivityExecution", + "summary": "TerminateActivityExecution terminates an existing activity execution immediately.", + "description": "Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a\nrunning attempt.", + "operationId": "TerminateActivityExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RequestCancelActivityExecutionResponse" + "$ref": "#/definitions/v1TerminateActivityExecutionResponse" } }, "default": { @@ -5092,7 +5921,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRequestCancelActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceTerminateActivityExecutionBody" } } ], @@ -5101,15 +5930,16 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/complete": { + "/namespaces/{namespace}/activity-complete": { "post": { - "summary": "See `RespondActivityTaskCompleted`. This version allows clients to record completions by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskCompletedById", + "summary": "RespondActivityTaskCompleted is called by workers when they successfully complete an activity\ntask.", + "description": "For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history\nand a new workflow task created for the workflow. Fails with `NotFound` if the task token is\nno longer valid due to activity timeout, already being completed, or never having existed.", + "operationId": "RespondActivityTaskCompleted", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCompletedByIdResponse" + "$ref": "#/definitions/v1RespondActivityTaskCompletedResponse" } }, "default": { @@ -5122,14 +5952,6 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "activityId", - "description": "Id of the activity to complete", "in": "path", "required": true, "type": "string" @@ -5139,7 +5961,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCompletedByIdBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCompletedBody" } } ], @@ -5148,15 +5970,15 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/fail": { - "post": { - "summary": "See `RecordActivityTaskFailed`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskFailedById", + "/namespaces/{namespace}/activity-count": { + "get": { + "summary": "CountActivityExecutions is a visibility API to count activity executions in a specific namespace.", + "operationId": "CountActivityExecutions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskFailedByIdResponse" + "$ref": "#/definitions/v1CountActivityExecutionsResponse" } }, "default": { @@ -5169,14 +5991,45 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "description": "Id of the activity to fail", + "name": "query", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/activity-fail": { + "post": { + "summary": "RespondActivityTaskFailed is called by workers when processing an activity task fails.", + "description": "This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and\na new workflow task created for the workflow. Fails with `NotFound` if the task token is no\nlonger valid due to activity timeout, already being completed, or never having existed.", + "operationId": "RespondActivityTaskFailed", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RespondActivityTaskFailedResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", "in": "path", "required": true, "type": "string" @@ -5186,7 +6039,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskFailedByIdBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskFailedBody" } } ], @@ -5195,15 +6048,16 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/heartbeat": { + "/namespaces/{namespace}/activity-heartbeat": { "post": { - "summary": "See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RecordActivityTaskHeartbeatById", + "summary": "RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.", + "description": "If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,\nthen the current attempt times out. Depending on RetryPolicy, this may trigger a retry or\ntime out the activity.\n\nFor workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow\nhistory. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations,\nin that event, the SDK should request cancellation of the activity.\n\nThe request may contain response `details` which will be persisted by the server and may be\nused by the activity to checkpoint progress. The `cancel_requested` field in the response\nindicates whether cancellation has been requested for the activity.", + "operationId": "RecordActivityTaskHeartbeat", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RecordActivityTaskHeartbeatByIdResponse" + "$ref": "#/definitions/v1RecordActivityTaskHeartbeatResponse" } }, "default": { @@ -5216,14 +6070,6 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "activityId", - "description": "Id of the activity we're heartbeating", "in": "path", "required": true, "type": "string" @@ -5233,7 +6079,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatByIdBody" + "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatBody" } } ], @@ -5242,15 +6088,16 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/outcome": { - "get": { - "summary": "PollActivityExecution long-polls for an activity execution to complete and returns the\noutcome (result or failure).", - "operationId": "PollActivityExecution", + "/namespaces/{namespace}/activity-resolve-as-canceled": { + "post": { + "summary": "RespondActivityTaskFailed is called by workers when processing an activity task fails.", + "description": "For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history\nand a new workflow task created for the workflow. Fails with `NotFound` if the task token is\nno longer valid due to activity timeout, already being completed, or never having existed.", + "operationId": "RespondActivityTaskCanceled", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PollActivityExecutionResponse" + "$ref": "#/definitions/v1RespondActivityTaskCanceledResponse" } }, "default": { @@ -5268,17 +6115,12 @@ "type": "string" }, { - "name": "activityId", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" - }, - { - "name": "runId", - "description": "Activity run ID. If empty the request targets the latest run.", - "in": "query", - "required": false, - "type": "string" + "schema": { + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledBody" + } } ], "tags": [ @@ -5286,15 +6128,15 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled": { - "post": { - "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskCanceledById", + "/namespaces/{namespace}/archived-workflows": { + "get": { + "summary": "ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.", + "operationId": "ListArchivedWorkflowExecutions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" + "$ref": "#/definitions/v1ListArchivedWorkflowExecutionsResponse" } }, "default": { @@ -5307,25 +6149,29 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "description": "Id of the activity to confirm is cancelled", - "in": "path", - "required": true, - "type": "string" + "name": "pageSize", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" - } + "name": "nextPageToken", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -5333,16 +6179,15 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/terminate": { - "post": { - "summary": "TerminateActivityExecution terminates an existing activity execution immediately.", - "description": "Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a\nrunning attempt.", - "operationId": "TerminateActivityExecution", + "/namespaces/{namespace}/batch-operations": { + "get": { + "summary": "ListBatchOperations returns a list of batch operations", + "operationId": "ListBatchOperations", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1TerminateActivityExecutionResponse" + "$ref": "#/definitions/v1ListBatchOperationsResponse" } }, "default": { @@ -5355,23 +6200,26 @@ "parameters": [ { "name": "namespace", + "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "in": "path", - "required": true, - "type": "string" + "name": "pageSize", + "description": "List page size", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceTerminateActivityExecutionBody" - } + "name": "nextPageToken", + "description": "Next page token", + "in": "query", + "required": false, + "type": "string", + "format": "byte" } ], "tags": [ @@ -5379,16 +6227,15 @@ ] } }, - "/namespaces/{namespace}/activity-complete": { - "post": { - "summary": "RespondActivityTaskCompleted is called by workers when they successfully complete an activity\ntask.", - "description": "For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history\nand a new workflow task created for the workflow. Fails with `NotFound` if the task token is\nno longer valid due to activity timeout, already being completed, or never having existed.", - "operationId": "RespondActivityTaskCompleted", + "/namespaces/{namespace}/batch-operations/{jobId}": { + "get": { + "summary": "DescribeBatchOperation returns the information about a batch operation", + "operationId": "DescribeBatchOperation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCompletedResponse" + "$ref": "#/definitions/v1DescribeBatchOperationResponse" } }, "default": { @@ -5401,33 +6248,31 @@ "parameters": [ { "name": "namespace", + "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "body", - "in": "body", + "name": "jobId", + "description": "Batch job id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCompletedBody" - } + "type": "string" } ], "tags": [ "WorkflowService" ] - } - }, - "/namespaces/{namespace}/activity-count": { - "get": { - "summary": "CountActivityExecutions is a visibility API to count activity executions in a specific namespace.", - "operationId": "CountActivityExecutions", + }, + "post": { + "summary": "StartBatchOperation starts a new batch operation", + "operationId": "StartBatchOperation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CountActivityExecutionsResponse" + "$ref": "#/definitions/v1StartBatchOperationResponse" } }, "default": { @@ -5440,16 +6285,25 @@ "parameters": [ { "name": "namespace", + "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "query", - "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.", - "in": "query", - "required": false, + "name": "jobId", + "description": "Job ID defines the unique ID for the batch job", + "in": "path", + "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceStartBatchOperationBody" + } } ], "tags": [ @@ -5457,16 +6311,15 @@ ] } }, - "/namespaces/{namespace}/activity-fail": { + "/namespaces/{namespace}/batch-operations/{jobId}/stop": { "post": { - "summary": "RespondActivityTaskFailed is called by workers when processing an activity task fails.", - "description": "This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and\na new workflow task created for the workflow. Fails with `NotFound` if the task token is no\nlonger valid due to activity timeout, already being completed, or never having existed.", - "operationId": "RespondActivityTaskFailed", + "summary": "StopBatchOperation stops a batch operation", + "operationId": "StopBatchOperation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskFailedResponse" + "$ref": "#/definitions/v1StopBatchOperationResponse" } }, "default": { @@ -5479,6 +6332,14 @@ "parameters": [ { "name": "namespace", + "description": "Namespace that contains the batch operation", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "jobId", + "description": "Batch job id", "in": "path", "required": true, "type": "string" @@ -5488,7 +6349,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskFailedBody" + "$ref": "#/definitions/WorkflowServiceStopBatchOperationBody" } } ], @@ -5497,16 +6358,15 @@ ] } }, - "/namespaces/{namespace}/activity-heartbeat": { + "/namespaces/{namespace}/current-deployment/{deployment.seriesName}": { "post": { - "summary": "RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.", - "description": "If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,\nthen the current attempt times out. Depending on RetryPolicy, this may trigger a retry or\ntime out the activity.\n\nFor workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow\nhistory. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations,\nin that event, the SDK should request cancellation of the activity.\n\nThe request may contain response `details` which will be persisted by the server and may be\nused by the activity to checkpoint progress. The `cancel_requested` field in the response\nindicates whether cancellation has been requested for the activity.", - "operationId": "RecordActivityTaskHeartbeat", + "summary": "Sets a deployment as the current deployment for its deployment series. Can optionally update\nthe metadata of the deployment as well.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced by `SetWorkerDeploymentCurrentVersion`.", + "operationId": "SetCurrentDeployment", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RecordActivityTaskHeartbeatResponse" + "$ref": "#/definitions/v1SetCurrentDeploymentResponse" } }, "default": { @@ -5523,12 +6383,19 @@ "required": true, "type": "string" }, + { + "name": "deployment.seriesName", + "description": "Different versions of the same worker service/application are related together by having a\nshared series name.\nOut of all deployments of a series, one can be designated as the current deployment, which\nreceives new workflow executions and new tasks of workflows with\n`VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatBody" + "$ref": "#/definitions/WorkflowServiceSetCurrentDeploymentBody" } } ], @@ -5537,16 +6404,15 @@ ] } }, - "/namespaces/{namespace}/activity-resolve-as-canceled": { - "post": { - "summary": "RespondActivityTaskFailed is called by workers when processing an activity task fails.", - "description": "For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history\nand a new workflow task created for the workflow. Fails with `NotFound` if the task token is\nno longer valid due to activity timeout, already being completed, or never having existed.", - "operationId": "RespondActivityTaskCanceled", + "/namespaces/{namespace}/current-deployment/{seriesName}": { + "get": { + "summary": "Returns the current deployment (and its info) for a given deployment series.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`.", + "operationId": "GetCurrentDeployment", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCanceledResponse" + "$ref": "#/definitions/v1GetCurrentDeploymentResponse" } }, "default": { @@ -5564,12 +6430,10 @@ "type": "string" }, { - "name": "body", - "in": "body", + "name": "seriesName", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledBody" - } + "type": "string" } ], "tags": [ @@ -5577,15 +6441,15 @@ ] } }, - "/namespaces/{namespace}/archived-workflows": { + "/namespaces/{namespace}/deployments": { "get": { - "summary": "ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.", - "operationId": "ListArchivedWorkflowExecutions", + "summary": "Lists worker deployments in the namespace. Optionally can filter based on deployment series\nname.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced with `ListWorkerDeployments`.", + "operationId": "ListDeployments", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListArchivedWorkflowExecutionsResponse" + "$ref": "#/definitions/v1ListDeploymentsResponse" } }, "default": { @@ -5617,7 +6481,8 @@ "format": "byte" }, { - "name": "query", + "name": "seriesName", + "description": "Optional. Use to filter based on exact series name match.", "in": "query", "required": false, "type": "string" @@ -5628,15 +6493,15 @@ ] } }, - "/namespaces/{namespace}/batch-operations": { + "/namespaces/{namespace}/deployments/{deployment.seriesName}/{deployment.buildId}": { "get": { - "summary": "ListBatchOperations returns a list of batch operations", - "operationId": "ListBatchOperations", + "summary": "Describes a worker deployment.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced with `DescribeWorkerDeploymentVersion`.", + "operationId": "DescribeDeployment", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListBatchOperationsResponse" + "$ref": "#/definitions/v1DescribeDeploymentResponse" } }, "default": { @@ -5649,26 +6514,23 @@ "parameters": [ { "name": "namespace", - "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "pageSize", - "description": "List page size", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" + "name": "deployment.seriesName", + "description": "Different versions of the same worker service/application are related together by having a\nshared series name.\nOut of all deployments of a series, one can be designated as the current deployment, which\nreceives new workflow executions and new tasks of workflows with\n`VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.", + "in": "path", + "required": true, + "type": "string" }, { - "name": "nextPageToken", - "description": "Next page token", - "in": "query", - "required": false, - "type": "string", - "format": "byte" + "name": "deployment.buildId", + "description": "Build ID changes with each version of the worker when the worker program code and/or config\nchanges.", + "in": "path", + "required": true, + "type": "string" } ], "tags": [ @@ -5676,15 +6538,15 @@ ] } }, - "/namespaces/{namespace}/batch-operations/{jobId}": { + "/namespaces/{namespace}/deployments/{deployment.seriesName}/{deployment.buildId}/reachability": { "get": { - "summary": "DescribeBatchOperation returns the information about a batch operation", - "operationId": "DescribeBatchOperation", + "summary": "Returns the reachability level of a worker deployment to help users decide when it is time\nto decommission a deployment. Reachability level is calculated based on the deployment's\n`status` and existing workflows that depend on the given deployment for their execution.\nCalculating reachability is relatively expensive. Therefore, server might return a recently\ncached value. In such a case, the `last_update_time` will inform you about the actual\nreachability calculation time.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`.", + "operationId": "GetDeploymentReachability", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DescribeBatchOperationResponse" + "$ref": "#/definitions/v1GetDeploymentReachabilityResponse" } }, "default": { @@ -5697,14 +6559,20 @@ "parameters": [ { "name": "namespace", - "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "jobId", - "description": "Batch job id", + "name": "deployment.seriesName", + "description": "Different versions of the same worker service/application are related together by having a\nshared series name.\nOut of all deployments of a series, one can be designated as the current deployment, which\nreceives new workflow executions and new tasks of workflows with\n`VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deployment.buildId", + "description": "Build ID changes with each version of the worker when the worker program code and/or config\nchanges.", "in": "path", "required": true, "type": "string" @@ -5713,15 +6581,17 @@ "tags": [ "WorkflowService" ] - }, - "post": { - "summary": "StartBatchOperation starts a new batch operation", - "operationId": "StartBatchOperation", + } + }, + "/namespaces/{namespace}/nexus-operation-count": { + "get": { + "summary": "CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.", + "operationId": "CountNexusOperationExecutions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1StartBatchOperationResponse" + "$ref": "#/definitions/v1CountNexusOperationExecutionsResponse" } }, "default": { @@ -5734,25 +6604,16 @@ "parameters": [ { "name": "namespace", - "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "jobId", - "description": "Job ID defines the unique ID for the batch job", - "in": "path", - "required": true, + "name": "query", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.\nSee also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations.", + "in": "query", + "required": false, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceStartBatchOperationBody" - } } ], "tags": [ @@ -5760,15 +6621,15 @@ ] } }, - "/namespaces/{namespace}/batch-operations/{jobId}/stop": { - "post": { - "summary": "StopBatchOperation stops a batch operation", - "operationId": "StopBatchOperation", + "/namespaces/{namespace}/nexus-operations": { + "get": { + "summary": "ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace.", + "operationId": "ListNexusOperationExecutions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1StopBatchOperationResponse" + "$ref": "#/definitions/v1ListNexusOperationExecutionsResponse" } }, "default": { @@ -5781,25 +6642,32 @@ "parameters": [ { "name": "namespace", - "description": "Namespace that contains the batch operation", "in": "path", "required": true, "type": "string" }, { - "name": "jobId", - "description": "Batch job id", - "in": "path", - "required": true, - "type": "string" + "name": "pageSize", + "description": "Max number of operations to return per page.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceStopBatchOperationBody" - } + "name": "nextPageToken", + "description": "Token returned in ListNexusOperationExecutionsResponse.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "query", + "description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.\nSearch attributes that are avaialble for Nexus operations include:\n- OperationId\n- RunId\n- Endpoint\n- Service\n- Operation\n- RequestId\n- StartTime\n- ExecutionTime\n- CloseTime\n- ExecutionStatus\n- ExecutionDuration\n- StateTransitionCount", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -5807,15 +6675,15 @@ ] } }, - "/namespaces/{namespace}/current-deployment/{deployment.seriesName}": { - "post": { - "summary": "Sets a deployment as the current deployment for its deployment series. Can optionally update\nthe metadata of the deployment as well.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced by `SetWorkerDeploymentCurrentVersion`.", - "operationId": "SetCurrentDeployment", + "/namespaces/{namespace}/nexus-operations/{operationId}": { + "get": { + "summary": "DescribeNexusOperationExecution returns information about a Nexus operation.\nSupported use cases include:\n- Get current operation info without waiting\n- Long-poll for next state change and return new operation info\nResponse can optionally include operation input or outcome (if the operation has completed).", + "operationId": "DescribeNexusOperationExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SetCurrentDeploymentResponse" + "$ref": "#/definitions/v1DescribeNexusOperationExecutionResponse" } }, "default": { @@ -5833,35 +6701,54 @@ "type": "string" }, { - "name": "deployment.seriesName", - "description": "Different versions of the same worker service/application are related together by having a\nshared series name.\nOut of all deployments of a series, one can be designated as the current deployment, which\nreceives new workflow executions and new tasks of workflows with\n`VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.", + "name": "operationId", "in": "path", "required": true, "type": "string" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceSetCurrentDeploymentBody" - } + "name": "runId", + "description": "Operation run ID. If empty the request targets the latest run.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeInput", + "description": "Include the input field in the response.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "includeOutcome", + "description": "Include the outcome (result/failure) in the response if the operation has completed.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "longPollToken", + "description": "Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation\nstate changes from the state encoded in this token. If absent, return current state immediately.\nIf present, run_id must also be present.\nNote that operation state may change multiple times between requests, therefore it is not\nguaranteed that a client making a sequence of long-poll requests will see a complete\nsequence of state changes.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" } ], "tags": [ "WorkflowService" ] - } - }, - "/namespaces/{namespace}/current-deployment/{seriesName}": { - "get": { - "summary": "Returns the current deployment (and its info) for a given deployment series.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`.", - "operationId": "GetCurrentDeployment", + }, + "post": { + "summary": "StartNexusOperationExecution starts a new Nexus operation.", + "description": "Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this\nnamespace unless permitted by the specified ID conflict policy.", + "operationId": "StartNexusOperationExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetCurrentDeploymentResponse" + "$ref": "#/definitions/v1StartNexusOperationExecutionResponse" } }, "default": { @@ -5879,10 +6766,19 @@ "type": "string" }, { - "name": "seriesName", + "name": "operationId", + "description": "Identifier for this operation. This is a caller-side ID, distinct from any internal\noperation identifiers generated by the handler. Must be unique among operations in the\nsame namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy.", "in": "path", "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceStartNexusOperationExecutionBody" + } } ], "tags": [ @@ -5890,15 +6786,16 @@ ] } }, - "/namespaces/{namespace}/deployments": { - "get": { - "summary": "Lists worker deployments in the namespace. Optionally can filter based on deployment series\nname.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced with `ListWorkerDeployments`.", - "operationId": "ListDeployments", + "/namespaces/{namespace}/nexus-operations/{operationId}/cancel": { + "post": { + "summary": "RequestCancelNexusOperationExecution requests cancellation of a Nexus operation.", + "description": "Requesting to cancel an operation does not automatically transition the operation to canceled status.\nThe operation will only transition to canceled status if it supports cancellation and the handler\nprocesses the cancellation request.", + "operationId": "RequestCancelNexusOperationExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListDeploymentsResponse" + "$ref": "#/definitions/v1RequestCancelNexusOperationExecutionResponse" } }, "default": { @@ -5916,25 +6813,18 @@ "type": "string" }, { - "name": "pageSize", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "nextPageToken", - "in": "query", - "required": false, - "type": "string", - "format": "byte" + "name": "operationId", + "in": "path", + "required": true, + "type": "string" }, { - "name": "seriesName", - "description": "Optional. Use to filter based on exact series name match.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceRequestCancelNexusOperationExecutionBody" + } } ], "tags": [ @@ -5942,15 +6832,15 @@ ] } }, - "/namespaces/{namespace}/deployments/{deployment.seriesName}/{deployment.buildId}": { + "/namespaces/{namespace}/nexus-operations/{operationId}/poll": { "get": { - "summary": "Describes a worker deployment.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced with `DescribeWorkerDeploymentVersion`.", - "operationId": "DescribeDeployment", + "summary": "PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns\nthe outcome (result or failure).", + "operationId": "PollNexusOperationExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DescribeDeploymentResponse" + "$ref": "#/definitions/v1PollNexusOperationExecutionResponse" } }, "default": { @@ -5968,18 +6858,30 @@ "type": "string" }, { - "name": "deployment.seriesName", - "description": "Different versions of the same worker service/application are related together by having a\nshared series name.\nOut of all deployments of a series, one can be designated as the current deployment, which\nreceives new workflow executions and new tasks of workflows with\n`VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.", + "name": "operationId", "in": "path", "required": true, "type": "string" }, { - "name": "deployment.buildId", - "description": "Build ID changes with each version of the worker when the worker program code and/or config\nchanges.", - "in": "path", - "required": true, + "name": "runId", + "description": "Operation run ID. If empty the request targets the latest run.", + "in": "query", + "required": false, "type": "string" + }, + { + "name": "waitStage", + "description": "Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked.\n\n - NEXUS_OPERATION_WAIT_STAGE_STARTED: Wait for the operation to be started.\n - NEXUS_OPERATION_WAIT_STAGE_CLOSED: Wait for the operation to be in a terminal state, either successful or unsuccessful.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED", + "NEXUS_OPERATION_WAIT_STAGE_STARTED", + "NEXUS_OPERATION_WAIT_STAGE_CLOSED" + ], + "default": "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED" } ], "tags": [ @@ -5987,15 +6889,16 @@ ] } }, - "/namespaces/{namespace}/deployments/{deployment.seriesName}/{deployment.buildId}/reachability": { - "get": { - "summary": "Returns the reachability level of a worker deployment to help users decide when it is time\nto decommission a deployment. Reachability level is calculated based on the deployment's\n`status` and existing workflows that depend on the given deployment for their execution.\nCalculating reachability is relatively expensive. Therefore, server might return a recently\ncached value. In such a case, the `last_update_time` will inform you about the actual\nreachability calculation time.\nExperimental. This API might significantly change or be removed in a future release.\nDeprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`.", - "operationId": "GetDeploymentReachability", + "/namespaces/{namespace}/nexus-operations/{operationId}/terminate": { + "post": { + "summary": "TerminateNexusOperationExecution terminates an existing Nexus operation immediately.", + "description": "Termination happens immediately and the operation handler cannot react to it. A terminated operation will have\nits outcome set to a failure with a termination reason.", + "operationId": "TerminateNexusOperationExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetDeploymentReachabilityResponse" + "$ref": "#/definitions/v1TerminateNexusOperationExecutionResponse" } }, "default": { @@ -6013,18 +6916,18 @@ "type": "string" }, { - "name": "deployment.seriesName", - "description": "Different versions of the same worker service/application are related together by having a\nshared series name.\nOut of all deployments of a series, one can be designated as the current deployment, which\nreceives new workflow executions and new tasks of workflows with\n`VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior.", + "name": "operationId", "in": "path", "required": true, "type": "string" }, { - "name": "deployment.buildId", - "description": "Build ID changes with each version of the worker when the worker program code and/or config\nchanges.", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/WorkflowServiceTerminateNexusOperationExecutionBody" + } } ], "tags": [ @@ -6434,14 +7337,15 @@ }, { "name": "taskQueue.kind", - "description": "Default: TASK_QUEUE_KIND_NORMAL.\n\n - TASK_QUEUE_KIND_UNSPECIFIED: Tasks from any non workflow task may be unspecified.\n\nTask queue kind is used to differentiate whether a workflow task queue is sticky or \nnormal. If a task is not a workflow task, Task queue kind will sometimes be \nunspecified.\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.", + "description": "Default: TASK_QUEUE_KIND_NORMAL.\n\n - TASK_QUEUE_KIND_UNSPECIFIED: Tasks from any non workflow task may be unspecified.\n\nTask queue kind is used to differentiate whether a workflow task queue is sticky or \nnormal. If a task is not a workflow task, Task queue kind will sometimes be \nunspecified.\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.\n - TASK_QUEUE_KIND_WORKER_COMMANDS: A worker-commands task queue is used for server-to-worker communication (e.g. activity\ncancellations). These queues are ephemeral and per-worker-process — they exist only for\nthe lifetime of the worker process. Used with TASK_QUEUE_TYPE_NEXUS and polled via\nPollNexusTaskQueue.", "in": "query", "required": false, "type": "string", "enum": [ "TASK_QUEUE_KIND_UNSPECIFIED", "TASK_QUEUE_KIND_NORMAL", - "TASK_QUEUE_KIND_STICKY" + "TASK_QUEUE_KIND_STICKY", + "TASK_QUEUE_KIND_WORKER_COMMANDS" ], "default": "TASK_QUEUE_KIND_UNSPECIFIED" }, @@ -6690,15 +7594,185 @@ ] } }, - "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}": { - "get": { - "summary": "Describes a worker deployment version.\nExperimental. This API might significantly change or be removed in a future release.", - "operationId": "DescribeWorkerDeploymentVersion", + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}": { + "post": { + "summary": "Creates a new Worker Deployment Version.", + "description": "Experimental. This API might significantly change or be removed in a\nfuture release.", + "operationId": "CreateWorkerDeploymentVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateWorkerDeploymentVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceCreateWorkerDeploymentVersionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}": { + "get": { + "summary": "Describes a worker deployment version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "DescribeWorkerDeploymentVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DescribeWorkerDeploymentVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "reportTaskQueueStats", + "description": "Report stats for task queues which have been polled by this version.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "WorkflowService" + ] + }, + "delete": { + "summary": "Used for manual deletion of Versions. User can delete a Version only when all the\nfollowing conditions are met:\n - It is not the Current or Ramping Version of its Deployment.\n - It has no active pollers (none of the task queues in the Version have pollers)\n - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition\n can be skipped by passing `skip-drainage=true`.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "DeleteWorkerDeploymentVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteWorkerDeploymentVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.deploymentName", + "description": "Identifies the Worker Deployment this Version is part of.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentVersion.buildId", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Deprecated. Use `deployment_version`.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "skipDrainage", + "description": "Pass to force deletion even if the Version is draining. In this case the open pinned\nworkflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "identity", + "description": "Optional. The identity of the client who initiated this request.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-compute-config": { + "post": { + "summary": "Updates the compute config attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "UpdateWorkerDeploymentVersionComputeConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DescribeWorkerDeploymentVersionResponse" + "$ref": "#/definitions/v1UpdateWorkerDeploymentVersionComputeConfigResponse" } }, "default": { @@ -6730,32 +7804,28 @@ "type": "string" }, { - "name": "version", - "description": "Deprecated. Use `deployment_version`.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "reportTaskQueueStats", - "description": "Report stats for task queues which have been polled by this version.", - "in": "query", - "required": false, - "type": "boolean" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionComputeConfigBody" + } } ], "tags": [ "WorkflowService" ] - }, - "delete": { - "summary": "Used for manual deletion of Versions. User can delete a Version only when all the\nfollowing conditions are met:\n - It is not the Current or Ramping Version of its Deployment.\n - It has no active pollers (none of the task queues in the Version have pollers)\n - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition\n can be skipped by passing `skip-drainage=true`.\nExperimental. This API might significantly change or be removed in a future release.", - "operationId": "DeleteWorkerDeploymentVersion", + } + }, + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-metadata": { + "post": { + "summary": "Updates the user-given metadata attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "UpdateWorkerDeploymentVersionMetadata", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeleteWorkerDeploymentVersionResponse" + "$ref": "#/definitions/v1UpdateWorkerDeploymentVersionMetadataResponse" } }, "default": { @@ -6787,25 +7857,12 @@ "type": "string" }, { - "name": "version", - "description": "Deprecated. Use `deployment_version`.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "skipDrainage", - "description": "Pass to force deletion even if the Version is draining. In this case the open pinned\nworkflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "identity", - "description": "Optional. The identity of the client who initiated this request.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody" + } } ], "tags": [ @@ -6813,15 +7870,15 @@ ] } }, - "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/update-metadata": { + "/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/validate-compute-config": { "post": { - "summary": "Updates the user-given metadata attached to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", - "operationId": "UpdateWorkerDeploymentVersionMetadata", + "summary": "Validates the compute config without attaching it to a Worker Deployment Version.\nExperimental. This API might significantly change or be removed in a future release.", + "operationId": "ValidateWorkerDeploymentVersionComputeConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateWorkerDeploymentVersionMetadataResponse" + "$ref": "#/definitions/v1ValidateWorkerDeploymentVersionComputeConfigResponse" } }, "default": { @@ -6857,7 +7914,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody" + "$ref": "#/definitions/WorkflowServiceValidateWorkerDeploymentVersionComputeConfigBody" } } ], @@ -6988,6 +8045,51 @@ "tags": [ "WorkflowService" ] + }, + "post": { + "summary": "Creates a new Worker Deployment.", + "description": "Experimental. This API might significantly change or be removed in a\nfuture release.", + "operationId": "CreateWorkerDeployment", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateWorkerDeploymentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentName", + "description": "The name of the Worker Deployment to create. If a Worker Deployment with\nthis name already exists, an error will be returned.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceCreateWorkerDeploymentBody" + } + } + ], + "tags": [ + "WorkflowService" + ] } }, "/namespaces/{namespace}/worker-deployments/{deploymentName}/set-current-version": { @@ -8645,13 +9747,9 @@ } }, "definitions": { - "CallbackInfoTrigger": { + "CallbackInfoActivityClosed": { "type": "object", - "properties": { - "workflowClosed": { - "$ref": "#/definitions/CallbackInfoWorkflowClosed" - } - } + "description": "Trigger for when the activity is closed." }, "CallbackInfoWorkflowClosed": { "type": "object", @@ -8760,6 +9858,21 @@ }, "description": "Target a worker polling on a Nexus task queue in a specific namespace." }, + "LinkActivity": { + "type": "object", + "properties": { + "namespace": { + "type": "string" + }, + "activityId": { + "type": "string" + }, + "runId": { + "type": "string" + } + }, + "description": "A link to an activity." + }, "LinkBatchJob": { "type": "object", "properties": { @@ -8769,6 +9882,21 @@ }, "description": "A link to a built-in batch job.\nBatch jobs can be used to perform operations on a set of workflows (e.g. terminate, signal, cancel, etc).\nThis link can be put on workflow history events generated by actions taken by a batch job." }, + "LinkNexusOperation": { + "type": "object", + "properties": { + "namespace": { + "type": "string" + }, + "operationId": { + "type": "string" + }, + "runId": { + "type": "string" + } + }, + "description": "A link to a standalone Nexus operation." + }, "LinkWorkflowEvent": { "type": "object", "properties": { @@ -9064,6 +10192,9 @@ "type": "string", "format": "date-time", "description": "Timestamp when this version last stopped being current or ramping.\nCleared if the version becomes current or ramping again." + }, + "computeConfig": { + "$ref": "#/definitions/v1ComputeConfigSummary" } } }, @@ -9144,6 +10275,49 @@ } } }, + "WorkflowServiceCreateWorkerDeploymentBody": { + "type": "object", + "properties": { + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + }, + "requestId": { + "type": "string", + "description": "A unique identifier for this create request for idempotence. Typically UUIDv4." + } + }, + "description": "Creates a new WorkerDeployment." + }, + "WorkflowServiceCreateWorkerDeploymentVersionBody": { + "type": "object", + "properties": { + "deploymentVersion": { + "type": "object", + "properties": { + "buildId": { + "type": "string", + "description": "A unique identifier for this Version within the Deployment it is a part of.\nNot necessarily unique within the namespace.\nThe combination of `deployment_name` and `build_id` uniquely identifies this\nVersion within the namespace, because Deployment names are unique within a namespace." + } + }, + "description": "Required.", + "title": "Required." + }, + "computeConfig": { + "$ref": "#/definitions/v1ComputeConfig", + "description": "Optional. Contains the new worker compute configuration for the Worker\nDeployment. Used for worker scale management." + }, + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + }, + "requestId": { + "type": "string", + "description": "A unique identifier for this create request for idempotence. Typically UUIDv4.\nIf a second request with the same ID is recieved, it is considered a successful no-op.\nRetrying with a different request ID for the same deployment name + build ID is an error." + } + }, + "description": "Creates a new WorkerDeploymentVersion." + }, "WorkflowServiceCreateWorkflowRuleBody": { "type": "object", "properties": { @@ -9369,6 +10543,27 @@ } } }, + "WorkflowServiceRequestCancelNexusOperationExecutionBody": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "Operation run ID, targets the latest run if empty." + }, + "identity": { + "type": "string", + "description": "The identity of the client who initiated this request." + }, + "requestId": { + "type": "string", + "description": "Used to de-dupe cancellation requests." + }, + "reason": { + "type": "string", + "description": "Reason for requesting the cancellation, recorded and available via the DescribeNexusOperationExecution API." + } + } + }, "WorkflowServiceRequestCancelWorkflowExecutionBody": { "type": "object", "properties": { @@ -9879,6 +11074,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "title": "Priority metadata" + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Time-skipping configuration. If not set, time skipping is disabled." } } }, @@ -9991,6 +11190,30 @@ "priority": { "$ref": "#/definitions/v1Priority", "description": "Priority metadata." + }, + "completionCallbacks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Callback" + }, + "description": "Callbacks to be called by the server when this activity reaches a terminal state.\nCallback addresses must be whitelisted in the server's dynamic configuration." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/apiCommonV1Link" + }, + "description": "Links to be associated with the activity. Callbacks may also have associated links;\nlinks already included with a callback should not be duplicated here." + }, + "onConflictOptions": { + "$ref": "#/definitions/apiCommonV1OnConflictOptions", + "description": "Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING." + }, + "startDelay": { + "type": "string", + "description": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." } } }, @@ -10036,14 +11259,78 @@ "updateWorkflowOptionsOperation": { "$ref": "#/definitions/v1BatchOperationUpdateWorkflowExecutionOptions" }, - "unpauseActivitiesOperation": { - "$ref": "#/definitions/v1BatchOperationUnpauseActivities" + "unpauseActivitiesOperation": { + "$ref": "#/definitions/v1BatchOperationUnpauseActivities" + }, + "resetActivitiesOperation": { + "$ref": "#/definitions/v1BatchOperationResetActivities" + }, + "updateActivityOptionsOperation": { + "$ref": "#/definitions/v1BatchOperationUpdateActivityOptions" + } + } + }, + "WorkflowServiceStartNexusOperationExecutionBody": { + "type": "object", + "properties": { + "identity": { + "type": "string", + "description": "The identity of the client who initiated this request." + }, + "requestId": { + "type": "string", + "description": "A unique identifier for this caller-side start request. Typically UUIDv4.\nStartOperation requests sent to the handler will use a server-generated request ID." + }, + "endpoint": { + "type": "string", + "description": "Endpoint name, resolved to a URL via the cluster's endpoint registry." + }, + "service": { + "type": "string", + "description": "Service name." + }, + "operation": { + "type": "string", + "description": "Operation name." + }, + "scheduleToCloseTimeout": { + "type": "string", + "description": "Schedule-to-close timeout for this operation.\nIndicates how long the caller is willing to wait for operation completion.\nCalls are retried internally by the server." + }, + "scheduleToStartTimeout": { + "type": "string", + "description": "Schedule-to-start timeout for this operation.\nIndicates how long the caller is willing to wait for the operation to be started (or completed if synchronous)\nby the handler.\nIf not set or zero, no schedule-to-start timeout is enforced." + }, + "startToCloseTimeout": { + "type": "string", + "description": "Start-to-close timeout for this operation.\nIndicates how long the caller is willing to wait for an asynchronous operation to complete after it has been\nstarted. Synchronous operations ignore this timeout.\nIf not set or zero, no start-to-close timeout is enforced." + }, + "input": { + "$ref": "#/definitions/v1Payload", + "description": "Serialized input to the operation. Passed as the request payload." + }, + "idReusePolicy": { + "$ref": "#/definitions/v1NexusOperationIdReusePolicy", + "description": "Defines whether to allow re-using the operation id from a previously *closed* operation.\nThe default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE." + }, + "idConflictPolicy": { + "$ref": "#/definitions/v1NexusOperationIdConflictPolicy", + "description": "Defines how to resolve an operation id conflict with a *running* operation.\nThe default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL." + }, + "searchAttributes": { + "$ref": "#/definitions/v1SearchAttributes", + "description": "Search attributes for indexing." }, - "resetActivitiesOperation": { - "$ref": "#/definitions/v1BatchOperationResetActivities" + "nexusHeader": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Header to attach to the Nexus request.\nUsers are responsible for encrypting sensitive data in this header as it is stored in workflow history and\ntransmitted to external services as-is.\nThis is useful for propagating tracing information.\nNote these headers are not the same as Temporal headers on internal activities and child workflows, these are\ntransmitted to Nexus operations that may be external and are not traditional payloads." }, - "updateActivityOptionsOperation": { - "$ref": "#/definitions/v1BatchOperationUpdateActivityOptions" + "userMetadata": { + "$ref": "#/definitions/v1UserMetadata", + "description": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation." } } }, @@ -10145,7 +11432,7 @@ "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." }, "onConflictOptions": { - "$ref": "#/definitions/v1OnConflictOptions", + "$ref": "#/definitions/apiWorkflowV1OnConflictOptions", "description": "Defines actions to be done to the existing running workflow when the conflict policy\nWORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a\nempty object (ie., all options with default value), it won't do anything to the existing\nrunning workflow. If set, it will add a history event to the running workflow." }, "priority": { @@ -10155,6 +11442,10 @@ "eagerWorkerDeploymentOptions": { "$ref": "#/definitions/v1WorkerDeploymentOptions", "description": "Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Time-skipping configuration. If not set, time skipping is disabled." } } }, @@ -10192,6 +11483,27 @@ } } }, + "WorkflowServiceTerminateNexusOperationExecutionBody": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "Operation run ID, targets the latest run if empty." + }, + "identity": { + "type": "string", + "description": "The identity of the client who initiated this request." + }, + "requestId": { + "type": "string", + "description": "Used to de-dupe termination requests." + }, + "reason": { + "type": "string", + "description": "Reason for requesting the termination, recorded in the operation's result failure outcome." + } + } + }, "WorkflowServiceTerminateWorkflowExecutionBody": { "type": "object", "properties": { @@ -10397,6 +11709,10 @@ "searchAttributes": { "$ref": "#/definitions/v1SearchAttributes", "description": "Schedule search attributes to be updated.\nDo not set this field if you do not want to update the search attributes.\nA non-null empty object will set the search attributes to an empty map.\nNote: you cannot only update the search attributes with `UpdateScheduleRequest`,\nyou must also set the `schedule` field; otherwise, it will unset the schedule." + }, + "memo": { + "$ref": "#/definitions/v1Memo", + "description": "Schedule memo to replace. If set, replaces the entire memo.\nDo not set this field if you do not want to update the memo.\nA non-null empty object will clear the memo." } } }, @@ -10457,116 +11773,331 @@ "$ref": "#/definitions/v1WorkerSelector", "description": "Defines which workers should receive this command." }, - "resourceId": { - "type": "string", - "description": "Resource ID for routing. Contains the worker grouping key." + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains the worker grouping key." + } + } + }, + "WorkflowServiceUpdateWorkerDeploymentVersionComputeConfigBody": { + "type": "object", + "properties": { + "deploymentVersion": { + "type": "object", + "description": "Required.", + "title": "Required." + }, + "computeConfigScalingGroups": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ComputeConfigScalingGroupUpdate" + }, + "description": "Optional. Contains the compute config scaling groups to add or update for the Worker\nDeployment." + }, + "removeComputeConfigScalingGroups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional. Contains the compute config scaling groups to remove from the Worker Deployment." + }, + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + }, + "requestId": { + "type": "string", + "description": "A unique identifier for this create request for idempotence. Typically UUIDv4.\nIf a second request with the same ID is recieved, it is considered a successful no-op.\nRetrying with a different request ID for the same deployment name + build ID is an error." + } + }, + "description": "Used to update the compute config of a Worker Deployment Version." + }, + "WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Deprecated. Use `deployment_version`." + }, + "deploymentVersion": { + "type": "object", + "description": "Required.", + "title": "Required." + }, + "upsertEntries": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1Payload" + } + }, + "removeEntries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of keys to remove from the metadata." + }, + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + } + }, + "description": "Used to update the user-defined metadata of a Worker Deployment Version." + }, + "WorkflowServiceUpdateWorkflowExecutionBody": { + "type": "object", + "properties": { + "workflowExecution": { + "type": "object", + "properties": { + "runId": { + "type": "string" + } + }, + "description": "The target Workflow Id and (optionally) a specific Run Id thereof.", + "title": "The target Workflow Id and (optionally) a specific Run Id thereof." + }, + "firstExecutionRunId": { + "type": "string", + "description": "If set, this call will error if the most recent (if no Run Id is set on\n`workflow_execution`), or specified (if it is) Workflow Execution is not\npart of the same execution chain as this Id." + }, + "waitPolicy": { + "$ref": "#/definitions/v1WaitPolicy", + "description": "Specifies client's intent to wait for Update results.\nNOTE: This field works together with API call timeout which is limited by\nserver timeout (maximum wait time). If server timeout is expired before\nuser specified timeout, API call returns even if specified stage is not reached.\nActual reached stage will be included in the response." + }, + "request": { + "type": "object", + "properties": { + "meta": { + "$ref": "#/definitions/v1Meta" + }, + "input": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/v1Header", + "description": "Headers that are passed with the Update from the requesting entity.\nThese can include things like auth or tracing tokens." + }, + "args": { + "$ref": "#/definitions/v1Payloads", + "description": "The arguments to pass to the named Update handler." + } + } + } + }, + "description": "The request information that will be delivered all the way down to the\nWorkflow Execution." + } + } + }, + "WorkflowServiceUpdateWorkflowExecutionOptionsBody": { + "type": "object", + "properties": { + "workflowExecution": { + "type": "object", + "properties": { + "runId": { + "type": "string" + } + }, + "description": "The target Workflow Id and (optionally) a specific Run Id thereof.", + "title": "The target Workflow Id and (optionally) a specific Run Id thereof." + }, + "workflowExecutionOptions": { + "$ref": "#/definitions/v1WorkflowExecutionOptions", + "description": "Workflow Execution options. Partial updates are accepted and controlled by update_mask." + }, + "updateMask": { + "type": "string", + "description": "Controls which fields from `workflow_execution_options` will be applied.\nTo unset a field, set it to null and use the update mask to indicate that it should be mutated." + }, + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + } + }, + "description": "Keep the parameters in sync with:\n - temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions.\n - temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions." + }, + "WorkflowServiceValidateWorkerDeploymentVersionComputeConfigBody": { + "type": "object", + "properties": { + "deploymentVersion": { + "type": "object", + "description": "Required.", + "title": "Required." + }, + "computeConfigScalingGroups": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ComputeConfigScalingGroupUpdate" + }, + "description": "Optional. Contains the compute config scaling groups to add or update for the Worker\nDeployment." + }, + "removeComputeConfigScalingGroups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional. Contains the compute config scaling groups to remove from the Worker Deployment." + }, + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + } + }, + "description": "Used to validate the compute config without attaching it to a Worker Deployment Version." + }, + "apiActivityV1CallbackInfo": { + "type": "object", + "properties": { + "trigger": { + "$ref": "#/definitions/apiActivityV1CallbackInfoTrigger", + "description": "Trigger for this callback." + }, + "info": { + "$ref": "#/definitions/apiCallbackV1CallbackInfo", + "description": "Common callback info." + } + }, + "description": "CallbackInfo contains the state of an attached activity callback." + }, + "apiActivityV1CallbackInfoTrigger": { + "type": "object", + "properties": { + "activityClosed": { + "$ref": "#/definitions/CallbackInfoActivityClosed" + } + } + }, + "apiCallbackV1CallbackInfo": { + "type": "object", + "properties": { + "callback": { + "$ref": "#/definitions/v1Callback", + "description": "Information on how this callback should be invoked (e.g. its URL and type)." + }, + "registrationTime": { + "type": "string", + "format": "date-time", + "description": "The time when the callback was registered." + }, + "state": { + "$ref": "#/definitions/v1CallbackState", + "description": "The current state of the callback." + }, + "attempt": { + "type": "integer", + "format": "int32", + "description": "The number of attempts made to deliver the callback.\nThis number represents a minimum bound since the attempt is incremented after the callback request completes." + }, + "lastAttemptCompleteTime": { + "type": "string", + "format": "date-time", + "description": "The time when the last attempt completed." + }, + "lastAttemptFailure": { + "$ref": "#/definitions/v1Failure", + "description": "The last attempt's failure, if any." + }, + "nextAttemptScheduleTime": { + "type": "string", + "format": "date-time", + "description": "The time when the next attempt is scheduled." + }, + "blockedReason": { + "type": "string", + "description": "If the state is BLOCKED, blocked reason provides additional information." + } + }, + "description": "Common callback information. Specific CallbackInfo messages should embed this and may include additional fields." + }, + "apiCommonV1OnConflictOptions": { + "type": "object", + "properties": { + "attachRequestId": { + "type": "boolean", + "description": "Attaches the request ID to the running execution." + }, + "attachCompletionCallbacks": { + "type": "boolean", + "description": "Attaches the completion callbacks to the running execution." + }, + "attachLinks": { + "type": "boolean", + "description": "Attaches the links to the running execution." } - } + }, + "description": "When starting an execution with a conflict policy that uses an existing execution and there is already an existing\nrunning execution, OnConflictOptions defines actions to be taken on the existing running execution." }, - "WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody": { + "apiWorkflowV1CallbackInfo": { "type": "object", "properties": { - "version": { + "callback": { + "$ref": "#/definitions/v1Callback", + "description": "Information on how this callback should be invoked (e.g. its URL and type)." + }, + "trigger": { + "$ref": "#/definitions/apiWorkflowV1CallbackInfoTrigger", + "description": "Trigger for this callback." + }, + "registrationTime": { "type": "string", - "description": "Deprecated. Use `deployment_version`." + "format": "date-time", + "description": "The time when the callback was registered." }, - "deploymentVersion": { - "type": "object", - "description": "Required.", - "title": "Required." + "state": { + "$ref": "#/definitions/v1CallbackState" }, - "upsertEntries": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1Payload" - } + "attempt": { + "type": "integer", + "format": "int32", + "description": "The number of attempts made to deliver the callback.\nThis number represents a minimum bound since the attempt is incremented after the callback request completes." }, - "removeEntries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of keys to remove from the metadata." + "lastAttemptCompleteTime": { + "type": "string", + "format": "date-time", + "description": "The time when the last attempt completed." }, - "identity": { + "lastAttemptFailure": { + "$ref": "#/definitions/v1Failure", + "description": "The last attempt's failure, if any." + }, + "nextAttemptScheduleTime": { "type": "string", - "description": "Optional. The identity of the client who initiated this request." + "format": "date-time", + "description": "The time when the next attempt is scheduled." + }, + "blockedReason": { + "type": "string", + "description": "If the state is BLOCKED, blocked reason provides additional information." } }, - "description": "Used to update the user-defined metadata of a Worker Deployment Version." + "description": "CallbackInfo contains the state of an attached workflow callback." }, - "WorkflowServiceUpdateWorkflowExecutionBody": { + "apiWorkflowV1CallbackInfoTrigger": { "type": "object", "properties": { - "workflowExecution": { - "type": "object", - "properties": { - "runId": { - "type": "string" - } - }, - "description": "The target Workflow Id and (optionally) a specific Run Id thereof.", - "title": "The target Workflow Id and (optionally) a specific Run Id thereof." - }, - "firstExecutionRunId": { - "type": "string", - "description": "If set, this call will error if the most recent (if no Run Id is set on\n`workflow_execution`), or specified (if it is) Workflow Execution is not\npart of the same execution chain as this Id." - }, - "waitPolicy": { - "$ref": "#/definitions/v1WaitPolicy", - "description": "Specifies client's intent to wait for Update results.\nNOTE: This field works together with API call timeout which is limited by\nserver timeout (maximum wait time). If server timeout is expired before\nuser specified timeout, API call returns even if specified stage is not reached.\nActual reached stage will be included in the response." - }, - "request": { - "type": "object", - "properties": { - "meta": { - "$ref": "#/definitions/v1Meta" - }, - "input": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/v1Header", - "description": "Headers that are passed with the Update from the requesting entity.\nThese can include things like auth or tracing tokens." - }, - "args": { - "$ref": "#/definitions/v1Payloads", - "description": "The arguments to pass to the named Update handler." - } - } - } - }, - "description": "The request information that will be delivered all the way down to the\nWorkflow Execution." + "workflowClosed": { + "$ref": "#/definitions/CallbackInfoWorkflowClosed" } } }, - "WorkflowServiceUpdateWorkflowExecutionOptionsBody": { + "apiWorkflowV1OnConflictOptions": { "type": "object", "properties": { - "workflowExecution": { - "type": "object", - "properties": { - "runId": { - "type": "string" - } - }, - "description": "The target Workflow Id and (optionally) a specific Run Id thereof.", - "title": "The target Workflow Id and (optionally) a specific Run Id thereof." - }, - "workflowExecutionOptions": { - "$ref": "#/definitions/v1WorkflowExecutionOptions", - "description": "Workflow Execution options. Partial updates are accepted and controlled by update_mask." + "attachRequestId": { + "type": "boolean", + "description": "Attaches the request ID to the running workflow." }, - "updateMask": { - "type": "string", - "description": "Controls which fields from `workflow_execution_options` will be applied.\nTo unset a field, set it to null and use the update mask to indicate that it should be mutated." + "attachCompletionCallbacks": { + "type": "boolean", + "description": "Attaches the completion callbacks to the running workflow." }, - "identity": { - "type": "string", - "description": "Optional. The identity of the client who initiated this request." + "attachLinks": { + "type": "boolean", + "description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event." } }, - "description": "Keep the parameters in sync with:\n - temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions.\n - temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions." + "description": "When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and\nthere is already an existing running workflow, OnConflictOptions defines actions to be taken on\nthe existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent\nhistory event in the running workflow with the changes requested in this object." }, "protobufAny": { "type": "object", @@ -10733,6 +12264,19 @@ "canceledReason": { "type": "string", "description": "Set if activity cancelation was requested." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Link" + }, + "description": "Links to related entities, such as the entity that started this activity." + }, + "totalHeartbeatCount": { + "type": "string", + "format": "int64", + "description": "Total number of heartbeats recorded across all attempts of this activity, including retries." } }, "description": "Information about a standalone activity." @@ -11576,51 +13120,6 @@ }, "description": "Callback to attach to various events in the system, e.g. workflow run completion." }, - "v1CallbackInfo": { - "type": "object", - "properties": { - "callback": { - "$ref": "#/definitions/v1Callback", - "description": "Information on how this callback should be invoked (e.g. its URL and type)." - }, - "trigger": { - "$ref": "#/definitions/CallbackInfoTrigger", - "description": "Trigger for this callback." - }, - "registrationTime": { - "type": "string", - "format": "date-time", - "description": "The time when the callback was registered." - }, - "state": { - "$ref": "#/definitions/v1CallbackState" - }, - "attempt": { - "type": "integer", - "format": "int32", - "description": "The number of attempts made to deliver the callback.\nThis number represents a minimum bound since the attempt is incremented after the callback request completes." - }, - "lastAttemptCompleteTime": { - "type": "string", - "format": "date-time", - "description": "The time when the last attempt completed." - }, - "lastAttemptFailure": { - "$ref": "#/definitions/v1Failure", - "description": "The last attempt's failure, if any." - }, - "nextAttemptScheduleTime": { - "type": "string", - "format": "date-time", - "description": "The time when the next attempt is scheduled." - }, - "blockedReason": { - "type": "string", - "description": "If the state is BLOCKED, blocked reason provides additional information." - } - }, - "description": "CallbackInfo contains the state of an attached workflow callback." - }, "v1CallbackState": { "type": "string", "enum": [ @@ -11649,6 +13148,10 @@ "properties": { "details": { "$ref": "#/definitions/v1Payloads" + }, + "identity": { + "type": "string", + "description": "The identity of the worker or client that requested the cancellation." } } }, @@ -11872,25 +13375,128 @@ "sourceBuildId": { "type": "string" }, - "targetBuildId": { + "targetBuildId": { + "type": "string", + "description": "Target Build ID must be compatible with the Source Build ID; that is it\nmust be able to process event histories made by the Source Build ID by\nusing [Patching](https://docs.temporal.io/workflows#patching) or other\nmeans." + } + }, + "description": "These rules apply to tasks assigned to a particular Build ID\n(`source_build_id`) to redirect them to another *compatible* Build ID\n(`target_build_id`).\n\nIt is user's responsibility to ensure that the target Build ID is compatible\nwith the source Build ID (e.g. by using the Patching API).\n\nMost deployments are not expected to need these rules, however following\nsituations can greatly benefit from redirects:\n - Need to move long-running Workflow Executions from an old Build ID to a\n newer one.\n - Need to hotfix some broken or stuck Workflow Executions.\n\nIn steady state, redirect rules are beneficial when dealing with old\nExecutions ran on now-decommissioned Build IDs:\n - To redirecting the Workflow Queries to the current (compatible) Build ID.\n - To be able to Reset an old Execution so it can run on the current\n (compatible) Build ID.\n\nRedirect rules can be chained." + }, + "v1CompatibleVersionSet": { + "type": "object", + "properties": { + "buildIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "All the compatible versions, unordered, except for the last element, which is considered the set \"default\"." + } + }, + "description": "Used by the worker versioning APIs, represents an unordered set of one or more versions which are\nconsidered to be compatible with each other. Currently the versions are always worker build IDs." + }, + "v1ComputeConfig": { + "type": "object", + "properties": { + "scalingGroups": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ComputeConfigScalingGroup" + }, + "description": "Each scaling group describes a compute config for a specific subset of the worker\ndeployment version: covering a specific set of task types and/or regions.\nHaving different configurations for different task types, allows independent\ntuning of activity and workflow task processing (for example).\n\nThe key of the map is the ID of the scaling group used to reference it in subsequent\nupdate calls." + } + }, + "description": "ComputeConfig stores configuration that helps a worker control plane\ncontroller understand *when* and *how* to respond to worker lifecycle\nevents." + }, + "v1ComputeConfigScalingGroup": { + "type": "object", + "properties": { + "taskQueueTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TaskQueueType" + }, + "description": "Optional. The set of task queue types this scaling group serves.\nIf not provided, this scaling group serves all not otherwise defined\ntask types." + }, + "provider": { + "$ref": "#/definitions/v1ComputeProvider", + "description": "Stores instructions for a worker control plane controller how to respond\nto worker lifeycle events." + }, + "scaler": { + "$ref": "#/definitions/v1ComputeScaler", + "description": "Informs a worker lifecycle controller *when* and *how often* to perform\ncertain worker lifecycle actions like starting a serverless worker." + } + } + }, + "v1ComputeConfigScalingGroupSummary": { + "type": "object", + "properties": { + "taskQueueTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TaskQueueType" + } + }, + "providerType": { + "type": "string" + } + } + }, + "v1ComputeConfigScalingGroupUpdate": { + "type": "object", + "properties": { + "scalingGroup": { + "$ref": "#/definitions/v1ComputeConfigScalingGroup" + }, + "updateMask": { + "type": "string", + "title": "Controls which fields from `scaling_group` will be applied. Semantics:\n- Mask is ignored for new scaling groups (only applicable when scaling group already exists).\n- Empty mask for an existing scaling group is no-op: no change.\n- Non-empty mask for an existing scaling group will update/unset only to the fields\n mentioned in the mask.\n- Accepted paths: \"task_queue_types\", \"provider\", \"provider.type\", \"provider.details\",\n \"provider.nexus_endpoint\", \"scaler\", \"scaler.type\", \"scaler.details\"" + } + } + }, + "v1ComputeConfigSummary": { + "type": "object", + "properties": { + "scalingGroups": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ComputeConfigScalingGroupSummary" + } + } + }, + "description": "A subset of information in ComputeConfig optimized for list views." + }, + "v1ComputeProvider": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the compute provider. This string is implementation-specific and\ncan be used by implementations to understand how to interpret the\ncontents of the provider_details field." + }, + "details": { + "$ref": "#/definitions/v1Payload", + "description": "Contains provider-specific instructions and configuration.\nFor server-implemented providers, use the SDK's default content\nconverter to ensure the server can understand it.\nFor remote-implemented providers, you might use your own content\nconverters according to what the remote endpoints understand." + }, + "nexusEndpoint": { "type": "string", - "description": "Target Build ID must be compatible with the Source Build ID; that is it\nmust be able to process event histories made by the Source Build ID by\nusing [Patching](https://docs.temporal.io/workflows#patching) or other\nmeans." + "description": "Optional. If the compute provider is a Nexus service, this should point\nthere." } }, - "description": "These rules apply to tasks assigned to a particular Build ID\n(`source_build_id`) to redirect them to another *compatible* Build ID\n(`target_build_id`).\n\nIt is user's responsibility to ensure that the target Build ID is compatible\nwith the source Build ID (e.g. by using the Patching API).\n\nMost deployments are not expected to need these rules, however following\nsituations can greatly benefit from redirects:\n - Need to move long-running Workflow Executions from an old Build ID to a\n newer one.\n - Need to hotfix some broken or stuck Workflow Executions.\n\nIn steady state, redirect rules are beneficial when dealing with old\nExecutions ran on now-decommissioned Build IDs:\n - To redirecting the Workflow Queries to the current (compatible) Build ID.\n - To be able to Reset an old Execution so it can run on the current\n (compatible) Build ID.\n\nRedirect rules can be chained." + "description": "ComputeProvider stores information used by a worker control plane controller\nto respond to worker lifecycle events. For example, when a Task is received\non a TaskQueue that has no active pollers, a serverless worker lifecycle\ncontroller might need to invoke an AWS Lambda Function that itself ends up\ncalling the SDK's worker.New() function." }, - "v1CompatibleVersionSet": { + "v1ComputeScaler": { "type": "object", "properties": { - "buildIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "All the compatible versions, unordered, except for the last element, which is considered the set \"default\"." + "type": { + "type": "string", + "description": "Type of the compute scaler. this string is implementation-specific and\ncan be used by implementations to understand how to interpret the\ncontents of the scaler_details field." + }, + "details": { + "$ref": "#/definitions/v1Payload", + "description": "Contains scaler-specific instructions and configuration.\nFor server-implemented scalers, use the SDK's default data\nconverter to ensure the server can understand it.\nFor remote-implemented scalers, you might use your own data\nconverters according to what the remote endpoints understand." } }, - "description": "Used by the worker versioning APIs, represents an unordered set of one or more versions which are\nconsidered to be compatible with each other. Currently the versions are always worker build IDs." + "description": "ComputeScaler instructs the Temporal Service when to scale up or down the number of\nWorkers that comprise a WorkerDeployment." }, "v1ConfigMetadata": { "type": "object", @@ -11925,10 +13531,11 @@ "type": "string", "enum": [ "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE", + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" ], "default": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED", - "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the previous workflow had a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\nbehavior, the base version of the new run will be the Target Version as described above, but the\neffective version will be whatever is specified by the Versioning Override until the override is removed." + "description": "Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: Experimental.\nStart the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\nstart-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\nVersioning Behavior the workflow is annotated with in the workflow code.\n\nNote that if the workflow being continued has a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: Experimental.\nUse the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\nTarget Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\nthe workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping\nVersion by the time that the first workflow task is dispatched, it will be sent to the Current Version.\n\nIt is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\nthis setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\nis AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\nmay be the Current Version instead of the Ramping Version.\n\nNote that if the workflow being continued has a Pinned override, that override will be inherited by the\nnew workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\ncommand. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions." }, "v1CountActivityExecutionsResponse": { "type": "object", @@ -11964,6 +13571,40 @@ } } }, + "v1CountNexusOperationExecutionsResponse": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64", + "description": "If `query` is not grouping by any field, the count is an approximate number\nof operations that match the query.\nIf `query` is grouping by a field, the count is simply the sum of the counts\nof the groups returned in the response. This number can be smaller than the\ntotal number of operations matching the query." + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1CountNexusOperationExecutionsResponseAggregationGroup" + }, + "description": "Contains the groups if the request is grouping by a field.\nThe list might not be complete, and the counts of each group is approximate." + } + } + }, + "v1CountNexusOperationExecutionsResponseAggregationGroup": { + "type": "object", + "properties": { + "groupValues": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Payload" + } + }, + "count": { + "type": "string", + "format": "int64" + } + } + }, "v1CountSchedulesResponse": { "type": "object", "properties": { @@ -12059,6 +13700,19 @@ } } }, + "v1CreateWorkerDeploymentResponse": { + "type": "object", + "properties": { + "conflictToken": { + "type": "string", + "format": "byte", + "description": "This value is returned so that it can be optionally passed to APIs that\nwrite to the WorkerDeployment state to ensure that the state did not\nchange between this API call and a future write." + } + } + }, + "v1CreateWorkerDeploymentVersionResponse": { + "type": "object" + }, "v1CreateWorkflowRuleResponse": { "type": "object", "properties": { @@ -12089,6 +13743,11 @@ "properties": { "deploymentVersion": { "$ref": "#/definitions/v1WorkerDeploymentVersion" + }, + "revisionNumber": { + "type": "string", + "format": "int64", + "description": "Revision number of the task queue routing config at the time the target\nwas declined. If an incoming target's revision is <= this value, it is\nnot newer and is not used for deciding whether or not to suppress the\nupgrade signal." } }, "description": "Wrapper for a target deployment version that the SDK declined to upgrade to.\nSee declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes." @@ -12228,6 +13887,14 @@ "type": "string", "format": "byte", "description": "Token for follow-on long-poll requests. Absent only if the activity is complete." + }, + "callbacks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/apiActivityV1CallbackInfo" + }, + "description": "Callbacks attached to this activity execution and their current state." } } }, @@ -12319,6 +13986,36 @@ } } }, + "v1DescribeNexusOperationExecutionResponse": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "The run ID of the operation, useful when run_id was not specified in the request." + }, + "info": { + "$ref": "#/definitions/v1NexusOperationExecutionInfo", + "description": "Information about the operation." + }, + "input": { + "$ref": "#/definitions/v1Payload", + "description": "Serialized operation input, passed as the request payload.\nOnly set if include_input was true in the request." + }, + "result": { + "$ref": "#/definitions/v1Payload", + "description": "The result if the operation completed successfully." + }, + "failure": { + "$ref": "#/definitions/v1Failure", + "description": "The failure if the operation completed unsuccessfully." + }, + "longPollToken": { + "type": "string", + "format": "byte", + "description": "Token for follow-on long-poll requests. Absent only if the operation is complete." + } + } + }, "v1DescribeScheduleResponse": { "type": "object", "properties": { @@ -12465,7 +14162,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1CallbackInfo" + "$ref": "#/definitions/apiWorkflowV1CallbackInfo" } }, "pendingNexusOperations": { @@ -12623,10 +14320,11 @@ "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED", "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED", "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED", - "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED", + "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED" ], "default": "EVENT_TYPE_UNSPECIFIED", - "description": "- EVENT_TYPE_UNSPECIFIED: Place holder and should never appear in a Workflow execution history\n - EVENT_TYPE_WORKFLOW_EXECUTION_STARTED: Workflow execution has been triggered/started\nIt contains Workflow execution inputs, as well as Workflow timeout configurations\n - EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED: Workflow execution has successfully completed and contains Workflow execution results\n - EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: Workflow execution has unsuccessfully completed and contains the Workflow execution error\n - EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT: Workflow execution has timed out by the Temporal Server\nUsually due to the Workflow having not been completed within timeout settings\n - EVENT_TYPE_WORKFLOW_TASK_SCHEDULED: Workflow Task has been scheduled and the SDK client should now be able to process any new history events\n - EVENT_TYPE_WORKFLOW_TASK_STARTED: Workflow Task has started and the SDK client has picked up the Workflow Task and is processing new history events\n - EVENT_TYPE_WORKFLOW_TASK_COMPLETED: Workflow Task has completed\nThe SDK client picked up the Workflow Task and processed new history events\nSDK client may or may not ask the Temporal Server to do additional work, such as:\nEVENT_TYPE_ACTIVITY_TASK_SCHEDULED\nEVENT_TYPE_TIMER_STARTED\nEVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES\nEVENT_TYPE_MARKER_RECORDED\nEVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED\nEVENT_TYPE_WORKFLOW_EXECUTION_FAILED\nEVENT_TYPE_WORKFLOW_EXECUTION_CANCELED\nEVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW\n - EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT: Workflow Task encountered a timeout\nEither an SDK client with a local cache was not available at the time, or it took too long for the SDK client to process the task\n - EVENT_TYPE_WORKFLOW_TASK_FAILED: Workflow Task encountered a failure\nUsually this means that the Workflow was non-deterministic\nHowever, the Workflow reset functionality also uses this event\n - EVENT_TYPE_ACTIVITY_TASK_SCHEDULED: Activity Task was scheduled\nThe SDK client should pick up this activity task and execute\nThis event type contains activity inputs, as well as activity timeout configurations\n - EVENT_TYPE_ACTIVITY_TASK_STARTED: Activity Task has started executing\nThe SDK client has picked up the Activity Task and is processing the Activity invocation\n - EVENT_TYPE_ACTIVITY_TASK_COMPLETED: Activity Task has finished successfully\nThe SDK client has picked up and successfully completed the Activity Task\nThis event type contains Activity execution results\n - EVENT_TYPE_ACTIVITY_TASK_FAILED: Activity Task has finished unsuccessfully\nThe SDK picked up the Activity Task but unsuccessfully completed it\nThis event type contains Activity execution errors\n - EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT: Activity has timed out according to the Temporal Server\nActivity did not complete within the timeout settings\n - EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED: A request to cancel the Activity has occurred\nThe SDK client will be able to confirm cancellation of an Activity during an Activity heartbeat\n - EVENT_TYPE_ACTIVITY_TASK_CANCELED: Activity has been cancelled\n - EVENT_TYPE_TIMER_STARTED: A timer has started\n - EVENT_TYPE_TIMER_FIRED: A timer has fired\n - EVENT_TYPE_TIMER_CANCELED: A time has been cancelled\n - EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED: A request has been made to cancel the Workflow execution\n - EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: SDK client has confirmed the cancellation request and the Workflow execution has been cancelled\n - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: Workflow has requested that the Temporal Server try to cancel another Workflow\n - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: Temporal Server could not cancel the targeted Workflow\nThis is usually because the target Workflow could not be found\n - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED: Temporal Server has successfully requested the cancellation of the target Workflow\n - EVENT_TYPE_MARKER_RECORDED: A marker has been recorded.\nThis event type is transparent to the Temporal Server\nThe Server will only store it and will not try to understand it.\n - EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED: Workflow has received a Signal event\nThe event type contains the Signal name, as well as a Signal payload\n - EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED: Workflow execution has been forcefully terminated\nThis is usually because the terminate Workflow API was called\n - EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW: Workflow has successfully completed and a new Workflow has been started within the same transaction\nContains last Workflow execution results as well as new Workflow execution inputs\n - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED: Temporal Server will try to start a child Workflow\n - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED: Child Workflow execution cannot be started/triggered\nUsually due to a child Workflow ID collision\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED: Child Workflow execution has successfully started/triggered\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED: Child Workflow execution has successfully completed\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED: Child Workflow execution has unsuccessfully completed\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED: Child Workflow execution has been cancelled\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT: Child Workflow execution has timed out by the Temporal Server\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED: Child Workflow execution has been terminated\n - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: Temporal Server will try to Signal the targeted Workflow\nContains the Signal name, as well as a Signal payload\n - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: Temporal Server cannot Signal the targeted Workflow\nUsually because the Workflow could not be found\n - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED: Temporal Server has successfully Signaled the targeted Workflow\n - EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES: Workflow search attributes should be updated and synchronized with the visibility store\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED: An update was admitted. Note that not all admitted updates result in this\nevent. See UpdateAdmittedEventOrigin for situations in which this event\nis created.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED: An update was accepted (i.e. passed validation, perhaps because no validator was defined)\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED: This event is never written to history.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED: An update completed\n - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY: Some property or properties of the workflow as a whole have changed by non-workflow code.\nThe distinction of external vs. command-based modification is important so the SDK can\nmaintain determinism when using the command-based approach.\n - EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY: Some property or properties of an already-scheduled activity have changed by non-workflow code.\nThe distinction of external vs. command-based modification is important so the SDK can\nmaintain determinism when using the command-based approach.\n - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: Workflow properties modified by user workflow code\n - EVENT_TYPE_NEXUS_OPERATION_SCHEDULED: A Nexus operation was scheduled using a ScheduleNexusOperation command.\n - EVENT_TYPE_NEXUS_OPERATION_STARTED: An asynchronous Nexus operation was started by a Nexus handler.\n - EVENT_TYPE_NEXUS_OPERATION_COMPLETED: A Nexus operation completed successfully.\n - EVENT_TYPE_NEXUS_OPERATION_FAILED: A Nexus operation failed.\n - EVENT_TYPE_NEXUS_OPERATION_CANCELED: A Nexus operation completed as canceled.\n - EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT: A Nexus operation timed out.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED: A Nexus operation was requested to be canceled using a RequestCancelNexusOperation command.\n - EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED: Workflow execution options updated by user.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED: A cancellation request for a Nexus operation was successfully delivered to the Nexus handler.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED: A cancellation request for a Nexus operation resulted in an error.\n - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED: An event that indicates that the workflow execution has been paused.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED: An event that indicates that the previously paused workflow execution has been unpaused.", + "description": "- EVENT_TYPE_UNSPECIFIED: Place holder and should never appear in a Workflow execution history\n - EVENT_TYPE_WORKFLOW_EXECUTION_STARTED: Workflow execution has been triggered/started\nIt contains Workflow execution inputs, as well as Workflow timeout configurations\n - EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED: Workflow execution has successfully completed and contains Workflow execution results\n - EVENT_TYPE_WORKFLOW_EXECUTION_FAILED: Workflow execution has unsuccessfully completed and contains the Workflow execution error\n - EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT: Workflow execution has timed out by the Temporal Server\nUsually due to the Workflow having not been completed within timeout settings\n - EVENT_TYPE_WORKFLOW_TASK_SCHEDULED: Workflow Task has been scheduled and the SDK client should now be able to process any new history events\n - EVENT_TYPE_WORKFLOW_TASK_STARTED: Workflow Task has started and the SDK client has picked up the Workflow Task and is processing new history events\n - EVENT_TYPE_WORKFLOW_TASK_COMPLETED: Workflow Task has completed\nThe SDK client picked up the Workflow Task and processed new history events\nSDK client may or may not ask the Temporal Server to do additional work, such as:\nEVENT_TYPE_ACTIVITY_TASK_SCHEDULED\nEVENT_TYPE_TIMER_STARTED\nEVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES\nEVENT_TYPE_MARKER_RECORDED\nEVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\nEVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED\nEVENT_TYPE_WORKFLOW_EXECUTION_FAILED\nEVENT_TYPE_WORKFLOW_EXECUTION_CANCELED\nEVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW\n - EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT: Workflow Task encountered a timeout\nEither an SDK client with a local cache was not available at the time, or it took too long for the SDK client to process the task\n - EVENT_TYPE_WORKFLOW_TASK_FAILED: Workflow Task encountered a failure\nUsually this means that the Workflow was non-deterministic\nHowever, the Workflow reset functionality also uses this event\n - EVENT_TYPE_ACTIVITY_TASK_SCHEDULED: Activity Task was scheduled\nThe SDK client should pick up this activity task and execute\nThis event type contains activity inputs, as well as activity timeout configurations\n - EVENT_TYPE_ACTIVITY_TASK_STARTED: Activity Task has started executing\nThe SDK client has picked up the Activity Task and is processing the Activity invocation\n - EVENT_TYPE_ACTIVITY_TASK_COMPLETED: Activity Task has finished successfully\nThe SDK client has picked up and successfully completed the Activity Task\nThis event type contains Activity execution results\n - EVENT_TYPE_ACTIVITY_TASK_FAILED: Activity Task has finished unsuccessfully\nThe SDK picked up the Activity Task but unsuccessfully completed it\nThis event type contains Activity execution errors\n - EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT: Activity has timed out according to the Temporal Server\nActivity did not complete within the timeout settings\n - EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED: A request to cancel the Activity has occurred\nThe SDK client will be able to confirm cancellation of an Activity during an Activity heartbeat\n - EVENT_TYPE_ACTIVITY_TASK_CANCELED: Activity has been cancelled\n - EVENT_TYPE_TIMER_STARTED: A timer has started\n - EVENT_TYPE_TIMER_FIRED: A timer has fired\n - EVENT_TYPE_TIMER_CANCELED: A time has been cancelled\n - EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED: A request has been made to cancel the Workflow execution\n - EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: SDK client has confirmed the cancellation request and the Workflow execution has been cancelled\n - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: Workflow has requested that the Temporal Server try to cancel another Workflow\n - EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: Temporal Server could not cancel the targeted Workflow\nThis is usually because the target Workflow could not be found\n - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED: Temporal Server has successfully requested the cancellation of the target Workflow\n - EVENT_TYPE_MARKER_RECORDED: A marker has been recorded.\nThis event type is transparent to the Temporal Server\nThe Server will only store it and will not try to understand it.\n - EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED: Workflow has received a Signal event\nThe event type contains the Signal name, as well as a Signal payload\n - EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED: Workflow execution has been forcefully terminated\nThis is usually because the terminate Workflow API was called\n - EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW: Workflow has successfully completed and a new Workflow has been started within the same transaction\nContains last Workflow execution results as well as new Workflow execution inputs\n - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED: Temporal Server will try to start a child Workflow\n - EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED: Child Workflow execution cannot be started/triggered\nUsually due to a child Workflow ID collision\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED: Child Workflow execution has successfully started/triggered\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED: Child Workflow execution has successfully completed\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED: Child Workflow execution has unsuccessfully completed\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED: Child Workflow execution has been cancelled\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT: Child Workflow execution has timed out by the Temporal Server\n - EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED: Child Workflow execution has been terminated\n - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED: Temporal Server will try to Signal the targeted Workflow\nContains the Signal name, as well as a Signal payload\n - EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED: Temporal Server cannot Signal the targeted Workflow\nUsually because the Workflow could not be found\n - EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED: Temporal Server has successfully Signaled the targeted Workflow\n - EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES: Workflow search attributes should be updated and synchronized with the visibility store\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED: An update was admitted. Note that not all admitted updates result in this\nevent. See UpdateAdmittedEventOrigin for situations in which this event\nis created.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED: An update was accepted (i.e. passed validation, perhaps because no validator was defined)\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED: This event is never written to history.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED: An update completed\n - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY: Some property or properties of the workflow as a whole have changed by non-workflow code.\nThe distinction of external vs. command-based modification is important so the SDK can\nmaintain determinism when using the command-based approach.\n - EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY: Some property or properties of an already-scheduled activity have changed by non-workflow code.\nThe distinction of external vs. command-based modification is important so the SDK can\nmaintain determinism when using the command-based approach.\n - EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED: Workflow properties modified by user workflow code\n - EVENT_TYPE_NEXUS_OPERATION_SCHEDULED: A Nexus operation was scheduled using a ScheduleNexusOperation command.\n - EVENT_TYPE_NEXUS_OPERATION_STARTED: An asynchronous Nexus operation was started by a Nexus handler.\n - EVENT_TYPE_NEXUS_OPERATION_COMPLETED: A Nexus operation completed successfully.\n - EVENT_TYPE_NEXUS_OPERATION_FAILED: A Nexus operation failed.\n - EVENT_TYPE_NEXUS_OPERATION_CANCELED: A Nexus operation completed as canceled.\n - EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT: A Nexus operation timed out.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED: A Nexus operation was requested to be canceled using a RequestCancelNexusOperation command.\n - EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED: Workflow execution options updated by user.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED: A cancellation request for a Nexus operation was successfully delivered to the Nexus handler.\n - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED: A cancellation request for a Nexus operation resulted in an error.\n - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED: An event that indicates that the workflow execution has been paused.\n - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED: An event that indicates that the previously paused workflow execution has been unpaused.\n - EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED: An event that indicates time skipping advanced time or was disabled automatically after a bound was reached.", "title": "Whenever this list of events is changed do change the function shouldBufferEvent in mutableStateBuilder.go to make sure to do the correct event ordering" }, "v1ExternalWorkflowExecutionCancelRequestedEventAttributes": { @@ -12885,6 +14583,10 @@ "nexus": { "type": "boolean", "description": "True if the server supports Nexus operations.\nThis flag is dependent both on server version and for Nexus to be enabled via server configuration." + }, + "serverScaledDeployments": { + "type": "boolean", + "description": "True if the server supports server-scaled deployments.\nThis flag is dependent both on server version and for server-scaled deployments\nto be enabled via server configuration." } }, "description": "System capability details." @@ -13042,7 +14744,11 @@ "type": "object", "$ref": "#/definitions/v1Link" }, - "description": "Links associated with the event." + "description": "Links to related entities, such as the entity that started this event's workflow." + }, + "principal": { + "$ref": "#/definitions/v1Principal", + "description": "Server-computed authenticated caller identity associated with this event." }, "workflowExecutionStartedEventAttributes": { "$ref": "#/definitions/v1WorkflowExecutionStartedEventAttributes" @@ -13220,6 +14926,9 @@ }, "workflowExecutionUnpausedEventAttributes": { "$ref": "#/definitions/v1WorkflowExecutionUnpausedEventAttributes" + }, + "workflowExecutionTimeSkippingTransitionedEventAttributes": { + "$ref": "#/definitions/v1WorkflowExecutionTimeSkippingTransitionedEventAttributes" } }, "description": "History events are the method by which Temporal SDKs advance (or recreate) workflow state.\nSee the `EventType` enum for more info about what each event is for." @@ -13258,9 +14967,13 @@ "type": "string", "format": "int64", "description": "The revision number of the source deployment version of the parent/previous workflow." + }, + "continueAsNewInitialVersioningBehavior": { + "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", + "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new.\n\nNote: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\na non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\nwith history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade\nvalue if the InheritedAutoUpgradeInfo is non-empty." } }, - "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version \nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior." + "description": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\nto a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\nAlso used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." }, "v1Input": { "type": "object", @@ -13299,6 +15012,12 @@ }, "batchJob": { "$ref": "#/definitions/LinkBatchJob" + }, + "activity": { + "$ref": "#/definitions/LinkActivity" + }, + "nexusOperation": { + "$ref": "#/definitions/LinkNexusOperation" } }, "description": "Link can be associated with history events. It might contain information about an external entity\nrelated to the history event. For example, workflow A makes a Nexus call that starts workflow B:\nin this case, a history event in workflow A could contain a Link to the workflow started event in\nworkflow B, and vice-versa." @@ -13403,6 +15122,23 @@ } } }, + "v1ListNexusOperationExecutionsResponse": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1NexusOperationExecutionListInfo" + } + }, + "nextPageToken": { + "type": "string", + "format": "byte", + "description": "Token to use to fetch the next page. If empty, there is no next page." + } + } + }, "v1ListScheduleMatchingTimesResponse": { "type": "object", "properties": { @@ -13972,40 +15708,277 @@ "description": "If the state is BLOCKED, blocked reason provides additional information." } }, - "description": "NexusOperationCancellationInfo contains the state of a nexus operation cancellation." - }, - "v1NexusOperationCancellationState": { - "type": "string", - "enum": [ - "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED", - "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED", - "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF", - "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED", - "NEXUS_OPERATION_CANCELLATION_STATE_FAILED", - "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT", - "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED" - ], - "default": "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED", - "description": "State of a Nexus operation cancellation.\n\n - NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED: Default value, unspecified state.\n - NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED: Cancellation request is in the queue waiting to be executed or is currently executing.\n - NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF: Cancellation request has failed with a retryable error and is backing off before the next attempt.\n - NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED: Cancellation request succeeded.\n - NEXUS_OPERATION_CANCELLATION_STATE_FAILED: Cancellation request failed with a non-retryable error.\n - NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT: The associated operation timed out - exceeded the user supplied schedule-to-close timeout.\n - NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED: Cancellation request is blocked (eg: by circuit breaker)." + "description": "NexusOperationCancellationInfo contains the state of a nexus operation cancellation." + }, + "v1NexusOperationCancellationState": { + "type": "string", + "enum": [ + "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED", + "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED", + "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF", + "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED", + "NEXUS_OPERATION_CANCELLATION_STATE_FAILED", + "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT", + "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED" + ], + "default": "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED", + "description": "State of a Nexus operation cancellation.\n\n - NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED: Default value, unspecified state.\n - NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED: Cancellation request is in the queue waiting to be executed or is currently executing.\n - NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF: Cancellation request has failed with a retryable error and is backing off before the next attempt.\n - NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED: Cancellation request succeeded.\n - NEXUS_OPERATION_CANCELLATION_STATE_FAILED: Cancellation request failed with a non-retryable error.\n - NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT: The associated operation timed out - exceeded the user supplied schedule-to-close timeout.\n - NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED: Cancellation request is blocked (eg: by circuit breaker)." + }, + "v1NexusOperationCompletedEventAttributes": { + "type": "object", + "properties": { + "scheduledEventId": { + "type": "string", + "format": "int64", + "description": "The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation." + }, + "result": { + "$ref": "#/definitions/v1Payload", + "description": "Serialized result of the Nexus operation. The response of the Nexus handler.\nDelivered either via a completion callback or as a response to a synchronous operation." + }, + "requestId": { + "type": "string", + "description": "The request ID allocated at schedule time." + } + }, + "description": "Nexus operation completed successfully." + }, + "v1NexusOperationExecutionCancellationInfo": { + "type": "object", + "properties": { + "requestedTime": { + "type": "string", + "format": "date-time", + "description": "The time when cancellation was requested." + }, + "state": { + "$ref": "#/definitions/v1NexusOperationCancellationState" + }, + "attempt": { + "type": "integer", + "format": "int32", + "description": "The number of attempts made to deliver the cancel operation request.\nThis number represents a minimum bound since the attempt is incremented after the request completes." + }, + "lastAttemptCompleteTime": { + "type": "string", + "format": "date-time", + "description": "The time when the last attempt completed." + }, + "lastAttemptFailure": { + "$ref": "#/definitions/v1Failure", + "description": "The last attempt's failure, if any." + }, + "nextAttemptScheduleTime": { + "type": "string", + "format": "date-time", + "description": "The time when the next attempt is scheduled." + }, + "blockedReason": { + "type": "string", + "description": "If the state is BLOCKED, blocked reason provides additional information." + }, + "reason": { + "type": "string", + "description": "A reason that may be specified in the CancelNexusOperationRequest." + } + }, + "description": "NexusOperationExecutionCancellationInfo contains the state of a Nexus operation cancellation." + }, + "v1NexusOperationExecutionInfo": { + "type": "object", + "properties": { + "operationId": { + "type": "string", + "description": "Unique identifier of this Nexus operation within its namespace along with run ID (below)." + }, + "runId": { + "type": "string" + }, + "endpoint": { + "type": "string", + "description": "Endpoint name, resolved to a URL via the cluster's endpoint registry." + }, + "service": { + "type": "string", + "description": "Service name." + }, + "operation": { + "type": "string", + "description": "Operation name." + }, + "status": { + "$ref": "#/definitions/v1NexusOperationExecutionStatus", + "description": "A general status for this operation, indicates whether it is currently running or in one of the terminal statuses.\nUpdated once when the operation is originally scheduled, and again when it reaches a terminal status." + }, + "state": { + "$ref": "#/definitions/v1PendingNexusOperationState", + "description": "More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING." + }, + "scheduleToCloseTimeout": { + "type": "string", + "description": "Schedule-to-close timeout for this operation." + }, + "scheduleToStartTimeout": { + "type": "string", + "description": "Schedule-to-start timeout for this operation." + }, + "startToCloseTimeout": { + "type": "string", + "description": "Start-to-close timeout for this operation." + }, + "attempt": { + "type": "integer", + "format": "int32", + "description": "The number of attempts made to deliver the start operation request.\nThis number is approximate, it is incremented when a task is added to the history queue.\nIn practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task\nwas never executed." + }, + "scheduleTime": { + "type": "string", + "format": "date-time", + "description": "Time the operation was originally scheduled via a StartNexusOperation request." + }, + "expirationTime": { + "type": "string", + "format": "date-time", + "description": "Scheduled time + schedule to close timeout." + }, + "closeTime": { + "type": "string", + "format": "date-time", + "description": "Time when the operation transitioned to a closed state." + }, + "lastAttemptCompleteTime": { + "type": "string", + "format": "date-time", + "description": "The time when the last attempt completed." + }, + "lastAttemptFailure": { + "$ref": "#/definitions/v1Failure", + "description": "The last attempt's failure, if any." + }, + "nextAttemptScheduleTime": { + "type": "string", + "format": "date-time", + "description": "The time when the next attempt is scheduled." + }, + "executionDuration": { + "type": "string", + "description": "Elapsed time from schedule_time to now for running operations or to close_time for closed\noperations, including all attempts and backoff between attempts." + }, + "cancellationInfo": { + "$ref": "#/definitions/v1NexusOperationExecutionCancellationInfo" + }, + "blockedReason": { + "type": "string", + "description": "If the state is BLOCKED, blocked reason provides additional information." + }, + "requestId": { + "type": "string", + "description": "Server-generated request ID used as an idempotency token when submitting start requests to\nthe handler. Distinct from the request_id in StartNexusOperationRequest, which is the\ncaller-side idempotency key for the StartNexusOperation RPC itself." + }, + "operationToken": { + "type": "string", + "description": "Operation token. Only set for asynchronous operations after a successful StartOperation call." + }, + "stateTransitionCount": { + "type": "string", + "format": "int64", + "description": "Incremented each time the operation's state is mutated in persistence." + }, + "searchAttributes": { + "$ref": "#/definitions/v1SearchAttributes" + }, + "nexusHeader": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Header for context propagation and tracing purposes." + }, + "userMetadata": { + "$ref": "#/definitions/v1UserMetadata", + "description": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Link" + }, + "description": "Links attached by the handler of this operation on start or completion." + }, + "identity": { + "type": "string", + "description": "The identity of the client who started this operation." + } + }, + "description": "Full current state of a standalone Nexus operation, as of the time of the request." }, - "v1NexusOperationCompletedEventAttributes": { + "v1NexusOperationExecutionListInfo": { "type": "object", "properties": { - "scheduledEventId": { + "operationId": { "type": "string", - "format": "int64", - "description": "The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation." + "description": "A unique identifier of this operation within its namespace along with run ID (below)." }, - "result": { - "$ref": "#/definitions/v1Payload", - "description": "Serialized result of the Nexus operation. The response of the Nexus handler.\nDelivered either via a completion callback or as a response to a synchronous operation." + "runId": { + "type": "string", + "description": "The run ID of the standalone Nexus operation." }, - "requestId": { + "endpoint": { "type": "string", - "description": "The request ID allocated at schedule time." + "description": "Endpoint name." + }, + "service": { + "type": "string", + "description": "Service name." + }, + "operation": { + "type": "string", + "description": "Operation name." + }, + "scheduleTime": { + "type": "string", + "format": "date-time", + "description": "Time the operation was originally scheduled via a StartNexusOperation request." + }, + "closeTime": { + "type": "string", + "format": "date-time", + "description": "If the operation is in a terminal status, this field represents the time the operation transitioned to that status." + }, + "status": { + "$ref": "#/definitions/v1NexusOperationExecutionStatus", + "description": "The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status." + }, + "searchAttributes": { + "$ref": "#/definitions/v1SearchAttributes", + "description": "Search attributes from the start request." + }, + "stateTransitionCount": { + "type": "string", + "format": "int64", + "description": "Updated on terminal status." + }, + "executionDuration": { + "type": "string", + "description": "The difference between close time and scheduled time.\nThis field is only populated if the operation is closed." } }, - "description": "Nexus operation completed successfully." + "description": "Limited Nexus operation information returned in the list response.\nWhen adding fields here, ensure that it is also present in NexusOperationExecutionInfo (note that it may already be present in\nNexusOperationExecutionInfo but not at the top-level)." + }, + "v1NexusOperationExecutionStatus": { + "type": "string", + "enum": [ + "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED", + "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING", + "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED", + "NEXUS_OPERATION_EXECUTION_STATUS_FAILED", + "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED", + "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED", + "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT" + ], + "default": "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED", + "description": "Status of a standalone Nexus operation execution.\nThe status is updated once, when the operation is originally scheduled, and again when the\noperation reaches a terminal status.\n\n - NEXUS_OPERATION_EXECUTION_STATUS_RUNNING: The operation is not in a terminal status. The operation may be attempting to start,\nbacking off between attempts, or already started.\n - NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED: The operation completed successfully.\n - NEXUS_OPERATION_EXECUTION_STATUS_FAILED: The operation completed with failure.\n - NEXUS_OPERATION_EXECUTION_STATUS_CANCELED: The operation completed as canceled.\nRequesting to cancel an operation does not automatically transition the operation to canceled status, depending\non the current operation status and the cancelation type used.\n - NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED: The operation was terminated. Termination happens immediately without notifying the handler.\n - NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT: The operation has timed out by reaching one of the specified timeouts." }, "v1NexusOperationFailedEventAttributes": { "type": "object", @@ -14057,6 +16030,27 @@ }, "description": "Representation of the Temporal SDK NexusOperationError object that is returned to workflow callers." }, + "v1NexusOperationIdConflictPolicy": { + "type": "string", + "enum": [ + "NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED", + "NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL", + "NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING" + ], + "default": "NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED", + "description": "Defines what to do when trying to start a Nexus operation with the same ID as a *running* operation.\nNote that it is *never* valid to have two running instances of the same operation ID.\n\nSee `NexusOperationIdReusePolicy` for handling operation ID duplication with a *closed* operation.\n\n - NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL: Don't start a new operation; instead return `NexusOperationAlreadyStarted` error.\n - NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING: Don't start a new operation; instead return a handle for the running operation." + }, + "v1NexusOperationIdReusePolicy": { + "type": "string", + "enum": [ + "NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED", + "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE", + "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY", + "NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE" + ], + "default": "NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED", + "description": "Defines whether to allow re-using an operation ID from a previously *closed* Nexus operation.\nIf the request is denied, the server returns a `NexusOperationAlreadyStarted` error.\n\nSee `NexusOperationIdConflictPolicy` for handling ID duplication with a *running* operation.\n\n - NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE: Always allow starting an operation using the same operation ID.\n - NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: Allow starting an operation using the same ID only when the last operation's final state is one\nof {failed, canceled, terminated, timed out}.\n - NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE: Do not permit re-use of the ID for this operation. Future start requests could potentially change the policy,\nallowing re-use of the ID." + }, "v1NexusOperationScheduledEventAttributes": { "type": "object", "properties": { @@ -14153,23 +16147,15 @@ }, "description": "Nexus operation timed out." }, - "v1OnConflictOptions": { - "type": "object", - "properties": { - "attachRequestId": { - "type": "boolean", - "description": "Attaches the request ID to the running workflow." - }, - "attachCompletionCallbacks": { - "type": "boolean", - "description": "Attaches the completion callbacks to the running workflow." - }, - "attachLinks": { - "type": "boolean", - "description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event." - } - }, - "description": "When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and\nthere is already an existing running workflow, OnConflictOptions defines actions to be taken on\nthe existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent\nhistory event in the running workflow with the changes requested in this object." + "v1NexusOperationWaitStage": { + "type": "string", + "enum": [ + "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED", + "NEXUS_OPERATION_WAIT_STAGE_STARTED", + "NEXUS_OPERATION_WAIT_STAGE_CLOSED" + ], + "default": "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED", + "description": "Stage that can be specified when waiting on a nexus operation.\n\n - NEXUS_OPERATION_WAIT_STAGE_STARTED: Wait for the operation to be started.\n - NEXUS_OPERATION_WAIT_STAGE_CLOSED: Wait for the operation to be in a terminal state, either successful or unsuccessful." }, "v1Outcome": { "type": "object", @@ -14391,7 +16377,7 @@ "attempt": { "type": "integer", "format": "int32", - "description": "The number of attempts made to deliver the start operation request.\nThis number represents a minimum bound since the attempt is incremented after the request completes." + "description": "The number of attempts made to deliver the start operation request.\nThis number is approximate, it is incremented when a task is added to the history queue.\nIn practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task\nwas never executed." }, "lastAttemptCompleteTime": { "type": "string", @@ -14505,6 +16491,31 @@ } } }, + "v1PollNexusOperationExecutionResponse": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "The run ID of the operation, useful when run_id was not specified in the request." + }, + "waitStage": { + "$ref": "#/definitions/v1NexusOperationWaitStage", + "description": "The current stage of the operation. May be more advanced than the stage requested in the poll." + }, + "operationToken": { + "type": "string", + "description": "Operation token. Only populated for asynchronous operations after a successful StartOperation call." + }, + "result": { + "$ref": "#/definitions/v1Payload", + "description": "The result if the operation completed successfully." + }, + "failure": { + "$ref": "#/definitions/v1Failure", + "description": "The failure if the operation completed unsuccessfully." + } + } + }, "v1PollWorkflowTaskQueueResponse": { "type": "object", "properties": { @@ -14584,6 +16595,30 @@ "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 awaiting for query response.\nCorresponding RespondQueryTaskCompleted should pass this value for proper routing." + }, + "pollerGroupInfos": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PollerGroupInfo" + }, + "description": "The weighted list of poller groups IDs that client should use for future polls to this task\nqueue. Client is expected to:\n 1. Maintain minimum number of pollers no less than the number of groups.\n 2. Try to assign the next poll to a group without any pending polls,\n 3. If every group has some pending polls, assign the next poll to a group randomly\n according to the weights." + } + } + }, + "v1PollerGroupInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "weight": { + "type": "number", + "format": "float" } } }, @@ -14634,6 +16669,20 @@ }, "description": "PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset." }, + "v1Principal": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Low-cardinality category of the principal (e.g., \"jwt\", \"users\")." + }, + "name": { + "type": "string", + "description": "Identifier within that category (e.g., sub JWT claim, email address)." + } + }, + "description": "Principal is an authenticated caller identity computed by the server from trusted\nauthentication context." + }, "v1Priority": { "type": "object", "properties": { @@ -14945,6 +16994,9 @@ } } }, + "v1RequestCancelNexusOperationExecutionResponse": { + "type": "object" + }, "v1RequestCancelWorkflowExecutionResponse": { "type": "object" }, @@ -15195,7 +17247,7 @@ "properties": { "currentDeploymentVersion": { "$ref": "#/definitions/v1WorkerDeploymentVersion", - "description": "Specifies which Deployment Version should receive new workflow executions and tasks of\nexisting unversioned or AutoUpgrade workflows.\nNil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). \nNote: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\nis non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." + "description": "Specifies which Deployment Version should receive new workflow executions and tasks of\nexisting unversioned or AutoUpgrade workflows.\nNil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.).\nNote: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\nis non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." }, "currentVersion": { "type": "string", @@ -15232,7 +17284,7 @@ "revisionNumber": { "type": "string", "format": "int64", - "description": "Monotonically increasing value which is incremented on every mutation \nto any field of this message to achieve eventual consistency between task queues and their partitions." + "description": "Monotonically increasing value which is incremented on every mutation\nto any field of this message to achieve eventual consistency between task queues and their partitions." } } }, @@ -15759,11 +17811,21 @@ "started": { "type": "boolean", "description": "If true, a new workflow was started." + }, + "signalLink": { + "$ref": "#/definitions/v1Link", + "description": "Link to be associated with the WorkflowExecutionSignaled event.\nAdded on the response to propagate the backlink.\nAvailable from Temporal server 1.31 and up." } } }, "v1SignalWorkflowExecutionResponse": { - "type": "object" + "type": "object", + "properties": { + "link": { + "$ref": "#/definitions/v1Link", + "description": "Link to be associated with the WorkflowExecutionSignaled event.\nAdded on the response to propagate the backlink.\nAvailable from Temporal server 1.31 and up." + } + } }, "v1StartActivityExecutionResponse": { "type": "object", @@ -15775,6 +17837,10 @@ "started": { "type": "boolean", "description": "If true, a new activity was started." + }, + "link": { + "$ref": "#/definitions/v1Link", + "description": "Link to the started activity." } } }, @@ -15899,6 +17965,27 @@ "priority": { "$ref": "#/definitions/v1Priority", "title": "Priority metadata" + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "The propagated time-skipping configuration for the child workflow." + }, + "initialSkippedDuration": { + "type": "string", + "description": "Propagate the duration skipped to the child workflow." + } + } + }, + "v1StartNexusOperationExecutionResponse": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "The run ID of the operation that was started - or used (via NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING)." + }, + "started": { + "type": "boolean", + "description": "If true, a new operation was started." } } }, @@ -16072,10 +18159,11 @@ "enum": [ "TASK_QUEUE_KIND_UNSPECIFIED", "TASK_QUEUE_KIND_NORMAL", - "TASK_QUEUE_KIND_STICKY" + "TASK_QUEUE_KIND_STICKY", + "TASK_QUEUE_KIND_WORKER_COMMANDS" ], "default": "TASK_QUEUE_KIND_UNSPECIFIED", - "description": " - TASK_QUEUE_KIND_UNSPECIFIED: Tasks from any non workflow task may be unspecified.\n\nTask queue kind is used to differentiate whether a workflow task queue is sticky or \nnormal. If a task is not a workflow task, Task queue kind will sometimes be \nunspecified.\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities." + "description": " - TASK_QUEUE_KIND_UNSPECIFIED: Tasks from any non workflow task may be unspecified.\n\nTask queue kind is used to differentiate whether a workflow task queue is sticky or \nnormal. If a task is not a workflow task, Task queue kind will sometimes be \nunspecified.\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.\n - TASK_QUEUE_KIND_WORKER_COMMANDS: A worker-commands task queue is used for server-to-worker communication (e.g. activity\ncancellations). These queues are ephemeral and per-worker-process — they exist only for\nthe lifetime of the worker process. Used with TASK_QUEUE_TYPE_NEXUS and polled via\nPollNexusTaskQueue." }, "v1TaskQueueReachability": { "type": "object", @@ -16236,8 +18324,7 @@ "format": "date-time", "description": "Last time versioning information of this Task Queue changed." } - }, - "description": "Experimental. Worker Deployments are experimental and might significantly change in the future." + } }, "v1TaskReachability": { "type": "string", @@ -16254,11 +18341,38 @@ "v1TerminateActivityExecutionResponse": { "type": "object" }, + "v1TerminateNexusOperationExecutionResponse": { + "type": "object" + }, "v1TerminateWorkflowExecutionResponse": { "type": "object" }, "v1TerminatedFailureInfo": { - "type": "object" + "type": "object", + "properties": { + "identity": { + "type": "string", + "description": "The identity of the worker or client that requested the termination." + } + } + }, + "v1TimeSkippingConfig": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enables or disables time skipping for this workflow execution." + }, + "maxSkippedDuration": { + "type": "string", + "description": "Maximum total virtual time that can be skipped." + }, + "maxElapsedDuration": { + "type": "string", + "description": "Maximum elapsed time since time skipping was enabled.\nThis includes both skipped time and real time elapsing." + } + }, + "description": "Configuration for time skipping during a workflow execution.\nWhen enabled, virtual time advances automatically whenever there is no in-flight work.\nIn-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\nand possibly other features added in the future.\nUser timers are not classified as in-flight work and will be skipped over.\nWhen time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n\nPropagation behavior of time skipping:\nThe enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n(1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n(2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n(3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run." }, "v1TimeoutFailureInfo": { "type": "object", @@ -16512,6 +18626,9 @@ } } }, + "v1UpdateWorkerDeploymentVersionComputeConfigResponse": { + "type": "object" + }, "v1UpdateWorkerDeploymentVersionMetadataResponse": { "type": "object", "properties": { @@ -16585,6 +18702,9 @@ }, "description": "Information a user can set, often for use by user interfaces." }, + "v1ValidateWorkerDeploymentVersionComputeConfigResponse": { + "type": "object" + }, "v1VersionDrainageInfo": { "type": "object", "properties": { @@ -16603,7 +18723,7 @@ "description": "Last time the system checked for drainage of this version." } }, - "description": "Information about workflow drainage to help the user determine when it is safe\nto decommission a Version. Not present while version is current or ramping.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "Information about workflow drainage to help the user determine when it is safe\nto decommission a Version. Not present while version is current or ramping." }, "v1VersionDrainageStatus": { "type": "string", @@ -16613,7 +18733,7 @@ "VERSION_DRAINAGE_STATUS_DRAINED" ], "default": "VERSION_DRAINAGE_STATUS_UNSPECIFIED", - "description": "Specify the drainage status for a Worker Deployment Version so users can decide whether they\ncan safely decommission the version.\nExperimental. Worker Deployments are experimental and might significantly change in the future.\n\n - VERSION_DRAINAGE_STATUS_UNSPECIFIED: Drainage Status is not specified.\n - VERSION_DRAINAGE_STATUS_DRAINING: The Worker Deployment Version is not used by new workflows but is still used by\nopen pinned workflows. The version cannot be decommissioned safely.\n - VERSION_DRAINAGE_STATUS_DRAINED: The Worker Deployment Version is not used by new or open workflows, but might be still needed by\nQueries sent to closed workflows. The version can be decommissioned safely if user does\nnot query closed workflows. If the user does query closed workflows for some time x after\nworkflows are closed, they should decommission the version after it has been drained for that duration." + "description": "Specify the drainage status for a Worker Deployment Version so users can decide whether they\ncan safely decommission the version.\n\n - VERSION_DRAINAGE_STATUS_UNSPECIFIED: Drainage Status is not specified.\n - VERSION_DRAINAGE_STATUS_DRAINING: The Worker Deployment Version is not used by new workflows but is still used by\nopen pinned workflows. The version cannot be decommissioned safely.\n - VERSION_DRAINAGE_STATUS_DRAINED: The Worker Deployment Version is not used by new or open workflows, but might be still needed by\nQueries sent to closed workflows. The version can be decommissioned safely if user does\nnot query closed workflows. If the user does query closed workflows for some time x after\nworkflows are closed, they should decommission the version after it has been drained for that duration." }, "v1VersionInfo": { "type": "object", @@ -16661,7 +18781,7 @@ "VERSIONING_BEHAVIOR_AUTO_UPGRADE" ], "default": "VERSIONING_BEHAVIOR_UNSPECIFIED", - "description": "Versioning Behavior specifies if and how a workflow execution moves between Worker Deployment\nVersions. The Versioning Behavior of a workflow execution is typically specified by the worker\nwho completes the first task of the execution, but is also overridable manually for new and\nexisting workflows (see VersioningOverride).\nExperimental. Worker Deployments are experimental and might significantly change in the future.\n\n - VERSIONING_BEHAVIOR_UNSPECIFIED: Workflow execution does not have a Versioning Behavior and is called Unversioned. This is the\nlegacy behavior. An Unversioned workflow's task can go to any Unversioned worker (see\n`WorkerVersioningMode`.)\nUser needs to use Patching to keep the new code compatible with prior versions when dealing\nwith Unversioned workflows.\n - VERSIONING_BEHAVIOR_PINNED: Workflow will start on its Target Version and then will be pinned to that same Deployment\nVersion until completion (the Version that this Workflow is pinned to is specified in\n`versioning_info.version` and is the Pinned Version of the Workflow).\n\nThe workflow's Target Version is the Current Version of its Task Queue, or, if the\nTask Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target\nVersion has a P% chance of being the Ramping Version. Whether a workflow falls into the\nRamping group depends on its Workflow ID and and the Ramp Percentage.\n\nThis behavior eliminates most of compatibility concerns users face when changing their code.\nPatching is not needed when pinned workflows code change.\nCan be overridden explicitly via `UpdateWorkflowExecutionOptions` API to move the\nexecution to another Deployment Version.\nActivities of `PINNED` workflows are sent to the same Deployment Version. Exception to this\nwould be when the activity Task Queue workers are not present in the workflow's Deployment\nVersion, in which case the activity will be sent to the Current Deployment Version of its own\ntask queue.\n - VERSIONING_BEHAVIOR_AUTO_UPGRADE: Workflow will automatically move to its Target Version when the next workflow task is dispatched.\n\nThe workflow's Target Version is the Current Version of its Task Queue, or, if the\nTask Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target\nVersion has a P% chance of being the Ramping Version. Whether a workflow falls into the\nRamping group depends on its Workflow ID and and the Ramp Percentage.\n\nAutoUpgrade behavior is suitable for long-running workflows as it allows them to move to the\nlatest Deployment Version, but the user still needs to use Patching to keep the new code\ncompatible with prior versions for changed workflow types.\nActivities of `AUTO_UPGRADE` workflows are sent to the Deployment Version of the workflow\nexecution (as specified in versioning_info.version based on the last completed\nworkflow task). Exception to this would be when the activity Task Queue workers are not\npresent in the workflow's Deployment Version, in which case, the activity will be sent to a\ndifferent Deployment Version according to the Current or Ramping Deployment Version of its own\nTask Queue.\nWorkflows stuck on a backlogged activity will still auto-upgrade if their Target Version\nchanges, without having to wait for the backlogged activity to complete on the old Version." + "description": "Versioning Behavior specifies if and how a workflow execution moves between Worker Deployment\nVersions. The Versioning Behavior of a workflow execution is typically specified by the worker\nwho completes the first task of the execution, but is also overridable manually for new and\nexisting workflows (see VersioningOverride).\n\n - VERSIONING_BEHAVIOR_UNSPECIFIED: Workflow execution does not have a Versioning Behavior and is called Unversioned. This is the\nlegacy behavior. An Unversioned workflow's task can go to any Unversioned worker (see\n`WorkerVersioningMode`.)\nUser needs to use Patching to keep the new code compatible with prior versions when dealing\nwith Unversioned workflows.\n - VERSIONING_BEHAVIOR_PINNED: Workflow will start on its Target Version and then will be pinned to that same Deployment\nVersion until completion (the Version that this Workflow is pinned to is specified in\n`versioning_info.version` and is the Pinned Version of the Workflow).\n\nThe workflow's Target Version is the Current Version of its Task Queue, or, if the\nTask Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target\nVersion has a P% chance of being the Ramping Version. Whether a workflow falls into the\nRamping group depends on its Workflow ID and and the Ramp Percentage.\n\nThis behavior eliminates most of compatibility concerns users face when changing their code.\nPatching is not needed when pinned workflows code change.\nCan be overridden explicitly via `UpdateWorkflowExecutionOptions` API to move the\nexecution to another Deployment Version.\nActivities of `PINNED` workflows are sent to the same Deployment Version. Exception to this\nwould be when the activity Task Queue workers are not present in the workflow's Deployment\nVersion, in which case the activity will be sent to the Current Deployment Version of its own\ntask queue.\n - VERSIONING_BEHAVIOR_AUTO_UPGRADE: Workflow will automatically move to its Target Version when the next workflow task is dispatched.\n\nThe workflow's Target Version is the Current Version of its Task Queue, or, if the\nTask Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target\nVersion has a P% chance of being the Ramping Version. Whether a workflow falls into the\nRamping group depends on its Workflow ID and and the Ramp Percentage.\n\nAutoUpgrade behavior is suitable for long-running workflows as it allows them to move to the\nlatest Deployment Version, but the user still needs to use Patching to keep the new code\ncompatible with prior versions for changed workflow types.\nActivities of `AUTO_UPGRADE` workflows are sent to the Deployment Version of the workflow\nexecution (as specified in versioning_info.version based on the last completed\nworkflow task). Exception to this would be when the activity Task Queue workers are not\npresent in the workflow's Deployment Version, in which case, the activity will be sent to a\ndifferent Deployment Version according to the Current or Ramping Deployment Version of its own\nTask Queue.\nWorkflows stuck on a backlogged activity will still auto-upgrade if their Target Version\nchanges, without having to wait for the backlogged activity to complete on the old Version." }, "v1VersioningOverride": { "type": "object", @@ -16727,7 +18847,7 @@ "type": "object", "$ref": "#/definitions/WorkerDeploymentInfoWorkerDeploymentVersionSummary" }, - "title": "Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be\ncleaned up automatically if all the following conditions meet:\n- It does not receive new executions (is not current or ramping)\n- It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) \n- It is drained (see WorkerDeploymentVersionInfo.drainage_status)" + "title": "Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be\ncleaned up automatically if all the following conditions meet:\n- It does not receive new executions (is not current or ramping)\n- It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status)\n- It is drained (see WorkerDeploymentVersionInfo.drainage_status)" }, "createTime": { "type": "string", @@ -16749,7 +18869,7 @@ "description": "Indicates whether the routing_config has been fully propagated to all\nrelevant task queues and their partitions." } }, - "description": "A Worker Deployment (Deployment, for short) represents all workers serving \na shared set of Task Queues. Typically, a Deployment represents one service or \napplication.\nA Deployment contains multiple Deployment Versions, each representing a different \nversion of workers. (see documentation of WorkerDeploymentVersionInfo)\nDeployment records are created in Temporal server automatically when their\nfirst poller arrives to the server.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "A Worker Deployment (Deployment, for short) represents all workers serving\na shared set of Task Queues. Typically, a Deployment represents one service or\napplication.\nA Deployment contains multiple Deployment Versions, each representing a different\nversion of workers. (see documentation of WorkerDeploymentVersionInfo)\nDeployment records are created in Temporal server automatically when their\nfirst poller arrives to the server." }, "v1WorkerDeploymentOptions": { "type": "object", @@ -16767,7 +18887,7 @@ "description": "Required. Versioning Mode for this worker. Must be the same for all workers with the\nsame `deployment_name` and `build_id` combination, across all Task Queues.\nWhen `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version." } }, - "description": "Worker Deployment options set in SDK that need to be sent to server in every poll.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "Worker Deployment options set in SDK that need to be sent to server in every poll." }, "v1WorkerDeploymentVersion": { "type": "object", @@ -16799,7 +18919,8 @@ "description": "Required." }, "deploymentName": { - "type": "string" + "type": "string", + "description": "Deprecated. User deployment_version.deployment_name." }, "createTime": { "type": "string", @@ -16855,9 +18976,17 @@ "metadata": { "$ref": "#/definitions/v1VersionMetadata", "description": "Arbitrary user-provided metadata attached to this version." + }, + "computeConfig": { + "$ref": "#/definitions/v1ComputeConfig", + "description": "Optional. Contains the new worker compute configuration for the Worker\nDeployment. Used for worker scale management." + }, + "lastModifierIdentity": { + "type": "string", + "title": "Identity of the last client who modified the configuration of this Version.\nAs of now, this field only covers changes through the following APIs:\n- `CreateWorkerDeploymentVersion`\n- `UpdateWorkerDeploymentVersionComputeConfig`\n- `UpdateWorkerDeploymentVersionMetadata`" } }, - "description": "A Worker Deployment Version (Version, for short) represents all workers of the same \ncode and config within a Deployment. Workers of the same Version are expected to \nbehave exactly the same so when executions move between them there are no \nnon-determinism issues.\nWorker Deployment Versions are created in Temporal server automatically when \ntheir first poller arrives to the server.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "A Worker Deployment Version (Version, for short) represents all workers of the same\ncode and config within a Deployment. Workers of the same Version are expected to\nbehave exactly the same so when executions move between them there are no\nnon-determinism issues.\nWorker Deployment Versions are created in Temporal server automatically when\ntheir first poller arrives to the server." }, "v1WorkerDeploymentVersionStatus": { "type": "string", @@ -16867,10 +18996,11 @@ "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT", "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING", "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING", - "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED" + "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED", + "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED" ], "default": "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED", - "description": "Specify the status of a Worker Deployment Version.\nExperimental. Worker Deployments are experimental and might significantly change in the future.\n\n - WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE: The Worker Deployment Version has been created inside the Worker Deployment but is not used by any\nworkflow executions. These Versions can still have workflows if they have an explicit Versioning Override targeting\nthis Version. Such Versioning Override could be set at workflow start time, or at a later time via `UpdateWorkflowExecutionOptions`.\n - WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT: The Worker Deployment Version is the current version of the Worker Deployment. All new workflow executions \nand tasks of existing unversioned or AutoUpgrade workflows are routed to this version.\n - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING: The Worker Deployment Version is the ramping version of the Worker Deployment. A subset of new Pinned workflow executions are \nrouted to this version. Moreover, a portion of existing unversioned or AutoUpgrade workflow executions are also routed to this version.\n - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING: The Worker Deployment Version is not used by new workflows but is still used by\nopen pinned workflows. The version cannot be decommissioned safely.\n - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED: The Worker Deployment Version is not used by new or open workflows, but might be still needed by\nQueries sent to closed workflows. The version can be decommissioned safely if user does\nnot query closed workflows. If the user does query closed workflows for some time x after\nworkflows are closed, they should decommission the version after it has been drained for that duration." + "description": "Specify the status of a Worker Deployment Version.\n\n - WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE: The Worker Deployment Version has been created inside the Worker Deployment but is not used by any\nworkflow executions. These Versions can still have workflows if they have an explicit Versioning Override targeting\nthis Version. Such Versioning Override could be set at workflow start time, or at a later time via `UpdateWorkflowExecutionOptions`.\n - WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT: The Worker Deployment Version is the current version of the Worker Deployment. All new workflow executions \nand tasks of existing unversioned or AutoUpgrade workflows are routed to this version.\n - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING: The Worker Deployment Version is the ramping version of the Worker Deployment. A subset of new Pinned workflow executions are \nrouted to this version. Moreover, a portion of existing unversioned or AutoUpgrade workflow executions are also routed to this version.\n - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING: The Worker Deployment Version is not used by new workflows but is still used by\nopen pinned workflows. The version cannot be decommissioned safely.\n - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED: The Worker Deployment Version is not used by new or open workflows, but might be still needed by\nQueries sent to closed workflows. The version can be decommissioned safely if user does\nnot query closed workflows. If the user does query closed workflows for some time x after\nworkflows are closed, they should decommission the version after it has been drained for that duration.\n - WORKER_DEPLOYMENT_VERSION_STATUS_CREATED: The Worker Deployment Version is created by user (via `CreateWorkerDeploymentVersion` API)\nbut server has not seen any poller for it yet." }, "v1WorkerHeartbeat": { "type": "object", @@ -17194,7 +19324,7 @@ "WORKER_VERSIONING_MODE_VERSIONED" ], "default": "WORKER_VERSIONING_MODE_UNSPECIFIED", - "description": "Versioning Mode of a worker is set by the app developer in the worker code, and specifies the\nbehavior of the system in the following related aspects:\n- Whether or not Temporal Server considers this worker's version (Build ID) when dispatching\n tasks to it.\n- Whether or not the workflows processed by this worker are versioned using the worker's version.\nExperimental. Worker Deployments are experimental and might significantly change in the future.\n\n - WORKER_VERSIONING_MODE_UNVERSIONED: Workers with this mode are not distinguished from each other for task routing, even if they\nhave different Build IDs.\nWorkflows processed by this worker will be unversioned and user needs to use Patching to keep\nthe new code compatible with prior versions.\nThis mode is recommended to be used along with Rolling Upgrade deployment strategies.\nWorkers with this mode are represented by the special string `__unversioned__` in the APIs.\n - WORKER_VERSIONING_MODE_VERSIONED: Workers with this mode are part of a Worker Deployment Version which is identified as\n\".\". Such workers are called \"versioned\" as opposed to\n\"unversioned\".\nEach Deployment Version is distinguished from other Versions for task routing and users can\nconfigure Temporal Server to send tasks to a particular Version (see\n`WorkerDeploymentInfo.routing_config`). This mode is the best option for Blue/Green and\nRainbow strategies (but typically not suitable for Rolling upgrades.)\nWorkflow Versioning Behaviors are enabled in this mode: each workflow type must choose\nbetween the Pinned and AutoUpgrade behaviors. Depending on the chosen behavior, the user may\nor may not need to use Patching to keep the new code compatible with prior versions. (see\nVersioningBehavior enum.)" + "description": "Versioning Mode of a worker is set by the app developer in the worker code, and specifies the\nbehavior of the system in the following related aspects:\n- Whether or not Temporal Server considers this worker's version (Build ID) when dispatching\n tasks to it.\n- Whether or not the workflows processed by this worker are versioned using the worker's version.\n\n - WORKER_VERSIONING_MODE_UNVERSIONED: Workers with this mode are not distinguished from each other for task routing, even if they\nhave different Build IDs.\nWorkflows processed by this worker will be unversioned and user needs to use Patching to keep\nthe new code compatible with prior versions.\nThis mode is recommended to be used along with Rolling Upgrade deployment strategies.\nWorkers with this mode are represented by the special string `__unversioned__` in the APIs.\n - WORKER_VERSIONING_MODE_VERSIONED: Workers with this mode are part of a Worker Deployment Version which is identified as\n\".\". Such workers are called \"versioned\" as opposed to\n\"unversioned\".\nEach Deployment Version is distinguished from other Versions for task routing and users can\nconfigure Temporal Server to send tasks to a particular Version (see\n`WorkerDeploymentInfo.routing_config`). This mode is the best option for Blue/Green and\nRainbow strategies (but typically not suitable for Rolling upgrades.)\nWorkflow Versioning Behaviors are enabled in this mode: each workflow type must choose\nbetween the Pinned and AutoUpgrade behaviors. Depending on the chosen behavior, the user may\nor may not need to use Patching to keep the new code compatible with prior versions. (see\nVersioningBehavior enum.)" }, "v1WorkflowExecution": { "type": "object", @@ -17494,7 +19624,7 @@ }, "workerDeploymentName": { "type": "string", - "description": "The name of Worker Deployment that completed the most recent workflow task.\nExperimental. Worker Deployments are experimental and might change in the future." + "description": "The name of Worker Deployment that completed the most recent workflow task." }, "priority": { "$ref": "#/definitions/v1Priority", @@ -17523,6 +19653,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "description": "If set, overrides the workflow's priority sent by the SDK." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Time-skipping configuration for this workflow execution.\nIf not set, the time-skipping configuration is not updated by this request;\nthe existing configuration is preserved." } } }, @@ -17556,6 +19690,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "description": "Priority override upserted in this event. Represents the full priority; not just partial fields.\nIgnored if nil." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "If set, the time-skipping configuration was changed. Contains the full updated configuration." } } }, @@ -17622,6 +19760,10 @@ "externalWorkflowExecution": { "$ref": "#/definitions/v1WorkflowExecution", "description": "When signal origin is a workflow execution, this field is set." + }, + "requestId": { + "type": "string", + "description": "The request ID of the Signal request, used by the server to attach this to\nthe correct Event ID when generating link." } } }, @@ -17780,6 +19922,14 @@ "declinedTargetVersionUpgrade": { "$ref": "#/definitions/v1DeclinedTargetVersionUpgrade", "description": "During a previous run of this workflow, the server may have notified the SDK\nthat the Target Worker Deployment Version changed, but the SDK declined to\nupgrade (e.g., by continuing-as-new with PINNED behavior). This field records\nthe target version that was declined.\n\nThis is a wrapper message to distinguish \"never declined\" (nil wrapper) from\n\"declined an unversioned target\" (non-nil wrapper with nil deployment_version).\n\nUsed internally by the server during continue-as-new and retry.\nShould not be read or interpreted by SDKs." + }, + "timeSkippingConfig": { + "$ref": "#/definitions/v1TimeSkippingConfig", + "description": "Initial time-skipping configuration for this workflow execution, recorded at start time.\nThis may have been set explicitly via the start workflow request, or propagated from a\nparent/previous execution.\n\nThe configuration may be updated after start via UpdateWorkflowExecutionOptions, which\nwill be reflected in the WorkflowExecutionOptionsUpdatedEvent." + }, + "initialSkippedDuration": { + "type": "string", + "description": "The time skipped by the previous execution that started this workflow.\nIt can happen in cases of child workflows and continue-as-new workflows." } }, "title": "Always the first event in workflow history" @@ -17816,6 +19966,26 @@ } } }, + "v1WorkflowExecutionTimeSkippingTransitionedEventAttributes": { + "type": "object", + "properties": { + "targetTime": { + "type": "string", + "format": "date-time", + "description": "The virtual time after time skipping was applied." + }, + "disabledAfterBound": { + "type": "boolean", + "description": "when true, time skipping was disabled automatically due to a bound being reached." + }, + "wallClockTime": { + "type": "string", + "format": "date-time", + "description": "The wall-clock time when the time-skipping state changed event was generated." + } + }, + "description": "Attributes for an event indicating that time skipping state changed for a workflow execution,\neither time was advanced or time skipping was disabled automatically due to a bound being reached.\nThe worker_may_ignore field in HistoryEvent should always be set true for this event." + }, "v1WorkflowExecutionTimedOutEventAttributes": { "type": "object", "properties": { @@ -17960,6 +20130,10 @@ "type": "string", "format": "int64", "description": "Monotonic counter reflecting the latest routing decision for this workflow execution.\nUsed for staleness detection between history and matching when dispatching tasks to workers.\nIncremented when a workflow execution routes to a new deployment version, which happens\nwhen a worker of the new deployment version completes a workflow task.\nNote: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not\nface the problem of inconsistent dispatching that arises from eventual consistency between\ntask queues and their partitions." + }, + "continueAsNewInitialVersioningBehavior": { + "$ref": "#/definitions/v1ContinueAsNewVersioningBehavior", + "description": "Experimental.\nIf this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\nspecified in that command.\nOnly used for the initial task of this run and the initial task of any retries of this run.\nNot passed to children or to future continue-as-new.\n\nNote: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\na non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\nwith ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent\nto ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade." } }, "description": "Holds all the information about worker versioning for a particular workflow execution.\nExperimental. Versioning info is experimental and might change in the future." @@ -18148,15 +20322,15 @@ }, "workerDeploymentVersion": { "type": "string", - "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.version`.\nExperimental. Worker Deployments are experimental and might significantly change in the future.\nDeprecated. Replaced with `deployment_version`." + "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.version`.\nDeprecated. Replaced with `deployment_version`." }, "workerDeploymentName": { "type": "string", - "description": "The name of Worker Deployment that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `worker_deployment_name`.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "The name of Worker Deployment that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `worker_deployment_name`." }, "deploymentVersion": { "$ref": "#/definitions/v1WorkerDeploymentVersion", - "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.deployment_version`.\nExperimental. Worker Deployments are experimental and might significantly change in the future." + "description": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\nis set. This value updates workflow execution's `versioning_info.deployment_version`." } } }, diff --git a/crates/common/protos/api_upstream/openapi/openapiv3.yaml b/crates/common/protos/api_upstream/openapi/openapiv3.yaml index 091a9998e..50030712a 100644 --- a/crates/common/protos/api_upstream/openapi/openapiv3.yaml +++ b/crates/common/protos/api_upstream/openapi/openapiv3.yaml @@ -1343,6 +1343,327 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/nexus-operation-count: + get: + tags: + - WorkflowService + description: CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace. + operationId: CountNexusOperationExecutions + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: query + in: query + description: |- + Visibility query, see https://docs.temporal.io/list-filter for the syntax. + See also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CountNexusOperationExecutionsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/nexus-operations: + get: + tags: + - WorkflowService + description: ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace. + operationId: ListNexusOperationExecutions + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: pageSize + in: query + description: Max number of operations to return per page. + schema: + type: integer + format: int32 + - name: nextPageToken + in: query + description: Token returned in ListNexusOperationExecutionsResponse. + schema: + type: string + format: bytes + - name: query + in: query + description: |- + Visibility query, see https://docs.temporal.io/list-filter for the syntax. + Search attributes that are avaialble for Nexus operations include: + - OperationId + - RunId + - Endpoint + - Service + - Operation + - RequestId + - StartTime + - ExecutionTime + - CloseTime + - ExecutionStatus + - ExecutionDuration + - StateTransitionCount + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ListNexusOperationExecutionsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/nexus-operations/{operationId}: + get: + tags: + - WorkflowService + description: |- + DescribeNexusOperationExecution returns information about a Nexus operation. + Supported use cases include: + - Get current operation info without waiting + - Long-poll for next state change and return new operation info + Response can optionally include operation input or outcome (if the operation has completed). + operationId: DescribeNexusOperationExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: operationId + in: path + required: true + schema: + type: string + - name: runId + in: query + description: Operation run ID. If empty the request targets the latest run. + schema: + type: string + - name: includeInput + in: query + description: Include the input field in the response. + schema: + type: boolean + - name: includeOutcome + in: query + description: Include the outcome (result/failure) in the response if the operation has completed. + schema: + type: boolean + - name: longPollToken + in: query + description: |- + Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation + state changes from the state encoded in this token. If absent, return current state immediately. + If present, run_id must also be present. + Note that operation state may change multiple times between requests, therefore it is not + guaranteed that a client making a sequence of long-poll requests will see a complete + sequence of state changes. + schema: + type: string + format: bytes + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeNexusOperationExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + post: + tags: + - WorkflowService + description: |- + StartNexusOperationExecution starts a new Nexus operation. + + Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + namespace unless permitted by the specified ID conflict policy. + operationId: StartNexusOperationExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: operationId + in: path + description: |- + Identifier for this operation. This is a caller-side ID, distinct from any internal + operation identifiers generated by the handler. Must be unique among operations in the + same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartNexusOperationExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/StartNexusOperationExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/nexus-operations/{operationId}/cancel: + post: + tags: + - WorkflowService + description: |- + RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + + Requesting to cancel an operation does not automatically transition the operation to canceled status. + The operation will only transition to canceled status if it supports cancellation and the handler + processes the cancellation request. + operationId: RequestCancelNexusOperationExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: operationId + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RequestCancelNexusOperationExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RequestCancelNexusOperationExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/nexus-operations/{operationId}/poll: + get: + tags: + - WorkflowService + description: |- + PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + the outcome (result or failure). + operationId: PollNexusOperationExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: operationId + in: path + required: true + schema: + type: string + - name: runId + in: query + description: Operation run ID. If empty the request targets the latest run. + schema: + type: string + - name: waitStage + in: query + description: Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked. + schema: + enum: + - NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED + - NEXUS_OPERATION_WAIT_STAGE_STARTED + - NEXUS_OPERATION_WAIT_STAGE_CLOSED + type: string + format: enum + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PollNexusOperationExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/nexus-operations/{operationId}/terminate: + post: + tags: + - WorkflowService + description: |- + TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + + Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + its outcome set to a failure with a termination reason. + operationId: TerminateNexusOperationExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: operationId + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminateNexusOperationExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TerminateNexusOperationExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}/schedule-count: get: tags: @@ -1812,6 +2133,7 @@ paths: - TASK_QUEUE_KIND_UNSPECIFIED - TASK_QUEUE_KIND_NORMAL - TASK_QUEUE_KIND_STICKY + - TASK_QUEUE_KIND_WORKER_COMMANDS type: string format: enum - name: taskQueue.normalName @@ -1958,14 +2280,16 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}: - get: + /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}: + post: tags: - WorkflowService description: |- - Describes a worker deployment version. - Experimental. This API might significantly change or be removed in a future release. - operationId: DescribeWorkerDeploymentVersion + Creates a new Worker Deployment Version. + + Experimental. This API might significantly change or be removed in a + future release. + operationId: CreateWorkerDeploymentVersion parameters: - name: namespace in: path @@ -1977,10 +2301,48 @@ paths: required: true schema: type: string - - name: deployment_version.build_id - in: path - required: true - schema: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentVersionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}: + get: + tags: + - WorkflowService + description: |- + Describes a worker deployment version. + Experimental. This API might significantly change or be removed in a future release. + operationId: DescribeWorkerDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id + in: path + required: true + schema: type: string - name: version in: query @@ -2091,6 +2453,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + ? /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute-config + : post: + tags: + - WorkflowService + description: |- + Updates the compute config attached to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + operationId: UpdateWorkerDeploymentVersionComputeConfig + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWorkerDeploymentVersionComputeConfigRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWorkerDeploymentVersionComputeConfigResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' ? /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata : post: tags: @@ -2134,6 +2539,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + ? /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/validate-compute-config + : post: + tags: + - WorkflowService + description: |- + Validates the compute config without attaching it to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + operationId: ValidateWorkerDeploymentVersionComputeConfig + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateWorkerDeploymentVersionComputeConfigRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateWorkerDeploymentVersionComputeConfigResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}/worker-deployments: get: tags: @@ -2203,6 +2651,48 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + post: + tags: + - WorkflowService + description: |- + Creates a new Worker Deployment. + + Experimental. This API might significantly change or be removed in a + future release. + operationId: CreateWorkerDeployment + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deploymentName + in: path + description: |- + The name of the Worker Deployment to create. If a Worker Deployment with + this name already exists, an error will be returned. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' delete: tags: - WorkflowService @@ -5235,199 +5725,520 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SetCurrentDeploymentResponse' + $ref: '#/components/schemas/SetCurrentDeploymentResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/current-deployment/{seriesName}: + get: + tags: + - WorkflowService + description: |- + Returns the current deployment (and its info) for a given deployment series. + Experimental. This API might significantly change or be removed in a future release. + Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. + operationId: GetCurrentDeployment + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: seriesName + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetCurrentDeploymentResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/deployments: + get: + tags: + - WorkflowService + description: |- + Lists worker deployments in the namespace. Optionally can filter based on deployment series + name. + Experimental. This API might significantly change or be removed in a future release. + Deprecated. Replaced with `ListWorkerDeployments`. + operationId: ListDeployments + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: pageSize + in: query + schema: + type: integer + format: int32 + - name: nextPageToken + in: query + schema: + type: string + format: bytes + - name: seriesName + in: query + description: Optional. Use to filter based on exact series name match. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ListDeploymentsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}: + get: + tags: + - WorkflowService + description: |- + Describes a worker deployment. + Experimental. This API might significantly change or be removed in a future release. + Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. + operationId: DescribeDeployment + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment.series_name + in: path + required: true + schema: + type: string + - name: deployment.build_id + in: path + required: true + schema: + type: string + - name: deployment.seriesName + in: query + description: |- + Different versions of the same worker service/application are related together by having a + shared series name. + Out of all deployments of a series, one can be designated as the current deployment, which + receives new workflow executions and new tasks of workflows with + `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. + schema: + type: string + - name: deployment.buildId + in: query + description: |- + Build ID changes with each version of the worker when the worker program code and/or config + changes. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeDeploymentResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability: + get: + tags: + - WorkflowService + description: |- + Returns the reachability level of a worker deployment to help users decide when it is time + to decommission a deployment. Reachability level is calculated based on the deployment's + `status` and existing workflows that depend on the given deployment for their execution. + Calculating reachability is relatively expensive. Therefore, server might return a recently + cached value. In such a case, the `last_update_time` will inform you about the actual + reachability calculation time. + Experimental. This API might significantly change or be removed in a future release. + Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. + operationId: GetDeploymentReachability + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment.series_name + in: path + required: true + schema: + type: string + - name: deployment.build_id + in: path + required: true + schema: + type: string + - name: deployment.seriesName + in: query + description: |- + Different versions of the same worker service/application are related together by having a + shared series name. + Out of all deployments of a series, one can be designated as the current deployment, which + receives new workflow executions and new tasks of workflows with + `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. + schema: + type: string + - name: deployment.buildId + in: query + description: |- + Build ID changes with each version of the worker when the worker program code and/or config + changes. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetDeploymentReachabilityResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/nexus-operation-count: + get: + tags: + - WorkflowService + description: CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace. + operationId: CountNexusOperationExecutions + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: query + in: query + description: |- + Visibility query, see https://docs.temporal.io/list-filter for the syntax. + See also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CountNexusOperationExecutionsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/nexus-operations: + get: + tags: + - WorkflowService + description: ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace. + operationId: ListNexusOperationExecutions + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: pageSize + in: query + description: Max number of operations to return per page. + schema: + type: integer + format: int32 + - name: nextPageToken + in: query + description: Token returned in ListNexusOperationExecutionsResponse. + schema: + type: string + format: bytes + - name: query + in: query + description: |- + Visibility query, see https://docs.temporal.io/list-filter for the syntax. + Search attributes that are avaialble for Nexus operations include: + - OperationId + - RunId + - Endpoint + - Service + - Operation + - RequestId + - StartTime + - ExecutionTime + - CloseTime + - ExecutionStatus + - ExecutionDuration + - StateTransitionCount + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ListNexusOperationExecutionsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/nexus-operations/{operationId}: + get: + tags: + - WorkflowService + description: |- + DescribeNexusOperationExecution returns information about a Nexus operation. + Supported use cases include: + - Get current operation info without waiting + - Long-poll for next state change and return new operation info + Response can optionally include operation input or outcome (if the operation has completed). + operationId: DescribeNexusOperationExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: operationId + in: path + required: true + schema: + type: string + - name: runId + in: query + description: Operation run ID. If empty the request targets the latest run. + schema: + type: string + - name: includeInput + in: query + description: Include the input field in the response. + schema: + type: boolean + - name: includeOutcome + in: query + description: Include the outcome (result/failure) in the response if the operation has completed. + schema: + type: boolean + - name: longPollToken + in: query + description: |- + Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation + state changes from the state encoded in this token. If absent, return current state immediately. + If present, run_id must also be present. + Note that operation state may change multiple times between requests, therefore it is not + guaranteed that a client making a sequence of long-poll requests will see a complete + sequence of state changes. + schema: + type: string + format: bytes + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeNexusOperationExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/current-deployment/{seriesName}: - get: + post: tags: - WorkflowService description: |- - Returns the current deployment (and its info) for a given deployment series. - Experimental. This API might significantly change or be removed in a future release. - Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. - operationId: GetCurrentDeployment + StartNexusOperationExecution starts a new Nexus operation. + + Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + namespace unless permitted by the specified ID conflict policy. + operationId: StartNexusOperationExecution parameters: - name: namespace in: path required: true schema: type: string - - name: seriesName + - name: operationId in: path + description: |- + Identifier for this operation. This is a caller-side ID, distinct from any internal + operation identifiers generated by the handler. Must be unique among operations in the + same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartNexusOperationExecutionRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/GetCurrentDeploymentResponse' + $ref: '#/components/schemas/StartNexusOperationExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/deployments: - get: + /namespaces/{namespace}/nexus-operations/{operationId}/cancel: + post: tags: - WorkflowService description: |- - Lists worker deployments in the namespace. Optionally can filter based on deployment series - name. - Experimental. This API might significantly change or be removed in a future release. - Deprecated. Replaced with `ListWorkerDeployments`. - operationId: ListDeployments + RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + + Requesting to cancel an operation does not automatically transition the operation to canceled status. + The operation will only transition to canceled status if it supports cancellation and the handler + processes the cancellation request. + operationId: RequestCancelNexusOperationExecution parameters: - name: namespace in: path required: true schema: type: string - - name: pageSize - in: query - schema: - type: integer - format: int32 - - name: nextPageToken - in: query - schema: - type: string - format: bytes - - name: seriesName - in: query - description: Optional. Use to filter based on exact series name match. + - name: operationId + in: path + required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RequestCancelNexusOperationExecutionRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListDeploymentsResponse' + $ref: '#/components/schemas/RequestCancelNexusOperationExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}: + /namespaces/{namespace}/nexus-operations/{operationId}/poll: get: tags: - WorkflowService description: |- - Describes a worker deployment. - Experimental. This API might significantly change or be removed in a future release. - Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. - operationId: DescribeDeployment + PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + the outcome (result or failure). + operationId: PollNexusOperationExecution parameters: - name: namespace in: path required: true schema: type: string - - name: deployment.series_name - in: path - required: true - schema: - type: string - - name: deployment.build_id + - name: operationId in: path required: true schema: type: string - - name: deployment.seriesName + - name: runId in: query - description: |- - Different versions of the same worker service/application are related together by having a - shared series name. - Out of all deployments of a series, one can be designated as the current deployment, which - receives new workflow executions and new tasks of workflows with - `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. + description: Operation run ID. If empty the request targets the latest run. schema: type: string - - name: deployment.buildId + - name: waitStage in: query - description: |- - Build ID changes with each version of the worker when the worker program code and/or config - changes. + description: Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked. schema: + enum: + - NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED + - NEXUS_OPERATION_WAIT_STAGE_STARTED + - NEXUS_OPERATION_WAIT_STAGE_CLOSED type: string + format: enum responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DescribeDeploymentResponse' + $ref: '#/components/schemas/PollNexusOperationExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability: - get: + /namespaces/{namespace}/nexus-operations/{operationId}/terminate: + post: tags: - WorkflowService description: |- - Returns the reachability level of a worker deployment to help users decide when it is time - to decommission a deployment. Reachability level is calculated based on the deployment's - `status` and existing workflows that depend on the given deployment for their execution. - Calculating reachability is relatively expensive. Therefore, server might return a recently - cached value. In such a case, the `last_update_time` will inform you about the actual - reachability calculation time. - Experimental. This API might significantly change or be removed in a future release. - Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. - operationId: GetDeploymentReachability + TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + + Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + its outcome set to a failure with a termination reason. + operationId: TerminateNexusOperationExecution parameters: - name: namespace in: path required: true schema: type: string - - name: deployment.series_name - in: path - required: true - schema: - type: string - - name: deployment.build_id + - name: operationId in: path required: true schema: type: string - - name: deployment.seriesName - in: query - description: |- - Different versions of the same worker service/application are related together by having a - shared series name. - Out of all deployments of a series, one can be designated as the current deployment, which - receives new workflow executions and new tasks of workflows with - `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. - schema: - type: string - - name: deployment.buildId - in: query - description: |- - Build ID changes with each version of the worker when the worker program code and/or config - changes. - schema: - type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminateNexusOperationExecutionRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/GetDeploymentReachabilityResponse' + $ref: '#/components/schemas/TerminateNexusOperationExecutionResponse' default: description: Default error response content: @@ -5878,6 +6689,7 @@ paths: - TASK_QUEUE_KIND_UNSPECIFIED - TASK_QUEUE_KIND_NORMAL - TASK_QUEUE_KIND_STICKY + - TASK_QUEUE_KIND_WORKER_COMMANDS type: string format: enum - name: taskQueue.normalName @@ -5991,6 +6803,46 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}: + post: + tags: + - WorkflowService + description: |- + Creates a new Worker Deployment Version. + + Experimental. This API might significantly change or be removed in a + future release. + operationId: CreateWorkerDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentVersionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}: get: tags: @@ -6063,7 +6915,118 @@ paths: - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition can be skipped by passing `skip-drainage=true`. Experimental. This API might significantly change or be removed in a future release. - operationId: DeleteWorkerDeploymentVersion + operationId: DeleteWorkerDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id + in: path + required: true + schema: + type: string + - name: version + in: query + description: Deprecated. Use `deployment_version`. + schema: + type: string + - name: deploymentVersion.buildId + in: query + description: |- + A unique identifier for this Version within the Deployment it is a part of. + Not necessarily unique within the namespace. + The combination of `deployment_name` and `build_id` uniquely identifies this + Version within the namespace, because Deployment names are unique within a namespace. + schema: + type: string + - name: deploymentVersion.deploymentName + in: query + description: Identifies the Worker Deployment this Version is part of. + schema: + type: string + - name: skipDrainage + in: query + description: |- + Pass to force deletion even if the Version is draining. In this case the open pinned + workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. + schema: + type: boolean + - name: identity + in: query + description: Optional. The identity of the client who initiated this request. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteWorkerDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + ? /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute-config + : post: + tags: + - WorkflowService + description: |- + Updates the compute config attached to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + operationId: UpdateWorkerDeploymentVersionComputeConfig + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deployment_version.deployment_name + in: path + required: true + schema: + type: string + - name: deployment_version.build_id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWorkerDeploymentVersionComputeConfigRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWorkerDeploymentVersionComputeConfigResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + ? /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata + : post: + tags: + - WorkflowService + description: |- + Updates the user-given metadata attached to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + operationId: UpdateWorkerDeploymentVersionMetadata parameters: - name: namespace in: path @@ -6080,58 +7043,33 @@ paths: required: true schema: type: string - - name: version - in: query - description: Deprecated. Use `deployment_version`. - schema: - type: string - - name: deploymentVersion.buildId - in: query - description: |- - A unique identifier for this Version within the Deployment it is a part of. - Not necessarily unique within the namespace. - The combination of `deployment_name` and `build_id` uniquely identifies this - Version within the namespace, because Deployment names are unique within a namespace. - schema: - type: string - - name: deploymentVersion.deploymentName - in: query - description: Identifies the Worker Deployment this Version is part of. - schema: - type: string - - name: skipDrainage - in: query - description: |- - Pass to force deletion even if the Version is draining. In this case the open pinned - workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. - schema: - type: boolean - - name: identity - in: query - description: Optional. The identity of the client who initiated this request. - schema: - type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWorkerDeploymentVersionMetadataRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteWorkerDeploymentVersionResponse' + $ref: '#/components/schemas/UpdateWorkerDeploymentVersionMetadataResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - ? /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata + ? /namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/validate-compute-config : post: tags: - WorkflowService description: |- - Updates the user-given metadata attached to a Worker Deployment Version. + Validates the compute config without attaching it to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. - operationId: UpdateWorkerDeploymentVersionMetadata + operationId: ValidateWorkerDeploymentVersionComputeConfig parameters: - name: namespace in: path @@ -6152,7 +7090,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateWorkerDeploymentVersionMetadataRequest' + $ref: '#/components/schemas/ValidateWorkerDeploymentVersionComputeConfigRequest' required: true responses: "200": @@ -6160,7 +7098,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateWorkerDeploymentVersionMetadataResponse' + $ref: '#/components/schemas/ValidateWorkerDeploymentVersionComputeConfigResponse' default: description: Default error response content: @@ -6236,6 +7174,48 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + post: + tags: + - WorkflowService + description: |- + Creates a new Worker Deployment. + + Experimental. This API might significantly change or be removed in a + future release. + operationId: CreateWorkerDeployment + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deploymentName + in: path + description: |- + The name of the Worker Deployment to create. If a Worker Deployment with + this name already exists, an error will be returned. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorkerDeploymentResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' delete: tags: - WorkflowService @@ -7900,6 +8880,14 @@ components: canceledReason: type: string description: Set if activity cancelation was requested. + links: + type: array + items: + $ref: '#/components/schemas/Link' + description: Links to related entities, such as the entity that started this activity. + totalHeartbeatCount: + type: string + description: Total number of heartbeats recorded across all attempts of this activity, including retries. description: Information about a standalone activity. ActivityExecutionListInfo: type: object @@ -8730,10 +9718,6 @@ components: allOf: - $ref: '#/components/schemas/Callback' description: Information on how this callback should be invoked (e.g. its URL and type). - trigger: - allOf: - - $ref: '#/components/schemas/CallbackInfo_Trigger' - description: Trigger for this callback. registrationTime: type: string description: The time when the callback was registered. @@ -8748,6 +9732,7 @@ components: - CALLBACK_STATE_SUCCEEDED - CALLBACK_STATE_BLOCKED type: string + description: The current state of the callback. format: enum attempt: type: integer @@ -8770,16 +9755,7 @@ components: blockedReason: type: string description: If the state is BLOCKED, blocked reason provides additional information. - description: CallbackInfo contains the state of an attached workflow callback. - CallbackInfo_Trigger: - type: object - properties: - workflowClosed: - $ref: '#/components/schemas/CallbackInfo_WorkflowClosed' - CallbackInfo_WorkflowClosed: - type: object - properties: {} - description: Trigger for when the workflow is closed. + description: Common callback information. Specific CallbackInfo messages should embed this and may include additional fields. Callback_Internal: type: object properties: @@ -8808,6 +9784,9 @@ components: properties: details: $ref: '#/components/schemas/Payloads' + identity: + type: string + description: The identity of the worker or client that requested the cancellation. ChildWorkflowExecutionCanceledEventAttributes: type: object properties: @@ -9031,6 +10010,143 @@ components: description: |- Used by the worker versioning APIs, represents an unordered set of one or more versions which are considered to be compatible with each other. Currently the versions are always worker build IDs. + ComputeConfig: + type: object + properties: + scalingGroups: + type: object + additionalProperties: + $ref: '#/components/schemas/ComputeConfigScalingGroup' + description: |- + Each scaling group describes a compute config for a specific subset of the worker + deployment version: covering a specific set of task types and/or regions. + Having different configurations for different task types, allows independent + tuning of activity and workflow task processing (for example). + + The key of the map is the ID of the scaling group used to reference it in subsequent + update calls. + description: |- + ComputeConfig stores configuration that helps a worker control plane + controller understand *when* and *how* to respond to worker lifecycle + events. + ComputeConfigScalingGroup: + type: object + properties: + taskQueueTypes: + type: array + items: + enum: + - TASK_QUEUE_TYPE_UNSPECIFIED + - TASK_QUEUE_TYPE_WORKFLOW + - TASK_QUEUE_TYPE_ACTIVITY + - TASK_QUEUE_TYPE_NEXUS + type: string + format: enum + description: |- + Optional. The set of task queue types this scaling group serves. + If not provided, this scaling group serves all not otherwise defined + task types. + provider: + allOf: + - $ref: '#/components/schemas/ComputeProvider' + description: |- + Stores instructions for a worker control plane controller how to respond + to worker lifeycle events. + scaler: + allOf: + - $ref: '#/components/schemas/ComputeScaler' + description: |- + Informs a worker lifecycle controller *when* and *how often* to perform + certain worker lifecycle actions like starting a serverless worker. + ComputeConfigScalingGroupSummary: + type: object + properties: + taskQueueTypes: + type: array + items: + enum: + - TASK_QUEUE_TYPE_UNSPECIFIED + - TASK_QUEUE_TYPE_WORKFLOW + - TASK_QUEUE_TYPE_ACTIVITY + - TASK_QUEUE_TYPE_NEXUS + type: string + format: enum + providerType: + type: string + ComputeConfigScalingGroupUpdate: + type: object + properties: + scalingGroup: + $ref: '#/components/schemas/ComputeConfigScalingGroup' + updateMask: + type: string + description: |- + Controls which fields from `scaling_group` will be applied. Semantics: + - Mask is ignored for new scaling groups (only applicable when scaling group already exists). + - Empty mask for an existing scaling group is no-op: no change. + - Non-empty mask for an existing scaling group will update/unset only to the fields + mentioned in the mask. + - Accepted paths: "task_queue_types", "provider", "provider.type", "provider.details", + "provider.nexus_endpoint", "scaler", "scaler.type", "scaler.details" + format: field-mask + ComputeConfigSummary: + type: object + properties: + scalingGroups: + type: object + additionalProperties: + $ref: '#/components/schemas/ComputeConfigScalingGroupSummary' + description: A subset of information in ComputeConfig optimized for list views. + ComputeProvider: + type: object + properties: + type: + type: string + description: |- + Type of the compute provider. This string is implementation-specific and + can be used by implementations to understand how to interpret the + contents of the provider_details field. + details: + allOf: + - $ref: '#/components/schemas/Payload' + description: |- + Contains provider-specific instructions and configuration. + For server-implemented providers, use the SDK's default content + converter to ensure the server can understand it. + For remote-implemented providers, you might use your own content + converters according to what the remote endpoints understand. + nexusEndpoint: + type: string + description: |- + Optional. If the compute provider is a Nexus service, this should point + there. + description: |- + ComputeProvider stores information used by a worker control plane controller + to respond to worker lifecycle events. For example, when a Task is received + on a TaskQueue that has no active pollers, a serverless worker lifecycle + controller might need to invoke an AWS Lambda Function that itself ends up + calling the SDK's worker.New() function. + ComputeScaler: + type: object + properties: + type: + type: string + description: |- + Type of the compute scaler. this string is implementation-specific and + can be used by implementations to understand how to interpret the + contents of the scaler_details field. + details: + allOf: + - $ref: '#/components/schemas/Payload' + description: |- + Contains scaler-specific instructions and configuration. + For server-implemented scalers, use the SDK's default data + converter to ensure the server can understand it. + For remote-implemented scalers, you might use your own data + converters according to what the remote endpoints understand. + description: |- + ComputeScaler instructs the Temporal Service when to scale up or down the number of + Workers that comprise a WorkerDeployment. ConfigMetadata: type: object properties: @@ -9073,6 +10189,33 @@ components: $ref: '#/components/schemas/Payload' count: type: string + CountNexusOperationExecutionsResponse: + type: object + properties: + count: + type: string + description: |- + If `query` is not grouping by any field, the count is an approximate number + of operations that match the query. + If `query` is grouping by a field, the count is simply the sum of the counts + of the groups returned in the response. This number can be smaller than the + total number of operations matching the query. + groups: + type: array + items: + $ref: '#/components/schemas/CountNexusOperationExecutionsResponse_AggregationGroup' + description: |- + Contains the groups if the request is grouping by a field. + The list might not be complete, and the counts of each group is approximate. + CountNexusOperationExecutionsResponse_AggregationGroup: + type: object + properties: + groupValues: + type: array + items: + $ref: '#/components/schemas/Payload' + count: + type: string CountSchedulesResponse: type: object properties: @@ -9179,6 +10322,61 @@ components: conflictToken: type: string format: bytes + CreateWorkerDeploymentRequest: + type: object + properties: + namespace: + type: string + deploymentName: + type: string + description: |- + The name of the Worker Deployment to create. If a Worker Deployment with + this name already exists, an error will be returned. + identity: + type: string + description: Optional. The identity of the client who initiated this request. + requestId: + type: string + description: A unique identifier for this create request for idempotence. Typically UUIDv4. + description: Creates a new WorkerDeployment. + CreateWorkerDeploymentResponse: + type: object + properties: + conflictToken: + type: string + description: |- + This value is returned so that it can be optionally passed to APIs that + write to the WorkerDeployment state to ensure that the state did not + change between this API call and a future write. + format: bytes + CreateWorkerDeploymentVersionRequest: + type: object + properties: + namespace: + type: string + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. + computeConfig: + allOf: + - $ref: '#/components/schemas/ComputeConfig' + description: |- + Optional. Contains the new worker compute configuration for the Worker + Deployment. Used for worker scale management. + identity: + type: string + description: Optional. The identity of the client who initiated this request. + requestId: + type: string + description: |- + A unique identifier for this create request for idempotence. Typically UUIDv4. + If a second request with the same ID is recieved, it is considered a successful no-op. + Retrying with a different request ID for the same deployment name + build ID is an error. + description: Creates a new WorkerDeploymentVersion. + CreateWorkerDeploymentVersionResponse: + type: object + properties: {} CreateWorkflowRuleRequest: type: object properties: @@ -9231,6 +10429,13 @@ components: properties: deploymentVersion: $ref: '#/components/schemas/WorkerDeploymentVersion' + revisionNumber: + type: string + description: |- + Revision number of the task queue routing config at the time the target + was declined. If an incoming target's revision is <= this value, it is + not newer and is not used for deciding whether or not to suppress the + upgrade signal. description: |- Wrapper for a target deployment version that the SDK declined to upgrade to. See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes. @@ -9381,6 +10586,11 @@ components: type: string description: Token for follow-on long-poll requests. Absent only if the activity is complete. format: bytes + callbacks: + type: array + items: + $ref: '#/components/schemas/CallbackInfo' + description: Callbacks attached to this activity execution and their current state. DescribeBatchOperationResponse: type: object properties: @@ -9451,15 +10661,43 @@ components: $ref: '#/components/schemas/NamespaceReplicationConfig' failoverVersion: type: string - isGlobalNamespace: - type: boolean - failoverHistory: - type: array - items: - $ref: '#/components/schemas/FailoverStatus' - description: |- - Contains the historical state of failover_versions for the cluster, truncated to contain only the last N - states to ensure that the list does not grow unbounded. + isGlobalNamespace: + type: boolean + failoverHistory: + type: array + items: + $ref: '#/components/schemas/FailoverStatus' + description: |- + Contains the historical state of failover_versions for the cluster, truncated to contain only the last N + states to ensure that the list does not grow unbounded. + DescribeNexusOperationExecutionResponse: + type: object + properties: + runId: + type: string + description: The run ID of the operation, useful when run_id was not specified in the request. + info: + allOf: + - $ref: '#/components/schemas/NexusOperationExecutionInfo' + description: Information about the operation. + input: + allOf: + - $ref: '#/components/schemas/Payload' + description: |- + Serialized operation input, passed as the request payload. + Only set if include_input was true in the request. + result: + allOf: + - $ref: '#/components/schemas/Payload' + description: The result if the operation completed successfully. + failure: + allOf: + - $ref: '#/components/schemas/Failure' + description: The failure if the operation completed unsuccessfully. + longPollToken: + type: string + description: Token for follow-on long-poll requests. Absent only if the operation is complete. + format: bytes DescribeScheduleResponse: type: object properties: @@ -9980,6 +11218,12 @@ components: description: |- True if the server supports Nexus operations. This flag is dependent both on server version and for Nexus to be enabled via server configuration. + serverScaledDeployments: + type: boolean + description: |- + True if the server supports server-scaled deployments. + This flag is dependent both on server version and for server-scaled deployments + to be enabled via server configuration. description: System capability details. GetWorkerBuildIdCompatibilityResponse: type: object @@ -10157,6 +11401,7 @@ components: - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED + - EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED type: string format: enum version: @@ -10192,7 +11437,11 @@ components: type: array items: $ref: '#/components/schemas/Link' - description: Links associated with the event. + description: Links to related entities, such as the entity that started this event's workflow. + principal: + allOf: + - $ref: '#/components/schemas/Principal' + description: Server-computed authenticated caller identity associated with this event. workflowExecutionStartedEventAttributes: $ref: '#/components/schemas/WorkflowExecutionStartedEventAttributes' workflowExecutionCompletedEventAttributes: @@ -10311,6 +11560,8 @@ components: $ref: '#/components/schemas/WorkflowExecutionPausedEventAttributes' workflowExecutionUnpausedEventAttributes: $ref: '#/components/schemas/WorkflowExecutionUnpausedEventAttributes' + workflowExecutionTimeSkippingTransitionedEventAttributes: + $ref: '#/components/schemas/WorkflowExecutionTimeSkippingTransitionedEventAttributes' description: |- History events are the method by which Temporal SDKs advance (or recreate) workflow state. See the `EventType` enum for more info about what each event is for. @@ -10324,7 +11575,28 @@ components: sourceDeploymentRevisionNumber: type: string description: The revision number of the source deployment version of the parent/previous workflow. - description: "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version \n to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior." + continueAsNewInitialVersioningBehavior: + enum: + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION + type: string + description: |- + Experimental. + If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + specified in that command. + Only used for the initial task of this run and the initial task of any retries of this run. + Not passed to children or to future continue-as-new. + + Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade + value if the InheritedAutoUpgradeInfo is non-empty. + format: enum + description: |- + Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version + to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. + Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion. Input: type: object properties: @@ -10369,11 +11641,25 @@ components: $ref: '#/components/schemas/Link_WorkflowEvent' batchJob: $ref: '#/components/schemas/Link_BatchJob' + activity: + $ref: '#/components/schemas/Link_Activity' + nexusOperation: + $ref: '#/components/schemas/Link_NexusOperation' description: |- Link can be associated with history events. It might contain information about an external entity related to the history event. For example, workflow A makes a Nexus call that starts workflow B: in this case, a history event in workflow A could contain a Link to the workflow started event in workflow B, and vice-versa. + Link_Activity: + type: object + properties: + namespace: + type: string + activityId: + type: string + runId: + type: string + description: A link to an activity. Link_BatchJob: type: object properties: @@ -10383,6 +11669,16 @@ components: A link to a built-in batch job. Batch jobs can be used to perform operations on a set of workflows (e.g. terminate, signal, cancel, etc). This link can be put on workflow history events generated by actions taken by a batch job. + Link_NexusOperation: + type: object + properties: + namespace: + type: string + operationId: + type: string + runId: + type: string + description: A link to a standalone Nexus operation. Link_WorkflowEvent: type: object properties: @@ -10460,6 +11756,17 @@ components: type: array items: $ref: '#/components/schemas/Endpoint' + ListNexusOperationExecutionsResponse: + type: object + properties: + operations: + type: array + items: + $ref: '#/components/schemas/NexusOperationExecutionListInfo' + nextPageToken: + type: string + description: Token to use to fetch the next page. If empty, there is no next page. + format: bytes ListScheduleMatchingTimesResponse: type: object properties: @@ -10996,6 +12303,241 @@ components: type: string description: The request ID allocated at schedule time. description: Nexus operation completed successfully. + NexusOperationExecutionCancellationInfo: + type: object + properties: + requestedTime: + type: string + description: The time when cancellation was requested. + format: date-time + state: + enum: + - NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED + - NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED + - NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF + - NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED + - NEXUS_OPERATION_CANCELLATION_STATE_FAILED + - NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT + - NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED + type: string + format: enum + attempt: + type: integer + description: |- + The number of attempts made to deliver the cancel operation request. + This number represents a minimum bound since the attempt is incremented after the request completes. + format: int32 + lastAttemptCompleteTime: + type: string + description: The time when the last attempt completed. + format: date-time + lastAttemptFailure: + allOf: + - $ref: '#/components/schemas/Failure' + description: The last attempt's failure, if any. + nextAttemptScheduleTime: + type: string + description: The time when the next attempt is scheduled. + format: date-time + blockedReason: + type: string + description: If the state is BLOCKED, blocked reason provides additional information. + reason: + type: string + description: A reason that may be specified in the CancelNexusOperationRequest. + description: NexusOperationExecutionCancellationInfo contains the state of a Nexus operation cancellation. + NexusOperationExecutionInfo: + type: object + properties: + operationId: + type: string + description: Unique identifier of this Nexus operation within its namespace along with run ID (below). + runId: + type: string + endpoint: + type: string + description: Endpoint name, resolved to a URL via the cluster's endpoint registry. + service: + type: string + description: Service name. + operation: + type: string + description: Operation name. + status: + enum: + - NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED + - NEXUS_OPERATION_EXECUTION_STATUS_RUNNING + - NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED + - NEXUS_OPERATION_EXECUTION_STATUS_FAILED + - NEXUS_OPERATION_EXECUTION_STATUS_CANCELED + - NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED + - NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT + type: string + description: |- + A general status for this operation, indicates whether it is currently running or in one of the terminal statuses. + Updated once when the operation is originally scheduled, and again when it reaches a terminal status. + format: enum + state: + enum: + - PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED + - PENDING_NEXUS_OPERATION_STATE_SCHEDULED + - PENDING_NEXUS_OPERATION_STATE_BACKING_OFF + - PENDING_NEXUS_OPERATION_STATE_STARTED + - PENDING_NEXUS_OPERATION_STATE_BLOCKED + type: string + description: More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING. + format: enum + scheduleToCloseTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Schedule-to-close timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + scheduleToStartTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Schedule-to-start timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + startToCloseTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Start-to-close timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + attempt: + type: integer + description: |- + The number of attempts made to deliver the start operation request. + This number is approximate, it is incremented when a task is added to the history queue. + In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task + was never executed. + format: int32 + scheduleTime: + type: string + description: Time the operation was originally scheduled via a StartNexusOperation request. + format: date-time + expirationTime: + type: string + description: Scheduled time + schedule to close timeout. + format: date-time + closeTime: + type: string + description: Time when the operation transitioned to a closed state. + format: date-time + lastAttemptCompleteTime: + type: string + description: The time when the last attempt completed. + format: date-time + lastAttemptFailure: + allOf: + - $ref: '#/components/schemas/Failure' + description: The last attempt's failure, if any. + nextAttemptScheduleTime: + type: string + description: The time when the next attempt is scheduled. + format: date-time + executionDuration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Elapsed time from schedule_time to now for running operations or to close_time for closed + operations, including all attempts and backoff between attempts. + cancellationInfo: + $ref: '#/components/schemas/NexusOperationExecutionCancellationInfo' + blockedReason: + type: string + description: If the state is BLOCKED, blocked reason provides additional information. + requestId: + type: string + description: |- + Server-generated request ID used as an idempotency token when submitting start requests to + the handler. Distinct from the request_id in StartNexusOperationRequest, which is the + caller-side idempotency key for the StartNexusOperation RPC itself. + operationToken: + type: string + description: Operation token. Only set for asynchronous operations after a successful StartOperation call. + stateTransitionCount: + type: string + description: Incremented each time the operation's state is mutated in persistence. + searchAttributes: + $ref: '#/components/schemas/SearchAttributes' + nexusHeader: + type: object + additionalProperties: + type: string + description: Header for context propagation and tracing purposes. + userMetadata: + allOf: + - $ref: '#/components/schemas/UserMetadata' + description: Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation. + links: + type: array + items: + $ref: '#/components/schemas/Link' + description: Links attached by the handler of this operation on start or completion. + identity: + type: string + description: The identity of the client who started this operation. + description: Full current state of a standalone Nexus operation, as of the time of the request. + NexusOperationExecutionListInfo: + type: object + properties: + operationId: + type: string + description: A unique identifier of this operation within its namespace along with run ID (below). + runId: + type: string + description: The run ID of the standalone Nexus operation. + endpoint: + type: string + description: Endpoint name. + service: + type: string + description: Service name. + operation: + type: string + description: Operation name. + scheduleTime: + type: string + description: Time the operation was originally scheduled via a StartNexusOperation request. + format: date-time + closeTime: + type: string + description: If the operation is in a terminal status, this field represents the time the operation transitioned to that status. + format: date-time + status: + enum: + - NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED + - NEXUS_OPERATION_EXECUTION_STATUS_RUNNING + - NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED + - NEXUS_OPERATION_EXECUTION_STATUS_FAILED + - NEXUS_OPERATION_EXECUTION_STATUS_CANCELED + - NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED + - NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT + type: string + description: The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status. + format: enum + searchAttributes: + allOf: + - $ref: '#/components/schemas/SearchAttributes' + description: Search attributes from the start request. + stateTransitionCount: + type: string + description: Updated on terminal status. + executionDuration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + The difference between close time and scheduled time. + This field is only populated if the operation is closed. + description: |- + Limited Nexus operation information returned in the list response. + When adding fields here, ensure that it is also present in NexusOperationExecutionInfo (note that it may already be present in + NexusOperationExecutionInfo but not at the top-level). NexusOperationFailedEventAttributes: type: object properties: @@ -11063,6 +12605,8 @@ components: Calls are retried internally by the server. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) + (-- api-linter: core::0142::time-field-names=disabled + aip.dev/not-precedent: "timeout" is an acceptable suffix for duration fields in this API. --) nexusHeader: type: object additionalProperties: @@ -11147,18 +12691,16 @@ components: properties: attachRequestId: type: boolean - description: Attaches the request ID to the running workflow. + description: Attaches the request ID to the running execution. attachCompletionCallbacks: type: boolean - description: Attaches the completion callbacks to the running workflow. + description: Attaches the completion callbacks to the running execution. attachLinks: type: boolean - description: Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event. + description: Attaches the links to the running execution. description: |- - When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and - there is already an existing running workflow, OnConflictOptions defines actions to be taken on - the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent - history event in the running workflow with the changes requested in this object. + When starting an execution with a conflict policy that uses an existing execution and there is already an existing + running execution, OnConflictOptions defines actions to be taken on the existing running execution. Outcome: type: object properties: @@ -11466,7 +13008,9 @@ components: type: integer description: |- The number of attempts made to deliver the start operation request. - This number represents a minimum bound since the attempt is incremented after the request completes. + This number is approximate, it is incremented when a task is added to the history queue. + In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task + was never executed. format: int32 lastAttemptCompleteTime: type: string @@ -11552,6 +13096,31 @@ components: description: The run ID of the activity, useful when run_id was not specified in the request. outcome: $ref: '#/components/schemas/ActivityExecutionOutcome' + PollNexusOperationExecutionResponse: + type: object + properties: + runId: + type: string + description: The run ID of the operation, useful when run_id was not specified in the request. + waitStage: + enum: + - NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED + - NEXUS_OPERATION_WAIT_STAGE_STARTED + - NEXUS_OPERATION_WAIT_STAGE_CLOSED + type: string + description: The current stage of the operation. May be more advanced than the stage requested in the poll. + format: enum + operationToken: + type: string + description: Operation token. Only populated for asynchronous operations after a successful StartOperation call. + result: + allOf: + - $ref: '#/components/schemas/Payload' + description: The result if the operation completed successfully. + failure: + allOf: + - $ref: '#/components/schemas/Failure' + description: The failure if the operation completed unsuccessfully. PollWorkflowTaskQueueResponse: type: object properties: @@ -11643,6 +13212,30 @@ 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 awaiting for query response. + Corresponding RespondQueryTaskCompleted should pass this value for proper routing. + pollerGroupInfos: + type: array + items: + $ref: '#/components/schemas/PollerGroupInfo' + description: |- + The weighted list of poller groups IDs that client should use for future polls to this task + queue. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + PollerGroupInfo: + type: object + properties: + id: + type: string + weight: + type: number + format: float PollerInfo: type: object properties: @@ -11727,6 +13320,18 @@ components: description: |- UpdateWorkflowOptions represents updating workflow execution options after a workflow reset. Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. + Principal: + type: object + properties: + type: + type: string + description: Low-cardinality category of the principal (e.g., "jwt", "users"). + name: + type: string + description: Identifier within that category (e.g., sub JWT claim, email address). + description: |- + Principal is an authenticated caller identity computed by the server from trusted + authentication context. Priority: type: object properties: @@ -12147,6 +13752,28 @@ components: reason: type: string description: Reason for requesting the cancellation + RequestCancelNexusOperationExecutionRequest: + type: object + properties: + namespace: + type: string + operationId: + type: string + runId: + type: string + description: Operation run ID, targets the latest run if empty. + identity: + type: string + description: The identity of the client who initiated this request. + requestId: + type: string + description: Used to de-dupe cancellation requests. + reason: + type: string + description: Reason for requesting the cancellation, recorded and available via the DescribeNexusOperationExecution API. + RequestCancelNexusOperationExecutionResponse: + type: object + properties: {} RequestCancelWorkflowExecutionRequest: type: object properties: @@ -12242,6 +13869,7 @@ components: - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED + - EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED type: string description: The event type of the history event generated by the request. format: enum @@ -12735,7 +14363,12 @@ components: currentDeploymentVersion: allOf: - $ref: '#/components/schemas/WorkerDeploymentVersion' - description: "Specifies which Deployment Version should receive new workflow executions and tasks of\n existing unversioned or AutoUpgrade workflows.\n Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). \n Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\n is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." + description: |- + Specifies which Deployment Version should receive new workflow executions and tasks of + existing unversioned or AutoUpgrade workflows. + Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). + Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage + is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). currentVersion: type: string description: Deprecated. Use `current_deployment_version`. @@ -12775,7 +14408,9 @@ components: format: date-time revisionNumber: type: string - description: "Monotonically increasing value which is incremented on every mutation \n to any field of this message to achieve eventual consistency between task queues and their partitions." + description: |- + Monotonically increasing value which is incremented on every mutation + to any field of this message to achieve eventual consistency between task queues and their partitions. Schedule: type: object properties: @@ -13555,6 +15190,10 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: Time-skipping configuration. If not set, time skipping is disabled. SignalWithStartWorkflowExecutionResponse: type: object properties: @@ -13564,6 +15203,13 @@ components: started: type: boolean description: If true, a new workflow was started. + signalLink: + allOf: + - $ref: '#/components/schemas/Link' + description: |- + Link to be associated with the WorkflowExecutionSignaled event. + Added on the response to propagate the backlink. + Available from Temporal server 1.31 and up. SignalWorkflowExecutionRequest: type: object properties: @@ -13604,7 +15250,14 @@ components: - temporal.api.workflow.v1.PostResetOperation.SignalWorkflow. SignalWorkflowExecutionResponse: type: object - properties: {} + properties: + link: + allOf: + - $ref: '#/components/schemas/Link' + description: |- + Link to be associated with the WorkflowExecutionSignaled event. + Added on the response to propagate the backlink. + Available from Temporal server 1.31 and up. StartActivityExecutionRequest: type: object properties: @@ -13708,6 +15361,28 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata. + completionCallbacks: + type: array + items: + $ref: '#/components/schemas/Callback' + description: |- + Callbacks to be called by the server when this activity reaches a terminal state. + Callback addresses must be whitelisted in the server's dynamic configuration. + links: + type: array + items: + $ref: '#/components/schemas/Link' + description: |- + Links to be associated with the activity. Callbacks may also have associated links; + links already included with a callback should not be duplicated here. + onConflictOptions: + allOf: + - $ref: '#/components/schemas/OnConflictOptions' + description: Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING. + startDelay: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. StartActivityExecutionResponse: type: object properties: @@ -13717,6 +15392,10 @@ components: started: type: boolean description: If true, a new activity was started. + link: + allOf: + - $ref: '#/components/schemas/Link' + description: Link to the started activity. StartBatchOperationRequest: type: object properties: @@ -13878,6 +15557,124 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: The propagated time-skipping configuration for the child workflow. + initialSkippedDuration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: Propagate the duration skipped to the child workflow. + StartNexusOperationExecutionRequest: + type: object + properties: + namespace: + type: string + identity: + type: string + description: The identity of the client who initiated this request. + requestId: + type: string + description: |- + A unique identifier for this caller-side start request. Typically UUIDv4. + StartOperation requests sent to the handler will use a server-generated request ID. + operationId: + type: string + description: |- + Identifier for this operation. This is a caller-side ID, distinct from any internal + operation identifiers generated by the handler. Must be unique among operations in the + same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. + endpoint: + type: string + description: Endpoint name, resolved to a URL via the cluster's endpoint registry. + service: + type: string + description: Service name. + operation: + type: string + description: Operation name. + scheduleToCloseTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Schedule-to-close timeout for this operation. + Indicates how long the caller is willing to wait for operation completion. + Calls are retried internally by the server. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + scheduleToStartTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Schedule-to-start timeout for this operation. + Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) + by the handler. + If not set or zero, no schedule-to-start timeout is enforced. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + startToCloseTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Start-to-close timeout for this operation. + Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been + started. Synchronous operations ignore this timeout. + If not set or zero, no start-to-close timeout is enforced. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + input: + allOf: + - $ref: '#/components/schemas/Payload' + description: Serialized input to the operation. Passed as the request payload. + idReusePolicy: + enum: + - NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED + - NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE + - NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY + - NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE + type: string + description: |- + Defines whether to allow re-using the operation id from a previously *closed* operation. + The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE. + format: enum + idConflictPolicy: + enum: + - NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED + - NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL + - NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING + type: string + description: |- + Defines how to resolve an operation id conflict with a *running* operation. + The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL. + format: enum + searchAttributes: + allOf: + - $ref: '#/components/schemas/SearchAttributes' + description: Search attributes for indexing. + nexusHeader: + type: object + additionalProperties: + type: string + description: |- + Header to attach to the Nexus request. + Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + transmitted to external services as-is. + This is useful for propagating tracing information. + Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + transmitted to Nexus operations that may be external and are not traditional payloads. + userMetadata: + allOf: + - $ref: '#/components/schemas/UserMetadata' + description: Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation. + StartNexusOperationExecutionResponse: + type: object + properties: + runId: + type: string + description: The run ID of the operation that was started - or used (via NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING). + started: + type: boolean + description: If true, a new operation was started. StartWorkflowExecutionRequest: type: object properties: @@ -14017,6 +15814,10 @@ components: allOf: - $ref: '#/components/schemas/WorkerDeploymentOptions' description: Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: Time-skipping configuration. If not set, time skipping is disabled. StartWorkflowExecutionResponse: type: object properties: @@ -14164,6 +15965,7 @@ components: - TASK_QUEUE_KIND_UNSPECIFIED - TASK_QUEUE_KIND_NORMAL - TASK_QUEUE_KIND_STICKY + - TASK_QUEUE_KIND_WORKER_COMMANDS type: string description: 'Default: TASK_QUEUE_KIND_NORMAL.' format: enum @@ -14364,7 +16166,6 @@ components: type: string description: Last time versioning information of this Task Queue changed. format: date-time - description: Experimental. Worker Deployments are experimental and might significantly change in the future. TerminateActivityExecutionRequest: type: object properties: @@ -14387,6 +16188,28 @@ components: TerminateActivityExecutionResponse: type: object properties: {} + TerminateNexusOperationExecutionRequest: + type: object + properties: + namespace: + type: string + operationId: + type: string + runId: + type: string + description: Operation run ID, targets the latest run if empty. + identity: + type: string + description: The identity of the client who initiated this request. + requestId: + type: string + description: Used to de-dupe termination requests. + reason: + type: string + description: Reason for requesting the termination, recorded in the operation's result failure outcome. + TerminateNexusOperationExecutionResponse: + type: object + properties: {} TerminateWorkflowExecutionRequest: type: object properties: @@ -14419,7 +16242,27 @@ components: properties: {} TerminatedFailureInfo: type: object - properties: {} + properties: + identity: + type: string + description: The identity of the worker or client that requested the termination. + TimeSkippingConfig: + type: object + properties: + enabled: + type: boolean + description: Enables or disables time skipping for this workflow execution. + maxSkippedDuration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: Maximum total virtual time that can be skipped. + maxElapsedDuration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Maximum elapsed time since time skipping was enabled. + This includes both skipped time and real time elapsing. + description: "Configuration for time skipping during a workflow execution.\n When enabled, virtual time advances automatically whenever there is no in-flight work.\n In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\n and possibly other features added in the future.\n User timers are not classified as in-flight work and will be skipped over.\n When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n \n Propagation behavior of time skipping:\n The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run." TimeoutFailureInfo: type: object properties: @@ -14781,6 +16624,13 @@ components: A non-null empty object will set the search attributes to an empty map. Note: you cannot only update the search attributes with `UpdateScheduleRequest`, you must also set the `schedule` field; otherwise, it will unset the schedule. + memo: + allOf: + - $ref: '#/components/schemas/Memo' + description: |- + Schedule memo to replace. If set, replaces the entire memo. + Do not set this field if you do not want to update the memo. + A non-null empty object will clear the memo. UpdateScheduleResponse: type: object properties: {} @@ -14884,6 +16734,40 @@ components: allOf: - $ref: '#/components/schemas/WorkerConfig' description: The worker configuration. Will be returned if the command was sent to a single worker. + UpdateWorkerDeploymentVersionComputeConfigRequest: + type: object + properties: + namespace: + type: string + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. + computeConfigScalingGroups: + type: object + additionalProperties: + $ref: '#/components/schemas/ComputeConfigScalingGroupUpdate' + description: |- + Optional. Contains the compute config scaling groups to add or update for the Worker + Deployment. + removeComputeConfigScalingGroups: + type: array + items: + type: string + description: Optional. Contains the compute config scaling groups to remove from the Worker Deployment. + identity: + type: string + description: Optional. The identity of the client who initiated this request. + requestId: + type: string + description: |- + A unique identifier for this create request for idempotence. Typically UUIDv4. + If a second request with the same ID is recieved, it is considered a successful no-op. + Retrying with a different request ID for the same deployment name + build ID is an error. + description: Used to update the compute config of a Worker Deployment Version. + UpdateWorkerDeploymentVersionComputeConfigResponse: + type: object + properties: {} UpdateWorkerDeploymentVersionMetadataRequest: type: object properties: @@ -15050,6 +16934,34 @@ components: that is a single JSON string for use in user interfaces. User interface formatting may apply to this text in common use. The payload data section is limited to 20000 bytes by default. description: Information a user can set, often for use by user interfaces. + ValidateWorkerDeploymentVersionComputeConfigRequest: + type: object + properties: + namespace: + type: string + deploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. + computeConfigScalingGroups: + type: object + additionalProperties: + $ref: '#/components/schemas/ComputeConfigScalingGroupUpdate' + description: |- + Optional. Contains the compute config scaling groups to add or update for the Worker + Deployment. + removeComputeConfigScalingGroups: + type: array + items: + type: string + description: Optional. Contains the compute config scaling groups to remove from the Worker Deployment. + identity: + type: string + description: Optional. The identity of the client who initiated this request. + description: Used to validate the compute config without attaching it to a Worker Deployment Version. + ValidateWorkerDeploymentVersionComputeConfigResponse: + type: object + properties: {} VersionDrainageInfo: type: object properties: @@ -15074,7 +16986,6 @@ components: description: |- Information about workflow drainage to help the user determine when it is safe to decommission a Version. Not present while version is current or ramping. - Experimental. Worker Deployments are experimental and might significantly change in the future. VersionInfo: type: object properties: @@ -15231,7 +17142,12 @@ components: type: array items: $ref: '#/components/schemas/WorkerDeploymentInfo_WorkerDeploymentVersionSummary' - description: "Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be\n cleaned up automatically if all the following conditions meet:\n - It does not receive new executions (is not current or ramping)\n - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) \n - It is drained (see WorkerDeploymentVersionInfo.drainage_status)" + description: |- + Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be + cleaned up automatically if all the following conditions meet: + - It does not receive new executions (is not current or ramping) + - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) + - It is drained (see WorkerDeploymentVersionInfo.drainage_status) createTime: type: string format: date-time @@ -15260,7 +17176,14 @@ components: Indicates whether the routing_config has been fully propagated to all relevant task queues and their partitions. format: enum - description: "A Worker Deployment (Deployment, for short) represents all workers serving \n a shared set of Task Queues. Typically, a Deployment represents one service or \n application.\n A Deployment contains multiple Deployment Versions, each representing a different \n version of workers. (see documentation of WorkerDeploymentVersionInfo)\n Deployment records are created in Temporal server automatically when their\n first poller arrives to the server.\n Experimental. Worker Deployments are experimental and might significantly change in the future." + description: |- + A Worker Deployment (Deployment, for short) represents all workers serving + a shared set of Task Queues. Typically, a Deployment represents one service or + application. + A Deployment contains multiple Deployment Versions, each representing a different + version of workers. (see documentation of WorkerDeploymentVersionInfo) + Deployment records are created in Temporal server automatically when their + first poller arrives to the server. WorkerDeploymentInfo_WorkerDeploymentVersionSummary: type: object properties: @@ -15275,6 +17198,7 @@ components: - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED + - WORKER_DEPLOYMENT_VERSION_STATUS_CREATED type: string description: The status of the Worker Deployment Version. format: enum @@ -15333,6 +17257,8 @@ components: Timestamp when this version last stopped being current or ramping. Cleared if the version becomes current or ramping again. format: date-time + computeConfig: + $ref: '#/components/schemas/ComputeConfigSummary' WorkerDeploymentOptions: type: object properties: @@ -15355,9 +17281,7 @@ components: same `deployment_name` and `build_id` combination, across all Task Queues. When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. format: enum - description: |- - Worker Deployment options set in SDK that need to be sent to server in every poll. - Experimental. Worker Deployments are experimental and might significantly change in the future. + description: Worker Deployment options set in SDK that need to be sent to server in every poll. WorkerDeploymentVersion: type: object properties: @@ -15391,6 +17315,7 @@ components: - WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING - WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED + - WORKER_DEPLOYMENT_VERSION_STATUS_CREATED type: string description: The status of the Worker Deployment Version. format: enum @@ -15400,6 +17325,7 @@ components: description: Required. deploymentName: type: string + description: Deprecated. User deployment_version.deployment_name. createTime: type: string format: date-time @@ -15471,7 +17397,27 @@ components: allOf: - $ref: '#/components/schemas/VersionMetadata' description: Arbitrary user-provided metadata attached to this version. - description: "A Worker Deployment Version (Version, for short) represents all workers of the same \n code and config within a Deployment. Workers of the same Version are expected to \n behave exactly the same so when executions move between them there are no \n non-determinism issues.\n Worker Deployment Versions are created in Temporal server automatically when \n their first poller arrives to the server.\n Experimental. Worker Deployments are experimental and might significantly change in the future." + computeConfig: + allOf: + - $ref: '#/components/schemas/ComputeConfig' + description: |- + Optional. Contains the new worker compute configuration for the Worker + Deployment. Used for worker scale management. + lastModifierIdentity: + type: string + description: |- + Identity of the last client who modified the configuration of this Version. + As of now, this field only covers changes through the following APIs: + - `CreateWorkerDeploymentVersion` + - `UpdateWorkerDeploymentVersionComputeConfig` + - `UpdateWorkerDeploymentVersionMetadata` + description: |- + A Worker Deployment Version (Version, for short) represents all workers of the same + code and config within a Deployment. Workers of the same Version are expected to + behave exactly the same so when executions move between them there are no + non-determinism issues. + Worker Deployment Versions are created in Temporal server automatically when + their first poller arrives to the server. WorkerDeploymentVersionInfo_VersionTaskQueueInfo: type: object properties: @@ -15843,6 +17789,7 @@ components: - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED + - EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED type: string format: enum description: EventReference is a direct reference to a history event through the event ID. @@ -15913,6 +17860,7 @@ components: - EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED - EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED - EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED + - EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED type: string format: enum description: RequestIdReference is a indirect reference to a history event through the request ID. @@ -16049,6 +17997,7 @@ components: enum: - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION type: string description: |- Experimental. Optionally decide the versioning behavior that the first task of the new run should use. @@ -16235,9 +18184,7 @@ components: Experimental. Versioning info is experimental and might change in the future. workerDeploymentName: type: string - description: |- - The name of Worker Deployment that completed the most recent workflow task. - Experimental. Worker Deployments are experimental and might change in the future. + description: The name of Worker Deployment that completed the most recent workflow task. priority: allOf: - $ref: '#/components/schemas/Priority' @@ -16262,6 +18209,13 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: If set, overrides the workflow's priority sent by the SDK. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: |- + Time-skipping configuration for this workflow execution. + If not set, the time-skipping configuration is not updated by this request; + the existing configuration is preserved. WorkflowExecutionOptionsUpdatedEventAttributes: type: object properties: @@ -16293,6 +18247,10 @@ components: description: |- Priority override upserted in this event. Represents the full priority; not just partial fields. Ignored if nil. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: If set, the time-skipping configuration was changed. Contains the full updated configuration. WorkflowExecutionPauseInfo: type: object properties: @@ -16346,6 +18304,11 @@ components: allOf: - $ref: '#/components/schemas/WorkflowExecution' description: When signal origin is a workflow execution, this field is set. + requestId: + type: string + description: |- + The request ID of the Signal request, used by the server to attach this to + the correct Event ID when generating link. WorkflowExecutionStartedEventAttributes: type: object properties: @@ -16586,6 +18549,22 @@ components: Used internally by the server during continue-as-new and retry. Should not be read or interpreted by SDKs. + timeSkippingConfig: + allOf: + - $ref: '#/components/schemas/TimeSkippingConfig' + description: |- + Initial time-skipping configuration for this workflow execution, recorded at start time. + This may have been set explicitly via the start workflow request, or propagated from a + parent/previous execution. + + The configuration may be updated after start via UpdateWorkflowExecutionOptions, which + will be reflected in the WorkflowExecutionOptionsUpdatedEvent. + initialSkippedDuration: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + The time skipped by the previous execution that started this workflow. + It can happen in cases of child workflows and continue-as-new workflows. description: Always the first event in workflow history WorkflowExecutionTerminatedEventAttributes: type: object @@ -16598,6 +18577,27 @@ components: identity: type: string description: id of the client who requested termination + WorkflowExecutionTimeSkippingTransitionedEventAttributes: + type: object + properties: + targetTime: + type: string + description: The virtual time after time skipping was applied. + format: date-time + disabledAfterBound: + type: boolean + description: |- + when true, time skipping was disabled automatically due to a bound being reached. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "after" is used to indicate temporal ordering. --) + wallClockTime: + type: string + description: The wall-clock time when the time-skipping state changed event was generated. + format: date-time + description: |- + Attributes for an event indicating that time skipping state changed for a workflow execution, + either time was advanced or time skipping was disabled automatically due to a bound being reached. + The worker_may_ignore field in HistoryEvent should always be set true for this event. WorkflowExecutionTimedOutEventAttributes: type: object properties: @@ -16796,6 +18796,24 @@ components: Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not face the problem of inconsistent dispatching that arises from eventual consistency between task queues and their partitions. + continueAsNewInitialVersioningBehavior: + enum: + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + - CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION + type: string + description: |- + Experimental. + If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + specified in that command. + Only used for the initial task of this run and the initial task of any retries of this run. + Not passed to children or to future continue-as-new. + + Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent + to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. + format: enum description: |- Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. @@ -16995,21 +19013,18 @@ components: description: |- The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `versioning_info.version`. - Experimental. Worker Deployments are experimental and might significantly change in the future. Deprecated. Replaced with `deployment_version`. workerDeploymentName: type: string description: |- The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `worker_deployment_name`. - Experimental. Worker Deployments are experimental and might significantly change in the future. deploymentVersion: allOf: - $ref: '#/components/schemas/WorkerDeploymentVersion' description: |- The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `versioning_info.deployment_version`. - Experimental. Worker Deployments are experimental and might significantly change in the future. WorkflowTaskCompletedMetadata: type: object properties: diff --git a/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto index 37eeae33c..8262cf88b 100644 --- a/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto @@ -15,6 +15,7 @@ import "google/protobuf/timestamp.proto"; import "temporal/api/common/v1/message.proto"; import "temporal/api/deployment/v1/message.proto"; import "temporal/api/enums/v1/activity.proto"; +import "temporal/api/callback/v1/message.proto"; import "temporal/api/enums/v1/workflow.proto"; import "temporal/api/failure/v1/message.proto"; import "temporal/api/taskqueue/v1/message.proto"; @@ -161,6 +162,12 @@ message ActivityExecutionInfo { // Set if activity cancelation was requested. string canceled_reason = 32; + + // Links to related entities, such as the entity that started this activity. + repeated temporal.api.common.v1.Link links = 33; + + // Total number of heartbeats recorded across all attempts of this activity, including retries. + int64 total_heartbeat_count = 34; } // Limited activity information returned in the list response. @@ -195,3 +202,20 @@ message ActivityExecutionListInfo { // This field is only populated if the activity is closed. google.protobuf.Duration execution_duration = 11; } + +// CallbackInfo contains the state of an attached activity callback. +message CallbackInfo { + // Trigger for when the activity is closed. + message ActivityClosed {} + + message Trigger { + oneof variant { + ActivityClosed activity_closed = 1; + } + } + + // Trigger for this callback. + Trigger trigger = 1; + // Common callback info. + temporal.api.callback.v1.CallbackInfo info = 2; +} diff --git a/crates/common/protos/api_upstream/temporal/api/callback/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/callback/v1/message.proto new file mode 100644 index 000000000..f881a4eef --- /dev/null +++ b/crates/common/protos/api_upstream/temporal/api/callback/v1/message.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package temporal.api.callback.v1; + +option go_package = "go.temporal.io/api/callback/v1;callback"; +option java_package = "io.temporal.api.callback.v1"; +option java_multiple_files = true; +option java_outer_classname = "MessageProto"; +option ruby_package = "Temporalio::Api::Callback::V1"; +option csharp_namespace = "Temporalio.Api.Callback.V1"; + +import "google/protobuf/timestamp.proto"; + +import "temporal/api/common/v1/message.proto"; +import "temporal/api/enums/v1/common.proto"; +import "temporal/api/failure/v1/message.proto"; + +// Common callback information. Specific CallbackInfo messages should embed this and may include additional fields. +message CallbackInfo { + // Information on how this callback should be invoked (e.g. its URL and type). + temporal.api.common.v1.Callback callback = 1; + // The time when the callback was registered. + google.protobuf.Timestamp registration_time = 2; + // The current state of the callback. + temporal.api.enums.v1.CallbackState state = 3; + // The number of attempts made to deliver the callback. + // This number represents a minimum bound since the attempt is incremented after the callback request completes. + int32 attempt = 4; + // The time when the last attempt completed. + google.protobuf.Timestamp last_attempt_complete_time = 5; + // The last attempt's failure, if any. + temporal.api.failure.v1.Failure last_attempt_failure = 6; + // The time when the next attempt is scheduled. + google.protobuf.Timestamp next_attempt_schedule_time = 7; + // If the state is BLOCKED, blocked reason provides additional information. + string blocked_reason = 8; +} \ No newline at end of file diff --git a/crates/common/protos/api_upstream/temporal/api/command/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/command/v1/message.proto index 12c2e43ff..597f9c94d 100644 --- a/crates/common/protos/api_upstream/temporal/api/command/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/command/v1/message.proto @@ -102,7 +102,8 @@ message CancelWorkflowExecutionCommandAttributes { } message RequestCancelExternalWorkflowExecutionCommandAttributes { - string namespace = 1; + // Deprecated. Cross-namespace operations are disabled by default as of server 1.30.1. + string namespace = 1 [deprecated = true]; string workflow_id = 2; string run_id = 3; // Deprecated. @@ -116,7 +117,8 @@ message RequestCancelExternalWorkflowExecutionCommandAttributes { } message SignalExternalWorkflowExecutionCommandAttributes { - string namespace = 1; + // Deprecated. Cross-namespace operations are disabled by default as of server 1.30.1. + string namespace = 1 [deprecated = true]; temporal.api.common.v1.WorkflowExecution execution = 2; // The workflow author-defined name of the signal to send to the workflow. string signal_name = 3; @@ -188,7 +190,8 @@ message ContinueAsNewWorkflowExecutionCommandAttributes { } message StartChildWorkflowExecutionCommandAttributes { - string namespace = 1; + // Deprecated. Cross-namespace operations are disabled by default as of server 1.30.1. + string namespace = 1 [deprecated = true]; string workflow_id = 2; temporal.api.common.v1.WorkflowType workflow_type = 3; temporal.api.taskqueue.v1.TaskQueue task_queue = 4; diff --git a/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto index aa5b3f370..13d9d1dc8 100644 --- a/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto @@ -240,12 +240,37 @@ message Link { string job_id = 1; } + // A link to an activity. + message Activity { + string namespace = 1; + string activity_id = 2; + string run_id = 3; + } + + // A link to a standalone Nexus operation. + message NexusOperation { + string namespace = 1; + string operation_id = 2; + string run_id = 3; + } + oneof variant { WorkflowEvent workflow_event = 1; BatchJob batch_job = 2; + Activity activity = 3; + NexusOperation nexus_operation = 4; } } +// Principal is an authenticated caller identity computed by the server from trusted +// authentication context. +message Principal { + // Low-cardinality category of the principal (e.g., "jwt", "users"). + string type = 1; + // Identifier within that category (e.g., sub JWT claim, email address). + string name = 2; +} + // Priority contains metadata that controls relative ordering of task processing // when tasks are backed up in a queue. Initially, Priority will be used in // matching (workflow and activity) task queues. Later it may be used in history @@ -346,3 +371,14 @@ message WorkerSelector { string worker_instance_key = 1; } } + +// When starting an execution with a conflict policy that uses an existing execution and there is already an existing +// running execution, OnConflictOptions defines actions to be taken on the existing running execution. +message OnConflictOptions { + // Attaches the request ID to the running execution. + bool attach_request_id = 1; + // Attaches the completion callbacks to the running execution. + bool attach_completion_callbacks = 2; + // Attaches the links to the running execution. + bool attach_links = 3; +} diff --git a/crates/common/protos/api_upstream/temporal/api/compute/v1/config.proto b/crates/common/protos/api_upstream/temporal/api/compute/v1/config.proto new file mode 100644 index 000000000..998ead08b --- /dev/null +++ b/crates/common/protos/api_upstream/temporal/api/compute/v1/config.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; + +package temporal.api.compute.v1; + +option go_package = "go.temporal.io/api/compute/v1;compute"; +option java_package = "io.temporal.api.compute.v1"; +option java_multiple_files = true; +option java_outer_classname = "ConfigProto"; +option ruby_package = "Temporalio::Api::Compute::V1"; +option csharp_namespace = "Temporalio.Api.Compute.V1"; + +import "temporal/api/compute/v1/provider.proto"; +import "temporal/api/compute/v1/scaler.proto"; +import "temporal/api/enums/v1/task_queue.proto"; +import "google/protobuf/field_mask.proto"; + +message ComputeConfigScalingGroup { + // Optional. The set of task queue types this scaling group serves. + // If not provided, this scaling group serves all not otherwise defined + // task types. + repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 1; + + // Stores instructions for a worker control plane controller how to respond + // to worker lifeycle events. + temporal.api.compute.v1.ComputeProvider provider = 3; + + // Informs a worker lifecycle controller *when* and *how often* to perform + // certain worker lifecycle actions like starting a serverless worker. + temporal.api.compute.v1.ComputeScaler scaler = 4; +} + +// ComputeConfig stores configuration that helps a worker control plane +// controller understand *when* and *how* to respond to worker lifecycle +// events. +message ComputeConfig { + + // Each scaling group describes a compute config for a specific subset of the worker + // deployment version: covering a specific set of task types and/or regions. + // Having different configurations for different task types, allows independent + // tuning of activity and workflow task processing (for example). + // + // The key of the map is the ID of the scaling group used to reference it in subsequent + // update calls. + map scaling_groups = 1; +} + +message ComputeConfigScalingGroupUpdate { + ComputeConfigScalingGroup scaling_group = 1; + + // Controls which fields from `scaling_group` will be applied. Semantics: + // - Mask is ignored for new scaling groups (only applicable when scaling group already exists). + // - Empty mask for an existing scaling group is no-op: no change. + // - Non-empty mask for an existing scaling group will update/unset only to the fields + // mentioned in the mask. + // - Accepted paths: "task_queue_types", "provider", "provider.type", "provider.details", + // "provider.nexus_endpoint", "scaler", "scaler.type", "scaler.details" + google.protobuf.FieldMask update_mask = 2; +} + +// A subset of information in ComputeConfig optimized for list views. +message ComputeConfigSummary { + map scaling_groups = 1; +} + +message ComputeConfigScalingGroupSummary { + repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 1; + string provider_type = 2; +} diff --git a/crates/common/protos/api_upstream/temporal/api/compute/v1/provider.proto b/crates/common/protos/api_upstream/temporal/api/compute/v1/provider.proto new file mode 100644 index 000000000..ed0baf9d5 --- /dev/null +++ b/crates/common/protos/api_upstream/temporal/api/compute/v1/provider.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package temporal.api.compute.v1; + +option go_package = "go.temporal.io/api/compute/v1;compute"; +option java_package = "io.temporal.api.compute.v1"; +option java_multiple_files = true; +option java_outer_classname = "ProviderProto"; +option ruby_package = "Temporalio::Api::Compute::V1"; +option csharp_namespace = "Temporalio.Api.Compute.V1"; + +import "temporal/api/common/v1/message.proto"; + +// ComputeProvider stores information used by a worker control plane controller +// to respond to worker lifecycle events. For example, when a Task is received +// on a TaskQueue that has no active pollers, a serverless worker lifecycle +// controller might need to invoke an AWS Lambda Function that itself ends up +// calling the SDK's worker.New() function. +message ComputeProvider { + // Type of the compute provider. This string is implementation-specific and + // can be used by implementations to understand how to interpret the + // contents of the provider_details field. + string type = 1; + + // Contains provider-specific instructions and configuration. + // For server-implemented providers, use the SDK's default content + // converter to ensure the server can understand it. + // For remote-implemented providers, you might use your own content + // converters according to what the remote endpoints understand. + temporal.api.common.v1.Payload details = 2; + + // Optional. If the compute provider is a Nexus service, this should point + // there. + string nexus_endpoint = 10; +} diff --git a/crates/common/protos/api_upstream/temporal/api/compute/v1/scaler.proto b/crates/common/protos/api_upstream/temporal/api/compute/v1/scaler.proto new file mode 100644 index 000000000..ecce95f1b --- /dev/null +++ b/crates/common/protos/api_upstream/temporal/api/compute/v1/scaler.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package temporal.api.compute.v1; + +option go_package = "go.temporal.io/api/compute/v1;compute"; +option java_package = "io.temporal.api.compute.v1"; +option java_multiple_files = true; +option java_outer_classname = "ScalerProto"; +option ruby_package = "Temporalio::Api::Compute::V1"; +option csharp_namespace = "Temporalio.Api.Compute.V1"; + +import "temporal/api/common/v1/message.proto"; + +// ComputeScaler instructs the Temporal Service when to scale up or down the number of +// Workers that comprise a WorkerDeployment. +message ComputeScaler { + // Type of the compute scaler. this string is implementation-specific and + // can be used by implementations to understand how to interpret the + // contents of the scaler_details field. + string type = 1; + + // Contains scaler-specific instructions and configuration. + // For server-implemented scalers, use the SDK's default data + // converter to ensure the server can understand it. + // For remote-implemented scalers, you might use your own data + // converters according to what the remote endpoints understand. + temporal.api.common.v1.Payload details = 2; +} diff --git a/crates/common/protos/api_upstream/temporal/api/deployment/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/deployment/v1/message.proto index b4b7883dd..25227df39 100644 --- a/crates/common/protos/api_upstream/temporal/api/deployment/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/deployment/v1/message.proto @@ -11,12 +11,13 @@ option csharp_namespace = "Temporalio.Api.Deployment.V1"; import "google/protobuf/timestamp.proto"; +import "temporal/api/enums/v1/workflow.proto"; import "temporal/api/enums/v1/deployment.proto"; import "temporal/api/enums/v1/task_queue.proto"; import "temporal/api/common/v1/message.proto"; +import "temporal/api/compute/v1/config.proto"; // Worker Deployment options set in SDK that need to be sent to server in every poll. -// Experimental. Worker Deployments are experimental and might significantly change in the future. message WorkerDeploymentOptions { // Required when `worker_versioning_mode==VERSIONED`. string deployment_name = 1; @@ -86,13 +87,12 @@ message DeploymentListInfo { } -// A Worker Deployment Version (Version, for short) represents all workers of the same -// code and config within a Deployment. Workers of the same Version are expected to -// behave exactly the same so when executions move between them there are no +// A Worker Deployment Version (Version, for short) represents all workers of the same +// code and config within a Deployment. Workers of the same Version are expected to +// behave exactly the same so when executions move between them there are no // non-determinism issues. -// Worker Deployment Versions are created in Temporal server automatically when +// Worker Deployment Versions are created in Temporal server automatically when // their first poller arrives to the server. -// Experimental. Worker Deployments are experimental and might significantly change in the future. message WorkerDeploymentVersionInfo { // Deprecated. Use `deployment_version`. string version = 1 [deprecated = true]; @@ -102,6 +102,7 @@ message WorkerDeploymentVersionInfo { // Required. WorkerDeploymentVersion deployment_version = 11; + // Deprecated. User deployment_version.deployment_name. string deployment_name = 2; google.protobuf.Timestamp create_time = 3; @@ -158,11 +159,21 @@ message WorkerDeploymentVersionInfo { // Arbitrary user-provided metadata attached to this version. VersionMetadata metadata = 10; + + // Optional. Contains the new worker compute configuration for the Worker + // Deployment. Used for worker scale management. + temporal.api.compute.v1.ComputeConfig compute_config = 16; + + // Identity of the last client who modified the configuration of this Version. + // As of now, this field only covers changes through the following APIs: + // - `CreateWorkerDeploymentVersion` + // - `UpdateWorkerDeploymentVersionComputeConfig` + // - `UpdateWorkerDeploymentVersionMetadata` + string last_modifier_identity = 17; } // Information about workflow drainage to help the user determine when it is safe // to decommission a Version. Not present while version is current or ramping. -// Experimental. Worker Deployments are experimental and might significantly change in the future. message VersionDrainageInfo { // Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping). // Set to DRAINED when no more open pinned workflows exist on this version. @@ -173,14 +184,13 @@ message VersionDrainageInfo { google.protobuf.Timestamp last_checked_time = 3; } -// A Worker Deployment (Deployment, for short) represents all workers serving -// a shared set of Task Queues. Typically, a Deployment represents one service or +// A Worker Deployment (Deployment, for short) represents all workers serving +// a shared set of Task Queues. Typically, a Deployment represents one service or // application. -// A Deployment contains multiple Deployment Versions, each representing a different +// A Deployment contains multiple Deployment Versions, each representing a different // version of workers. (see documentation of WorkerDeploymentVersionInfo) // Deployment records are created in Temporal server automatically when their // first poller arrives to the server. -// Experimental. Worker Deployments are experimental and might significantly change in the future. message WorkerDeploymentInfo { // Identifies a Worker Deployment. Must be unique within the namespace. string name = 1; @@ -188,8 +198,8 @@ message WorkerDeploymentInfo { // Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be // cleaned up automatically if all the following conditions meet: // - It does not receive new executions (is not current or ramping) - // - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) - // - It is drained (see WorkerDeploymentVersionInfo.drainage_status) + // - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) + // - It is drained (see WorkerDeploymentVersionInfo.drainage_status) repeated WorkerDeploymentVersionSummary version_summaries = 2; google.protobuf.Timestamp create_time = 3; @@ -244,6 +254,7 @@ message WorkerDeploymentInfo { // Timestamp when this version last stopped being current or ramping. // Cleared if the version becomes current or ramping again. google.protobuf.Timestamp last_deactivation_time = 10; + temporal.api.compute.v1.ComputeConfigSummary compute_config = 13; } } @@ -271,7 +282,7 @@ message VersionMetadata { message RoutingConfig { // Specifies which Deployment Version should receive new workflow executions and tasks of // existing unversioned or AutoUpgrade workflows. - // Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). + // Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). // Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage // is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). temporal.api.deployment.v1.WorkerDeploymentVersion current_deployment_version = 7; @@ -299,16 +310,28 @@ message RoutingConfig { // Last time ramping version percentage was changed. // If ramping version is changed, this is also updated, even if the percentage stays the same. google.protobuf.Timestamp ramping_version_percentage_changed_time = 6; - // Monotonically increasing value which is incremented on every mutation + // Monotonically increasing value which is incremented on every mutation // to any field of this message to achieve eventual consistency between task queues and their partitions. int64 revision_number = 10; } -// Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version +// Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version // to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. +// Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion. message InheritedAutoUpgradeInfo { // The source deployment version of the parent/previous workflow. temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1; // The revision number of the source deployment version of the parent/previous workflow. int64 source_deployment_revision_number = 2; -} \ No newline at end of file + // Experimental. + // If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + // specified in that command. + // Only used for the initial task of this run and the initial task of any retries of this run. + // Not passed to children or to future continue-as-new. + // + // Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + // a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + // with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade + // value if the InheritedAutoUpgradeInfo is non-empty. + temporal.api.enums.v1.ContinueAsNewVersioningBehavior continue_as_new_initial_versioning_behavior = 3; +} diff --git a/crates/common/protos/api_upstream/temporal/api/enums/v1/deployment.proto b/crates/common/protos/api_upstream/temporal/api/enums/v1/deployment.proto index 710d7c38d..a29b4488d 100644 --- a/crates/common/protos/api_upstream/temporal/api/enums/v1/deployment.proto +++ b/crates/common/protos/api_upstream/temporal/api/enums/v1/deployment.proto @@ -30,7 +30,6 @@ enum DeploymentReachability { // aip.dev/not-precedent: Call this status because it is . --) // Specify the drainage status for a Worker Deployment Version so users can decide whether they // can safely decommission the version. -// Experimental. Worker Deployments are experimental and might significantly change in the future. enum VersionDrainageStatus { // Drainage Status is not specified. VERSION_DRAINAGE_STATUS_UNSPECIFIED = 0; @@ -49,7 +48,6 @@ enum VersionDrainageStatus { // - Whether or not Temporal Server considers this worker's version (Build ID) when dispatching // tasks to it. // - Whether or not the workflows processed by this worker are versioned using the worker's version. -// Experimental. Worker Deployments are experimental and might significantly change in the future. enum WorkerVersioningMode { WORKER_VERSIONING_MODE_UNSPECIFIED = 0; // Workers with this mode are not distinguished from each other for task routing, even if they @@ -76,7 +74,6 @@ enum WorkerVersioningMode { // (-- api-linter: core::0216::synonyms=disabled // aip.dev/not-precedent: Call this status because it is . --) // Specify the status of a Worker Deployment Version. -// Experimental. Worker Deployments are experimental and might significantly change in the future. enum WorkerDeploymentVersionStatus { WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED = 0; // The Worker Deployment Version has been created inside the Worker Deployment but is not used by any @@ -97,4 +94,7 @@ enum WorkerDeploymentVersionStatus { // not query closed workflows. If the user does query closed workflows for some time x after // workflows are closed, they should decommission the version after it has been drained for that duration. WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED = 5; + // The Worker Deployment Version is created by user (via `CreateWorkerDeploymentVersion` API) + // but server has not seen any poller for it yet. + WORKER_DEPLOYMENT_VERSION_STATUS_CREATED = 6; } diff --git a/crates/common/protos/api_upstream/temporal/api/enums/v1/event_type.proto b/crates/common/protos/api_upstream/temporal/api/enums/v1/event_type.proto index 26a512992..b879f51e8 100644 --- a/crates/common/protos/api_upstream/temporal/api/enums/v1/event_type.proto +++ b/crates/common/protos/api_upstream/temporal/api/enums/v1/event_type.proto @@ -173,4 +173,6 @@ enum EventType { EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED = 58; // An event that indicates that the previously paused workflow execution has been unpaused. EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED = 59; + // An event that indicates time skipping advanced time or was disabled automatically after a bound was reached. + EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED = 60; } diff --git a/crates/common/protos/api_upstream/temporal/api/enums/v1/nexus.proto b/crates/common/protos/api_upstream/temporal/api/enums/v1/nexus.proto index 3a3087716..fd69bb0e9 100644 --- a/crates/common/protos/api_upstream/temporal/api/enums/v1/nexus.proto +++ b/crates/common/protos/api_upstream/temporal/api/enums/v1/nexus.proto @@ -20,3 +20,63 @@ enum NexusHandlerErrorRetryBehavior { NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE = 2; } +// Status of a standalone Nexus operation execution. +// The status is updated once, when the operation is originally scheduled, and again when the +// operation reaches a terminal status. +// (-- api-linter: core::0216::synonyms=disabled +// aip.dev/not-precedent: Named consistently with WorkflowExecutionStatus. --) +enum NexusOperationExecutionStatus { + NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED = 0; + // The operation is not in a terminal status. The operation may be attempting to start, + // backing off between attempts, or already started. + NEXUS_OPERATION_EXECUTION_STATUS_RUNNING = 1; + // The operation completed successfully. + NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED = 2; + // The operation completed with failure. + NEXUS_OPERATION_EXECUTION_STATUS_FAILED = 3; + // The operation completed as canceled. + // Requesting to cancel an operation does not automatically transition the operation to canceled status, depending + // on the current operation status and the cancelation type used. + NEXUS_OPERATION_EXECUTION_STATUS_CANCELED = 4; + // The operation was terminated. Termination happens immediately without notifying the handler. + NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED = 5; + // The operation has timed out by reaching one of the specified timeouts. + NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT = 6; +} + +// Stage that can be specified when waiting on a nexus operation. +enum NexusOperationWaitStage { + NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED = 0; + // Wait for the operation to be started. + NEXUS_OPERATION_WAIT_STAGE_STARTED = 1; + // Wait for the operation to be in a terminal state, either successful or unsuccessful. + NEXUS_OPERATION_WAIT_STAGE_CLOSED = 2; +} + +// Defines whether to allow re-using an operation ID from a previously *closed* Nexus operation. +// If the request is denied, the server returns a `NexusOperationAlreadyStarted` error. +// +// See `NexusOperationIdConflictPolicy` for handling ID duplication with a *running* operation. +enum NexusOperationIdReusePolicy { + NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED = 0; + // Always allow starting an operation using the same operation ID. + NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE = 1; + // Allow starting an operation using the same ID only when the last operation's final state is one + // of {failed, canceled, terminated, timed out}. + NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 2; + // Do not permit re-use of the ID for this operation. Future start requests could potentially change the policy, + // allowing re-use of the ID. + NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE = 3; +} + +// Defines what to do when trying to start a Nexus operation with the same ID as a *running* operation. +// Note that it is *never* valid to have two running instances of the same operation ID. +// +// See `NexusOperationIdReusePolicy` for handling operation ID duplication with a *closed* operation. +enum NexusOperationIdConflictPolicy { + NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED = 0; + // Don't start a new operation; instead return `NexusOperationAlreadyStarted` error. + NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL = 1; + // Don't start a new operation; instead return a handle for the running operation. + NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING = 2; +} diff --git a/crates/common/protos/api_upstream/temporal/api/enums/v1/task_queue.proto b/crates/common/protos/api_upstream/temporal/api/enums/v1/task_queue.proto index b54f8f18b..e583988fe 100644 --- a/crates/common/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +++ b/crates/common/protos/api_upstream/temporal/api/enums/v1/task_queue.proto @@ -31,6 +31,11 @@ enum TaskQueueKind { // // Sticky queues are only for workflow tasks. There are no sticky task queues for activities. TASK_QUEUE_KIND_STICKY = 2; + // A worker-commands task queue is used for server-to-worker communication (e.g. activity + // cancellations). These queues are ephemeral and per-worker-process — they exist only for + // the lifetime of the worker process. Used with TASK_QUEUE_TYPE_NEXUS and polled via + // PollNexusTaskQueue. + TASK_QUEUE_KIND_WORKER_COMMANDS = 3; } enum TaskQueueType { diff --git a/crates/common/protos/api_upstream/temporal/api/enums/v1/workflow.proto b/crates/common/protos/api_upstream/temporal/api/enums/v1/workflow.proto index 3e73ae6fa..a9ac3fc33 100644 --- a/crates/common/protos/api_upstream/temporal/api/enums/v1/workflow.proto +++ b/crates/common/protos/api_upstream/temporal/api/enums/v1/workflow.proto @@ -128,7 +128,6 @@ enum TimeoutType { // Versions. The Versioning Behavior of a workflow execution is typically specified by the worker // who completes the first task of the execution, but is also overridable manually for new and // existing workflows (see VersioningOverride). -// Experimental. Worker Deployments are experimental and might significantly change in the future. enum VersioningBehavior { // Workflow execution does not have a Versioning Behavior and is called Unversioned. This is the // legacy behavior. An Unversioned workflow's task can go to any Unversioned worker (see @@ -179,16 +178,31 @@ enum VersioningBehavior { enum ContinueAsNewVersioningBehavior { CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED = 0; + // Experimental. // Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at // start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever // Versioning Behavior the workflow is annotated with in the workflow code. // - // Note that if the previous workflow had a Pinned override, that override will be inherited by the + // Note that if the workflow being continued has a Pinned override, that override will be inherited by the // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new - // command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade - // behavior, the base version of the new run will be the Target Version as described above, but the - // effective version will be whatever is specified by the Versioning Override until the override is removed. + // command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE = 1; + + // Experimental. + // Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's + // Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, + // the workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping + // Version by the time that the first workflow task is dispatched, it will be sent to the Current Version. + // + // It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because + // this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow + // is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which + // may be the Current Version instead of the Ramping Version. + // + // Note that if the workflow being continued has a Pinned override, that override will be inherited by the + // new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new + // command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. + CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION = 2; } // SuggestContinueAsNewReason specifies why SuggestContinueAsNew is true. diff --git a/crates/common/protos/api_upstream/temporal/api/errordetails/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/errordetails/v1/message.proto index c01e90e2c..2abb60db6 100644 --- a/crates/common/protos/api_upstream/temporal/api/errordetails/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/errordetails/v1/message.proto @@ -129,3 +129,11 @@ message ActivityExecutionAlreadyStartedFailure { string start_request_id = 1; string run_id = 2; } + +// An error indicating that a Nexus operation failed to start. Returned when there is an existing operation with the +// given operation ID, and the given ID reuse and conflict policies do not permit starting a new one or attaching to an +// existing one. +message NexusOperationExecutionAlreadyStartedFailure { + string start_request_id = 1; + string run_id = 2; +} diff --git a/crates/common/protos/api_upstream/temporal/api/failure/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/failure/v1/message.proto index fa17872a6..a8634dc93 100644 --- a/crates/common/protos/api_upstream/temporal/api/failure/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/failure/v1/message.proto @@ -35,9 +35,13 @@ message TimeoutFailureInfo { message CanceledFailureInfo { temporal.api.common.v1.Payloads details = 1; + // The identity of the worker or client that requested the cancellation. + string identity = 2; } message TerminatedFailureInfo { + // The identity of the worker or client that requested the termination. + string identity = 1; } message ServerFailureInfo { diff --git a/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto index 21fb13c5e..e57ec8d60 100644 --- a/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto @@ -196,12 +196,29 @@ message WorkflowExecutionStartedEventAttributes { // Used internally by the server during continue-as-new and retry. // Should not be read or interpreted by SDKs. DeclinedTargetVersionUpgrade declined_target_version_upgrade = 40; + + // Initial time-skipping configuration for this workflow execution, recorded at start time. + // This may have been set explicitly via the start workflow request, or propagated from a + // parent/previous execution. + // + // The configuration may be updated after start via UpdateWorkflowExecutionOptions, which + // will be reflected in the WorkflowExecutionOptionsUpdatedEvent. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 41; + + // The time skipped by the previous execution that started this workflow. + // It can happen in cases of child workflows and continue-as-new workflows. + google.protobuf.Duration initial_skipped_duration = 42; } // Wrapper for a target deployment version that the SDK declined to upgrade to. // See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes. message DeclinedTargetVersionUpgrade { temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 1; + // Revision number of the task queue routing config at the time the target + // was declined. If an incoming target's revision is <= this value, it is + // not newer and is not used for deciding whether or not to suppress the + // upgrade signal. + int64 revision_number = 2; } message WorkflowExecutionCompletedEventAttributes { @@ -348,16 +365,13 @@ message WorkflowTaskCompletedEventAttributes { temporal.api.enums.v1.VersioningBehavior versioning_behavior = 8; // The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` // is set. This value updates workflow execution's `versioning_info.version`. - // Experimental. Worker Deployments are experimental and might significantly change in the future. // Deprecated. Replaced with `deployment_version`. string worker_deployment_version = 9 [deprecated = true]; // The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` // is set. This value updates workflow execution's `worker_deployment_name`. - // Experimental. Worker Deployments are experimental and might significantly change in the future. string worker_deployment_name = 10; // The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` // is set. This value updates workflow execution's `versioning_info.deployment_version`. - // Experimental. Worker Deployments are experimental and might significantly change in the future. temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 11; } @@ -607,6 +621,9 @@ message WorkflowExecutionSignaledEventAttributes { bool skip_generate_workflow_task = 5 [deprecated = true]; // When signal origin is a workflow execution, this field is set. temporal.api.common.v1.WorkflowExecution external_workflow_execution = 6; + // The request ID of the Signal request, used by the server to attach this to + // the correct Event ID when generating link. + string request_id = 7; } message WorkflowExecutionTerminatedEventAttributes { @@ -757,6 +774,12 @@ message StartChildWorkflowExecutionInitiatedEventAttributes { bool inherit_build_id = 19 [deprecated = true]; // Priority metadata temporal.api.common.v1.Priority priority = 20; + + // The propagated time-skipping configuration for the child workflow. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 21; + + // Propagate the duration skipped to the child workflow. + google.protobuf.Duration initial_skipped_duration = 30; } message StartChildWorkflowExecutionFailedEventAttributes { @@ -873,6 +896,8 @@ message WorkflowExecutionOptionsUpdatedEventAttributes { // Priority override upserted in this event. Represents the full priority; not just partial fields. // Ignored if nil. temporal.api.common.v1.Priority priority = 6; + // If set, the time-skipping configuration was changed. Contains the full updated configuration. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 7; } // Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes @@ -965,6 +990,23 @@ message WorkflowExecutionUnpausedEventAttributes { string request_id = 3; } +// Attributes for an event indicating that time skipping state changed for a workflow execution, +// either time was advanced or time skipping was disabled automatically due to a bound being reached. +// The worker_may_ignore field in HistoryEvent should always be set true for this event. +message WorkflowExecutionTimeSkippingTransitionedEventAttributes { + + // The virtual time after time skipping was applied. + google.protobuf.Timestamp target_time = 1; + + // when true, time skipping was disabled automatically due to a bound being reached. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "after" is used to indicate temporal ordering. --) + bool disabled_after_bound = 2; + + // The wall-clock time when the time-skipping state changed event was generated. + google.protobuf.Timestamp wall_clock_time = 3; +} + // Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command. message NexusOperationScheduledEventAttributes { // Endpoint name, must exist in the endpoint registry. @@ -982,6 +1024,8 @@ message NexusOperationScheduledEventAttributes { // Calls are retried internally by the server. // (-- api-linter: core::0140::prepositions=disabled // aip.dev/not-precedent: "to" is used to indicate interval. --) + // (-- api-linter: core::0142::time-field-names=disabled + // aip.dev/not-precedent: "timeout" is an acceptable suffix for duration fields in this API. --) google.protobuf.Duration schedule_to_close_timeout = 5; // Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal // activities and child workflows, these are transmitted to Nexus operations that may be external and are not @@ -1134,8 +1178,10 @@ message HistoryEvent { // * timer_started_event_attributes - summary represents an identifier for the timer for use by // user interfaces. temporal.api.sdk.v1.UserMetadata user_metadata = 301; - // Links associated with the event. + // Links to related entities, such as the entity that started this event's workflow. repeated temporal.api.common.v1.Link links = 302; + // Server-computed authenticated caller identity associated with this event. + temporal.api.common.v1.Principal principal = 303; // The event details. The type must match that in `event_type`. oneof attributes { WorkflowExecutionStartedEventAttributes workflow_execution_started_event_attributes = 6; @@ -1197,6 +1243,7 @@ message HistoryEvent { NexusOperationCancelRequestFailedEventAttributes nexus_operation_cancel_request_failed_event_attributes = 62; WorkflowExecutionPausedEventAttributes workflow_execution_paused_event_attributes = 63; WorkflowExecutionUnpausedEventAttributes workflow_execution_unpaused_event_attributes = 64; + WorkflowExecutionTimeSkippingTransitionedEventAttributes workflow_execution_time_skipping_transitioned_event_attributes = 65; } } diff --git a/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto index 552b75c26..3623daa70 100644 --- a/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto @@ -9,10 +9,13 @@ option java_outer_classname = "MessageProto"; option ruby_package = "Temporalio::Api::Nexus::V1"; option csharp_namespace = "Temporalio.Api.Nexus.V1"; +import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "temporal/api/common/v1/message.proto"; +import "temporal/api/enums/v1/common.proto"; import "temporal/api/enums/v1/nexus.proto"; import "temporal/api/failure/v1/message.proto"; +import "temporal/api/sdk/v1/user_metadata.proto"; // A general purpose failure message. // See: https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure @@ -199,7 +202,6 @@ message EndpointTarget { // Nexus task queue to route requests to. string task_queue = 2; } - // Target an external server by URL. // At a later point, this will support providing credentials, in the meantime, an http.RoundTripper can be injected // into the server to modify the request. @@ -213,3 +215,150 @@ message EndpointTarget { External external = 2; } } + +// NexusOperationExecutionCancellationInfo contains the state of a Nexus operation cancellation. +message NexusOperationExecutionCancellationInfo { + // The time when cancellation was requested. + google.protobuf.Timestamp requested_time = 1; + + temporal.api.enums.v1.NexusOperationCancellationState state = 2; + + // The number of attempts made to deliver the cancel operation request. + // This number represents a minimum bound since the attempt is incremented after the request completes. + int32 attempt = 3; + + // The time when the last attempt completed. + google.protobuf.Timestamp last_attempt_complete_time = 4; + // The last attempt's failure, if any. + temporal.api.failure.v1.Failure last_attempt_failure = 5; + // The time when the next attempt is scheduled. + google.protobuf.Timestamp next_attempt_schedule_time = 6; + + // If the state is BLOCKED, blocked reason provides additional information. + string blocked_reason = 7; + + // A reason that may be specified in the CancelNexusOperationRequest. + string reason = 8; +} + +// Full current state of a standalone Nexus operation, as of the time of the request. +message NexusOperationExecutionInfo { + // Unique identifier of this Nexus operation within its namespace along with run ID (below). + string operation_id = 1; + string run_id = 2; + + // Endpoint name, resolved to a URL via the cluster's endpoint registry. + string endpoint = 3; + // Service name. + string service = 4; + // Operation name. + string operation = 5; + + // A general status for this operation, indicates whether it is currently running or in one of the terminal statuses. + // Updated once when the operation is originally scheduled, and again when it reaches a terminal status. + temporal.api.enums.v1.NexusOperationExecutionStatus status = 6; + // More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING. + temporal.api.enums.v1.PendingNexusOperationState state = 7; + + // Schedule-to-close timeout for this operation. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration schedule_to_close_timeout = 8; + + // Schedule-to-start timeout for this operation. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration schedule_to_start_timeout = 9; + + // Start-to-close timeout for this operation. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration start_to_close_timeout = 10; + + // The number of attempts made to deliver the start operation request. + // This number is approximate, it is incremented when a task is added to the history queue. + // In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task + // was never executed. + int32 attempt = 11; + + // Time the operation was originally scheduled via a StartNexusOperation request. + google.protobuf.Timestamp schedule_time = 12; + // Scheduled time + schedule to close timeout. + google.protobuf.Timestamp expiration_time = 13; + // Time when the operation transitioned to a closed state. + google.protobuf.Timestamp close_time = 14; + + // The time when the last attempt completed. + google.protobuf.Timestamp last_attempt_complete_time = 15; + // The last attempt's failure, if any. + temporal.api.failure.v1.Failure last_attempt_failure = 16; + // The time when the next attempt is scheduled. + google.protobuf.Timestamp next_attempt_schedule_time = 17; + + // Elapsed time from schedule_time to now for running operations or to close_time for closed + // operations, including all attempts and backoff between attempts. + google.protobuf.Duration execution_duration = 18; + + NexusOperationExecutionCancellationInfo cancellation_info = 19; + + // If the state is BLOCKED, blocked reason provides additional information. + string blocked_reason = 20; + + // Server-generated request ID used as an idempotency token when submitting start requests to + // the handler. Distinct from the request_id in StartNexusOperationRequest, which is the + // caller-side idempotency key for the StartNexusOperation RPC itself. + string request_id = 21; + + // Operation token. Only set for asynchronous operations after a successful StartOperation call. + string operation_token = 22; + + // Incremented each time the operation's state is mutated in persistence. + int64 state_transition_count = 23; + + temporal.api.common.v1.SearchAttributes search_attributes = 24; + + // Header for context propagation and tracing purposes. + map nexus_header = 25; + + // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation. + temporal.api.sdk.v1.UserMetadata user_metadata = 26; + + // Links attached by the handler of this operation on start or completion. + repeated temporal.api.common.v1.Link links = 27; + + // The identity of the client who started this operation. + string identity = 28; +} + +// Limited Nexus operation information returned in the list response. +// When adding fields here, ensure that it is also present in NexusOperationExecutionInfo (note that it may already be present in +// NexusOperationExecutionInfo but not at the top-level). +message NexusOperationExecutionListInfo { + // A unique identifier of this operation within its namespace along with run ID (below). + string operation_id = 1; + // The run ID of the standalone Nexus operation. + string run_id = 2; + + // Endpoint name. + string endpoint = 3; + // Service name. + string service = 4; + // Operation name. + string operation = 5; + + // Time the operation was originally scheduled via a StartNexusOperation request. + google.protobuf.Timestamp schedule_time = 6; + // If the operation is in a terminal status, this field represents the time the operation transitioned to that status. + google.protobuf.Timestamp close_time = 7; + // The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status. + temporal.api.enums.v1.NexusOperationExecutionStatus status = 8; + + // Search attributes from the start request. + temporal.api.common.v1.SearchAttributes search_attributes = 9; + + // Updated on terminal status. + int64 state_transition_count = 10; + // The difference between close time and scheduled time. + // This field is only populated if the operation is closed. + google.protobuf.Duration execution_duration = 11; +} diff --git a/crates/common/protos/api_upstream/temporal/api/nexusservices/workerservice/v1/request_response.proto b/crates/common/protos/api_upstream/temporal/api/nexusservices/workerservice/v1/request_response.proto new file mode 100644 index 000000000..e5b46e7ce --- /dev/null +++ b/crates/common/protos/api_upstream/temporal/api/nexusservices/workerservice/v1/request_response.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package temporal.api.nexusservices.workerservice.v1; + +option go_package = "go.temporal.io/api/nexusservices/workerservice/v1;workerservice"; +option java_package = "io.temporal.api.nexusservices.workerservice.v1"; +option java_multiple_files = true; +option java_outer_classname = "RequestResponseProto"; +option ruby_package = "Temporalio::Api::Nexusservices::Workerservice::V1"; +option csharp_namespace = "Temporalio.Api.Nexusservices.Workerservice.V1"; + +import "temporal/api/worker/v1/message.proto"; + +// (-- +// Internal Nexus service for server-to-worker communication. +// --) + +// Request payload for the "ExecuteCommands" Nexus operation. +message ExecuteCommandsRequest { + repeated temporal.api.worker.v1.WorkerCommand commands = 1; +} + +// Response payload for the "ExecuteCommands" Nexus operation. +// The results list must be 1:1 with the commands list in the request (same size and order). +message ExecuteCommandsResponse { + repeated temporal.api.worker.v1.WorkerCommandResult results = 1; +} diff --git a/crates/common/protos/api_upstream/temporal/api/sdk/v1/external_storage.proto b/crates/common/protos/api_upstream/temporal/api/sdk/v1/external_storage.proto new file mode 100644 index 000000000..5a08f9995 --- /dev/null +++ b/crates/common/protos/api_upstream/temporal/api/sdk/v1/external_storage.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package temporal.api.sdk.v1; + +option go_package = "go.temporal.io/api/sdk/v1;sdk"; +option java_package = "io.temporal.api.sdk.v1"; +option java_multiple_files = true; +option java_outer_classname = "ExternalStorageProto"; +option ruby_package = "Temporalio::Api::Sdk::V1"; +option csharp_namespace = "Temporalio.Api.Sdk.V1"; + +// ExternalStorageReference identifies a payload stored in an external storage system. +// It is used as a claim-check token, allowing the actual payload data to be retrieved +// from the named driver using the provided claim data. +message ExternalStorageReference { + // The name of the storage driver responsible for retrieving the payload. + string driver_name = 1; + // Driver-specific key-value pairs that identify and provide access to the stored payload. + map claim_data = 2; +} diff --git a/crates/common/protos/api_upstream/temporal/api/taskqueue/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/taskqueue/v1/message.proto index 3580abdc2..358b9430c 100644 --- a/crates/common/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/taskqueue/v1/message.proto @@ -33,7 +33,6 @@ message TaskQueueMetadata { google.protobuf.DoubleValue max_tasks_per_second = 1; } -// Experimental. Worker Deployments are experimental and might significantly change in the future. message TaskQueueVersioningInfo { // Specifies which Deployment Version should receive new workflow executions and tasks of // existing unversioned or AutoUpgrade workflows. @@ -304,6 +303,11 @@ message TimestampedCompatibleBuildIdRedirectRule { google.protobuf.Timestamp create_time = 2; } +message PollerGroupInfo { + string id = 1; + float weight = 2; +} + // Attached to task responses to give hints to the SDK about how it may adjust its number of // pollers. message PollerScalingDecision { diff --git a/crates/common/protos/api_upstream/temporal/api/worker/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/worker/v1/message.proto index b65faeb29..a87142c78 100644 --- a/crates/common/protos/api_upstream/temporal/api/worker/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/worker/v1/message.proto @@ -193,3 +193,27 @@ message StorageDriverInfo { // The type of the driver, required. string type = 1; } + +// A command sent from the server to a worker. +message WorkerCommand { + oneof type { + CancelActivityCommand cancel_activity = 1; + } +} + +// Cancel an activity if it is still running. Otherwise, do nothing. +message CancelActivityCommand { + bytes task_token = 1; +} + +// The result of executing a WorkerCommand. +message WorkerCommandResult { + oneof type { + CancelActivityResult cancel_activity = 1; + } +} + +// Result of a CancelActivityCommand. +// Treat both successful cancellation and no-op (activity is no longer running) as success. +message CancelActivityResult { +} diff --git a/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto index 40753b2ce..51b39b76a 100644 --- a/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto @@ -93,7 +93,6 @@ message WorkflowExecutionInfo { WorkflowExecutionVersioningInfo versioning_info = 22; // The name of Worker Deployment that completed the most recent workflow task. - // Experimental. Worker Deployments are experimental and might change in the future. string worker_deployment_name = 23; // Priority metadata @@ -232,6 +231,17 @@ message WorkflowExecutionVersioningInfo { // face the problem of inconsistent dispatching that arises from eventual consistency between // task queues and their partitions. int64 revision_number = 8; + // Experimental. + // If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + // specified in that command. + // Only used for the initial task of this run and the initial task of any retries of this run. + // Not passed to children or to future continue-as-new. + // + // Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + // a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + // with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent + // to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. + temporal.api.enums.v1.ContinueAsNewVersioningBehavior continue_as_new_initial_versioning_behavior = 9; } // Holds information about ongoing transition of a workflow execution from one deployment to another. @@ -505,7 +515,9 @@ message PendingNexusOperationInfo { temporal.api.enums.v1.PendingNexusOperationState state = 7; // The number of attempts made to deliver the start operation request. - // This number represents a minimum bound since the attempt is incremented after the request completes. + // This number is approximate, it is incremented when a task is added to the history queue. + // In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task + // was never executed. int32 attempt = 8; // The time when the last attempt completed. @@ -566,6 +578,53 @@ message WorkflowExecutionOptions { // If set, overrides the workflow's priority sent by the SDK. temporal.api.common.v1.Priority priority = 2; + + // Time-skipping configuration for this workflow execution. + // If not set, the time-skipping configuration is not updated by this request; + // the existing configuration is preserved. + TimeSkippingConfig time_skipping_config = 3; +} + +// Configuration for time skipping during a workflow execution. +// When enabled, virtual time advances automatically whenever there is no in-flight work. +// In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, +// and possibly other features added in the future. +// User timers are not classified as in-flight work and will be skipped over. +// When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists. +// +// Propagation behavior of time skipping: +// The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows: +// (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are +// inherited from the current execution. The configured bound is shared between the inherited skipped +// duration and any additional duration skipped by the new run. +// (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the +// current workflow started; the accumulated skipped duration of the current run is not propagated. +// (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays +// all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that +// point, the resulting run ends up with the same final time-skipping configuration as the previous run. +message TimeSkippingConfig { + reserved 2, 6; + reserved "disable_propagation", "max_target_time"; + + // Enables or disables time skipping for this workflow execution. + bool enabled = 1; + + // Optional bound that limits the gap between the virtual time of this execution and wall-clock time. + // Once the bound is reached, time skipping is automatically disabled, + // but can be re-enabled by setting `enabled` to true via UpdateWorkflowExecutionOptions. + // This bound cannot be set to a value smaller than the execution's currently skipped duration. + // + // This is useful in testing scenarios where a workflow is expected to receive + // signals, updates, or other external events while timers are in progress. + oneof bound { + // Maximum total virtual time that can be skipped. + google.protobuf.Duration max_skipped_duration = 4; + + // Maximum elapsed time since time skipping was enabled. + // This includes both skipped time and real time elapsing. + // (-- api-linter: core::0142::time-field-names=disabled --) + google.protobuf.Duration max_elapsed_duration = 5; + } } // Used to override the versioning behavior (and pinned deployment version, if applicable) of a @@ -693,4 +752,3 @@ message WorkflowExecutionPauseInfo { // The reason for pausing the workflow execution. string reason = 3; } - diff --git a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto index 2d9dd7b83..5653ddf23 100644 --- a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +++ b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto @@ -20,11 +20,13 @@ import "temporal/api/enums/v1/task_queue.proto"; import "temporal/api/enums/v1/deployment.proto"; import "temporal/api/enums/v1/update.proto"; import "temporal/api/enums/v1/activity.proto"; +import "temporal/api/enums/v1/nexus.proto"; import "temporal/api/activity/v1/message.proto"; import "temporal/api/common/v1/message.proto"; import "temporal/api/history/v1/message.proto"; import "temporal/api/workflow/v1/message.proto"; import "temporal/api/command/v1/message.proto"; +import "temporal/api/compute/v1/config.proto"; import "temporal/api/deployment/v1/message.proto"; import "temporal/api/failure/v1/message.proto"; import "temporal/api/filter/v1/message.proto"; @@ -197,6 +199,8 @@ message StartWorkflowExecutionRequest { temporal.api.common.v1.Priority priority = 27; // Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`. temporal.api.deployment.v1.WorkerDeploymentOptions eager_worker_deployment_options = 28; + // Time-skipping configuration. If not set, time skipping is disabled. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 29; } message StartWorkflowExecutionResponse { @@ -257,11 +261,21 @@ message GetWorkflowExecutionHistoryReverseResponse { message PollWorkflowTaskQueueRequest { string namespace = 1; temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + // Unless this is the first poll, the client must pass one of the poller group IDs received in + // `poller_group_infos` of the last the PollWorkflowTaskQueueResponse according to the + // instructions. If not set, the poll is routed randomly which can cause it being blocked + // without receiving a task while the queue actually has tasks in another server location. + string poller_group_id = 10; // The identity of the worker/client who is polling this task queue string identity = 3; // A unique key for this worker instance, used for tracking worker lifecycle. // This is guaranteed to be unique, whereas identity is not guaranteed to be unique. string worker_instance_key = 8; + + // A dedicated per-worker Nexus task queue on which the server sends control + // tasks (e.g. activity cancellation) to this specific worker instance. + string worker_control_task_queue = 9; + // Deprecated. Use deployment_options instead. // Each worker process should provide an ID unique to the specific set of code it is running // "checksum" in this field name isn't very accurate, it should be though of as an id. @@ -271,11 +285,10 @@ message PollWorkflowTaskQueueRequest { // feature. See the `WorkerVersionCapabilities` docstring for more. temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 5 [deprecated = true]; // Worker deployment options that user has set in the worker. - // Experimental. Worker Deployments are experimental and might significantly change in the future. temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6; // Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat - reserved 7; + reserved 7; reserved "worker_heartbeat"; } @@ -331,6 +344,16 @@ 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 awaiting for query response. + // Corresponding RespondQueryTaskCompleted should pass this value for proper routing. + string poller_group_id = 17; + // The weighted list of poller groups IDs that client should use for future polls to this task + // queue. Client is expected to: + // 1. Maintain minimum number of pollers no less than the number of groups. + // 2. Try to assign the next poll to a group without any pending polls, + // 3. If every group has some pending polls, assign the next poll to a group randomly + // according to the weights. + repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 18; } message RespondWorkflowTaskCompletedRequest { @@ -383,6 +406,14 @@ message RespondWorkflowTaskCompletedRequest { // Worker deployment options that user has set in the worker. temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 17; + // A unique key for this worker instance, used for tracking worker lifecycle. + // This is guaranteed to be unique, whereas identity is not guaranteed to be unique. + string worker_instance_key = 19; + + // A dedicated per-worker Nexus task queue on which the server sends control + // tasks (e.g. activity cancellation) to this specific worker instance. + string worker_control_task_queue = 20; + // SDK capability details. message Capabilities { // True if the SDK can handle speculative workflow task with command events. If true, the @@ -443,11 +474,21 @@ message RespondWorkflowTaskFailedResponse { message PollActivityTaskQueueRequest { string namespace = 1; temporal.api.taskqueue.v1.TaskQueue task_queue = 2; + // Unless this is the first poll, the client must pass one of the poller group IDs received in + // `poller_group_infos` of the last the PollActivityTaskQueueResponse according to the + // instructions. If not set, the poll is routed randomly which can cause it being blocked + // without receiving a task while the queue actually has tasks in another server location. + string poller_group_id = 10; // The identity of the worker/client string identity = 3; // A unique key for this worker instance, used for tracking worker lifecycle. // This is guaranteed to be unique, whereas identity is not guaranteed to be unique. string worker_instance_key = 8; + + // A dedicated per-worker Nexus task queue on which the server sends control + // tasks (e.g. activity cancellation) to this specific worker instance. + string worker_control_task_queue = 9; + temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4; // Information about this worker's build identifier and if it is choosing to use the versioning // feature. See the `WorkerVersionCapabilities` docstring for more. @@ -457,7 +498,7 @@ message PollActivityTaskQueueRequest { temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6; // Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat - reserved 7; + reserved 7; reserved "worker_heartbeat"; } @@ -516,6 +557,13 @@ message PollActivityTaskQueueResponse { temporal.api.common.v1.Priority priority = 19; // The run ID of the activity execution, only set for standalone activities. string activity_run_id = 20; + // The weighted list of poller groups IDs that client should use for future polls to this task + // queue. Client is expected to: + // 1. Maintain minimum number of pollers no less than the number of groups. + // 2. Try to assign the next poll to a group without any pending polls, + // 3. If every group has some pending polls, assign the next poll to a group randomly + // according to the weights. + repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 21; } message RecordActivityTaskHeartbeatRequest { @@ -773,6 +821,10 @@ message SignalWorkflowExecutionRequest { } message SignalWorkflowExecutionResponse { + // Link to be associated with the WorkflowExecutionSignaled event. + // Added on the response to propagate the backlink. + // Available from Temporal server 1.31 and up. + temporal.api.common.v1.Link link = 1; } message SignalWithStartWorkflowExecutionRequest { @@ -836,6 +888,8 @@ message SignalWithStartWorkflowExecutionRequest { temporal.api.workflow.v1.VersioningOverride versioning_override = 25; // Priority metadata temporal.api.common.v1.Priority priority = 26; + // Time-skipping configuration. If not set, time skipping is disabled. + temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 27; } message SignalWithStartWorkflowExecutionResponse { @@ -843,6 +897,10 @@ message SignalWithStartWorkflowExecutionResponse { string run_id = 1; // If true, a new workflow was started. bool started = 2; + // Link to be associated with the WorkflowExecutionSignaled event. + // Added on the response to propagate the backlink. + // Available from Temporal server 1.31 and up. + temporal.api.common.v1.Link signal_link = 3; } message ResetWorkflowExecutionRequest { @@ -1028,6 +1086,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; + // Client must forward the poller_group_id received in PollWorkflowTaskQueueResponse for proper + // routing of the response. + string poller_group_id = 9; } message RespondQueryTaskCompletedResponse { @@ -1267,6 +1328,11 @@ message GetSystemInfoResponse { // This flag is dependent both on server version and for Nexus to be enabled via server configuration. bool nexus = 11; + // True if the server supports server-scaled deployments. + // This flag is dependent both on server version and for server-scaled deployments + // to be enabled via server configuration. + bool server_scaled_deployments = 12; + } } @@ -1355,6 +1421,10 @@ message UpdateScheduleRequest { // Note: you cannot only update the search attributes with `UpdateScheduleRequest`, // you must also set the `schedule` field; otherwise, it will unset the schedule. temporal.api.common.v1.SearchAttributes search_attributes = 7; + // Schedule memo to replace. If set, replaces the entire memo. + // Do not set this field if you do not want to update the memo. + // A non-null empty object will clear the memo. + temporal.api.common.v1.Memo memo = 8; } message UpdateScheduleResponse { @@ -1868,12 +1938,17 @@ message PollWorkflowExecutionUpdateResponse { message PollNexusTaskQueueRequest { string namespace = 1; + temporal.api.taskqueue.v1.TaskQueue task_queue = 3; + // Unless this is the first poll, the client must pass one of the poller group IDs received in + // `poller_group_infos` of the last the PollNexusTaskQueueResponse according to the + // instructions. If not set, the poll is routed randomly which can cause it being blocked + // without receiving a task while the queue actually has tasks in another server location. + string poller_group_id = 9; // The identity of the client who initiated this request. string identity = 2; // A unique key for this worker instance, used for tracking worker lifecycle. // This is guaranteed to be unique, whereas identity is not guaranteed to be unique. string worker_instance_key = 8; - temporal.api.taskqueue.v1.TaskQueue task_queue = 3; // Information about this worker's build identifier and if it is choosing to use the versioning // feature. See the `WorkerVersionCapabilities` docstring for more. // Deprecated. Replaced by deployment_options. @@ -1892,6 +1967,18 @@ 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 awaiting for synchronous + // response. + // Corresponding `RespondNexusTaskCompleted` and `RespondNexusTaskFailed` calls should pass this + // value for proper response routing. + string poller_group_id = 4; + // The weighted list of poller groups IDs that client should use for future polls to this task + // queue. Client is expected to: + // 1. Maintain minimum number of pollers no less than the number of groups. + // 2. Try to assign the next poll to a group without any pending polls, + // 3. If every group has some pending polls, assign the next poll to a group randomly + // according to the weights. + repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 5; } message RespondNexusTaskCompletedRequest { @@ -1902,6 +1989,9 @@ message RespondNexusTaskCompletedRequest { bytes task_token = 3; // Embedded response to be translated into a frontend response. temporal.api.nexus.v1.Response response = 4; + // Client must forward the poller_group_id received in PollNexusTaskQueueResponse for proper + // routing of the response. + string poller_group_id = 5; } message RespondNexusTaskCompletedResponse { @@ -1917,6 +2007,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; + // Client must forward the poller_group_id received in PollNexusTaskQueueResponse for proper + // routing of the response. + string poller_group_id = 6; } message RespondNexusTaskFailedResponse { @@ -2340,6 +2433,26 @@ message SetWorkerDeploymentRampingVersionResponse { float previous_percentage = 3 [deprecated = true]; } +// Creates a new WorkerDeployment. +message CreateWorkerDeploymentRequest { + string namespace = 1; + // The name of the Worker Deployment to create. If a Worker Deployment with + // this name already exists, an error will be returned. + string deployment_name = 2; + + // Optional. The identity of the client who initiated this request. + string identity = 4; + // A unique identifier for this create request for idempotence. Typically UUIDv4. + string request_id = 5; +} + +message CreateWorkerDeploymentResponse { + // This value is returned so that it can be optionally passed to APIs that + // write to the WorkerDeployment state to ensure that the state did not + // change between this API call and a future write. + bytes conflict_token = 1; +} + message ListWorkerDeploymentsRequest { string namespace = 1; int32 page_size = 2; @@ -2366,6 +2479,28 @@ message ListWorkerDeploymentsResponse { } } +// Creates a new WorkerDeploymentVersion. +message CreateWorkerDeploymentVersionRequest { + string namespace = 1; + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 2; + + // Optional. Contains the new worker compute configuration for the Worker + // Deployment. Used for worker scale management. + temporal.api.compute.v1.ComputeConfig compute_config = 4; + + // Optional. The identity of the client who initiated this request. + string identity = 3; + + // A unique identifier for this create request for idempotence. Typically UUIDv4. + // If a second request with the same ID is recieved, it is considered a successful no-op. + // Retrying with a different request ID for the same deployment name + build ID is an error. + string request_id = 5; +} + +message CreateWorkerDeploymentVersionResponse { +} + // Used for manual deletion of Versions. User can delete a Version only when all the // following conditions are met: // - It is not the Current or Ramping Version of its Deployment. @@ -2400,6 +2535,53 @@ message DeleteWorkerDeploymentRequest { message DeleteWorkerDeploymentResponse { } +// Used to update the compute config of a Worker Deployment Version. +message UpdateWorkerDeploymentVersionComputeConfigRequest { + string namespace = 1; + + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 2; + + // Optional. Contains the compute config scaling groups to add or update for the Worker + // Deployment. + map compute_config_scaling_groups = 6; + + // Optional. Contains the compute config scaling groups to remove from the Worker Deployment. + repeated string remove_compute_config_scaling_groups = 7; + + // Optional. The identity of the client who initiated this request. + string identity = 3; + + // A unique identifier for this create request for idempotence. Typically UUIDv4. + // If a second request with the same ID is recieved, it is considered a successful no-op. + // Retrying with a different request ID for the same deployment name + build ID is an error. + string request_id = 4; +} + +message UpdateWorkerDeploymentVersionComputeConfigResponse { +} + +// Used to validate the compute config without attaching it to a Worker Deployment Version. +message ValidateWorkerDeploymentVersionComputeConfigRequest { + string namespace = 1; + + // Required. + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 2; + + // Optional. Contains the compute config scaling groups to add or update for the Worker + // Deployment. + map compute_config_scaling_groups = 6; + + // Optional. Contains the compute config scaling groups to remove from the Worker Deployment. + repeated string remove_compute_config_scaling_groups = 7; + + // Optional. The identity of the client who initiated this request. + string identity = 3; +} + +message ValidateWorkerDeploymentVersionComputeConfigResponse { +} + // Used to update the user-defined metadata of a Worker Deployment Version. message UpdateWorkerDeploymentVersionMetadataRequest { string namespace = 1; @@ -2572,7 +2754,6 @@ 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; } @@ -2811,6 +2992,16 @@ message StartActivityExecutionRequest { temporal.api.sdk.v1.UserMetadata user_metadata = 17; // Priority metadata. temporal.api.common.v1.Priority priority = 18; + // Callbacks to be called by the server when this activity reaches a terminal state. + // Callback addresses must be whitelisted in the server's dynamic configuration. + repeated temporal.api.common.v1.Callback completion_callbacks = 19; + // Links to be associated with the activity. Callbacks may also have associated links; + // links already included with a callback should not be duplicated here. + repeated temporal.api.common.v1.Link links = 20; + // Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING. + temporal.api.common.v1.OnConflictOptions on_conflict_options = 21; + // Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. + google.protobuf.Duration start_delay = 22; } message StartActivityExecutionResponse { @@ -2818,6 +3009,8 @@ message StartActivityExecutionResponse { string run_id = 1; // If true, a new activity was started. bool started = 2; + // Link to the started activity. + temporal.api.common.v1.Link link = 3; } message DescribeActivityExecutionRequest { @@ -2854,6 +3047,9 @@ message DescribeActivityExecutionResponse { // Token for follow-on long-poll requests. Absent only if the activity is complete. bytes long_poll_token = 5; + + // Callbacks attached to this activity execution and their current state. + repeated temporal.api.activity.v1.CallbackInfo callbacks = 6; } message PollActivityExecutionRequest { @@ -2886,6 +3082,176 @@ message ListActivityExecutionsResponse { bytes next_page_token = 2; } +message StartNexusOperationExecutionRequest { + string namespace = 1; + // The identity of the client who initiated this request. + string identity = 2; + // A unique identifier for this caller-side start request. Typically UUIDv4. + // StartOperation requests sent to the handler will use a server-generated request ID. + string request_id = 3; + // Identifier for this operation. This is a caller-side ID, distinct from any internal + // operation identifiers generated by the handler. Must be unique among operations in the + // same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. + string operation_id = 4; + // Endpoint name, resolved to a URL via the cluster's endpoint registry. + string endpoint = 5; + // Service name. + string service = 6; + // Operation name. + string operation = 7; + + // Schedule-to-close timeout for this operation. + // Indicates how long the caller is willing to wait for operation completion. + // Calls are retried internally by the server. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration schedule_to_close_timeout = 8; + + // Schedule-to-start timeout for this operation. + // Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) + // by the handler. + // If not set or zero, no schedule-to-start timeout is enforced. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration schedule_to_start_timeout = 9; + + // Start-to-close timeout for this operation. + // Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been + // started. Synchronous operations ignore this timeout. + // If not set or zero, no start-to-close timeout is enforced. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration start_to_close_timeout = 10; + + // Serialized input to the operation. Passed as the request payload. + temporal.api.common.v1.Payload input = 11; + + // Defines whether to allow re-using the operation id from a previously *closed* operation. + // The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE. + temporal.api.enums.v1.NexusOperationIdReusePolicy id_reuse_policy = 12; + // Defines how to resolve an operation id conflict with a *running* operation. + // The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL. + temporal.api.enums.v1.NexusOperationIdConflictPolicy id_conflict_policy = 13; + + // Search attributes for indexing. + temporal.api.common.v1.SearchAttributes search_attributes = 14; + // Header to attach to the Nexus request. + // Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + // transmitted to external services as-is. + // This is useful for propagating tracing information. + // Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + // transmitted to Nexus operations that may be external and are not traditional payloads. + map nexus_header = 15; + // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation. + temporal.api.sdk.v1.UserMetadata user_metadata = 16; +} + +message StartNexusOperationExecutionResponse { + // The run ID of the operation that was started - or used (via NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING). + string run_id = 1; + // If true, a new operation was started. + bool started = 2; +} + +message DescribeNexusOperationExecutionRequest { + string namespace = 1; + string operation_id = 2; + // Operation run ID. If empty the request targets the latest run. + string run_id = 3; + // Include the input field in the response. + bool include_input = 4; + // Include the outcome (result/failure) in the response if the operation has completed. + bool include_outcome = 5; + // Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation + // state changes from the state encoded in this token. If absent, return current state immediately. + // If present, run_id must also be present. + // Note that operation state may change multiple times between requests, therefore it is not + // guaranteed that a client making a sequence of long-poll requests will see a complete + // sequence of state changes. + bytes long_poll_token = 6; +} + +message DescribeNexusOperationExecutionResponse { + // The run ID of the operation, useful when run_id was not specified in the request. + string run_id = 1; + + // Information about the operation. + temporal.api.nexus.v1.NexusOperationExecutionInfo info = 2; + + // Serialized operation input, passed as the request payload. + // Only set if include_input was true in the request. + temporal.api.common.v1.Payload input = 3; + + // Only set if the operation is completed and include_outcome was true in the request. + oneof outcome { + // The result if the operation completed successfully. + temporal.api.common.v1.Payload result = 4; + // The failure if the operation completed unsuccessfully. + temporal.api.failure.v1.Failure failure = 5; + } + + // Token for follow-on long-poll requests. Absent only if the operation is complete. + bytes long_poll_token = 6; +} + +message PollNexusOperationExecutionRequest { + string namespace = 1; + string operation_id = 2; + // Operation run ID. If empty the request targets the latest run. + string run_id = 3; + + // Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked. + temporal.api.enums.v1.NexusOperationWaitStage wait_stage = 4; +} + +message PollNexusOperationExecutionResponse { + // The run ID of the operation, useful when run_id was not specified in the request. + string run_id = 1; + + // The current stage of the operation. May be more advanced than the stage requested in the poll. + temporal.api.enums.v1.NexusOperationWaitStage wait_stage = 2; + + // Operation token. Only populated for asynchronous operations after a successful StartOperation call. + string operation_token = 3; + + // The operation outcome, available if the operation is in a closed state. + oneof outcome { + // The result if the operation completed successfully. + temporal.api.common.v1.Payload result = 4; + // The failure if the operation completed unsuccessfully. + temporal.api.failure.v1.Failure failure = 5; + } +} + +message ListNexusOperationExecutionsRequest { + string namespace = 1; + // Max number of operations to return per page. + int32 page_size = 2; + // Token returned in ListNexusOperationExecutionsResponse. + bytes next_page_token = 3; + // Visibility query, see https://docs.temporal.io/list-filter for the syntax. + // Search attributes that are avaialble for Nexus operations include: + // - OperationId + // - RunId + // - Endpoint + // - Service + // - Operation + // - RequestId + // - StartTime + // - ExecutionTime + // - CloseTime + // - ExecutionStatus + // - ExecutionDuration + // - StateTransitionCount + string query = 4; +} + +message ListNexusOperationExecutionsResponse { + repeated temporal.api.nexus.v1.NexusOperationExecutionListInfo operations = 1; + // Token to use to fetch the next page. If empty, there is no next page. + bytes next_page_token = 2; +} + message CountActivityExecutionsRequest { string namespace = 1; // Visibility query, see https://docs.temporal.io/list-filter for the syntax. @@ -2910,6 +3276,31 @@ message CountActivityExecutionsResponse { } } +message CountNexusOperationExecutionsRequest { + string namespace = 1; + // Visibility query, see https://docs.temporal.io/list-filter for the syntax. + // See also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations. + string query = 2; +} + +message CountNexusOperationExecutionsResponse { + // If `query` is not grouping by any field, the count is an approximate number + // of operations that match the query. + // If `query` is grouping by a field, the count is simply the sum of the counts + // of the groups returned in the response. This number can be smaller than the + // total number of operations matching the query. + int64 count = 1; + + // Contains the groups if the request is grouping by a field. + // The list might not be complete, and the counts of each group is approximate. + repeated AggregationGroup groups = 2; + + message AggregationGroup { + repeated temporal.api.common.v1.Payload group_values = 1; + int64 count = 2; + } +} + message RequestCancelActivityExecutionRequest { string namespace = 1; string activity_id = 2; @@ -2952,3 +3343,45 @@ message DeleteActivityExecutionRequest { message DeleteActivityExecutionResponse { } + +message RequestCancelNexusOperationExecutionRequest { + string namespace = 1; + string operation_id = 2; + // Operation run ID, targets the latest run if empty. + string run_id = 3; + // The identity of the client who initiated this request. + string identity = 4; + // Used to de-dupe cancellation requests. + string request_id = 5; + // Reason for requesting the cancellation, recorded and available via the DescribeNexusOperationExecution API. + string reason = 6; +} + +message RequestCancelNexusOperationExecutionResponse { +} + +message TerminateNexusOperationExecutionRequest { + string namespace = 1; + string operation_id = 2; + // Operation run ID, targets the latest run if empty. + string run_id = 3; + // The identity of the client who initiated this request. + string identity = 4; + // Used to de-dupe termination requests. + string request_id = 5; + // Reason for requesting the termination, recorded in the operation's result failure outcome. + string reason = 6; +} + +message TerminateNexusOperationExecutionResponse { +} + +message DeleteNexusOperationExecutionRequest { + string namespace = 1; + string operation_id = 2; + // Operation run ID, targets the latest run if empty. + string run_id = 3; +} + +message DeleteNexusOperationExecutionResponse { +} diff --git a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto index cbd71e2ba..6a4287100 100644 --- a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +++ b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto @@ -121,7 +121,7 @@ service WorkflowService { rpc ExecuteMultiOperation (ExecuteMultiOperationRequest) returns (ExecuteMultiOperationResponse) { option (temporal.api.protometa.v1.request_header) = { header: "temporal-resource-id" - value: "workflow:{resource_id}" + value: "{resource_id}" }; } @@ -166,6 +166,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc PollWorkflowTaskQueue (PollWorkflowTaskQueueRequest) returns (PollWorkflowTaskQueueResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "poller:{poller_group_id}" + }; } // RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks @@ -180,7 +184,7 @@ service WorkflowService { rpc RespondWorkflowTaskCompleted (RespondWorkflowTaskCompletedRequest) returns (RespondWorkflowTaskCompletedResponse) { option (temporal.api.protometa.v1.request_header) = { header: "temporal-resource-id" - value: "workflow:{resource_id}" + value: "{resource_id}" }; } @@ -199,7 +203,7 @@ service WorkflowService { rpc RespondWorkflowTaskFailed (RespondWorkflowTaskFailedRequest) returns (RespondWorkflowTaskFailedResponse) { option (temporal.api.protometa.v1.request_header) = { header: "temporal-resource-id" - value: "workflow:{resource_id}" + value: "{resource_id}" }; } @@ -219,6 +223,10 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc PollActivityTaskQueue (PollActivityTaskQueueRequest) returns (PollActivityTaskQueueResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "poller:{poller_group_id}" + }; } // RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. @@ -618,7 +626,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 @@ -1116,6 +1129,62 @@ service WorkflowService { }; } + // Creates a new Worker Deployment. + // + // Experimental. This API might significantly change or be removed in a + // future release. + rpc CreateWorkerDeployment (CreateWorkerDeploymentRequest) returns (CreateWorkerDeploymentResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/worker-deployments/{deployment_name}" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}" + body: "*" + } + }; + } + + // Creates a new Worker Deployment Version. + // + // Experimental. This API might significantly change or be removed in a + // future release. + rpc CreateWorkerDeploymentVersion (CreateWorkerDeploymentVersionRequest) returns (CreateWorkerDeploymentVersionResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}" + body: "*" + } + }; + } + + // Updates the compute config attached to a Worker Deployment Version. + // Experimental. This API might significantly change or be removed in a future release. + rpc UpdateWorkerDeploymentVersionComputeConfig (UpdateWorkerDeploymentVersionComputeConfigRequest) returns (UpdateWorkerDeploymentVersionComputeConfigResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute-config" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-compute-config" + body: "*" + } + }; + } + + // Validates the compute config without attaching it to a Worker Deployment Version. + // Experimental. This API might significantly change or be removed in a future release. + rpc ValidateWorkerDeploymentVersionComputeConfig (ValidateWorkerDeploymentVersionComputeConfigRequest) returns (ValidateWorkerDeploymentVersionComputeConfigResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/validate-compute-config" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/validate-compute-config" + body: "*" + } + }; + } + // Updates the user-given metadata attached to a Worker Deployment Version. // Experimental. This API might significantly change or be removed in a future release. rpc UpdateWorkerDeploymentVersionMetadata (UpdateWorkerDeploymentVersionMetadataRequest) returns (UpdateWorkerDeploymentVersionMetadataResponse) { @@ -1240,18 +1309,30 @@ service WorkflowService { // (-- api-linter: core::0127::http-annotation=disabled // aip.dev/not-precedent: We do not expose worker API to HTTP. --) rpc PollNexusTaskQueue(PollNexusTaskQueueRequest) returns (PollNexusTaskQueueResponse) { + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "poller:{poller_group_id}" + }; } // RespondNexusTaskCompleted is called by workers to respond to 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 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. @@ -1460,7 +1541,7 @@ service WorkflowService { }; option (temporal.api.protometa.v1.request_header) = { header: "temporal-resource-id" - value: "worker:{resource_id}" + value: "{resource_id}" }; }; @@ -1505,7 +1586,7 @@ service WorkflowService { }; option (temporal.api.protometa.v1.request_header) = { header: "temporal-resource-id" - value: "worker:{resource_id}" + value: "{resource_id}" }; } @@ -1523,7 +1604,7 @@ service WorkflowService { }; option (temporal.api.protometa.v1.request_header) = { header: "temporal-resource-id" - value: "worker:{resource_id}" + value: "{resource_id}" }; } @@ -1597,6 +1678,25 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "activity:{activity_id}" + }; + } + + // StartNexusOperationExecution starts a new Nexus operation. + // + // Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + // namespace unless permitted by the specified ID conflict policy. + rpc StartNexusOperationExecution (StartNexusOperationExecutionRequest) returns (StartNexusOperationExecutionResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/nexus-operations/{operation_id}" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}" + body: "*" + } + }; } // DescribeActivityExecution returns information about an activity execution. @@ -1611,6 +1711,24 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/activities/{activity_id}" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "activity:{activity_id}" + }; + } + + // DescribeNexusOperationExecution returns information about a Nexus operation. + // Supported use cases include: + // - Get current operation info without waiting + // - Long-poll for next state change and return new operation info + // Response can optionally include operation input or outcome (if the operation has completed). + rpc DescribeNexusOperationExecution (DescribeNexusOperationExecutionRequest) returns (DescribeNexusOperationExecutionResponse) { + option (google.api.http) = { + get: "/namespaces/{namespace}/nexus-operations/{operation_id}" + additional_bindings { + get: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}" + } + }; } // PollActivityExecution long-polls for an activity execution to complete and returns the @@ -1622,6 +1740,21 @@ service WorkflowService { get: "/api/v1/namespaces/{namespace}/activities/{activity_id}/outcome" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "activity:{activity_id}" + }; + } + + // PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + // the outcome (result or failure). + rpc PollNexusOperationExecution (PollNexusOperationExecutionRequest) returns (PollNexusOperationExecutionResponse) { + option (google.api.http) = { + get: "/namespaces/{namespace}/nexus-operations/{operation_id}/poll" + additional_bindings { + get: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/poll" + } + }; } // ListActivityExecutions is a visibility API to list activity executions in a specific namespace. @@ -1634,6 +1767,16 @@ service WorkflowService { }; } + // ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace. + rpc ListNexusOperationExecutions (ListNexusOperationExecutionsRequest) returns (ListNexusOperationExecutionsResponse) { + option (google.api.http) = { + get: "/namespaces/{namespace}/nexus-operations" + additional_bindings { + get: "/api/v1/namespaces/{namespace}/nexus-operations" + } + }; + } + // CountActivityExecutions is a visibility API to count activity executions in a specific namespace. rpc CountActivityExecutions (CountActivityExecutionsRequest) returns (CountActivityExecutionsResponse) { option (google.api.http) = { @@ -1644,6 +1787,16 @@ service WorkflowService { }; } + // CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace. + rpc CountNexusOperationExecutions (CountNexusOperationExecutionsRequest) returns (CountNexusOperationExecutionsResponse) { + option (google.api.http) = { + get: "/namespaces/{namespace}/nexus-operation-count" + additional_bindings { + get: "/api/v1/namespaces/{namespace}/nexus-operation-count" + } + }; + } + // RequestCancelActivityExecution requests cancellation of an activity execution. // // Cancellation is cooperative: this call records the request, but the activity must detect and @@ -1659,6 +1812,26 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "activity:{activity_id}" + }; + } + + // RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + // + // Requesting to cancel an operation does not automatically transition the operation to canceled status. + // The operation will only transition to canceled status if it supports cancellation and the handler + // processes the cancellation request. + rpc RequestCancelNexusOperationExecution (RequestCancelNexusOperationExecutionRequest) returns (RequestCancelNexusOperationExecutionResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/nexus-operations/{operation_id}/cancel" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/cancel" + body: "*" + } + }; } // TerminateActivityExecution terminates an existing activity execution immediately. @@ -1674,6 +1847,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "activity:{activity_id}" + }; } // DeleteActivityExecution asynchronously deletes a specific activity execution (when @@ -1684,4 +1861,27 @@ 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) {} + + // TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + // + // Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + // its outcome set to a failure with a termination reason. + rpc TerminateNexusOperationExecution (TerminateNexusOperationExecutionRequest) returns (TerminateNexusOperationExecutionResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/nexus-operations/{operation_id}/terminate" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/terminate" + body: "*" + } + }; + } + + // DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when + // run_id is provided) or the latest run (when run_id is not provided). If the operation + // is running, it will be terminated before deletion. + // + // (-- 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) {} } From a540b509d48779c667e0c8b1cc4846bd4bac6152 Mon Sep 17 00:00:00 2001 From: jmaeagle99 <44687433+jmaeagle99@users.noreply.github.com> Date: Fri, 24 Apr 2026 13:17:17 -0700 Subject: [PATCH 2/2] Adjust to proto changes --- crates/client/src/grpc.rs | 108 ++++++++++++++++++ crates/common/build.rs | 2 + crates/common/src/protos/history_builder.rs | 5 +- crates/common/src/protos/mod.rs | 14 +++ crates/sdk-core-c-bridge/src/client.rs | 91 +++++++++++++++ crates/sdk-core/src/core_tests/workers.rs | 4 + crates/sdk-core/src/worker/activities.rs | 1 + crates/sdk-core/src/worker/client.rs | 10 ++ crates/sdk-core/src/worker/client/mocks.rs | 1 + .../machines/activity_state_machine.rs | 1 + .../machines/cancel_external_state_machine.rs | 1 + .../machines/child_workflow_state_machine.rs | 5 +- .../machines/signal_external_state_machine.rs | 6 +- .../workflow/machines/workflow_machines.rs | 1 + 14 files changed, 247 insertions(+), 3 deletions(-) diff --git a/crates/client/src/grpc.rs b/crates/client/src/grpc.rs index bea678741..43ab159ce 100644 --- a/crates/client/src/grpc.rs +++ b/crates/client/src/grpc.rs @@ -1582,6 +1582,114 @@ proxier! { r.extensions_mut().insert(labels); } ); + ( + count_nexus_operation_executions, + CountNexusOperationExecutionsRequest, + CountNexusOperationExecutionsResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + create_worker_deployment, + CreateWorkerDeploymentRequest, + CreateWorkerDeploymentResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + create_worker_deployment_version, + CreateWorkerDeploymentVersionRequest, + CreateWorkerDeploymentVersionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + delete_nexus_operation_execution, + DeleteNexusOperationExecutionRequest, + DeleteNexusOperationExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + describe_nexus_operation_execution, + DescribeNexusOperationExecutionRequest, + DescribeNexusOperationExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + list_nexus_operation_executions, + ListNexusOperationExecutionsRequest, + ListNexusOperationExecutionsResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + poll_nexus_operation_execution, + PollNexusOperationExecutionRequest, + PollNexusOperationExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + request_cancel_nexus_operation_execution, + RequestCancelNexusOperationExecutionRequest, + RequestCancelNexusOperationExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + start_nexus_operation_execution, + StartNexusOperationExecutionRequest, + StartNexusOperationExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + terminate_nexus_operation_execution, + TerminateNexusOperationExecutionRequest, + TerminateNexusOperationExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + update_worker_deployment_version_compute_config, + UpdateWorkerDeploymentVersionComputeConfigRequest, + UpdateWorkerDeploymentVersionComputeConfigResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); + ( + validate_worker_deployment_version_compute_config, + ValidateWorkerDeploymentVersionComputeConfigRequest, + ValidateWorkerDeploymentVersionComputeConfigResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); } proxier! { diff --git a/crates/common/build.rs b/crates/common/build.rs index 39248237e..5c2ec3f04 100644 --- a/crates/common/build.rs +++ b/crates/common/build.rs @@ -30,8 +30,10 @@ const SERDE_DERIVE_PREFIXES: &[&str] = &[ ".grpc", ".temporal.api.activity", ".temporal.api.batch", + ".temporal.api.callback", ".temporal.api.cloud", ".temporal.api.command", + ".temporal.api.compute", ".temporal.api.deployment", ".temporal.api.filter", ".temporal.api.history", diff --git a/crates/common/src/protos/history_builder.rs b/crates/common/src/protos/history_builder.rs index 1348d34e0..b60705abc 100644 --- a/crates/common/src/protos/history_builder.rs +++ b/crates/common/src/protos/history_builder.rs @@ -377,7 +377,10 @@ impl TestHistoryBuilder { stack_trace: "".to_string(), cause: None, failure_info: Some(failure::FailureInfo::CanceledFailureInfo( - CanceledFailureInfo { details: None }, + CanceledFailureInfo { + details: None, + identity: Default::default(), + }, )), encoded_attributes: Default::default(), }), diff --git a/crates/common/src/protos/mod.rs b/crates/common/src/protos/mod.rs index 3f6db65e1..5bb841d78 100644 --- a/crates/common/src/protos/mod.rs +++ b/crates/common/src/protos/mod.rs @@ -315,6 +315,7 @@ pub mod coresdk { failure_info: Some(failure::FailureInfo::CanceledFailureInfo( CanceledFailureInfo { details: details.map(Into::into), + identity: Default::default(), }, )), ..Default::default() @@ -1654,6 +1655,11 @@ pub mod temporal { tonic::include_proto!("temporal.api.batch.v1"); } } + pub mod callback { + pub mod v1 { + tonic::include_proto!("temporal.api.callback.v1"); + } + } pub mod command { pub mod v1 { tonic::include_proto!("temporal.api.command.v1"); @@ -2180,6 +2186,11 @@ pub mod temporal { } } } + pub mod compute { + pub mod v1 { + tonic::include_proto!("temporal.api.compute.v1"); + } + } pub mod deployment { pub mod v1 { tonic::include_proto!("temporal.api.deployment.v1"); @@ -2414,6 +2425,8 @@ pub mod temporal { Attributes::WorkflowExecutionPausedEventAttributes(_) => true, // !! Ignorable !! Attributes::WorkflowExecutionUnpausedEventAttributes(_) => true, + // !! Ignorable !! + Attributes::WorkflowExecutionTimeSkippingTransitionedEventAttributes(_) => true, } } else { false @@ -2495,6 +2508,7 @@ pub mod temporal { Attributes::NexusOperationCancelRequestFailedEventAttributes(_) => { EventType::NexusOperationCancelRequestFailed } Attributes::WorkflowExecutionPausedEventAttributes(_) => { EventType::WorkflowExecutionPaused } Attributes::WorkflowExecutionUnpausedEventAttributes(_) => { EventType::WorkflowExecutionUnpaused } + Attributes::WorkflowExecutionTimeSkippingTransitionedEventAttributes(_) => { EventType::WorkflowExecutionTimeSkippingTransitioned } } } } diff --git a/crates/sdk-core-c-bridge/src/client.rs b/crates/sdk-core-c-bridge/src/client.rs index 3073fb06a..6c01d00c5 100644 --- a/crates/sdk-core-c-bridge/src/client.rs +++ b/crates/sdk-core-c-bridge/src/client.rs @@ -573,11 +573,30 @@ async fn call_workflow_service( "CountActivityExecutions" => { rpc_call_on_trait!(client, call, WorkflowService, count_activity_executions) } + "CountNexusOperationExecutions" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + count_nexus_operation_executions + ) + } "CountSchedules" => rpc_call_on_trait!(client, call, WorkflowService, count_schedules), "CountWorkflowExecutions" => { rpc_call_on_trait!(client, call, WorkflowService, count_workflow_executions) } "CreateSchedule" => rpc_call_on_trait!(client, call, WorkflowService, create_schedule), + "CreateWorkerDeployment" => { + rpc_call_on_trait!(client, call, WorkflowService, create_worker_deployment) + } + "CreateWorkerDeploymentVersion" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + create_worker_deployment_version + ) + } "CreateWorkflowRule" => { rpc_call_on_trait!(client, call, WorkflowService, create_workflow_rule) } @@ -585,6 +604,14 @@ async fn call_workflow_service( "DeleteActivityExecution" => { rpc_call_on_trait!(client, call, WorkflowService, delete_activity_execution) } + "DeleteNexusOperationExecution" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + delete_nexus_operation_execution + ) + } "DeleteWorkerDeployment" => { rpc_call_on_trait!(client, call, WorkflowService, delete_worker_deployment) } @@ -617,6 +644,14 @@ async fn call_workflow_service( "DescribeNamespace" => { rpc_call_on_trait!(client, call, WorkflowService, describe_namespace) } + "DescribeNexusOperationExecution" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + describe_nexus_operation_execution + ) + } "DescribeSchedule" => rpc_call_on_trait!(client, call, WorkflowService, describe_schedule), "DescribeTaskQueue" => { rpc_call_on_trait!(client, call, WorkflowService, describe_task_queue) @@ -708,6 +743,14 @@ async fn call_workflow_service( ), "ListDeployments" => rpc_call_on_trait!(client, call, WorkflowService, list_deployments), "ListNamespaces" => rpc_call_on_trait!(client, call, WorkflowService, list_namespaces), + "ListNexusOperationExecutions" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + list_nexus_operation_executions + ) + } "ListOpenWorkflowExecutions" => { rpc_call_on_trait!(client, call, WorkflowService, list_open_workflow_executions) } @@ -739,6 +782,14 @@ async fn call_workflow_service( "PollActivityTaskQueue" => { rpc_call_on_trait!(client, call, WorkflowService, poll_activity_task_queue) } + "PollNexusOperationExecution" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + poll_nexus_operation_execution + ) + } "PollNexusTaskQueue" => { rpc_call_on_trait!(client, call, WorkflowService, poll_nexus_task_queue) } @@ -780,6 +831,14 @@ async fn call_workflow_service( request_cancel_activity_execution ) } + "RequestCancelNexusOperationExecution" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + request_cancel_nexus_operation_execution + ) + } "RequestCancelWorkflowExecution" => { rpc_call_on_trait!( client, @@ -895,6 +954,14 @@ async fn call_workflow_service( "StartBatchOperation" => { rpc_call_on_trait!(client, call, WorkflowService, start_batch_operation) } + "StartNexusOperationExecution" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + start_nexus_operation_execution + ) + } "StartWorkflowExecution" => { rpc_call_on_trait!(client, call, WorkflowService, start_workflow_execution) } @@ -904,6 +971,14 @@ async fn call_workflow_service( "TerminateActivityExecution" => { rpc_call_on_trait!(client, call, WorkflowService, terminate_activity_execution) } + "TerminateNexusOperationExecution" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + terminate_nexus_operation_execution + ) + } "TerminateWorkflowExecution" => { rpc_call_on_trait!(client, call, WorkflowService, terminate_workflow_execution) } @@ -927,6 +1002,14 @@ async fn call_workflow_service( "UpdateWorkerConfig" => { rpc_call_on_trait!(client, call, WorkflowService, update_worker_config) } + "UpdateWorkerDeploymentVersionComputeConfig" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + update_worker_deployment_version_compute_config + ) + } "UpdateWorkerDeploymentVersionMetadata" => { rpc_call_on_trait!( client, @@ -960,6 +1043,14 @@ async fn call_workflow_service( update_worker_build_id_compatibility ) } + "ValidateWorkerDeploymentVersionComputeConfig" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + validate_worker_deployment_version_compute_config + ) + } rpc => Err(anyhow::anyhow!("Unknown RPC call {rpc}")), } } diff --git a/crates/sdk-core/src/core_tests/workers.rs b/crates/sdk-core/src/core_tests/workers.rs index 0df6c821c..c9ac69668 100644 --- a/crates/sdk-core/src/core_tests/workers.rs +++ b/crates/sdk-core/src/core_tests/workers.rs @@ -436,6 +436,8 @@ fn create_test_nexus_task( )), }), poller_scaling_decision: None, + poller_group_id: Default::default(), + poller_group_infos: vec![], } } @@ -1068,6 +1070,7 @@ async fn nexus_start_operation_failure_with_canceled_failure_info() { message: "operation canceled".to_string(), failure_info: Some(FailureInfo::CanceledFailureInfo(CanceledFailureInfo { details: None, + identity: Default::default(), })), ..Default::default() }, @@ -1147,6 +1150,7 @@ async fn nexus_start_operation_failure_with_invalid_failure_info( #[case::canceled_failure( FailureInfo::CanceledFailureInfo(CanceledFailureInfo { details: None, + identity: Default::default(), }), NexusOperationErrorState::Canceled )] diff --git a/crates/sdk-core/src/worker/activities.rs b/crates/sdk-core/src/worker/activities.rs index 81f9eb7ef..e7bdc3d0d 100644 --- a/crates/sdk-core/src/worker/activities.rs +++ b/crates/sdk-core/src/worker/activities.rs @@ -393,6 +393,7 @@ impl WorkerActivityTasks { failure_info: Some(FailureInfo::CanceledFailureInfo(CanceledFailureInfo { details, + .. })), .. }) = failure diff --git a/crates/sdk-core/src/worker/client.rs b/crates/sdk-core/src/worker/client.rs index 0fce87351..10a84a44a 100644 --- a/crates/sdk-core/src/worker/client.rs +++ b/crates/sdk-core/src/worker/client.rs @@ -310,6 +310,8 @@ impl WorkerClient for WorkerClientBag { worker_version_capabilities: self.worker_version_capabilities(), deployment_options: self.deployment_options(), worker_instance_key: self.worker_instance_key.to_string(), + poller_group_id: Default::default(), + worker_control_task_queue: Default::default(), } .into_request(); request.extensions_mut().insert(IsWorkerTaskLongPoll); @@ -348,6 +350,8 @@ impl WorkerClient for WorkerClientBag { worker_version_capabilities: self.worker_version_capabilities(), deployment_options: self.deployment_options(), worker_instance_key: self.worker_instance_key.to_string(), + poller_group_id: Default::default(), + worker_control_task_queue: Default::default(), } .into_request(); request.extensions_mut().insert(IsWorkerTaskLongPoll); @@ -384,6 +388,7 @@ impl WorkerClient for WorkerClientBag { deployment_options: self.deployment_options(), worker_heartbeat: Vec::new(), worker_instance_key: self.worker_instance_key.to_string(), + poller_group_id: Default::default(), } .into_request(); request.extensions_mut().insert(IsWorkerTaskLongPoll); @@ -445,6 +450,8 @@ impl WorkerClient for WorkerClientBag { versioning_behavior: request.versioning_behavior.into(), deployment_options: self.deployment_options(), resource_id: Default::default(), + worker_instance_key: self.worker_instance_key.to_string(), + worker_control_task_queue: Default::default(), }; Ok(self .connection @@ -495,6 +502,7 @@ impl WorkerClient for WorkerClientBag { identity: self.identity(), task_token: task_token.0, response: Some(response), + poller_group_id: Default::default(), } .into_request(), ) @@ -630,6 +638,7 @@ impl WorkerClient for WorkerClientBag { task_token: task_token.0, failure, error, + poller_group_id: Default::default(), } .into_request(), ) @@ -691,6 +700,7 @@ impl WorkerClient for WorkerClientBag { namespace: self.namespace.clone(), failure, cause: cause.into(), + poller_group_id: Default::default(), } .into_request(), ) diff --git a/crates/sdk-core/src/worker/client/mocks.rs b/crates/sdk-core/src/worker/client/mocks.rs index 983ef139e..00218e45f 100644 --- a/crates/sdk-core/src/worker/client/mocks.rs +++ b/crates/sdk-core/src/worker/client/mocks.rs @@ -18,6 +18,7 @@ pub(crate) static DEFAULT_TEST_CAPABILITIES: &Capabilities = &Capabilities { sdk_metadata: true, count_group_by_execution_status: false, nexus: false, + server_scaled_deployments: false, }; #[cfg(any(feature = "test-utilities", test))] diff --git a/crates/sdk-core/src/worker/workflow/machines/activity_state_machine.rs b/crates/sdk-core/src/worker/workflow/machines/activity_state_machine.rs index 33ea7a963..6b2e35cf8 100644 --- a/crates/sdk-core/src/worker/workflow/machines/activity_state_machine.rs +++ b/crates/sdk-core/src/worker/workflow/machines/activity_state_machine.rs @@ -866,6 +866,7 @@ fn new_cancel_failure(dat: &SharedState, attrs: ActivityTaskCanceledEventAttribu cause: Some(Box::from(Failure { failure_info: Some(FailureInfo::CanceledFailureInfo(CanceledFailureInfo { details: attrs.details, + identity: Default::default(), })), ..Default::default() })), diff --git a/crates/sdk-core/src/worker/workflow/machines/cancel_external_state_machine.rs b/crates/sdk-core/src/worker/workflow/machines/cancel_external_state_machine.rs index 2250da8af..392135176 100644 --- a/crates/sdk-core/src/worker/workflow/machines/cancel_external_state_machine.rs +++ b/crates/sdk-core/src/worker/workflow/machines/cancel_external_state_machine.rs @@ -63,6 +63,7 @@ pub(super) fn new_external_cancel( let mut s = CancelExternalMachine::from_parts(Created {}.into(), SharedState { seq }); OnEventWrapper::on_event_mut(&mut s, CancelExternalMachineEvents::Schedule) .expect("Scheduling cancel external wf command doesn't fail"); + #[allow(deprecated)] let cmd_attrs = command::Attributes::RequestCancelExternalWorkflowExecutionCommandAttributes( RequestCancelExternalWorkflowExecutionCommandAttributes { namespace: workflow_execution.namespace, diff --git a/crates/sdk-core/src/worker/workflow/machines/child_workflow_state_machine.rs b/crates/sdk-core/src/worker/workflow/machines/child_workflow_state_machine.rs index a10e6d46a..3457c5e6b 100644 --- a/crates/sdk-core/src/worker/workflow/machines/child_workflow_state_machine.rs +++ b/crates/sdk-core/src/worker/workflow/machines/child_workflow_state_machine.rs @@ -399,7 +399,9 @@ impl Started { cause: Some(Box::new(Failure { message: "Terminated".to_owned(), failure_info: Some(FailureInfo::TerminatedFailureInfo( - failure::TerminatedFailureInfo {}, + failure::TerminatedFailureInfo { + identity: Default::default(), + }, )), ..Default::default() })), @@ -729,6 +731,7 @@ impl WFMachinesAdapter for ChildWorkflowMachine { ChildWorkflowCommand::IssueCancelAfterStarted { reason } => { let mut resps = vec![]; if self.shared_state.cancel_type != ChildWorkflowCancellationType::Abandon { + #[allow(deprecated)] resps.push(MachineResponse::NewCoreOriginatedCommand( RequestCancelExternalWorkflowExecutionCommandAttributes { namespace: self.shared_state.namespace.clone(), diff --git a/crates/sdk-core/src/worker/workflow/machines/signal_external_state_machine.rs b/crates/sdk-core/src/worker/workflow/machines/signal_external_state_machine.rs index 548c198b3..8b8710cd2 100644 --- a/crates/sdk-core/src/worker/workflow/machines/signal_external_state_machine.rs +++ b/crates/sdk-core/src/worker/workflow/machines/signal_external_state_machine.rs @@ -89,6 +89,7 @@ pub(super) fn new_external_signal( SignalExternalMachine::from_parts(Created {}.into(), SharedState { seq: attrs.seq }); OnEventWrapper::on_event_mut(&mut s, SignalExternalMachineEvents::Schedule) .expect("Scheduling signal external wf command doesn't fail"); + #[allow(deprecated)] let cmd_attrs = command::Attributes::SignalExternalWorkflowExecutionCommandAttributes( SignalExternalWorkflowExecutionCommandAttributes { namespace: workflow_execution.namespace, @@ -270,7 +271,10 @@ impl SignalExternalMachine { failure: Some(Failure { message: SIG_CANCEL_MSG.to_string(), failure_info: Some(FailureInfo::CanceledFailureInfo( - CanceledFailureInfo { details: None }, + CanceledFailureInfo { + details: None, + identity: Default::default(), + }, )), ..Default::default() }), diff --git a/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs b/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs index c5fceb231..9dbf4c35e 100644 --- a/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs +++ b/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs @@ -1205,6 +1205,7 @@ impl WorkflowMachines { ProtoCmdAttrs::RequestCancelExternalWorkflowExecutionCommandAttributes( attrs, ) => { + #[allow(deprecated)] let we = NamespacedWorkflowExecution { namespace: attrs.namespace, workflow_id: attrs.workflow_id,