feat(runs,events,ui): identify workflows by immutable UUID (#2125)
This commit is contained in:
46 files changed
+1284
-512
No files matched your search
+143
-29
@@ -1258,6 +1258,18 @@ components:
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
CreateWorkflowInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
body:
|
||||
description: The first version's workflow document, as YAML; the workflow is created unpublished without one
|
||||
type: string
|
||||
name:
|
||||
description: Lowercase letters and digits, joined by dots or hyphens
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
CreateWorkspaceInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -1735,14 +1747,11 @@ components:
|
||||
type: string
|
||||
source_id:
|
||||
type: string
|
||||
workflow:
|
||||
type: string
|
||||
required:
|
||||
- source_id
|
||||
- source
|
||||
- event_type
|
||||
- filter
|
||||
- workflow
|
||||
type: object
|
||||
EventsSavedID:
|
||||
additionalProperties: false
|
||||
@@ -1915,10 +1924,13 @@ components:
|
||||
type: boolean
|
||||
workflow:
|
||||
type: string
|
||||
workflow_id:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- event_type
|
||||
- filter
|
||||
- workflow_id
|
||||
- workflow
|
||||
- enabled
|
||||
- status
|
||||
@@ -3726,11 +3738,12 @@ components:
|
||||
description: The source whose events fire it; none when every is set
|
||||
format: uuid
|
||||
type: string
|
||||
workflow:
|
||||
workflow_id:
|
||||
description: The workflow each match runs
|
||||
format: uuid
|
||||
type: string
|
||||
required:
|
||||
- workflow
|
||||
- workflow_id
|
||||
type: object
|
||||
PutWorkflowInputBody:
|
||||
additionalProperties: false
|
||||
@@ -3739,7 +3752,7 @@ components:
|
||||
description: The workflow document, as YAML
|
||||
type: string
|
||||
expected_version:
|
||||
description: The latest version the document was edited from, 0 for a new workflow; the save is refused with 409 when another is stored
|
||||
description: The latest version the document was edited from, 0 for a workflow not yet published; the save is refused with 409 when another is stored
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
@@ -3792,6 +3805,15 @@ components:
|
||||
- expected_version
|
||||
type: object
|
||||
RenameInputBody1:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
name:
|
||||
description: Lowercase letters and digits, joined by dots or hyphens
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
RenameInputBody2:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
title:
|
||||
@@ -3883,7 +3905,10 @@ components:
|
||||
type: string
|
||||
updated_by:
|
||||
type: string
|
||||
workflow_id:
|
||||
type: string
|
||||
required:
|
||||
- workflow_id
|
||||
- name
|
||||
- body
|
||||
- base_version
|
||||
@@ -4068,11 +4093,14 @@ components:
|
||||
type: string
|
||||
workflow:
|
||||
type: string
|
||||
workflow_id:
|
||||
type: string
|
||||
workflow_version:
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
- workflow_id
|
||||
- workflow
|
||||
- workflow_version
|
||||
- state
|
||||
@@ -4229,6 +4257,24 @@ components:
|
||||
- at
|
||||
- kind
|
||||
type: object
|
||||
RunsWorkflowIdentity:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
version:
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- enabled
|
||||
- version
|
||||
type: object
|
||||
RunsWorkflowStats:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -4253,7 +4299,10 @@ components:
|
||||
type: integer
|
||||
workflow:
|
||||
type: string
|
||||
workflow_id:
|
||||
type: string
|
||||
required:
|
||||
- workflow_id
|
||||
- workflow
|
||||
- total
|
||||
- succeeded
|
||||
@@ -4273,6 +4322,8 @@ components:
|
||||
type: string
|
||||
enabled:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
steps:
|
||||
@@ -4285,6 +4336,7 @@ components:
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- version
|
||||
- body
|
||||
@@ -5747,7 +5799,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RenameInputBody1"
|
||||
$ref: "#/components/schemas/RenameInputBody2"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
@@ -8338,9 +8390,10 @@ paths:
|
||||
- description: Only this workflow's runs
|
||||
explode: false
|
||||
in: query
|
||||
name: workflow
|
||||
name: workflow_id
|
||||
schema:
|
||||
description: Only this workflow's runs
|
||||
format: uuid
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
@@ -9629,14 +9682,39 @@ paths:
|
||||
summary: List every workflow at its latest version
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{name}:
|
||||
post:
|
||||
operationId: create-workflow
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateWorkflowInputBody"
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RunsWorkflowIdentity"
|
||||
description: Created
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Create a workflow, and publish its first version when a document is given
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{id}:
|
||||
delete:
|
||||
operationId: delete-workflow
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
@@ -9647,16 +9725,17 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Delete a workflow, unless a trigger or another workflow still names it
|
||||
summary: Delete a workflow, unless a trigger or another workflow still refers to it
|
||||
tags:
|
||||
- Workflows
|
||||
get:
|
||||
operationId: get-workflow
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
- description: A past version; the latest by default
|
||||
explode: false
|
||||
@@ -9686,12 +9765,11 @@ paths:
|
||||
put:
|
||||
operationId: put-workflow
|
||||
parameters:
|
||||
- description: Lowercase letters and digits, joined by dots or hyphens
|
||||
in: path
|
||||
name: name
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Lowercase letters and digits, joined by dots or hyphens
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
@@ -9715,14 +9793,15 @@ paths:
|
||||
summary: Publish a workflow document as its next version
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{name}/draft:
|
||||
/api/workflows/{id}/draft:
|
||||
delete:
|
||||
operationId: discard-workflow-draft
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
@@ -9740,9 +9819,10 @@ paths:
|
||||
operationId: get-workflow-draft
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
@@ -9763,12 +9843,11 @@ paths:
|
||||
put:
|
||||
operationId: put-workflow-draft
|
||||
parameters:
|
||||
- description: Lowercase letters and digits, joined by dots or hyphens
|
||||
in: path
|
||||
name: name
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Lowercase letters and digits, joined by dots or hyphens
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
@@ -9792,14 +9871,15 @@ paths:
|
||||
summary: Save a workflow's draft, which no run uses until it is published
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{name}/draft/test-run:
|
||||
/api/workflows/{id}/draft/test-run:
|
||||
post:
|
||||
operationId: test-workflow-draft
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
@@ -9823,14 +9903,15 @@ paths:
|
||||
summary: "Test-run a workflow's draft: every action is judged and none that changes something runs"
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{name}/enabled:
|
||||
/api/workflows/{id}/enabled:
|
||||
put:
|
||||
operationId: set-workflow-enabled
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
@@ -9854,14 +9935,47 @@ paths:
|
||||
summary: Enable or disable a workflow
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{name}/runs:
|
||||
/api/workflows/{id}/name:
|
||||
put:
|
||||
operationId: rename-workflow
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RenameInputBody1"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RunsWorkflowIdentity"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Rename a workflow; its runs, triggers and callers refer to it by id and are unchanged
|
||||
tags:
|
||||
- Workflows
|
||||
/api/workflows/{id}/runs:
|
||||
post:
|
||||
operationId: run-workflow
|
||||
parameters:
|
||||
- in: path
|
||||
name: name
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
format: uuid
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
|
||||
Reference in new issue
Block a user