diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index b961ba800..33e2fa096 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -870,7 +870,7 @@ }, "/api/v1/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "SetCurrentDeployment2", "responses": { "200": { @@ -916,7 +916,7 @@ }, "/api/v1/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "GetCurrentDeployment2", "responses": { "200": { @@ -953,7 +953,7 @@ }, "/api/v1/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "ListDeployments2", "responses": { "200": { @@ -1005,7 +1005,7 @@ }, "/api/v1/namespaces/{namespace}/deployments/{deployment.seriesName}/{deployment.buildId}": { "get": { - "summary": "Describes a worker deployment.\nExperimental. This API might significantly change or be removed in a future release.", + "summary": "Describes a worker deployment.\nExperimental. This API might significantly change or be removed in a future release.\n[cleanup-wv-pre-release]", "operationId": "DescribeDeployment2", "responses": { "200": { @@ -1050,7 +1050,7 @@ }, "/api/v1/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "GetDeploymentReachability2", "responses": { "200": { @@ -1730,6 +1730,88 @@ ] } }, + "/api/v1/namespaces/{namespace}/worker-deployment/{deploymentName}/set-current-version": { + "post": { + "summary": "Sets a deployment version as the current version for its deployment.", + "operationId": "SetCurrentDeploymentVersion2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SetCurrentDeploymentVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceSetCurrentDeploymentVersionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/worker-deployments-version/{version}": { + "get": { + "summary": "Describes a worker deployment version.", + "operationId": "DescribeWorkerDeploymentVersion2", + "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": "version", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/api/v1/namespaces/{namespace}/worker-task-reachability": { "get": { "summary": "Deprecated. Use `DescribeTaskQueue`.", @@ -3870,7 +3952,7 @@ }, "/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "SetCurrentDeployment", "responses": { "200": { @@ -3916,7 +3998,7 @@ }, "/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "GetCurrentDeployment", "responses": { "200": { @@ -3953,7 +4035,7 @@ }, "/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "ListDeployments", "responses": { "200": { @@ -4005,7 +4087,7 @@ }, "/namespaces/{namespace}/deployments/{deployment.seriesName}/{deployment.buildId}": { "get": { - "summary": "Describes a worker deployment.\nExperimental. This API might significantly change or be removed in a future release.", + "summary": "Describes a worker deployment.\nExperimental. This API might significantly change or be removed in a future release.\n[cleanup-wv-pre-release]", "operationId": "DescribeDeployment", "responses": { "200": { @@ -4050,7 +4132,7 @@ }, "/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.", + "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.\n[cleanup-wv-pre-release]", "operationId": "GetDeploymentReachability", "responses": { "200": { @@ -4660,6 +4742,88 @@ ] } }, + "/namespaces/{namespace}/worker-deployment/{deploymentName}/set-current-version": { + "post": { + "summary": "Sets a deployment version as the current version for its deployment.", + "operationId": "SetCurrentDeploymentVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SetCurrentDeploymentVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceSetCurrentDeploymentVersionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/worker-deployments-version/{version}": { + "get": { + "summary": "Describes a worker deployment version.", + "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": "version", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/namespaces/{namespace}/worker-task-reachability": { "get": { "summary": "Deprecated. Use `DescribeTaskQueue`.", @@ -5819,6 +5983,17 @@ }, "description": "Replaces the routing rule with the given source Build ID." }, + "WorkerDeploymentVersionInfoWorkerBuildTaskQueueInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1TaskQueueType" + } + } + }, "WorkflowEventEventReference": { "type": "object", "properties": { @@ -6269,7 +6444,7 @@ "description": "Build ID changes with each version of the worker when the worker program code and/or config\nchanges." } }, - "description": "`Deployment` identifies a deployment of Temporal workers. The combination of deployment series\nname + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker\nprograms to specify these values." + "title": "`Deployment` identifies a deployment of Temporal workers. The combination of deployment series\nname + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker\nprograms to specify these values.\n[cleanup-wv-pre-release]" }, "identity": { "type": "string", @@ -6279,6 +6454,20 @@ "$ref": "#/definitions/v1UpdateDeploymentMetadata", "description": "Optional. Use to add or remove user-defined metadata entries. Metadata entries are exposed\nwhen describing a deployment. It is a good place for information such as operator name,\nlinks to internal deployment pipelines, etc." } + }, + "title": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + }, + "WorkflowServiceSetCurrentDeploymentVersionBody": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Must be a Versioned Build. Pass empty string to unset." + }, + "identity": { + "type": "string", + "description": "Optional. The identity of the client who initiated this request." + } } }, "WorkflowServiceSignalWithStartWorkflowExecutionBody": { @@ -8215,7 +8404,7 @@ "description": "Build ID changes with each version of the worker when the worker program code and/or config\nchanges." } }, - "description": "`Deployment` identifies a deployment of Temporal workers. The combination of deployment series\nname + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker\nprograms to specify these values." + "title": "`Deployment` identifies a deployment of Temporal workers. The combination of deployment series\nname + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker\nprograms to specify these values.\n[cleanup-wv-pre-release]" }, "v1DeploymentInfo": { "type": "object", @@ -8246,7 +8435,7 @@ "description": "If this deployment is the current deployment of its deployment series." } }, - "description": "`DeploymentInfo` holds information about a deployment. Deployment information is tracked\nautomatically by server as soon as the first poll from that deployment reaches the server. There\ncan be multiple task queue workers in a single deployment which are listed in this message." + "title": "`DeploymentInfo` holds information about a deployment. Deployment information is tracked\nautomatically by server as soon as the first poll from that deployment reaches the server. There\ncan be multiple task queue workers in a single deployment which are listed in this message.\n[cleanup-wv-pre-release]" }, "v1DeploymentListInfo": { "type": "object", @@ -8263,7 +8452,7 @@ "description": "If this deployment is the current deployment of its deployment series." } }, - "description": "DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in\nListDeployments." + "title": "DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in\nListDeployments.\n[cleanup-wv-pre-release]" }, "v1DeploymentReachability": { "type": "string", @@ -8346,7 +8535,8 @@ "deploymentInfo": { "$ref": "#/definitions/v1DeploymentInfo" } - } + }, + "title": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" }, "v1DescribeNamespaceResponse": { "type": "object", @@ -8435,6 +8625,14 @@ } } }, + "v1DescribeWorkerDeploymentVersionResponse": { + "type": "object", + "properties": { + "workerDeploymentVersionInfo": { + "$ref": "#/definitions/v1WorkerDeploymentVersionInfo" + } + } + }, "v1DescribeWorkflowExecutionResponse": { "type": "object", "properties": { @@ -8747,7 +8945,8 @@ "currentDeploymentInfo": { "$ref": "#/definitions/v1DeploymentInfo" } - } + }, + "title": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" }, "v1GetDeploymentReachabilityResponse": { "type": "object", @@ -8763,7 +8962,8 @@ "format": "date-time", "description": "Reachability level might come from server cache. This timestamp specifies when the value\nwas actually calculated." } - } + }, + "title": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" }, "v1GetNexusEndpointResponse": { "type": "object", @@ -9312,7 +9512,8 @@ "$ref": "#/definitions/v1DeploymentListInfo" } } - } + }, + "title": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" }, "v1ListNamespacesResponse": { "type": "object", @@ -11493,6 +11694,16 @@ "$ref": "#/definitions/v1DeploymentInfo", "description": "Info of the deployment that was current before executing this operation." } + }, + "title": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + }, + "v1SetCurrentDeploymentVersionResponse": { + "type": "object", + "properties": { + "previousVersion": { + "type": "string", + "description": "Info of the version that was current before executing this operation." + } } }, "v1Severity": { @@ -12483,7 +12694,7 @@ "description": "List of keys to remove from the metadata." } }, - "description": "Used as part of Deployment write APIs to update metadata attached to a deployment." + "title": "Used as part of Deployment write APIs to update metadata attached to a deployment.\n[cleanup-wv-pre-release]" }, "v1UpdateNamespaceInfo": { "type": "object", @@ -12736,6 +12947,32 @@ }, "description": "Specifies client's intent to wait for Update results." }, + "v1WorkerDeploymentVersionInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Identifies a Worker Deployment Version. Must be unique within the namespace.\nSame ID cannot be used in multiple Deployments.\nIn some contexts, such as Reset-by-build-id, version might be used\nas \"Build ID\"." + }, + "deploymentName": { + "type": "string", + "description": "Each Worker Version belongs to exactly one Deployment." + }, + "createTime": { + "type": "string", + "format": "date-time" + }, + "taskQueueInfos": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WorkerDeploymentVersionInfoWorkerBuildTaskQueueInfo" + }, + "description": "All the Task Queues that have ever polled from this Deployment version." + } + }, + "title": "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.\nEach Version has a Workflow Versioning Mode which is chosen by the app\ndeveloper. (see WorkflowVersioningMode enum documentation)" + }, "v1WorkerVersionCapabilities": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 015474359..f047a009b 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -780,6 +780,7 @@ paths: Sets a deployment as the current deployment for its deployment series. Can optionally update the metadata of the deployment as well. Experimental. This API might significantly change or be removed in a future release. + [cleanup-wv-pre-release] operationId: SetCurrentDeployment parameters: - name: namespace @@ -818,6 +819,7 @@ paths: 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. + [cleanup-wv-pre-release] operationId: GetCurrentDeployment parameters: - name: namespace @@ -851,6 +853,7 @@ paths: 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. + [cleanup-wv-pre-release] operationId: ListDeployments parameters: - name: namespace @@ -893,6 +896,7 @@ paths: description: |- Describes a worker deployment. Experimental. This API might significantly change or be removed in a future release. + [cleanup-wv-pre-release] operationId: DescribeDeployment parameters: - name: namespace @@ -952,6 +956,7 @@ paths: 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. + [cleanup-wv-pre-release] operationId: GetDeploymentReachability parameters: - name: namespace @@ -1528,6 +1533,72 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/worker-deployment/{deploymentName}/set-current-version: + post: + tags: + - WorkflowService + description: Sets a deployment version as the current version for its deployment. + operationId: SetCurrentDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deploymentName + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetCurrentDeploymentVersionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SetCurrentDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/worker-deployments-version/{version}: + get: + tags: + - WorkflowService + description: Describes a worker deployment version. + operationId: DescribeWorkerDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: version + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeWorkerDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}/worker-task-reachability: get: tags: @@ -3443,6 +3514,7 @@ paths: Sets a deployment as the current deployment for its deployment series. Can optionally update the metadata of the deployment as well. Experimental. This API might significantly change or be removed in a future release. + [cleanup-wv-pre-release] operationId: SetCurrentDeployment parameters: - name: namespace @@ -3481,6 +3553,7 @@ paths: 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. + [cleanup-wv-pre-release] operationId: GetCurrentDeployment parameters: - name: namespace @@ -3514,6 +3587,7 @@ paths: 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. + [cleanup-wv-pre-release] operationId: ListDeployments parameters: - name: namespace @@ -3556,6 +3630,7 @@ paths: description: |- Describes a worker deployment. Experimental. This API might significantly change or be removed in a future release. + [cleanup-wv-pre-release] operationId: DescribeDeployment parameters: - name: namespace @@ -3615,6 +3690,7 @@ paths: 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. + [cleanup-wv-pre-release] operationId: GetDeploymentReachability parameters: - name: namespace @@ -4133,6 +4209,72 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /namespaces/{namespace}/worker-deployment/{deploymentName}/set-current-version: + post: + tags: + - WorkflowService + description: Sets a deployment version as the current version for its deployment. + operationId: SetCurrentDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: deploymentName + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetCurrentDeploymentVersionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SetCurrentDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/worker-deployments-version/{version}: + get: + tags: + - WorkflowService + description: Describes a worker deployment version. + operationId: DescribeWorkerDeploymentVersion + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: version + in: path + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeWorkerDeploymentVersionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /namespaces/{namespace}/worker-task-reachability: get: tags: @@ -5936,6 +6078,7 @@ components: `Deployment` identifies a deployment of Temporal workers. The combination of deployment series name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker programs to specify these values. + [cleanup-wv-pre-release] DeploymentInfo: type: object properties: @@ -5962,6 +6105,7 @@ components: `DeploymentInfo` holds information about a deployment. Deployment information is tracked automatically by server as soon as the first poll from that deployment reaches the server. There can be multiple task queue workers in a single deployment which are listed in this message. + [cleanup-wv-pre-release] DeploymentInfo_TaskQueueInfo: type: object properties: @@ -5993,6 +6137,7 @@ components: description: |- DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in ListDeployments. + [cleanup-wv-pre-release] DeploymentTransition: type: object properties: @@ -6060,6 +6205,7 @@ components: properties: deploymentInfo: $ref: '#/components/schemas/DeploymentInfo' + description: '[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later' DescribeNamespaceResponse: type: object properties: @@ -6132,6 +6278,11 @@ components: description: |- This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. Only set in `ENHANCED` mode. + DescribeWorkerDeploymentVersionResponse: + type: object + properties: + workerDeploymentVersionInfo: + $ref: '#/components/schemas/WorkerDeploymentVersionInfo' DescribeWorkflowExecutionResponse: type: object properties: @@ -6420,6 +6571,7 @@ components: properties: currentDeploymentInfo: $ref: '#/components/schemas/DeploymentInfo' + description: '[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later' GetDeploymentReachabilityResponse: type: object properties: @@ -6439,6 +6591,7 @@ components: Reachability level might come from server cache. This timestamp specifies when the value was actually calculated. format: date-time + description: '[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later' GetNexusEndpointResponse: type: object properties: @@ -6916,6 +7069,7 @@ components: type: array items: $ref: '#/components/schemas/DeploymentListInfo' + description: '[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later' ListNamespacesResponse: type: object properties: @@ -8878,6 +9032,7 @@ components: Optional. Use to add or remove user-defined metadata entries. Metadata entries are exposed when describing a deployment. It is a good place for information such as operator name, links to internal deployment pipelines, etc. + description: '[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later' SetCurrentDeploymentResponse: type: object properties: @@ -8887,6 +9042,26 @@ components: allOf: - $ref: '#/components/schemas/DeploymentInfo' description: Info of the deployment that was current before executing this operation. + description: '[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later' + SetCurrentDeploymentVersionRequest: + type: object + properties: + namespace: + type: string + deploymentName: + type: string + version: + type: string + description: Must be a Versioned Build. Pass empty string to unset. + identity: + type: string + description: Optional. The identity of the client who initiated this request. + SetCurrentDeploymentVersionResponse: + type: object + properties: + previousVersion: + type: string + description: Info of the version that was current before executing this operation. SignalExternalWorkflowExecutionFailedEventAttributes: type: object properties: @@ -9860,7 +10035,9 @@ components: items: type: string description: List of keys to remove from the metadata. - description: Used as part of Deployment write APIs to update metadata attached to a deployment. + description: |- + Used as part of Deployment write APIs to update metadata attached to a deployment. + [cleanup-wv-pre-release] UpdateNamespaceInfo: type: object properties: @@ -10169,6 +10346,41 @@ components: user specified timeout, API call returns even if specified stage is not reached. format: enum description: Specifies client's intent to wait for Update results. + WorkerDeploymentVersionInfo: + type: object + properties: + version: + type: string + description: |- + Identifies a Worker Deployment Version. Must be unique within the namespace. + Same ID cannot be used in multiple Deployments. + In some contexts, such as Reset-by-build-id, version might be used + as "Build ID". + deploymentName: + type: string + description: Each Worker Version belongs to exactly one Deployment. + createTime: + type: string + format: date-time + taskQueueInfos: + type: array + items: + $ref: '#/components/schemas/WorkerDeploymentVersionInfo_WorkerBuildTaskQueueInfo' + description: All the Task Queues that have ever polled from this Deployment 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 Each Version has a Workflow Versioning Mode which is chosen by the app\n developer. (see WorkflowVersioningMode enum documentation)" + WorkerDeploymentVersionInfo_WorkerBuildTaskQueueInfo: + type: object + properties: + name: + type: string + type: + enum: + - TASK_QUEUE_TYPE_UNSPECIFIED + - TASK_QUEUE_TYPE_WORKFLOW + - TASK_QUEUE_TYPE_ACTIVITY + - TASK_QUEUE_TYPE_NEXUS + type: string + format: enum WorkerVersionCapabilities: type: object properties: diff --git a/temporal/api/deployment/v1/message.proto b/temporal/api/deployment/v1/message.proto index 9a6b4aa48..8742f7d3c 100644 --- a/temporal/api/deployment/v1/message.proto +++ b/temporal/api/deployment/v1/message.proto @@ -39,6 +39,7 @@ import "temporal/api/common/v1/message.proto"; // `Deployment` identifies a deployment of Temporal workers. The combination of deployment series // name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker // programs to specify these values. +// [cleanup-wv-pre-release] message Deployment { // Different versions of the same worker service/application are related together by having a // shared series name. @@ -54,6 +55,7 @@ message Deployment { // `DeploymentInfo` holds information about a deployment. Deployment information is tracked // automatically by server as soon as the first poll from that deployment reaches the server. There // can be multiple task queue workers in a single deployment which are listed in this message. +// [cleanup-wv-pre-release] message DeploymentInfo { Deployment deployment = 1; google.protobuf.Timestamp create_time = 2; @@ -73,6 +75,7 @@ message DeploymentInfo { } // Used as part of Deployment write APIs to update metadata attached to a deployment. +// [cleanup-wv-pre-release] message UpdateDeploymentMetadata { map upsert_entries = 1; // List of keys to remove from the metadata. @@ -81,9 +84,41 @@ message UpdateDeploymentMetadata { // DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in // ListDeployments. +// [cleanup-wv-pre-release] message DeploymentListInfo { deployment.v1.Deployment deployment = 1; google.protobuf.Timestamp create_time = 2; // If this deployment is the current deployment of its deployment series. bool is_current = 3; } + + +// 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. +// Each Version has a Workflow Versioning Mode which is chosen by the app +// developer. (see WorkflowVersioningMode enum documentation) +message WorkerDeploymentVersionInfo { + // Identifies a Worker Deployment Version. Must be unique within the namespace. + // Same ID cannot be used in multiple Deployments. + // In some contexts, such as Reset-by-build-id, version might be used + // as "Build ID". + string version = 1; + + // Each Worker Version belongs to exactly one Deployment. + string deployment_name = 2; + + google.protobuf.Timestamp create_time = 3; + // All the Task Queues that have ever polled from this Deployment version. + repeated WorkerBuildTaskQueueInfo task_queue_infos = 4; + + message WorkerBuildTaskQueueInfo { + string name = 1; + temporal.api.enums.v1.TaskQueueType type = 2; + } +} + + diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index f84e3e2ce..5d0bfbd5b 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -61,7 +61,6 @@ import "temporal/api/batch/v1/message.proto"; import "temporal/api/sdk/v1/task_complete_metadata.proto"; import "temporal/api/sdk/v1/user_metadata.proto"; import "temporal/api/nexus/v1/message.proto"; - import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -1884,15 +1883,26 @@ message UpdateWorkflowExecutionOptionsResponse { temporal.api.workflow.v1.WorkflowExecutionOptions workflow_execution_options = 1; } +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message DescribeDeploymentRequest { string namespace = 1; deployment.v1.Deployment deployment = 2; } - +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message DescribeDeploymentResponse { deployment.v1.DeploymentInfo deployment_info = 1; } +message DescribeWorkerDeploymentVersionRequest { + string namespace = 1; + string version = 2; +} + +message DescribeWorkerDeploymentVersionResponse { + deployment.v1.WorkerDeploymentVersionInfo worker_deployment_version_info = 1; +} + +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message ListDeploymentsRequest { string namespace = 1; int32 page_size = 2; @@ -1901,11 +1911,13 @@ message ListDeploymentsRequest { string series_name = 4; } +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message ListDeploymentsResponse { bytes next_page_token = 1; repeated temporal.api.deployment.v1.DeploymentListInfo deployments = 2; } +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message SetCurrentDeploymentRequest { string namespace = 1; temporal.api.deployment.v1.Deployment deployment = 2; @@ -1916,28 +1928,45 @@ message SetCurrentDeploymentRequest { // links to internal deployment pipelines, etc. temporal.api.deployment.v1.UpdateDeploymentMetadata update_metadata = 4; } - +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message SetCurrentDeploymentResponse { temporal.api.deployment.v1.DeploymentInfo current_deployment_info = 1; // Info of the deployment that was current before executing this operation. temporal.api.deployment.v1.DeploymentInfo previous_deployment_info = 2; } +message SetCurrentDeploymentVersionRequest { + string namespace = 1; + string deployment_name = 2; + // Must be a Versioned Build. Pass empty string to unset. + string version = 3; + // Optional. The identity of the client who initiated this request. + string identity = 4; +} + +message SetCurrentDeploymentVersionResponse { + // Info of the version that was current before executing this operation. + string previous_version = 1; +} + // Returns the Current Deployment of a deployment series. +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message GetCurrentDeploymentRequest { string namespace = 1; string series_name = 2; } - +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message GetCurrentDeploymentResponse { temporal.api.deployment.v1.DeploymentInfo current_deployment_info = 1; } +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message GetDeploymentReachabilityRequest { string namespace = 1; temporal.api.deployment.v1.Deployment deployment = 2; } +// [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later message GetDeploymentReachabilityResponse { temporal.api.deployment.v1.DeploymentInfo deployment_info = 1; enums.v1.DeploymentReachability reachability = 2; diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 0a6c83087..5427000f1 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -774,6 +774,7 @@ service WorkflowService { // Describes a worker deployment. // Experimental. This API might significantly change or be removed in a future release. + // [cleanup-wv-pre-release] rpc DescribeDeployment (DescribeDeploymentRequest) returns (DescribeDeploymentResponse) { option (google.api.http) = { get: "/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}" @@ -783,9 +784,20 @@ service WorkflowService { }; } + // Describes a worker deployment version. + rpc DescribeWorkerDeploymentVersion (DescribeWorkerDeploymentVersionRequest) returns (DescribeWorkerDeploymentVersionResponse) { + option (google.api.http) = { + get: "/namespaces/{namespace}/worker-deployments-version/{version}" + additional_bindings { + get: "/api/v1/namespaces/{namespace}/worker-deployments-version/{version}" + } + }; + } + // 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. + // [cleanup-wv-pre-release] rpc ListDeployments (ListDeploymentsRequest) returns (ListDeploymentsResponse) { option (google.api.http) = { get: "/namespaces/{namespace}/deployments" @@ -802,6 +814,7 @@ service WorkflowService { // 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. + // [cleanup-wv-pre-release] rpc GetDeploymentReachability (GetDeploymentReachabilityRequest) returns (GetDeploymentReachabilityResponse) { option (google.api.http) = { get: "/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability" @@ -813,6 +826,7 @@ service WorkflowService { // 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. + // [cleanup-wv-pre-release] rpc GetCurrentDeployment (GetCurrentDeploymentRequest) returns (GetCurrentDeploymentResponse) { option (google.api.http) = { get: "/namespaces/{namespace}/current-deployment/{series_name}" @@ -825,6 +839,7 @@ service WorkflowService { // Sets a deployment as the current deployment for its deployment series. Can optionally update // the metadata of the deployment as well. // Experimental. This API might significantly change or be removed in a future release. + // [cleanup-wv-pre-release] rpc SetCurrentDeployment (SetCurrentDeploymentRequest) returns (SetCurrentDeploymentResponse) { option (google.api.http) = { post: "/namespaces/{namespace}/current-deployment/{deployment.series_name}" @@ -836,6 +851,18 @@ service WorkflowService { }; } + // Sets a deployment version as the current version for its deployment. + rpc SetCurrentDeploymentVersion (SetCurrentDeploymentVersionRequest) returns (SetCurrentDeploymentVersionResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace}/worker-deployment/{deployment_name}/set-current-version" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/worker-deployment/{deployment_name}/set-current-version" + body: "*" + } + }; + } + // Invokes the specified Update function on user Workflow code. rpc UpdateWorkflowExecution(UpdateWorkflowExecutionRequest) returns (UpdateWorkflowExecutionResponse) { option (google.api.http) = {