diff --git a/.github/workflows/trigger-api-go-update.yml b/.github/workflows/trigger-api-go-update.yml index e5424cd54..7a23b3c73 100644 --- a/.github/workflows/trigger-api-go-update.yml +++ b/.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/.gitignore b/.gitignore index 8655883e5..efbf7b661 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ /.gen /.vscode /.stamp -*~ \ No newline at end of file +*~ +*.swp +*.swo diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 5b5719cc7..088da922a 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -2190,6 +2190,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.", @@ -2313,6 +2360,59 @@ ] } }, + "/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.", @@ -2366,6 +2466,59 @@ ] } }, + "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deploymentVersion.deploymentName}/{deploymentVersion.buildId}/validate-compute-config": { + "post": { + "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/v1ValidateWorkerDeploymentVersionComputeConfigResponse" + } + }, + "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/WorkflowServiceValidateWorkerDeploymentVersionComputeConfigBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/api/v1/namespaces/{namespace}/worker-deployments": { "get": { "summary": "Lists all Worker Deployments that are tracked in the Namespace.\nExperimental. This API might significantly change or be removed in a future release.", @@ -2488,6 +2641,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": { @@ -6690,6 +6888,53 @@ ] } }, + "/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.", @@ -6755,7 +7000,126 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeleteWorkerDeploymentVersionResponse" + "$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/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" + ] + } + }, + "/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/v1UpdateWorkerDeploymentVersionMetadataResponse" } }, "default": { @@ -6787,25 +7151,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 +7164,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 +7208,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateWorkerDeploymentVersionMetadataBody" + "$ref": "#/definitions/WorkflowServiceValidateWorkerDeploymentVersionComputeConfigBody" } } ], @@ -6988,6 +7339,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": { @@ -8760,6 +9156,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": { @@ -9144,6 +9555,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": { @@ -9991,6 +10445,26 @@ "priority": { "$ref": "#/definitions/v1Priority", "description": "Priority metadata." + }, + "startDelay": { + "type": "string", + "description": "Time to wait before dispatching the first activity." + }, + "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." } } }, @@ -10467,6 +10941,39 @@ } } }, + "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 updated 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": { @@ -10572,6 +11079,35 @@ }, "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 updated 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." + }, "protobufAny": { "type": "object", "properties": { @@ -11896,6 +12432,83 @@ }, "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." + } + } + }, + "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\"" + } + } + }, + "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": "Optional. If the compute provider is a Nexus service, this should point\nthere." + } + }, + "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." + }, + "v1ComputeScaler": { + "type": "object", + "properties": { + "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 content\nconverter to ensure the server can understand it.\nFor remote-implemented scalers, you might use your own content\nconverters according to what the remote endpoints understand." + } + }, + "description": "ComputeScaler instructs the Temporal Service when to scale up or down the number of\nWorkers that comprise a WorkerDeployment." + }, "v1ConfigMetadata": { "type": "object", "properties": { @@ -12063,6 +12676,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": { @@ -12889,6 +13515,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." @@ -13307,6 +13937,9 @@ }, "batchJob": { "$ref": "#/definitions/LinkBatchJob" + }, + "activity": { + "$ref": "#/definitions/LinkActivity" } }, "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." @@ -15217,7 +15850,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", @@ -15254,7 +15887,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." } } }, @@ -16534,6 +17167,9 @@ } } }, + "v1UpdateWorkerDeploymentVersionComputeConfigResponse": { + "type": "object" + }, "v1UpdateWorkerDeploymentVersionMetadataResponse": { "type": "object", "properties": { @@ -16607,6 +17243,9 @@ }, "description": "Information a user can set, often for use by user interfaces." }, + "v1ValidateWorkerDeploymentVersionComputeConfigResponse": { + "type": "object" + }, "v1VersionDrainageInfo": { "type": "object", "properties": { @@ -16749,7 +17388,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", @@ -16821,7 +17460,8 @@ "description": "Required." }, "deploymentName": { - "type": "string" + "type": "string", + "description": "Deprecated. User deployment_version.deployment_name." }, "createTime": { "type": "string", @@ -16877,6 +17517,14 @@ "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." @@ -16889,10 +17537,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.\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.\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", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index c2dbbc15d..c84d02602 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -1958,6 +1958,46 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /api/v1/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' /api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}: get: tags: @@ -2091,6 +2131,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 +2217,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 +2329,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 @@ -5991,6 +6159,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: @@ -6124,6 +6332,49 @@ paths: 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: @@ -6167,6 +6418,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + ? /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' /namespaces/{namespace}/worker-deployments: get: tags: @@ -6236,6 +6530,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 @@ -9031,6 +9367,110 @@ 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 \n deployment version: covering a specific set of task types and/or regions.\n Having different configurations for different task types, allows independent\n tuning of activity and workflow task processing (for example).\n\n The key of the map is the ID of the scaling group used to reference it in subsequent\n 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. \n If not provided, this scaling group serves all not otherwise defined\n 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. + 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 + 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 content + converter to ensure the server can understand it. + For remote-implemented scalers, you might use your own content + 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: @@ -9179,6 +9619,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: @@ -9980,6 +10475,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 @@ -10373,11 +10874,23 @@ components: $ref: '#/components/schemas/Link_WorkflowEvent' batchJob: $ref: '#/components/schemas/Link_BatchJob' + activity: + $ref: '#/components/schemas/Link_Activity' 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: @@ -12751,7 +13264,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`. @@ -12791,7 +13309,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: @@ -13724,6 +14244,22 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata. + 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. + 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. StartActivityExecutionResponse: type: object properties: @@ -14907,6 +15443,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 updated 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: @@ -15073,6 +15643,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 updated 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: @@ -15254,7 +15852,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 @@ -15298,6 +15901,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 @@ -15414,6 +16018,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 @@ -15423,6 +16028,7 @@ components: description: Required. deploymentName: type: string + description: Deprecated. User deployment_version.deployment_name. createTime: type: string format: date-time @@ -15494,6 +16100,20 @@ components: allOf: - $ref: '#/components/schemas/VersionMetadata' description: Arbitrary user-provided metadata attached to this version. + 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 \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." WorkerDeploymentVersionInfo_VersionTaskQueueInfo: type: object diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index 88c3a834e..419f08f68 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -240,9 +240,17 @@ message Link { string job_id = 1; } + // A link to an activity. + message Activity { + string namespace = 1; + string activity_id = 2; + string run_id = 3; + } + oneof variant { WorkflowEvent workflow_event = 1; BatchJob batch_job = 2; + Activity activity = 3; } } diff --git a/temporal/api/compute/v1/config.proto b/temporal/api/compute/v1/config.proto new file mode 100644 index 000000000..73e481ea9 --- /dev/null +++ b/temporal/api/compute/v1/config.proto @@ -0,0 +1,58 @@ +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; +} diff --git a/temporal/api/compute/v1/provider.proto b/temporal/api/compute/v1/provider.proto new file mode 100644 index 000000000..ed0baf9d5 --- /dev/null +++ b/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/temporal/api/compute/v1/scaler.proto b/temporal/api/compute/v1/scaler.proto new file mode 100644 index 000000000..95c751800 --- /dev/null +++ b/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 content + // converter to ensure the server can understand it. + // For remote-implemented scalers, you might use your own content + // converters according to what the remote endpoints understand. + temporal.api.common.v1.Payload details = 2; +} diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index b4b7883dd..6fdd28814 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -14,6 +14,7 @@ import "google/protobuf/timestamp.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. @@ -102,6 +103,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,6 +160,17 @@ 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 @@ -188,8 +201,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; @@ -271,7 +284,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,7 +312,7 @@ 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; } @@ -311,4 +324,4 @@ message InheritedAutoUpgradeInfo { 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 +} diff --git a/temporal/api/enums/v1/deployment.proto b/temporal/api/enums/v1/deployment.proto index 710d7c38d..e3792d9e5 100644 --- a/temporal/api/enums/v1/deployment.proto +++ b/temporal/api/enums/v1/deployment.proto @@ -97,4 +97,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/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 7bfcf236e..36a8a7032 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -25,6 +25,7 @@ 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"; @@ -1267,6 +1268,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; + } } @@ -2344,6 +2350,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; @@ -2370,6 +2396,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. @@ -2404,6 +2452,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 updated 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 updated 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; @@ -2815,6 +2910,13 @@ message StartActivityExecutionRequest { temporal.api.sdk.v1.UserMetadata user_metadata = 17; // Priority metadata. temporal.api.common.v1.Priority priority = 18; + // Time to wait before dispatching the first activity. + google.protobuf.Duration start_delay = 19; + // 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 = 20; + // Links to be associated with the activity. + repeated temporal.api.common.v1.Link links = 21; } message StartActivityExecutionResponse { diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 18e579c2c..914bbaf83 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1116,6 +1116,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) {