mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 00:02:23 +00:00
edece035f8
* feat(EE): job debouncing Signed-off-by: pyranota <pyra@duck.com> * remove 'script' file Signed-off-by: pyranota <pyra@duck.com> * more work Signed-off-by: pyranota <pyra@duck.com> * properly gate it behind enterprise Signed-off-by: pyranota <pyra@duck.com> * update ee repo ref Signed-off-by: pyranota <pyra@duck.com> * change ee repo ref again Signed-off-by: pyranota <pyra@duck.com> * remove unused variable Signed-off-by: pyranota <pyra@duck.com> * feat(EE): implement TODOs and enhance tracing for job debouncing - Add database index on script(workspace_id, debounce_key) for efficient lookups - Update minimum version requirement to 1.564.0 throughout codebase - Add tracing warnings when debouncing is disabled due to worker version mismatch - Fix all documentation links from TODO placeholders to proper URLs - Replace Gauge icon with Timer icon for debouncing UI elements - Update placeholder text and tooltips with clear descriptions Co-authored-by: Pyra <pyranota@users.noreply.github.com> * create -> crate Signed-off-by: pyranota <pyra@duck.com> * remove index Signed-off-by: pyranota <pyra@duck.com> * some updates Signed-off-by: pyranota <pyra@duck.com> * fix once more Signed-off-by: pyranota <pyra@duck.com> * fix it once more Signed-off-by: pyranota <pyra@duck.com> * Remove flow step debouncing, keep top-level flow debouncing - Remove debounce fields from RawScript and FlowScript FlowModuleValue variants - Remove debounce fields from JobPayload::FlowScript and RawCode - Update raw_script_to_payload function signature - Remove debouncing UI from flow step runtime settings - Remove debouncing toggle handler and indicator badge - Preserve top-level flow debouncing in FlowSettings Co-authored-by: Pyra <pyranota@users.noreply.github.com> * cleanup Signed-off-by: pyranota <pyra@duck.com> * fixup claude's work Signed-off-by: pyranota <pyra@duck.com> * cleanup: remove dbg! statements, update min version to 1.566.0, add comprehensive comments - Removed all dbg! macro calls from production code - Updated MIN_VERSION_SUPPORTS_DEBOUNCING from 1.564.0 to 1.566.0 - Added comprehensive documentation comments explaining: - Debouncing feature purpose and mechanics - Database schema for debounce_key and debounce_stale_data tables - Version check logic and guard functions - Improved code clarity and maintainability Co-authored-by: Pyra <pyranota@users.noreply.github.com> * improve fallback Signed-off-by: pyranota <pyra@duck.com> * remove comments from old migration Signed-off-by: pyranota <pyra@duck.com> * fix pull Signed-off-by: pyranota <pyra@duck.com> * fix once more Signed-off-by: pyranota <pyra@duck.com> * Update frontend/src/lib/components/ScriptBuilder.svelte Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * add sqlx cache Signed-off-by: pyranota <pyra@duck.com> * fix: frontend CI - fix debounce field names and remove leftover flow step debouncing - Fix ScriptBuilder.svelte: change custom_debounce_key to debounce_key - Add debounce_key and debounce_delay_s fields to NewScript schema in openapi.yaml - Regenerate frontend types from OpenAPI spec - Remove leftover flow step debouncing code from FlowModuleComponent.svelte - Remove debounce fields from RawScript in openflow.openapi.yaml - Remove unused Timer import from FlowModuleHeader.svelte All frontend checks now passing (0 errors, 0 warnings) Co-authored-by: Pyra <pyranota@users.noreply.github.com> * fix ci Signed-off-by: pyranota <pyra@duck.com> * remove unused import Signed-off-by: pyranota <pyra@duck.com> * fix ci again Signed-off-by: pyranota <pyra@duck.com> * udpate ee repo ref Signed-off-by: pyranota <pyra@duck.com> * CI doesn't want to be fixed but I still try Signed-off-by: pyranota <pyra@duck.com> * nits Signed-off-by: pyranota <pyra@duck.com> * ci... Signed-off-by: pyranota <pyra@duck.com> * Update ee-repo-ref.txt * safer migration Signed-off-by: pyranota <pyra@duck.com> * reduce noise in logs Signed-off-by: pyranota <pyra@duck.com> * fix cli for scripts Signed-off-by: pyranota <pyra@duck.com> * nit Signed-off-by: pyranota <pyra@duck.com> --------- Signed-off-by: pyranota <pyra@duck.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Pyra <pyranota@users.noreply.github.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
739 lines
17 KiB
YAML
739 lines
17 KiB
YAML
openapi: "3.0.3"
|
|
|
|
info:
|
|
version: 1.565.0
|
|
title: OpenFlow Spec
|
|
contact:
|
|
name: Ruben Fiszel
|
|
email: ruben@windmill.dev
|
|
url: https://windmill.dev
|
|
|
|
license:
|
|
name: Apache 2.0
|
|
url: https://www.apache.org/licenses/LICENSE-2.0.html
|
|
|
|
paths: {}
|
|
|
|
externalDocs:
|
|
description: documentation portal
|
|
url: https://windmill.dev
|
|
|
|
components:
|
|
schemas:
|
|
OpenFlow:
|
|
type: object
|
|
properties:
|
|
summary:
|
|
type: string
|
|
description:
|
|
type: string
|
|
value:
|
|
$ref: "#/components/schemas/FlowValue"
|
|
schema:
|
|
type: object
|
|
required:
|
|
- summary
|
|
- value
|
|
|
|
FlowValue:
|
|
type: object
|
|
properties:
|
|
modules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
failure_module:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
preprocessor_module:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
same_worker:
|
|
type: boolean
|
|
concurrent_limit:
|
|
type: number
|
|
concurrency_key:
|
|
type: string
|
|
concurrency_time_window_s:
|
|
type: number
|
|
debounce_delay_s:
|
|
type: number
|
|
debounce_key:
|
|
type: string
|
|
skip_expr:
|
|
type: string
|
|
cache_ttl:
|
|
type: number
|
|
priority:
|
|
type: number
|
|
early_return:
|
|
type: string
|
|
chat_input_enabled:
|
|
type: boolean
|
|
description: Whether this flow accepts chat-style input
|
|
required:
|
|
- modules
|
|
|
|
Retry:
|
|
type: object
|
|
properties:
|
|
constant:
|
|
type: object
|
|
properties:
|
|
attempts:
|
|
type: integer
|
|
seconds:
|
|
type: integer
|
|
exponential:
|
|
type: object
|
|
properties:
|
|
attempts:
|
|
type: integer
|
|
multiplier:
|
|
type: integer
|
|
seconds:
|
|
type: integer
|
|
random_factor:
|
|
type: integer
|
|
minimum: 0
|
|
maximum: 100
|
|
retry_if:
|
|
$ref: "#/components/schemas/RetryIf"
|
|
|
|
RetryIf:
|
|
type: object
|
|
properties:
|
|
expr:
|
|
type: string
|
|
required:
|
|
- expr
|
|
|
|
StopAfterIf:
|
|
type: object
|
|
properties:
|
|
skip_if_stopped:
|
|
type: boolean
|
|
expr:
|
|
type: string
|
|
error_message:
|
|
type: string
|
|
required:
|
|
- expr
|
|
|
|
FlowModule:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
value:
|
|
$ref: "#/components/schemas/FlowModuleValue"
|
|
stop_after_if:
|
|
$ref: "#/components/schemas/StopAfterIf"
|
|
stop_after_all_iters_if:
|
|
$ref: "#/components/schemas/StopAfterIf"
|
|
skip_if:
|
|
type: object
|
|
properties:
|
|
expr:
|
|
type: string
|
|
required:
|
|
- expr
|
|
sleep:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
cache_ttl:
|
|
type: number
|
|
timeout:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
delete_after_use:
|
|
type: boolean
|
|
summary:
|
|
type: string
|
|
mock:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
return_value: {}
|
|
suspend:
|
|
type: object
|
|
properties:
|
|
required_events:
|
|
type: integer
|
|
timeout:
|
|
type: integer
|
|
resume_form:
|
|
type: object
|
|
properties:
|
|
schema:
|
|
type: object
|
|
user_auth_required:
|
|
type: boolean
|
|
user_groups_required:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
self_approval_disabled:
|
|
type: boolean
|
|
hide_cancel:
|
|
type: boolean
|
|
continue_on_disapprove_timeout:
|
|
type: boolean
|
|
priority:
|
|
type: number
|
|
continue_on_error:
|
|
type: boolean
|
|
retry:
|
|
$ref: "#/components/schemas/Retry"
|
|
required:
|
|
- value
|
|
- id
|
|
|
|
InputTransform:
|
|
oneOf:
|
|
- $ref: "#/components/schemas/StaticTransform"
|
|
- $ref: "#/components/schemas/JavascriptTransform"
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
static: "#/components/schemas/StaticTransform"
|
|
javascript: "#/components/schemas/JavascriptTransform"
|
|
|
|
StaticTransform:
|
|
type: object
|
|
properties:
|
|
value: {}
|
|
type:
|
|
type: string
|
|
enum:
|
|
- static
|
|
required:
|
|
- type
|
|
|
|
JavascriptTransform:
|
|
type: object
|
|
properties:
|
|
expr:
|
|
type: string
|
|
type:
|
|
type: string
|
|
enum:
|
|
- javascript
|
|
required:
|
|
- expr
|
|
- type
|
|
|
|
FlowModuleValue:
|
|
oneOf:
|
|
- $ref: "#/components/schemas/RawScript"
|
|
- $ref: "#/components/schemas/PathScript"
|
|
- $ref: "#/components/schemas/PathFlow"
|
|
- $ref: "#/components/schemas/ForloopFlow"
|
|
- $ref: "#/components/schemas/WhileloopFlow"
|
|
- $ref: "#/components/schemas/BranchOne"
|
|
- $ref: "#/components/schemas/BranchAll"
|
|
- $ref: "#/components/schemas/Identity"
|
|
- $ref: "#/components/schemas/AiAgent"
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
rawscript: "#/components/schemas/RawScript"
|
|
script: "#/components/schemas/PathScript"
|
|
flow: "#/components/schemas/PathFlow"
|
|
forloopflow: "#/components/schemas/ForloopFlow"
|
|
whileloopflow: "#/components/schemas/WhileloopFlow"
|
|
branchone: "#/components/schemas/BranchOne"
|
|
branchall: "#/components/schemas/BranchAll"
|
|
identity: "#/components/schemas/Identity"
|
|
aiagent: "#/components/schemas/AiAgent"
|
|
|
|
RawScript:
|
|
type: object
|
|
properties:
|
|
# to be made required once migration is over
|
|
input_transforms:
|
|
type: object
|
|
additionalProperties:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
content:
|
|
type: string
|
|
language:
|
|
type: string
|
|
enum:
|
|
- deno
|
|
- bun
|
|
- python3
|
|
- go
|
|
- bash
|
|
- powershell
|
|
- postgresql
|
|
- mysql
|
|
- bigquery
|
|
- snowflake
|
|
- mssql
|
|
- oracledb
|
|
- graphql
|
|
- nativets
|
|
- php
|
|
# TODO: Add missing languages
|
|
path:
|
|
type: string
|
|
lock:
|
|
type: string
|
|
type:
|
|
type: string
|
|
enum:
|
|
- rawscript
|
|
tag:
|
|
type: string
|
|
concurrent_limit:
|
|
type: number
|
|
concurrency_time_window_s:
|
|
type: number
|
|
custom_concurrency_key:
|
|
type: string
|
|
is_trigger:
|
|
type: boolean
|
|
assets:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- path
|
|
- kind
|
|
properties:
|
|
path:
|
|
type: string
|
|
kind:
|
|
type: string
|
|
enum:
|
|
- s3object
|
|
- resource
|
|
- ducklake
|
|
access_type:
|
|
type: string
|
|
enum: [r, w, rw]
|
|
alt_access_type:
|
|
type: string
|
|
enum: [r, w, rw]
|
|
required:
|
|
- type
|
|
- content
|
|
- language
|
|
- input_transforms
|
|
|
|
PathScript:
|
|
type: object
|
|
properties:
|
|
input_transforms:
|
|
type: object
|
|
additionalProperties:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
path:
|
|
type: string
|
|
hash:
|
|
type: string
|
|
type:
|
|
type: string
|
|
enum:
|
|
- script
|
|
tag_override:
|
|
type: string
|
|
is_trigger:
|
|
type: boolean
|
|
required:
|
|
- type
|
|
- path
|
|
- input_transforms
|
|
|
|
PathFlow:
|
|
type: object
|
|
properties:
|
|
input_transforms:
|
|
type: object
|
|
additionalProperties:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
path:
|
|
type: string
|
|
type:
|
|
type: string
|
|
enum:
|
|
- flow
|
|
required:
|
|
- type
|
|
- path
|
|
- input_transforms
|
|
|
|
ForloopFlow:
|
|
type: object
|
|
properties:
|
|
modules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
iterator:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
skip_failures:
|
|
type: boolean
|
|
type:
|
|
type: string
|
|
enum:
|
|
- forloopflow
|
|
parallel:
|
|
type: boolean
|
|
parallelism:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
required:
|
|
- modules
|
|
- iterator
|
|
- skip_failures
|
|
- type
|
|
|
|
WhileloopFlow:
|
|
type: object
|
|
properties:
|
|
modules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
skip_failures:
|
|
type: boolean
|
|
type:
|
|
type: string
|
|
enum:
|
|
- whileloopflow
|
|
parallel:
|
|
type: boolean
|
|
parallelism:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
required:
|
|
- modules
|
|
- skip_failures
|
|
- type
|
|
|
|
BranchOne:
|
|
type: object
|
|
properties:
|
|
branches:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
summary:
|
|
type: string
|
|
expr:
|
|
type: string
|
|
modules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
required:
|
|
- modules
|
|
- expr
|
|
default:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
required: [modules]
|
|
type:
|
|
type: string
|
|
enum:
|
|
- branchone
|
|
required:
|
|
- branches
|
|
- default
|
|
- type
|
|
|
|
BranchAll:
|
|
type: object
|
|
properties:
|
|
branches:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
summary:
|
|
type: string
|
|
skip_failure:
|
|
type: boolean
|
|
modules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowModule"
|
|
required:
|
|
- modules
|
|
type:
|
|
type: string
|
|
enum:
|
|
- branchall
|
|
parallel:
|
|
type: boolean
|
|
required:
|
|
- branches
|
|
- type
|
|
|
|
AgentTool:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
summary:
|
|
type: string
|
|
value:
|
|
$ref: "#/components/schemas/ToolValue"
|
|
required:
|
|
- id
|
|
- value
|
|
|
|
ToolValue:
|
|
oneOf:
|
|
- $ref: "#/components/schemas/FlowModuleTool"
|
|
- $ref: "#/components/schemas/McpToolValue"
|
|
discriminator:
|
|
propertyName: tool_type
|
|
mapping:
|
|
flowmodule: "#/components/schemas/FlowModuleTool"
|
|
mcp: "#/components/schemas/McpToolValue"
|
|
|
|
FlowModuleTool:
|
|
allOf:
|
|
- type: object
|
|
properties:
|
|
tool_type:
|
|
type: string
|
|
enum:
|
|
- flowmodule
|
|
required:
|
|
- tool_type
|
|
- $ref: "#/components/schemas/FlowModuleValue"
|
|
|
|
McpToolValue:
|
|
type: object
|
|
properties:
|
|
tool_type:
|
|
type: string
|
|
enum:
|
|
- mcp
|
|
resource_path:
|
|
type: string
|
|
include_tools:
|
|
type: array
|
|
items:
|
|
type: string
|
|
exclude_tools:
|
|
type: array
|
|
items:
|
|
type: string
|
|
required:
|
|
- tool_type
|
|
- resource_path
|
|
|
|
AiAgent:
|
|
type: object
|
|
properties:
|
|
input_transforms:
|
|
type: object
|
|
additionalProperties:
|
|
$ref: "#/components/schemas/InputTransform"
|
|
tools:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/AgentTool"
|
|
type:
|
|
type: string
|
|
enum:
|
|
- aiagent
|
|
parallel:
|
|
type: boolean
|
|
required:
|
|
- tools
|
|
- type
|
|
- input_transforms
|
|
|
|
Identity:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- identity
|
|
flow:
|
|
type: boolean
|
|
|
|
required:
|
|
- type
|
|
|
|
FlowStatus:
|
|
type: object
|
|
properties:
|
|
step:
|
|
type: integer
|
|
modules:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/FlowStatusModule"
|
|
user_states:
|
|
additionalProperties: true
|
|
preprocessor_module:
|
|
allOf:
|
|
- $ref: "#/components/schemas/FlowStatusModule"
|
|
failure_module:
|
|
allOf:
|
|
- $ref: "#/components/schemas/FlowStatusModule"
|
|
- type: object
|
|
properties:
|
|
parent_module:
|
|
type: string
|
|
retry:
|
|
type: object
|
|
properties:
|
|
fail_count:
|
|
type: integer
|
|
failed_jobs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: uuid
|
|
required:
|
|
- step
|
|
- modules
|
|
- failure_module
|
|
|
|
FlowStatusModule:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- WaitingForPriorSteps
|
|
- WaitingForEvents
|
|
- WaitingForExecutor
|
|
- InProgress
|
|
- Success
|
|
- Failure
|
|
id:
|
|
type: string
|
|
job:
|
|
type: string
|
|
format: uuid
|
|
count:
|
|
type: integer
|
|
progress:
|
|
type: integer
|
|
iterator:
|
|
type: object
|
|
properties:
|
|
index:
|
|
type: integer
|
|
itered:
|
|
type: array
|
|
items: {}
|
|
args: {}
|
|
flow_jobs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
flow_jobs_success:
|
|
type: array
|
|
items:
|
|
type: boolean
|
|
flow_jobs_duration:
|
|
type: object
|
|
properties:
|
|
started_at:
|
|
type: array
|
|
items:
|
|
type: string
|
|
duration_ms:
|
|
type: array
|
|
items:
|
|
type: integer
|
|
branch_chosen:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum: [branch, default]
|
|
branch:
|
|
type: integer
|
|
required:
|
|
- type
|
|
branchall:
|
|
type: object
|
|
properties:
|
|
branch:
|
|
type: integer
|
|
len:
|
|
type: integer
|
|
required:
|
|
- branch
|
|
- len
|
|
approvers:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
resume_id:
|
|
type: integer
|
|
approver:
|
|
type: string
|
|
required:
|
|
- resume_id
|
|
- approver
|
|
failed_retries:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: uuid
|
|
skipped:
|
|
type: boolean
|
|
agent_actions:
|
|
type: array
|
|
items:
|
|
type: object
|
|
oneOf:
|
|
- type: object
|
|
properties:
|
|
job_id:
|
|
type: string
|
|
format: uuid
|
|
function_name:
|
|
type: string
|
|
type:
|
|
type: string
|
|
enum: [tool_call]
|
|
module_id:
|
|
type: string
|
|
required:
|
|
- job_id
|
|
- function_name
|
|
- type
|
|
- module_id
|
|
- type: object
|
|
properties:
|
|
call_id:
|
|
type: string
|
|
format: uuid
|
|
function_name:
|
|
type: string
|
|
resource_path:
|
|
type: string
|
|
type:
|
|
type: string
|
|
enum: [mcp_tool_call]
|
|
arguments:
|
|
type: object
|
|
required:
|
|
- call_id
|
|
- function_name
|
|
- resource_path
|
|
- type
|
|
- type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum: [message]
|
|
required:
|
|
- content
|
|
- type
|
|
agent_actions_success:
|
|
type: array
|
|
items:
|
|
type: boolean
|
|
required: [type]
|