Compare commits

..

1 Commits

Author SHA1 Message Date
Ruben Fiszel
09d981bb76 chore(main): release 1.462.2 (#5286)
* chore(main): release 1.462.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com>
2025-02-14 04:26:16 +01:00
83 changed files with 479 additions and 939 deletions

4
.env
View File

@@ -7,7 +7,3 @@ WM_IMAGE=ghcr.io/windmill-labs/windmill:main
# To use another port than :80, setup the Caddyfile and the caddy section of the docker-compose to your needs: https://caddyserver.com/docs/getting-started
# To have caddy take care of automatic TLS
# To rotate logs, set the following variables:
#LOG_MAX_SIZE=10m
#LOG_MAX_FILE=3

View File

@@ -22,7 +22,7 @@ jobs:
windmill:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -64,7 +64,7 @@ jobs:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
windmill:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -106,7 +106,7 @@ jobs:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
windmill:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -119,7 +119,7 @@ jobs:
ports:
- 8000:8000
windmill_1:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -130,7 +130,7 @@ jobs:
--pull always
windmill_2:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -141,7 +141,7 @@ jobs:
--pull always
windmill_3:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -162,7 +162,6 @@ jobs:
-c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json
--workers 4
--factor 3
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
@@ -183,7 +182,7 @@ jobs:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
windmill:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -196,7 +195,7 @@ jobs:
ports:
- 8000:8000
windmill_1:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -207,7 +206,7 @@ jobs:
--pull always
windmill_2:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -218,7 +217,7 @@ jobs:
--pull always
windmill_3:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -229,7 +228,7 @@ jobs:
--pull always
windmill_4:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -240,7 +239,7 @@ jobs:
--pull always
windmill_5:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -251,7 +250,7 @@ jobs:
--pull always
windmill_6:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -262,7 +261,7 @@ jobs:
--pull always
windmill_7:
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
image: ghcr.io/windmill-labs/windmill-ee:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -282,7 +281,6 @@ jobs:
-c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json
--workers 8
--factor 3
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:

View File

@@ -1,74 +1,5 @@
# Changelog
## [1.463.6](https://github.com/windmill-labs/windmill/compare/v1.463.5...v1.463.6) (2025-02-18)
### Bug Fixes
* fix reactivity issue on loading live flow on runs page ([52e12d1](https://github.com/windmill-labs/windmill/commit/52e12d1021831adc2ce9b7b0946a93562038017e))
* improve v2 migration finalizer to avoid deadlocks ([1069ad3](https://github.com/windmill-labs/windmill/commit/1069ad39992940e32e5d8566ef2283970525be1a))
## [1.463.5](https://github.com/windmill-labs/windmill/compare/v1.463.4...v1.463.5) (2025-02-18)
### Bug Fixes
* fix teams cleanup preventing start ([1b46e0f](https://github.com/windmill-labs/windmill/commit/1b46e0f08426497d549cf5007c93981df9ab41e5))
## [1.463.4](https://github.com/windmill-labs/windmill/compare/v1.463.3...v1.463.4) (2025-02-17)
### Bug Fixes
* improve queue job indices for faster performances ([9530826](https://github.com/windmill-labs/windmill/commit/953082681e2c4fd71d5ac1acf372265ccc72297b))
* improve teams settings in workspace settings ([#5316](https://github.com/windmill-labs/windmill/issues/5316)) ([935b5b7](https://github.com/windmill-labs/windmill/commit/935b5b799636c0f02597315837268d4a76f6709a))
## [1.463.3](https://github.com/windmill-labs/windmill/compare/v1.463.2...v1.463.3) (2025-02-17)
### Bug Fixes
* windmill_admin has implicit bypass rls on v2_job even if role not set ([0208f53](https://github.com/windmill-labs/windmill/commit/0208f53541473aa51bed0e15d938def3d4530e3f))
## [1.463.2](https://github.com/windmill-labs/windmill/compare/v1.463.1...v1.463.2) (2025-02-16)
### Bug Fixes
* show skipped flows as success ([#5304](https://github.com/windmill-labs/windmill/issues/5304)) ([062e6bc](https://github.com/windmill-labs/windmill/commit/062e6bc161b56215cb081209d37ad8e0cbd1dd99))
## [1.463.1](https://github.com/windmill-labs/windmill/compare/v1.463.0...v1.463.1) (2025-02-15)
### Bug Fixes
* not able to filter runs by schedule ([#5302](https://github.com/windmill-labs/windmill/issues/5302)) ([53f47bc](https://github.com/windmill-labs/windmill/commit/53f47bcfc84ed747b55d3a7d84ccf13ff1c43c97))
## [1.463.0](https://github.com/windmill-labs/windmill/compare/v1.462.1...v1.463.0) (2025-02-14)
### Features
* adding docker log rotation by default in docker compose ([#5295](https://github.com/windmill-labs/windmill/issues/5295)) ([dad829a](https://github.com/windmill-labs/windmill/commit/dad829adf4bff97e998f7d18e0bbafb8497d4198))
* parse script for preprocessor/no_main_func on deploy ([#5292](https://github.com/windmill-labs/windmill/issues/5292)) ([28558e6](https://github.com/windmill-labs/windmill/commit/28558e674f60fef1b165a79c039b1b450759d500))
### Bug Fixes
* display branch chosen even if emoty branch ([77a8eed](https://github.com/windmill-labs/windmill/commit/77a8eedc96171e9f84463407bdc5aec9b7b10d62))
* improve handling of empty branches and loops ([e7d4582](https://github.com/windmill-labs/windmill/commit/e7d458278969897aa7312dcd20a8091aaad772d7))
* improve runs page load time ([266f820](https://github.com/windmill-labs/windmill/commit/266f82046ad287163d24910902393cd63156ca1d))
* static website serving ([#5298](https://github.com/windmill-labs/windmill/issues/5298)) ([41eecc1](https://github.com/windmill-labs/windmill/commit/41eecc1437301bea557fb467cc48b502162de419))
* users should be able to see their own jobs ([9ccadb6](https://github.com/windmill-labs/windmill/commit/9ccadb6085498119bdfcc172d52c7fce1eb3336e))
## [1.462.3](https://github.com/windmill-labs/windmill/compare/v1.462.1...v1.462.2) (2025-02-14)
### Bug Fixes
* users should be able to see their own jobs ([9ccadb6](https://github.com/windmill-labs/windmill/commit/9ccadb6085498119bdfcc172d52c7fce1eb3336e))
## [1.462.2](https://github.com/windmill-labs/windmill/compare/v1.462.1...v1.462.2) (2025-02-14)

View File

@@ -130,28 +130,28 @@
},
{
"ordinal": 25,
"name": "teams_command_script",
"type_info": "Text"
},
{
"ordinal": 26,
"name": "teams_team_id",
"type_info": "Text"
},
{
"ordinal": 27,
"name": "teams_team_name",
"type_info": "Text"
},
{
"ordinal": 28,
"name": "ai_models",
"type_info": "VarcharArray"
},
{
"ordinal": 29,
"ordinal": 26,
"name": "code_completion_model",
"type_info": "Varchar"
},
{
"ordinal": 27,
"name": "teams_command_script",
"type_info": "Text"
},
{
"ordinal": 28,
"name": "teams_team_id",
"type_info": "Text"
},
{
"ordinal": 29,
"name": "teams_team_name",
"type_info": "Text"
}
],
"parameters": {
@@ -185,10 +185,10 @@
true,
true,
true,
true,
true,
true,
false,
true,
true,
true,
true
]
},

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DROP INDEX CONCURRENTLY IF EXISTS queue_sort",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now() AND ($3::text[] IS NULL OR tag = ANY($3))",
"query": "SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now()",
"describe": {
"columns": [
{
@@ -17,8 +17,7 @@
"parameters": {
"Left": [
"Text",
"Bool",
"TextArray"
"Bool"
]
},
"nullable": [
@@ -26,5 +25,5 @@
null
]
},
"hash": "0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd"
"hash": "19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395"
}

View File

@@ -0,0 +1,26 @@
{
"db_name": "PostgreSQL",
"query": "\n WITH assigned_teams AS (\n SELECT teams_team_id\n FROM workspace_settings\n ),\n all_teams AS (\n SELECT jsonb_array_elements(value::jsonb) AS team\n FROM global_settings\n WHERE name = 'teams'\n )\n SELECT team->>'team_name' AS team_name, team->>'team_internal_id' AS team_id\n FROM all_teams\n WHERE NOT EXISTS (\n SELECT 1\n FROM assigned_teams\n WHERE assigned_teams.teams_team_id = team->>'team_internal_id'\n )\n AND team->>'team_name' IS NOT NULL\n AND team->>'team_id' IS NOT NULL\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "team_name",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "team_id",
"type_info": "Text"
}
],
"parameters": {
"Left": []
},
"nullable": [
null,
null
]
},
"hash": "2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966"
}

View File

@@ -1,24 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE v2_job_status\n SET flow_status = JSONB_SET(flow_status, ARRAY['modules', $1::TEXT], $2)\n WHERE id = $3\n RETURNING flow_status AS \"flow_status: Json<Box<RawValue>>\"",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "flow_status: Json<Box<RawValue>>",
"type_info": "Jsonb"
}
],
"parameters": {
"Left": [
"Text",
"Jsonb",
"Uuid"
]
},
"nullable": [
true
]
},
"hash": "30216cf02e972f961b7cc6054050fdc984be118df1ad68f7263c84e058bb1266"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DROP INDEX CONCURRENTLY IF EXISTS queue_sort_2",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "create index concurrently if not exists root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "CREATE INDEX CONCURRENTLY queue_sort_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for, tag) WHERE running = false",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "VACUUM (skip_locked) v2_job_queue, v2_job_runtime, v2_job_status",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_7",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "4d4aa16b2a55e57f9376d0cb253e671525969fb5f528ae07576e9dc5e77af1f1"
}

View File

@@ -1,26 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n WITH assigned_teams AS (\n SELECT teams_team_id\n FROM workspace_settings\n ),\n all_teams AS (\n SELECT jsonb_array_elements(CASE\n WHEN jsonb_typeof(value::jsonb) = 'array' THEN value::jsonb\n ELSE '[]'::jsonb\n END) AS team\n FROM global_settings\n WHERE name = 'teams'\n )\n SELECT team->>'team_name' AS team_name, team->>'team_internal_id' AS team_id\n FROM all_teams\n WHERE NOT EXISTS (\n SELECT 1\n FROM assigned_teams\n WHERE assigned_teams.teams_team_id = team->>'team_internal_id'\n )\n AND team->>'team_name' IS NOT NULL\n AND team->>'team_id' IS NOT NULL\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "team_name",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "team_id",
"type_info": "Text"
}
],
"parameters": {
"Left": []
},
"nullable": [
null,
null
]
},
"hash": "50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48"
}

View File

@@ -130,28 +130,28 @@
},
{
"ordinal": 25,
"name": "teams_command_script",
"type_info": "Text"
},
{
"ordinal": 26,
"name": "teams_team_id",
"type_info": "Text"
},
{
"ordinal": 27,
"name": "teams_team_name",
"type_info": "Text"
},
{
"ordinal": 28,
"name": "ai_models",
"type_info": "VarcharArray"
},
{
"ordinal": 29,
"ordinal": 26,
"name": "code_completion_model",
"type_info": "Varchar"
},
{
"ordinal": 27,
"name": "teams_command_script",
"type_info": "Text"
},
{
"ordinal": 28,
"name": "teams_team_id",
"type_info": "Text"
},
{
"ordinal": 29,
"name": "teams_team_name",
"type_info": "Text"
}
],
"parameters": {
@@ -185,10 +185,10 @@
true,
true,
true,
true,
true,
true,
false,
true,
true,
true,
true
]
},

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n UPDATE workspace_settings\n SET teams_command_script = NULL,\n teams_team_id = NULL,\n teams_team_name = NULL\n ",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n UPDATE global_settings\n SET value = (\n SELECT COALESCE(jsonb_agg(elem), '[]'::jsonb)\n FROM jsonb_array_elements(value) AS elem\n WHERE NOT (elem ? 'teams_channel')\n )\n WHERE name = 'critical_error_channels'\n ",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "create index concurrently if not exists ix_job_workspace_id_created_at_new_6 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "8be277b89102a26dda506202a3ef7eb05342cfb3aa9b4f5d80c70fbc50d437ba"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "create index concurrently if not exists ix_job_workspace_id_created_at_new_7 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "ae8dfecd46425d5f86003eea9a578e9831fc0e700cc76ab9627afe9040a4efe0"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "VACUUM v2_job_queue, v2_job_runtime, v2_job_status",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "create index concurrently if not exists ix_job_root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM v2_job_queue WHERE id = $1 RETURNING 1",
"query": "DELETE FROM v2_job_queue WHERE workspace_id = $1 AND id = $2 RETURNING 1",
"describe": {
"columns": [
{
@@ -11,6 +11,7 @@
],
"parameters": {
"Left": [
"Text",
"Uuid"
]
},
@@ -18,5 +19,5 @@
null
]
},
"hash": "c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06"
"hash": "d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "create index concurrently if not exists ix_v2_job_workspace_id_created_at ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow', 'singlescriptflow') AND parent_job IS NULL",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "d585aa6301c41308b02a1f0fbf068221e732e48dfa6e34d5b025adbbdcbb03e0"
}

View File

@@ -0,0 +1,16 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE v2_job_status\n SET flow_status = JSONB_SET(flow_status, ARRAY['modules', $1::TEXT], $2)\n WHERE id = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Jsonb",
"Uuid"
]
},
"nullable": []
},
"hash": "db91141ae55b96a3237e05e3f127386339cb3c7a6f88bb2102498ec5d34f9537"
}

View File

@@ -1,14 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE global_settings SET value = $1 WHERE name = 'teams'",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Jsonb"
]
},
"nullable": []
},
"hash": "e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_6",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "faa0e401e6beebde6c3fef06151d3e73a5806f61cae4a53b5bdc888ec7164395"
}

190
backend/Cargo.lock generated
View File

@@ -713,7 +713,7 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -1007,9 +1007,9 @@ dependencies = [
[[package]]
name = "backon"
version = "1.4.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49fef586913a57ff189f25c9b3d034356a5bf6b3fa9a7f067588fe1698ba1f5d"
checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7"
dependencies = [
"fastrand 2.3.0",
"gloo-timers",
@@ -1222,16 +1222,15 @@ dependencies = [
[[package]]
name = "blake3"
version = "1.6.0"
version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1230237285e3e10cde447185e8975408ae24deaa67205ce684805c25bc0c7937"
checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e"
dependencies = [
"arrayref",
"arrayvec",
"cc",
"cfg-if",
"constant_time_eq",
"memmap2",
]
[[package]]
@@ -1553,9 +1552,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.14"
version = "1.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
dependencies = [
"jobserver",
"libc",
@@ -1669,9 +1668,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.30"
version = "4.5.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92b7b18d71fad5313a1e320fa9897994228ce274b60faa4d694fe0ea89cd9e6d"
checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1679,9 +1678,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.30"
version = "4.5.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c"
checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9"
dependencies = [
"anstream",
"anstyle",
@@ -2264,7 +2263,7 @@ dependencies = [
"tokio",
"tokio-util",
"url",
"uuid 1.13.2",
"uuid 1.13.1",
"xz2",
"zstd",
]
@@ -2364,7 +2363,7 @@ dependencies = [
"regex",
"sha2 0.10.8",
"unicode-segmentation",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -2531,7 +2530,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
dependencies = [
"serde",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -2826,7 +2825,7 @@ dependencies = [
"serde",
"thiserror 1.0.69",
"tokio",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -3210,9 +3209,9 @@ dependencies = [
[[package]]
name = "equivalent"
version = "1.0.2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
@@ -5406,7 +5405,7 @@ dependencies = [
"sha2 0.10.8",
"subprocess",
"thiserror 1.0.69",
"uuid 1.13.2",
"uuid 1.13.1",
"zstd",
]
@@ -5777,9 +5776,9 @@ dependencies = [
[[package]]
name = "openssl"
version = "0.10.71"
version = "0.10.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd"
checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6"
dependencies = [
"bitflags 2.8.0",
"cfg-if",
@@ -5818,9 +5817,9 @@ dependencies = [
[[package]]
name = "openssl-sys"
version = "0.9.106"
version = "0.9.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd"
checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc"
dependencies = [
"cc",
"libc",
@@ -6367,7 +6366,7 @@ dependencies = [
"postgres-protocol 0.6.8",
"serde",
"serde_json",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -6609,9 +6608,9 @@ dependencies = [
[[package]]
name = "psm"
version = "0.1.25"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f58e5423e24c18cc840e1c98370b3993c6649cd1678b4d24318bcf0a083cbe88"
checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810"
dependencies = [
"cc",
]
@@ -6738,9 +6737,9 @@ dependencies = [
[[package]]
name = "quinn-udp"
version = "0.5.10"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944"
checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
dependencies = [
"cfg_aliases",
"libc",
@@ -6796,8 +6795,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.1",
"zerocopy 0.8.18",
"rand_core 0.9.0",
"zerocopy 0.8.17",
]
[[package]]
@@ -6827,7 +6826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core 0.9.1",
"rand_core 0.9.0",
]
[[package]]
@@ -6850,12 +6849,12 @@ dependencies = [
[[package]]
name = "rand_core"
version = "0.9.1"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a88e0da7a2c97baa202165137c158d0a2e824ac465d13d81046727b34cb247d3"
checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff"
dependencies = [
"getrandom 0.3.1",
"zerocopy 0.8.18",
"zerocopy 0.8.17",
]
[[package]]
@@ -7223,7 +7222,7 @@ dependencies = [
"rkyv_derive",
"seahash",
"tinyvec",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -7576,9 +7575,9 @@ checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"
[[package]]
name = "ryu-js"
version = "1.0.2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15"
checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5"
[[package]]
name = "safetensors"
@@ -7614,7 +7613,7 @@ dependencies = [
"serde",
"thiserror 1.0.69",
"url",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -7652,7 +7651,7 @@ dependencies = [
"schemars_derive",
"serde",
"serde_json",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -8151,9 +8150,9 @@ dependencies = [
[[package]]
name = "smallvec"
version = "1.14.0"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
dependencies = [
"serde",
]
@@ -8387,7 +8386,7 @@ dependencies = [
"tokio-stream",
"tracing",
"url",
"uuid 1.13.2",
"uuid 1.13.1",
"webpki-roots",
]
@@ -8471,7 +8470,7 @@ dependencies = [
"stringprep",
"thiserror 2.0.11",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
"whoami",
]
@@ -8512,7 +8511,7 @@ dependencies = [
"stringprep",
"thiserror 2.0.11",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
"whoami",
]
@@ -8538,7 +8537,7 @@ dependencies = [
"sqlx-core",
"tracing",
"url",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -9185,7 +9184,7 @@ dependencies = [
"tempfile",
"thiserror 1.0.69",
"time",
"uuid 1.13.2",
"uuid 1.13.1",
"winapi",
]
@@ -9298,9 +9297,9 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.17.1"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230"
checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91"
dependencies = [
"cfg-if",
"fastrand 2.3.0",
@@ -9415,7 +9414,7 @@ dependencies = [
"tokio-rustls 0.24.1",
"tokio-util",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
@@ -10122,9 +10121,9 @@ dependencies = [
[[package]]
name = "tree-sitter-language"
version = "0.1.5"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4013970217383f67b18aef68f6fb2e8d409bc5755227092d32efb0422ba24b8"
checksum = "38eee4db33814de3d004de9d8d825627ed3320d0989cce0dea30efaf5be4736c"
[[package]]
name = "triomphe"
@@ -10196,9 +10195,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
[[package]]
name = "typenum"
version = "1.18.0"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "typify"
@@ -10251,7 +10250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab82fc73182c29b02e2926a6df32f2241dbadb5cfc111fd595515b3598f46bb3"
dependencies = [
"rand 0.9.0",
"uuid 1.13.2",
"uuid 1.13.1",
"web-time",
]
@@ -10533,9 +10532,9 @@ dependencies = [
[[package]]
name = "uuid"
version = "1.13.2"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c1f41ffb7cf259f1ecc2876861a17e7142e63ead296f671f81f6ae85903e0d6"
checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0"
dependencies = [
"getrandom 0.3.1",
"serde",
@@ -10859,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windmill"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"axum",
@@ -10888,7 +10887,7 @@ dependencies = [
"tokio",
"tracing",
"url",
"uuid 1.13.2",
"uuid 1.13.1",
"v8",
"windmill-api",
"windmill-api-client",
@@ -10902,7 +10901,7 @@ dependencies = [
[[package]]
name = "windmill-api"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"argon2",
@@ -10983,20 +10982,19 @@ dependencies = [
"ulid",
"url",
"urlencoding",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-audit",
"windmill-common",
"windmill-git-sync",
"windmill-indexer",
"windmill-parser",
"windmill-parser-py",
"windmill-parser-ts",
"windmill-queue",
]
[[package]]
name = "windmill-api-client"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -11009,12 +11007,12 @@ dependencies = [
"serde",
"serde_json",
"syn 1.0.109",
"uuid 1.13.2",
"uuid 1.13.1",
]
[[package]]
name = "windmill-audit"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"chrono",
"serde",
@@ -11027,21 +11025,21 @@ dependencies = [
[[package]]
name = "windmill-autoscaling"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"serde",
"serde_json",
"sqlx",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-common",
"windmill-queue",
]
[[package]]
name = "windmill-common"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"async-stream",
@@ -11094,27 +11092,27 @@ dependencies = [
"tracing-loki",
"tracing-opentelemetry",
"tracing-subscriber",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-macros",
]
[[package]]
name = "windmill-git-sync"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"regex",
"serde",
"serde_json",
"sqlx",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-common",
"windmill-queue",
]
[[package]]
name = "windmill-indexer"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"bytes",
@@ -11131,13 +11129,13 @@ dependencies = [
"tokio",
"tokio-tar",
"tracing",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-common",
]
[[package]]
name = "windmill-macros"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"itertools 0.14.0",
"lazy_static",
@@ -11149,7 +11147,7 @@ dependencies = [
[[package]]
name = "windmill-parser"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"convert_case 0.6.0",
"serde",
@@ -11158,7 +11156,7 @@ dependencies = [
[[package]]
name = "windmill-parser-bash"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"lazy_static",
@@ -11170,7 +11168,7 @@ dependencies = [
[[package]]
name = "windmill-parser-csharp"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"serde_json",
@@ -11182,7 +11180,7 @@ dependencies = [
[[package]]
name = "windmill-parser-go"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"gosyn",
@@ -11194,7 +11192,7 @@ dependencies = [
[[package]]
name = "windmill-parser-graphql"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"lazy_static",
@@ -11206,7 +11204,7 @@ dependencies = [
[[package]]
name = "windmill-parser-php"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"itertools 0.14.0",
@@ -11217,7 +11215,7 @@ dependencies = [
[[package]]
name = "windmill-parser-py"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"itertools 0.14.0",
@@ -11228,7 +11226,7 @@ dependencies = [
[[package]]
name = "windmill-parser-py-imports"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"async-recursion",
@@ -11248,7 +11246,7 @@ dependencies = [
[[package]]
name = "windmill-parser-rust"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"convert_case 0.6.0",
@@ -11265,7 +11263,7 @@ dependencies = [
[[package]]
name = "windmill-parser-sql"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"lazy_static",
@@ -11277,7 +11275,7 @@ dependencies = [
[[package]]
name = "windmill-parser-ts"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"lazy_static",
@@ -11295,7 +11293,7 @@ dependencies = [
[[package]]
name = "windmill-parser-wasm"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"getrandom 0.2.15",
@@ -11317,7 +11315,7 @@ dependencies = [
[[package]]
name = "windmill-parser-yaml"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"serde_json",
@@ -11327,7 +11325,7 @@ dependencies = [
[[package]]
name = "windmill-queue"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"async-recursion",
@@ -11353,14 +11351,14 @@ dependencies = [
"tokio",
"tracing",
"ulid",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-audit",
"windmill-common",
]
[[package]]
name = "windmill-sql-datatype-parser-wasm"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"wasm-bindgen",
"wasm-bindgen-test",
@@ -11370,7 +11368,7 @@ dependencies = [
[[package]]
name = "windmill-worker"
version = "1.463.6"
version = "1.462.2"
dependencies = [
"anyhow",
"async-recursion",
@@ -11427,7 +11425,7 @@ dependencies = [
"tokio-util",
"tracing",
"urlencoding",
"uuid 1.13.2",
"uuid 1.13.1",
"windmill-audit",
"windmill-common",
"windmill-git-sync",
@@ -11784,11 +11782,11 @@ dependencies = [
[[package]]
name = "zerocopy"
version = "0.8.18"
version = "0.8.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79386d31a42a4996e3336b0919ddb90f81112af416270cff95b5f5af22b839c2"
checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713"
dependencies = [
"zerocopy-derive 0.8.18",
"zerocopy-derive 0.8.17",
]
[[package]]
@@ -11804,9 +11802,9 @@ dependencies = [
[[package]]
name = "zerocopy-derive"
version = "0.8.18"
version = "0.8.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76331675d372f91bf8d17e13afbd5fe639200b73d01f0fc748bb059f9cca2db7"
checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626"
dependencies = [
"proc-macro2",
"quote",

View File

@@ -1,6 +1,6 @@
[package]
name = "windmill"
version = "1.463.6"
version = "1.462.2"
authors.workspace = true
edition.workspace = true
@@ -30,7 +30,7 @@ members = [
]
[workspace.package]
version = "1.463.6"
version = "1.462.2"
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
edition = "2021"
@@ -174,7 +174,7 @@ uuid = { version = "^1", features = ["serde", "v4"] }
thiserror = "^2"
anyhow = "^1"
chrono = { version = "0.4.35", features = ["serde"] }
chrono-tz = "^0.10.1"
chrono-tz = "^0"
tracing = "^0"
tracing-subscriber = { version = "^0", features = ["env-filter", "json"] }
tracing-appender = "^0"
@@ -187,7 +187,7 @@ hex = "^0"
sql-builder = "^3"
argon2 = "^0"
quick_cache = "^0"
rand = "=0.9.0"
rand = "^0"
rand_core = { version = "^0", features = ["std"] }
magic-crypt = "^3"
git-version = "^0"

View File

@@ -1 +1 @@
5d25cf2cd15c1953794045fd7debea14a33c7519
703a03ac430b6f603a5a189e5b4ff9a42bb2bd7f

View File

@@ -1 +0,0 @@
-- Add down migration script here

View File

@@ -1,8 +0,0 @@
-- Add up migration script here
DROP POLICY IF EXISTS see_own ON v2_job;
CREATE POLICY see_own ON v2_job
AS PERMISSIVE
FOR ALL
TO windmill_user
USING ((SPLIT_PART((permissioned_as)::TEXT, '/'::TEXT, 1) = 'u'::TEXT) AND
(SPLIT_PART((permissioned_as)::TEXT, '/'::TEXT, 2) = CURRENT_SETTING('session.user'::TEXT)));

View File

@@ -1 +0,0 @@
-- Add down migration script here

View File

@@ -1,3 +0,0 @@
-- Add up migration script here
DROP POLICY IF EXISTS admin_policy ON v2_job;
CREATE POLICY admin_policy ON v2_job FOR ALL TO windmill_admin USING (true);

View File

@@ -60,7 +60,6 @@ fn filter_non_main(code: &str, main_name: &str) -> String {
pub fn parse_python_signature(
code: &str,
override_main: Option<String>,
skip_params: bool,
) -> anyhow::Result<MainArgSignature> {
let main_name = override_main.unwrap_or("main".to_string());
@@ -79,13 +78,11 @@ pub fn parse_python_signature(
let ast = Suite::parse(&filtered_code, "main.py")
.map_err(|e| anyhow::anyhow!("Error parsing code: {}", e.to_string()))?;
let params = ast.into_iter().find_map(|x| match x {
let param = ast.into_iter().find_map(|x| match x {
Stmt::FunctionDef(StmtFunctionDef { name, args, .. }) if &name == &main_name => Some(*args),
_ => None,
});
if !skip_params && params.is_some() {
let params = params.unwrap();
if let Some(params) = param {
//println!("{:?}", params);
let def_arg_start = params.args.len() - params.defaults().count();
Ok(MainArgSignature {
@@ -152,7 +149,7 @@ pub fn parse_python_signature(
star_args: false,
star_kwargs: false,
args: vec![],
no_main_func: Some(params.is_none()),
no_main_func: Some(true),
has_preprocessor: Some(has_preprocessor),
})
}
@@ -290,7 +287,7 @@ def main(test1: str, name: datetime.datetime = datetime.now(), byte: bytes = byt
";
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -379,7 +376,7 @@ def main(test1: str,
";
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -439,7 +436,7 @@ def main(test1: str,
";
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -496,7 +493,7 @@ def main(test1: Literal["foo", "bar"], test2: List[Literal["foo", "bar"]]): retu
"#;
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -540,7 +537,7 @@ def main(test1: DynSelect_foo): return
"#;
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -571,7 +568,7 @@ def hello(): return
"#;
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -599,7 +596,7 @@ def main(): return
"#;
//println!("{}", serde_json::to_string()?);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -620,10 +617,10 @@ def main(a: list, e: List[int], b: list = [1,2,3,4], c = [1,2,3,4], d = ["a", "b
"#;
println!(
"{}",
serde_json::to_string(&parse_python_signature(code, None, false)?)?
serde_json::to_string(&parse_python_signature(code, None)?)?
);
assert_eq!(
parse_python_signature(code, None, false)?,
parse_python_signature(code, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,

View File

@@ -134,7 +134,6 @@ pub fn parse_expr_for_ids(code: &str) -> anyhow::Result<Vec<(String, String)>> {
pub fn parse_deno_signature(
code: &str,
skip_dflt: bool,
skip_params: bool,
main_override: Option<String>,
) -> anyhow::Result<MainArgSignature> {
let cm: Lrc<SourceMap> = Default::default();
@@ -180,26 +179,27 @@ pub fn parse_deno_signature(
});
let mut c: u16 = 0;
let no_main_func = params.is_none();
let r = MainArgSignature {
star_args: false,
star_kwargs: false,
args: if skip_params {
vec![]
} else {
params
.map(|x| {
x.into_iter()
.map(|x| parse_param(x, &cm, skip_dflt, &mut c))
.collect::<anyhow::Result<Vec<Arg>>>()
})
.transpose()?
.unwrap_or_else(|| vec![])
},
no_main_func: Some(no_main_func),
has_preprocessor: Some(has_preprocessor),
};
Ok(r)
if let Some(params) = params {
let r = MainArgSignature {
star_args: false,
star_kwargs: false,
args: params
.into_iter()
.map(|x| parse_param(x, &cm, skip_dflt, &mut c))
.collect::<anyhow::Result<Vec<Arg>>>()?,
no_main_func: Some(false),
has_preprocessor: Some(has_preprocessor),
};
Ok(r)
} else {
Ok(MainArgSignature {
star_args: false,
star_kwargs: false,
args: vec![],
no_main_func: Some(true),
has_preprocessor: Some(has_preprocessor),
})
}
}
fn parse_param(

View File

@@ -17,11 +17,10 @@ fn wrap_sig(r: anyhow::Result<MainArgSignature>) -> String {
#[cfg(feature = "ts-parser")]
#[wasm_bindgen]
pub fn parse_deno(code: &str, main_override: Option<String>, skip_params: Option<bool>) -> String {
pub fn parse_deno(code: &str, main_override: Option<String>) -> String {
wrap_sig(windmill_parser_ts::parse_deno_signature(
code,
false,
false,
main_override,
))
}
@@ -74,7 +73,6 @@ pub fn parse_python(code: &str, main_override: Option<String>) -> String {
wrap_sig(windmill_parser_py::parse_python_signature(
code,
main_override,
false,
))
}

View File

@@ -18,7 +18,7 @@ export function main(test1?: string, test2: string = \"burkina\",
}
";
assert_eq!(
parse_deno_signature(code, false, false, None)?,
parse_deno_signature(code, false, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -159,7 +159,7 @@ export function main(test2 = \"burkina\",
}
";
assert_eq!(
parse_deno_signature(code, false, false, None)?,
parse_deno_signature(code, false, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -236,7 +236,7 @@ export function main(foo: FooBar, {a, b}: FooBar, {c, d}: FooBar = {a: \"foo\",
}
";
assert_eq!(
parse_deno_signature(code, false, false, None)?,
parse_deno_signature(code, false, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,
@@ -282,7 +282,7 @@ export function main(foo: (\"foo\" | \"bar\")[]) {
}
";
assert_eq!(
parse_deno_signature(code, false, false, None)?,
parse_deno_signature(code, false, None)?,
MainArgSignature {
star_args: false,
star_kwargs: false,

View File

View File

@@ -21,7 +21,7 @@ use std::{
net::{IpAddr, Ipv4Addr, SocketAddr},
time::Duration,
};
use tokio::{fs::File, io::AsyncReadExt, task::JoinHandle};
use tokio::{fs::File, io::AsyncReadExt};
use uuid::Uuid;
use windmill_api::HTTP_CLIENT;
@@ -372,7 +372,6 @@ async fn windmill_main() -> anyhow::Result<()> {
let is_agent = mode == Mode::Agent;
let mut migration_handle: Option<JoinHandle<()>> = None;
#[cfg(feature = "parquet")]
let disable_s3_store = std::env::var("DISABLE_S3_STORE")
.ok()
@@ -385,7 +384,7 @@ async fn windmill_main() -> anyhow::Result<()> {
if !skip_migration {
// migration code to avoid break
migration_handle = windmill_api::migrate_db(&db).await?;
windmill_api::migrate_db(&db).await?;
} else {
tracing::info!("SKIP_MIGRATION set, skipping db migration...")
}
@@ -683,14 +682,6 @@ Windmill Community Edition {GIT_VERSION}
loop {
tokio::select! {
biased;
Some(_) = async { if let Some(jh) = migration_handle.take() {
tracing::info!("migration job finished");
Some(jh.await)
} else {
None
}} => {
continue;
},
_ = monitor_killpill_rx.recv() => {
tracing::info!("received killpill for monitor job");
break;

View File

@@ -68,7 +68,7 @@ fi
if [ "$REVERT" == "YES" ]; then
for ee_file in $(find ${EE_CODE_DIR} -name "*ee.rs"); do
ce_file="${ee_file/${EE_CODE_DIR}/}"
ce_file="${ee_file/${EE_CODE_DIR}/.}"
ce_file="${root_dirpath}/backend/${ce_file}"
if [ "$REVERT_PREVIOUS" == "YES" ]; then
git checkout HEAD@{3} ${ce_file} || true
@@ -80,7 +80,7 @@ if [ "$REVERT" == "YES" ]; then
else
# This replaces all files in current repo with alternative EE files in windmill-ee-private
for ee_file in $(find "${EE_CODE_DIR}" -name "*ee.rs"); do
ce_file="${ee_file/${EE_CODE_DIR}/}"
ce_file="${ee_file/${EE_CODE_DIR}/.}"
ce_file="${root_dirpath}/backend/${ce_file}"
if [[ -f "${ce_file}" ]]; then
rm "${ce_file}"

View File

@@ -36,7 +36,6 @@ windmill-common = { workspace = true, default-features = false }
windmill-audit.workspace = true
windmill-parser.workspace = true
windmill-parser-ts.workspace = true
windmill-parser-py.workspace = true
windmill-git-sync.workspace = true
windmill-indexer = { workspace = true, optional = true }
tokio.workspace = true

View File

@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.463.6
version: 1.462.2
title: Windmill API
contact:

View File

@@ -15,7 +15,6 @@ use sqlx::{
Executor, PgConnection, Pool, Postgres,
};
use tokio::task::JoinHandle;
use windmill_audit::audit_ee::{AuditAuthor, AuditAuthorable};
use windmill_common::{
db::{Authable, Authed},
@@ -171,7 +170,7 @@ impl Migrate for CustomMigrator {
}
}
pub async fn migrate(db: &DB) -> Result<Option<JoinHandle<()>>, Error> {
pub async fn migrate(db: &DB) -> Result<(), Error> {
let migrator = db.acquire().await?;
let mut custom_migrator = CustomMigrator { inner: migrator };
@@ -226,10 +225,9 @@ pub async fn migrate(db: &DB) -> Result<Option<JoinHandle<()>>, Error> {
}
});
let mut jh = None;
if !has_done_migration(db, "v2_finalize_job_completed").await {
if !has_done_migration(db, "v2_finalize_disable_sync_III").await {
let db2 = db.clone();
let v2jh = tokio::task::spawn(async move {
let _ = tokio::task::spawn(async move {
loop {
if !*MIN_VERSION_IS_AT_LEAST_1_461.read().await {
tracing::info!("Waiting for all workers to be at least version 1.461 before applying v2 finalize migration, sleeping for 5s...");
@@ -247,10 +245,9 @@ pub async fn migrate(db: &DB) -> Result<Option<JoinHandle<()>>, Error> {
break;
}
});
jh = Some(v2jh)
}
Ok(jh)
Ok(())
}
async fn fix_flow_versioning_migration(
@@ -376,91 +373,29 @@ async fn v2_finalize(db: &DB) -> Result<(), Error> {
run_windmill_migration!("v2_finalize_disable_sync_III", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_queue IN ACCESS EXCLUSIVE MODE;
ALTER TABLE v2_job_queue DISABLE ROW LEVEL SECURITY;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_disable_sync_III_2", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_completed IN ACCESS EXCLUSIVE MODE;
ALTER TABLE v2_job_completed DISABLE ROW LEVEL SECURITY;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_disable_sync_III_3", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job IN ACCESS EXCLUSIVE MODE;
DROP FUNCTION IF EXISTS v2_job_after_update CASCADE;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_disable_sync_III_4", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_completed IN ACCESS EXCLUSIVE MODE;
DROP FUNCTION IF EXISTS v2_job_completed_before_insert CASCADE;
DROP FUNCTION IF EXISTS v2_job_completed_before_update CASCADE;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_disable_sync_III_5", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_queue IN ACCESS EXCLUSIVE MODE;
DROP FUNCTION IF EXISTS v2_job_completed_before_update CASCADE;
DROP FUNCTION IF EXISTS v2_job_queue_after_insert CASCADE;
DROP FUNCTION IF EXISTS v2_job_queue_before_insert CASCADE;
DROP FUNCTION IF EXISTS v2_job_queue_before_update CASCADE;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_disable_sync_III_6", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_runtime IN ACCESS EXCLUSIVE MODE;
DROP FUNCTION IF EXISTS v2_job_queue_before_update CASCADE;
DROP FUNCTION IF EXISTS v2_job_runtime_before_insert CASCADE;
DROP FUNCTION IF EXISTS v2_job_runtime_before_update CASCADE;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_disable_sync_III_7", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_status IN ACCESS EXCLUSIVE MODE;
DROP FUNCTION IF EXISTS v2_job_runtime_before_update CASCADE;
DROP FUNCTION IF EXISTS v2_job_status_before_insert CASCADE;
DROP FUNCTION IF EXISTS v2_job_status_before_update CASCADE;
"#,
)
.await?;
});
DROP FUNCTION IF EXISTS v2_job_status_before_update CASCADE;
run_windmill_migration!("v2_finalize_disable_sync_III_8", db, |tx| {
tx.execute(
r#"
DROP VIEW IF EXISTS completed_job, completed_job_view, job, queue, queue_view CASCADE;
"#,
)
.await?;
});
run_windmill_migration!("v2_finalize_job_queue", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_queue IN ACCESS EXCLUSIVE MODE;
ALTER TABLE v2_job_queue
DROP COLUMN IF EXISTS __parent_job CASCADE,
DROP COLUMN IF EXISTS __created_by CASCADE,
@@ -499,7 +434,6 @@ async fn v2_finalize(db: &DB) -> Result<(), Error> {
run_windmill_migration!("v2_finalize_job_completed", db, |tx| {
tx.execute(
r#"
LOCK TABLE v2_job_completed IN ACCESS EXCLUSIVE MODE;
ALTER TABLE v2_job_completed
DROP COLUMN IF EXISTS __parent_job CASCADE,
DROP COLUMN IF EXISTS __created_by CASCADE,
@@ -611,8 +545,8 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> {
.await?;
});
run_windmill_migration!("fix_job_index_1_II", &db, |tx| {
let migration_job_name = "fix_job_index_1_II";
run_windmill_migration!("fix_job_index_1", &db, |tx| {
let migration_job_name = "fix_job_completed_index_4";
let mut i = 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("create index concurrently if not exists ix_job_workspace_id_created_at_new_3 ON v2_job (workspace_id, created_at DESC)")
@@ -639,26 +573,31 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> {
i += 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("create index concurrently if not exists ix_job_workspace_id_created_at_new_6 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL")
.execute(db)
.await?;
i += 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("create index concurrently if not exists ix_job_workspace_id_created_at_new_7 ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow') AND parent_job IS NULL")
.execute(db)
.await?;
i += 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("create index concurrently if not exists ix_completed_job_workspace_id_started_at_new_2 ON v2_job_completed (workspace_id, started_at DESC)")
.execute(db)
.await?;
i += 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("create index concurrently if not exists ix_job_root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL")
sqlx::query!("create index concurrently if not exists root_job_index_by_path_2 ON v2_job (workspace_id, runnable_path, created_at desc) WHERE parent_job IS NULL")
.execute(db)
.await?;
i += 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2")
.execute(db)
.await?;
i += 1;
tracing::info!("step {i} of {migration_job_name} migration");
sqlx::query!("create index concurrently if not exists ix_job_created_at ON v2_job (created_at DESC)")
.execute(db)
.await?;
@@ -714,37 +653,6 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> {
.await?;
});
run_windmill_migration!("v2_improve_v2_job_indices_ii", &db, |tx| {
sqlx::query!("create index concurrently if not exists ix_v2_job_workspace_id_created_at ON v2_job (workspace_id, created_at DESC) where kind in ('script', 'flow', 'singlescriptflow') AND parent_job IS NULL")
.execute(db)
.await?;
sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_6")
.execute(db)
.await?;
sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS ix_job_workspace_id_created_at_new_7")
.execute(db)
.await?;
});
run_windmill_migration!("v2_improve_v2_queued_jobs_indices", &db, |tx| {
sqlx::query!("CREATE INDEX CONCURRENTLY queue_sort_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for, tag) WHERE running = false")
.execute(db)
.await?;
// sqlx::query!("CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (tag, priority DESC NULLS LAST, scheduled_for) WHERE running = false")
// .execute(db)
// .await?;
sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS queue_sort")
.execute(db)
.await?;
sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS queue_sort_2")
.execute(db)
.await?;
});
Ok(())
}

View File

@@ -538,7 +538,7 @@ async fn get_http_route_trigger(
let route_path = trigger.route_path.clone();
if trigger.is_static_website {
router
.insert(format!("/{}/*wm_subpath", route_path), idx)
.insert(format!("{}/*wm_subpath", route_path), idx)
.unwrap_or_else(|e| {
tracing::warn!(
"Failed to consider http trigger route {}: {:?}",
@@ -547,22 +547,19 @@ async fn get_http_route_trigger(
);
});
}
router
.insert(format!("/{}", route_path), idx)
.unwrap_or_else(|e| {
tracing::warn!(
"Failed to consider http trigger route {}: {:?}",
route_path,
e,
);
});
router.insert(route_path.as_str(), idx).unwrap_or_else(|e| {
tracing::warn!(
"Failed to consider http trigger route {}: {:?}",
route_path,
e,
);
});
}
let requested_path = format!("/{}", route_path.0);
let trigger_idx = router.at(requested_path.as_str()).ok();
let trigger_idx = router.at(route_path.0.as_str()).ok();
let matchit::Match { value: trigger_idx, params } =
not_found_if_none(trigger_idx, "Trigger", requested_path.as_str())?;
not_found_if_none(trigger_idx, "Trigger", route_path.0.as_str())?;
let trigger = triggers.remove(trigger_idx.to_owned());

View File

@@ -1161,7 +1161,7 @@ pub struct ListableCompletedJob {
pub parent_job: Option<Uuid>,
pub created_by: String,
pub created_at: chrono::DateTime<chrono::Utc>,
pub started_at: Option<chrono::DateTime<chrono::Utc>>,
pub started_at: chrono::DateTime<chrono::Utc>,
pub duration_ms: i64,
pub success: bool,
#[serde(skip_serializing_if = "Option::is_none")]
@@ -1319,7 +1319,7 @@ pub fn filter_list_queue_query(
}
if let Some(p) = &lq.schedule_path {
sqlb.and_where_eq("trigger", "?".bind(p));
sqlb.and_where_eq("trigger_kind", "'schedule'");
sqlb.and_where_eq("trigger_kind", "schedule");
}
if let Some(h) = &lq.script_hash {
sqlb.and_where_eq("runnable_id", "?".bind(h));
@@ -1647,7 +1647,6 @@ struct QueueStats {
#[derive(Deserialize)]
pub struct CountQueueJobsQuery {
all_workspaces: Option<bool>,
tags: Option<String>,
}
async fn count_queue_jobs(
@@ -1655,16 +1654,12 @@ async fn count_queue_jobs(
Path(w_id): Path<String>,
Query(cq): Query<CountQueueJobsQuery>,
) -> error::JsonResult<QueueStats> {
let tags = cq
.tags
.map(|t| t.split(',').map(|s| s.to_string()).collect::<Vec<_>>());
Ok(Json(
sqlx::query_as!(
QueueStats,
"SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now() AND ($3::text[] IS NULL OR tag = ANY($3))",
"SELECT coalesce(COUNT(*) FILTER(WHERE suspend = 0 AND running = false), 0) as \"database_length!\", coalesce(COUNT(*) FILTER(WHERE suspend > 0), 0) as \"suspended!\" FROM v2_as_queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now()",
w_id,
w_id == "admins" && cq.all_workspaces.unwrap_or(false),
tags.as_ref().map(|v| v.as_slice())
)
.fetch_one(&db)
.await?,
@@ -1805,13 +1800,13 @@ async fn list_jobs(
}
sqlc.unwrap().limit(per_page).offset(offset).query()?
};
let mut tx: Transaction<'_, Postgres> = user_db.begin(&authed).await?;
let mut tx = user_db.begin(&authed).await?;
#[cfg(feature = "prometheus")]
let start = Instant::now();
#[cfg(feature = "prometheus")]
if _api_list_jobs_query_duration.is_some() || true {
if _api_list_jobs_query_duration.is_some() {
tracing::info!("list_jobs query: {}", sql);
}
@@ -2686,7 +2681,7 @@ const CJ_FIELDS: &[&str] = &[
"v2_job.runnable_path as script_path",
"null as args",
"v2_job_completed.duration_ms",
"v2_job_completed.status = 'success' OR v2_job_completed.status = 'skipped' as success",
"v2_job_completed.status = 'success' as success",
"false as deleted",
"v2_job_completed.status = 'canceled' as canceled",
"v2_job_completed.canceled_by",
@@ -4700,7 +4695,6 @@ struct BatchInfo {
flow_value: Option<FlowValue>,
path: Option<String>,
rawscript: Option<BatchRawScript>,
tag: Option<String>,
}
#[tracing::instrument(level = "trace", skip_all)]
@@ -4869,8 +4863,6 @@ async fn add_batch_jobs(
} else {
format!("{}", language.as_str())
}
} else if let Some(tag) = batch_info.tag {
tag
} else {
format!("{}", language.as_str())
};
@@ -5480,7 +5472,7 @@ async fn list_completed_jobs(
"v2_job.created_at",
"v2_job_completed.started_at",
"v2_job_completed.duration_ms",
"v2_job_completed.status = 'success' OR v2_job_completed.status = 'skipped' as success",
"v2_job_completed.status = 'success' as success",
"v2_job.runnable_id as script_hash",
"v2_job.runnable_path as script_path",
"false as deleted",

View File

@@ -34,7 +34,6 @@ use http::HeaderValue;
use reqwest::Client;
#[cfg(feature = "oauth2")]
use std::collections::HashMap;
use tokio::task::JoinHandle;
use windmill_common::global_settings::load_value_from_global_settings;
use windmill_common::global_settings::EMAIL_DOMAIN_SETTING;
use windmill_common::worker::HUB_CACHE_DIR;
@@ -642,8 +641,7 @@ async fn openapi_json() -> &'static str {
include_str!("../openapi-deref.json")
}
pub async fn migrate_db(db: &DB) -> anyhow::Result<Option<JoinHandle<()>>> {
db::migrate(db)
.await
.map_err(|e| anyhow::anyhow!("Error migrating db: {e:#}"))
pub async fn migrate_db(db: &DB) -> anyhow::Result<()> {
db::migrate(db).await?;
Ok(())
}

View File

@@ -625,19 +625,6 @@ async fn create_script_internal<'c>(
} else {
ns.language.clone()
};
let (no_main_func, has_preprocessor) = match lang {
ScriptLang::Bun | ScriptLang::Bunnative | ScriptLang::Deno | ScriptLang::Nativets => {
let args = windmill_parser_ts::parse_deno_signature(&ns.content, true, true, None)?;
(args.no_main_func, args.has_preprocessor)
}
ScriptLang::Python3 => {
let args = windmill_parser_py::parse_python_signature(&ns.content, None, true)?;
(args.no_main_func, args.has_preprocessor)
}
_ => (ns.no_main_func, ns.has_preprocessor),
};
sqlx::query!(
"INSERT INTO script (workspace_id, hash, path, parent_hashes, summary, description, \
content, created_by, schema, is_template, extra_perms, lock, language, kind, tag, \
@@ -673,9 +660,9 @@ async fn create_script_internal<'c>(
ns.timeout,
ns.concurrency_key,
ns.visible_to_runner_only,
no_main_func.filter(|x| *x), // should be Some(true) or None
ns.no_main_func,
codebase,
has_preprocessor.filter(|x| *x), // should be Some(true) or None
ns.has_preprocessor,
if ns.on_behalf_of_email.is_some() {
Some(&authed.email)
} else {

View File

@@ -47,11 +47,8 @@ lazy_static::lazy_static! {
.connect_timeout(std::time::Duration::from_secs(10))
.build().unwrap();
pub static ref GIT_SEM_VERSION: Version = Version::parse(
if GIT_VERSION.starts_with('v') {
&GIT_VERSION[1..]
} else {
GIT_VERSION
}
// skip first `v` character.
GIT_VERSION.split_at(1).1
).unwrap_or(Version::new(0, 1, 0));
}

View File

@@ -657,7 +657,7 @@ pub async fn update_min_version<'c, E: sqlx::Executor<'c, Database = sqlx::Postg
let min_version = pings
.iter()
.filter(|x| !x.is_empty())
.filter_map(|x| semver::Version::parse(if x.starts_with('v') { &x[1..] } else { x }).ok())
.filter_map(|x| semver::Version::parse(x.split_at(1).1).ok())
.min()
.unwrap_or_else(|| cur_version.clone());

View File

@@ -566,9 +566,6 @@ pub async fn add_completed_job<T: Serialize + Send + Sync + ValidableJson>(
let result_columns = result_columns.as_ref();
let _job_id = queued_job.id;
let (opt_uuid, _duration, _skip_downstream_error_handlers) = (|| async {
// let start = std::time::Instant::now();
let mut tx = db.begin().await?;
let job_id = queued_job.id;
@@ -666,7 +663,7 @@ pub async fn add_completed_job<T: Serialize + Send + Sync + ValidableJson>(
// tracing::error!("Added completed job {:#?}", queued_job);
let mut _skip_downstream_error_handlers = false;
tx = delete_job(tx, &job_id).await?;
tx = delete_job(tx, &queued_job.workspace_id, job_id).await?;
// tracing::error!("3 {:?}", start.elapsed());
if queued_job.is_flow_step {
@@ -861,7 +858,6 @@ pub async fn add_completed_job<T: Serialize + Send + Sync + ValidableJson>(
"inserted completed job: {} (success: {success})",
queued_job.id
);
// tracing::info!("completed job: {:?}", start.elapsed().as_micros());
Ok((None, _duration, _skip_downstream_error_handlers)) as windmill_common::error::Result<(Option<Uuid>, i64, bool)>
})
.retry(
@@ -2112,15 +2108,12 @@ async fn pull_single_job_and_mark_as_running_no_concurrency_limit<'c>(
for query in queries.iter() {
// tracing::info!("Pulling job with query: {}", query);
// let instant = std::time::Instant::now();
let r = sqlx::query_as::<_, PulledJob>(query)
.bind(worker_name)
.fetch_optional(db)
.await?;
if let Some(pulled_job) = r {
// tracing::info!("pulled job: {:?}", instant.elapsed().as_micros());
highest_priority_job = Some(pulled_job);
break;
}
@@ -2601,17 +2594,21 @@ async fn extract_result_from_job_result(
pub async fn delete_job<'c>(
mut tx: Transaction<'c, Postgres>,
job_id: &Uuid,
w_id: &str,
job_id: Uuid,
) -> windmill_common::error::Result<Transaction<'c, Postgres>> {
#[cfg(feature = "prometheus")]
if METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed) {
QUEUE_DELETE_COUNT.inc();
}
let job_removed =
sqlx::query_scalar!("DELETE FROM v2_job_queue WHERE id = $1 RETURNING 1", job_id,)
.fetch_optional(&mut *tx)
.await;
let job_removed = sqlx::query_scalar!(
"DELETE FROM v2_job_queue WHERE workspace_id = $1 AND id = $2 RETURNING 1",
w_id,
job_id
)
.fetch_optional(&mut *tx)
.await;
if let Err(job_removed) = job_removed {
tracing::error!(

View File

@@ -21,24 +21,10 @@ mount {
is_bind: true
}
mount {
src: "/proc/self/fd"
dst: "/dev/fd"
is_symlink: true
mandatory: false
}
mount {
src: "/bin"
dst: "/bin"
is_bind: true
}
mount {
src: "/opt/microsoft"
dst: "/opt/microsoft"
is_bind: true
mandatory: false
}
mount {

View File

@@ -21,13 +21,6 @@ mount {
is_bind: true
}
mount {
src: "/proc/self/fd"
dst: "/dev/fd"
is_symlink: true
mandatory: false
}
mount {
src: "/opt/microsoft"
dst: "/opt/microsoft"

View File

@@ -97,7 +97,7 @@ cleanup() {{
trap '' SIGTERM SIGINT
# Kill the process group of the script (negative PID value)
pkill -P $$ 2>/dev/null || true
pkill -P $$
exit
}}
@@ -105,9 +105,14 @@ cleanup() {{
# Trap SIGTERM (or other signals) and call cleanup function
trap cleanup SIGTERM SIGINT
# Create a named pipe
mkfifo bp
# Start background processes
cat bp | tail -1 >> ./result2.out &
# Run main.sh in the same process group
{bash} ./main.sh "$@" 2>&1 | tee >(tail -1 >> ./result2.out) &
{bash} ./main.sh "$@" 2>&1 | tee bp &
pid=$!
@@ -116,6 +121,7 @@ wait $pid
exit_status=$?
# Clean up the named pipe and background processes
rm -f bp
pkill -P $$ || true
# Exit with the captured status
@@ -618,7 +624,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"",
write_file(
job_dir,
"wrapper.sh",
&format!("set -o pipefail\nset -e\n{} -F ./main.ps1 \"$@\" 2>&1 | tee >(tail -1 >> ./result2.out) &\nwait $!", POWERSHELL_PATH.as_str()),
&format!("set -o pipefail\nset -e\nmkfifo bp\ncat bp | tail -1 > ./result2.out &\n{} -F ./main.ps1 \"$@\" 2>&1 | tee bp\nwait $!", POWERSHELL_PATH.as_str()),
)?;
#[cfg(windows)]

View File

@@ -951,7 +951,6 @@ pub async fn handle_bun_job(
let args = windmill_parser_ts::parse_deno_signature(
inner_content,
true,
false,
main_override.map(ToString::to_string),
)?
.args;
@@ -961,7 +960,6 @@ pub async fn handle_bun_job(
windmill_parser_ts::parse_deno_signature(
inner_content,
true,
false,
Some("preprocessor".to_string()),
)?
.args,
@@ -1575,7 +1573,7 @@ pub async fn start_worker(
{
// let mut start = Instant::now();
let args = windmill_parser_ts::parse_deno_signature(inner_content, true, false, None)?.args;
let args = windmill_parser_ts::parse_deno_signature(inner_content, true, None)?.args;
let dates = args
.iter()
.filter_map(|x| {

View File

@@ -205,7 +205,6 @@ pub async fn handle_deno_job(
let args = windmill_parser_ts::parse_deno_signature(
inner_content,
true,
false,
main_override.map(ToString::to_string),
)?
.args;
@@ -215,7 +214,6 @@ pub async fn handle_deno_job(
windmill_parser_ts::parse_deno_signature(
inner_content,
true,
false,
Some("preprocessor".to_string()),
)?
.args,
@@ -535,7 +533,7 @@ pub async fn start_worker(
{
// let mut start = Instant::now();
let args = windmill_parser_ts::parse_deno_signature(inner_content, true, false, None)?.args;
let args = windmill_parser_ts::parse_deno_signature(inner_content, true, None)?.args;
let dates = args
.iter()
.filter_map(|x| {

View File

@@ -775,7 +775,7 @@ pub async fn eval_fetch_timeout(
let (sender, mut receiver) = oneshot::channel::<IsolateHandle>();
let parsed_args = windmill_parser_ts::parse_deno_signature(&ts_expr, true, false, None)?.args;
let parsed_args = windmill_parser_ts::parse_deno_signature(&ts_expr, true, None)?.args;
let spread = parsed_args
.into_iter()
.map(|x| {

View File

@@ -1296,14 +1296,12 @@ async fn prepare_wrapper(
let sig = windmill_parser_py::parse_python_signature(
inner_content,
main_override.map(ToString::to_string),
false,
)?;
let pre_sig = if apply_preprocessor {
Some(windmill_parser_py::parse_python_signature(
inner_content,
Some("preprocessor".to_string()),
false,
)?)
} else {
None
@@ -1663,7 +1661,7 @@ async fn spawn_uv_install(
.replace("{TARGET_DIR}", &venv_p)
.replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string()),
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd
.current_dir(job_dir)

View File

@@ -1277,7 +1277,7 @@ pub async fn run_worker(
tokio::task::spawn(
(async move {
tracing::info!(worker = %worker_name, hostname = %hostname, "vacuuming queue");
if let Err(e) = sqlx::query!("VACUUM v2_job_queue, v2_job_runtime, v2_job_status")
if let Err(e) = sqlx::query!("VACUUM (skip_locked) v2_job_queue, v2_job_runtime, v2_job_status")
.execute(&db2)
.await
{

View File

@@ -26,7 +26,7 @@ async function verifyOutputs(uuids: string[], workspace: string) {
incorrectResults++;
}
if (job.result !== uuid) {
console.log(`Job ${uuid} did not output the correct value: ${JSON.stringify(job)}`);
console.log(`Job ${uuid} did not output the correct value`);
incorrectResults++;
}
} catch (_) {
@@ -37,7 +37,6 @@ async function verifyOutputs(uuids: string[], workspace: string) {
console.log(`Incorrect results: ${incorrectResults}`);
}
export const NON_TEST_TAGS = ["deno", "python", "go", "bash", "dedicated", "bun", "nativets", "flow"]
export async function main({
host,
email,
@@ -97,11 +96,11 @@ export async function main({
windmill.setClient(final_token, host);
const enc = (s: string) => new TextEncoder().encode(s);
async function getQueueCount(tags?: string[]) {
async function getQueueCount() {
return (
await (
await fetch(
config.server + "/api/w/" + config.workspace_id + "/jobs/queue/count" + (tags && tags.length > 0 ? "?tags=" + tags.join(",") : ""),
config.server + "/api/w/" + config.workspace_id + "/jobs/queue/count",
{ headers: { ["Authorization"]: "Bearer " + config.token } }
)
).json()
@@ -133,11 +132,11 @@ export async function main({
}
let pastJobs = 0;
async function getCompletedJobsCount(tags?: string[]): Promise<number> {
async function getCompletedJobsCount(): Promise<number> {
const completedJobs = (
await (
await fetch(
host + "/api/w/" + config.workspace_id + "/jobs/completed/count" + (tags && tags.length > 0 ? "?tags=" + tags.join(",") : ""),
host + "/api/w/" + config.workspace_id + "/jobs/completed/count",
{ headers: { ["Authorization"]: "Bearer " + config.token } }
)
).json()
@@ -153,6 +152,7 @@ export async function main({
await createBenchScript(kind, workspace);
}
pastJobs = await getCompletedJobsCount();
const jobsSent = jobs;
console.log(`Bulk creating ${jobsSent} jobs`);
@@ -201,51 +201,18 @@ export async function main({
kind: "rawscript",
rawscript: {
language: api.RawScript.language.BASH,
content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(100) + "echo \"$WM_FLOW_JOB_ID\"\n",
content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(25000) + "echo \"$WM_FLOW_JOB_ID\"\n",
},
});
} else {
throw new Error("Unknown script pattern " + kind);
}
let testOtherTag = false;
if (testOtherTag) {
const otherTagTodo = 2000000;
let parsed = JSON.parse(body);
parsed.tag = "test";
let nbody = JSON.stringify(parsed);
let response2 = await fetch(
config.server +
"/api/w/" +
config.workspace_id +
`/jobs/add_batch_jobs/${otherTagTodo}`,
{
method: "POST",
headers: {
["Authorization"]: "Bearer " + config.token,
"Content-Type": "application/json",
},
body: nbody,
}
);
if (!response2.ok) {
throw new Error(
"Failed to create jobs: " +
response2.statusText +
" " +
(await response2.text())
);
}
}
pastJobs = await getCompletedJobsCount(NON_TEST_TAGS);
const response = await fetch(
config.server +
"/api/w/" +
config.workspace_id +
`/jobs/add_batch_jobs/${jobsSent}`,
"/api/w/" +
config.workspace_id +
`/jobs/add_batch_jobs/${jobsSent}`,
{
method: "POST",
headers: {
@@ -255,24 +222,20 @@ export async function main({
body,
}
);
if (!response.ok) {
throw new Error(
"Failed to create jobs: " +
response.statusText +
" " +
(await response.text())
response.statusText +
" " +
(await response.text())
);
}
const uuids = await response.json();
const end_create = Date.now();
const create_duration = end_create - start_create;
console.log(
`Jobs successfully added to the queue in ${create_duration / 1000
`Jobs successfully added to the queue in ${
create_duration / 1000
}s. Windmill will start pulling them\n`
);
let start = Date.now();
@@ -285,14 +248,14 @@ export async function main({
while (completedJobs < jobsSent) {
const loopStart = Date.now();
if (!didStart) {
const actual_queue = await getQueueCount(NON_TEST_TAGS);
const actual_queue = await getQueueCount();
if (actual_queue < jobsSent) {
start = Date.now();
didStart = true;
}
} else {
const elapsed = start ? Date.now() - start : 0;
completedJobs = await getCompletedJobsCount(NON_TEST_TAGS);
completedJobs = await getCompletedJobsCount();
if (nStepsFlow > 0) {
completedJobs = Math.floor(completedJobs / (nStepsFlow + 1));
}
@@ -300,9 +263,9 @@ export async function main({
const instThr =
lastElapsed > 0
? (
((completedJobs - lastCompletedJobs) / (elapsed - lastElapsed)) *
1000
).toFixed(2)
((completedJobs - lastCompletedJobs) / (elapsed - lastElapsed)) *
1000
).toFixed(2)
: 0;
lastElapsed = elapsed;
@@ -312,7 +275,8 @@ export async function main({
enc(
`elapsed: ${(elapsed / 1000).toFixed(
2
)} | jobs executed: ${completedJobs}/${jobsSent} (thr: inst ${instThr} - avg ${avgThr}) | remaining: ${jobsSent - completedJobs
)} | jobs executed: ${completedJobs}/${jobsSent} (thr: inst ${instThr} - avg ${avgThr}) | remaining: ${
jobsSent - completedJobs
} \r`
)
);
@@ -330,7 +294,7 @@ export async function main({
console.log(`avg. throughput (jobs/time): ${jobsSent / total_duration_sec}`);
console.log("completed jobs", completedJobs);
console.log("queue length:", await getQueueCount(NON_TEST_TAGS));
console.log("queue length:", await getQueueCount());
if (
!noVerify &&

View File

@@ -39,7 +39,6 @@ async function main({
workspace,
configPath,
workers,
factor
}: {
host: string;
email?: string;
@@ -48,7 +47,6 @@ async function main({
workspace: string;
configPath: string;
workers: number;
factor?: number;
}) {
async function getConfig(configPath: string): Promise<Config> {
if (configPath.startsWith("http")) {
@@ -79,7 +77,7 @@ async function main({
token,
workspace,
kind: benchmark.kind,
jobs: benchmark.jobs * (factor ?? 1),
jobs: benchmark.jobs,
});
if (benchmark.noSave) {
@@ -155,9 +153,6 @@ await new Command()
"Number of workers that are used to run the benchmarks (only affect graph title)",
{ default: 1 }
)
.option("--factor <factor:number>", "Factor to multiply the number of jobs by.", {
default: 1,
})
.action(main)
.command(
"upgrade",

View File

@@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts";
import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts";
import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts";
export const VERSION = "v1.463.6";
export const VERSION = "v1.462.2";
export async function login(email: string, password: string): Promise<string> {
return await windmill.UserService.login({
@@ -25,7 +25,7 @@ async function waitForDeployment(workspace: string, hash: string) {
if (resp.lock !== null) {
return;
}
} catch (err) { }
} catch (err) {}
await sleep(0.5);
}
throw new Error("Script did not deploy in time");
@@ -246,7 +246,7 @@ export const getFlowPayload = (flowPattern: string): api.FlowPreview => {
input_transforms: {},
language: api.RawScript.language.BASH,
type: "rawscript",
content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(100) + `if [[ -z $\{WM_FLOW_JOB_ID+x\} ]]; then\necho "not set"\nelif [[ -z "$WM_FLOW_JOB_ID" ]]; then\necho "empty"\nelse\necho "$WM_FLOW_JOB_ID"\nfi`,
content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(25000) + "echo \"$WM_FLOW_JOB_ID\"\n",
},
}
],

View File

@@ -62,7 +62,7 @@ export {
// }
// });
export const VERSION = "1.463.6";
export const VERSION = "1.462.2";
const command = new Command()
.name("wmill")

View File

@@ -313,16 +313,10 @@ export async function updateScriptSchema(
path
);
metadataContent.schema = result.schema;
if (result.has_preprocessor) {
if (result.has_preprocessor == true)
metadataContent.has_preprocessor = result.has_preprocessor;
} else {
delete metadataContent.has_preprocessor;
}
if (result.no_main_func) {
if (result.no_main_func === true)
metadataContent.no_main_func = result.no_main_func;
} else {
delete metadataContent.no_main_func;
}
}
async function updateScriptLock(
@@ -447,11 +441,7 @@ export function inferSchema(
content: string,
currentSchema: any,
path: string
): {
schema: any;
has_preprocessor: boolean | undefined;
no_main_func: boolean | undefined;
} {
) {
let inferedSchema: any;
if (language === "python3") {
inferedSchema = JSON.parse(parse_python(content));

View File

@@ -1,12 +1,5 @@
version: "3.7"
x-logging: &default-logging
driver: "json-file"
options:
max-size: "${LOG_MAX_SIZE:-20m}"
max-file: "${LOG_MAX_FILE:-10}"
compress: "true"
services:
db:
deploy:
@@ -29,7 +22,6 @@ services:
interval: 10s
timeout: 5s
retries: 5
logging: *default-logging
windmill_server:
image: ${WM_IMAGE}
@@ -48,7 +40,6 @@ services:
condition: service_healthy
volumes:
- worker_logs:/tmp/windmill/logs
logging: *default-logging
windmill_worker:
image: ${WM_IMAGE}
@@ -74,7 +65,6 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- worker_dependency_cache:/tmp/windmill/cache
- worker_logs:/tmp/windmill/logs
logging: *default-logging
## This worker is specialized for "native" jobs. Native jobs run in-process and thus are much more lightweight than other jobs
windmill_worker_native:
@@ -100,7 +90,6 @@ services:
condition: service_healthy
volumes:
- worker_logs:/tmp/windmill/logs
logging: *default-logging
# This worker is specialized for reports or scraping jobs. It is assigned the "reports" worker group which has an init script that installs chromium and can be targeted by using the "chromium" worker tag.
# windmill_worker_reports:
# image: ${WM_IMAGE}
@@ -146,7 +135,6 @@ services:
volumes:
- windmill_index:/tmp/windmill/search
- worker_logs:/tmp/windmill/logs
logging: *default-logging
lsp:
image: ghcr.io/windmill-labs/windmill-lsp:latest
@@ -156,7 +144,6 @@ services:
- 3001
volumes:
- lsp_cache:/pyls/.cache
logging: *default-logging
multiplayer:
image: ghcr.io/windmill-labs/windmill-multiplayer:latest
@@ -165,7 +152,6 @@ services:
restart: unless-stopped
expose:
- 3002
logging: *default-logging
caddy:
image: ghcr.io/windmill-labs/caddy-l4:latest
@@ -184,7 +170,6 @@ services:
- BASE_URL=":80"
# - BASE_URL=":443" # uncomment and comment line above to enable HTTPS via custom certificate and key files
# - BASE_URL=mydomain.com # Uncomment and comment line above to enable HTTPS handling by Caddy
logging: *default-logging
volumes:
db_data: null

View File

@@ -1,12 +1,12 @@
{
"name": "windmill-components",
"version": "1.463.6",
"version": "1.462.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "windmill-components",
"version": "1.463.6",
"version": "1.462.2",
"license": "AGPL-3.0",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.1",

View File

@@ -1,6 +1,6 @@
{
"name": "windmill-components",
"version": "1.463.6",
"version": "1.462.2",
"scripts": {
"dev": "vite dev",
"build": "vite build",

View File

@@ -35,7 +35,7 @@
isFetching = false
}
$: workspaceStore && platform && $enterpriseLicense && loadTeams()
$: workspaceStore && platform && $enterpriseLicense === 'teams' && loadTeams()
async function connectTeams() {
const selectedTeam = teams.find((team) => team.team_id === selected_teams_team)

View File

@@ -29,21 +29,17 @@
$: jobId != lastJobId && diffJobId()
let iteration = 0
let logOffset = 0
async function diffJobId() {
if (jobId != lastJobId) {
lastJobId = jobId
logs = undefined
logOffset = 0
iteration = 0
getLogs()
}
}
let logOffset = 0
async function getLogs() {
iteration += 1
if (jobId) {
const getUpdate = await JobService.getJobUpdates({
workspace: workspaceId ?? $workspaceStore!,
@@ -55,14 +51,11 @@
logOffset = getUpdate.log_offset ?? 0
}
if (refreshLog) {
setTimeout(
() => {
if (refreshLog) {
getLogs()
}
},
iteration < 10 ? 1000 : iteration < 20 ? 2000 : 5000
)
setTimeout(() => {
if (refreshLog) {
getLogs()
}
}, 1000)
}
}
</script>
@@ -76,7 +69,7 @@
class:border={!noBorder}
class="grid {!col
? 'grid-cols-2'
: 'grid-rows-2 max-h-screen'} shadow border border-tertiary-inverse grow overflow-hidden"
: 'grid-rows-2'} shadow border border-tertiary-inverse grow overflow-hidden"
>
<div class="bg-surface {col ? '' : 'max-h-80'} p-1 overflow-auto relative">
<span class="text-tertiary">Result</span>

View File

@@ -88,7 +88,7 @@
flowJobIds?.flowJobs?.map((x, id) => `iter #${id + 1} not loaded by frontend yet`) ?? []
let retry_selected = ''
let timeout: NodeJS.Timeout | undefined = undefined
let timeout: NodeJS.Timeout
let localModuleStates: Writable<Record<string, GraphModuleState>> = writable({})
let localDurationStatuses: Writable<Record<string, DurationStatus>> = writable({})
@@ -403,7 +403,7 @@
}
}
$: isForloopSelected && globalModuleStates && debounceLoadJobInProgress()
$: isForloopSelected && globalModuleStates && loadJobInProgress()
async function getNewJob(jobId: string, initialJob: Job | undefined) {
if (
@@ -421,33 +421,10 @@
}
}
let debounceJobId: string | undefined = undefined
let lastRefreshed: Date | undefined = undefined
function debounceLoadJobInProgress() {
const pollingRate = reducedPolling ? 5000 : 1000
if (
lastRefreshed &&
new Date().getTime() - lastRefreshed.getTime() < pollingRate &&
debounceJobId == jobId
) {
timeout && clearTimeout(timeout)
}
timeout = setTimeout(() => {
loadJobInProgress()
lastRefreshed = new Date()
debounceJobId = jobId
timeout = undefined
}, pollingRate)
}
let errorCount = 0
let notAnonynmous = false
let started = false
async function loadJobInProgress() {
if (!started) {
started = true
dispatch('start')
}
dispatch('start')
if (jobId != '00000000-0000-0000-0000-000000000000') {
try {
const newJob = await getNewJob(jobId, initialJob)
@@ -470,7 +447,7 @@
}
}
if (job?.type !== 'CompletedJob' && errorCount < 4 && !destroyed) {
debounceLoadJobInProgress()
timeout = setTimeout(() => loadJobInProgress(), reducedPolling ? 5000 : 1000)
} else {
dispatch('done', job)
}
@@ -1309,7 +1286,7 @@
durationStatuses={localDurationStatuses}
/>
{:else if rightColumnSelect == 'node_status'}
<div class="pt-2 grow flex flex-col">
<div class="pt-2 max-h-[80vh] grow flex flex-col">
{#if selectedNode}
{@const node = $localModuleStates[selectedNode]}
@@ -1388,6 +1365,7 @@
/>
</div>
{/if}
<FlowJobResult
workspaceId={job?.workspace_id}
jobId={node.job_id}

View File

@@ -344,6 +344,7 @@
failedTimes = s.on_failure_times ?? 1
failedExact = s.on_failure_exact ?? false
errorHandlerExtraArgs = s.on_failure_extra_args ?? {}
console.log('errorHandlerExtraArgs', errorHandlerExtraArgs)
errorHandlerSelected = getHandlerType('error', errorHandlerPath)
} else {
errorHandlerPath = undefined

View File

@@ -95,7 +95,20 @@
return jobKinds
}
if (jobKindsCat == 'all') {
return ''
let kinds: CompletedJob['job_kind'][] = [
'script',
'flow',
'dependencies',
'flowdependencies',
'appdependencies',
'preview',
'flowpreview',
'script_hub',
'flowscript',
'flownode',
'appscript'
]
return kinds.join(',')
} else if (jobKindsCat == 'dependencies') {
let kinds: CompletedJob['job_kind'][] = [
'dependencies',
@@ -109,9 +122,6 @@
} else if (jobKindsCat == 'deploymentcallbacks') {
let kinds: CompletedJob['job_kind'][] = ['deploymentcallback']
return kinds.join(',')
} else if (jobKindsCat == 'runs') {
let kinds: CompletedJob['job_kind'][] = ['script', 'flow', 'singlescriptflow']
return kinds.join(',')
} else {
let kinds: CompletedJob['job_kind'][] = [
'script',
@@ -160,7 +170,7 @@
createdBefore,
createdBy: user === null || user === '' ? undefined : user,
scriptPathStart: scriptPathStart,
jobKinds: jobKindsCat == 'all' || jobKinds == '' ? undefined : jobKinds,
jobKinds,
success: success == 'success' ? true : success == 'failure' ? false : undefined,
running:
success == 'running' || success == 'suspended'
@@ -218,7 +228,7 @@
scriptPathExact: path === null || path === '' ? undefined : path,
createdBy: user === null || user === '' ? undefined : user,
scriptPathStart: folder === null || folder === '' ? undefined : `f/${folder}/`,
jobKinds: jobKindsCat == 'all' || jobKinds == '' ? undefined : jobKinds,
jobKinds,
success: success == 'success' ? true : success == 'failure' ? false : undefined,
running: success == 'running' ? true : undefined,
isSkipped: isSkipped ? undefined : false,

View File

@@ -1099,14 +1099,6 @@ export function isFlowPreview(job_kind: Job['job_kind'] | undefined) {
return !!job_kind && (job_kind === 'flowpreview' || job_kind === 'flownode')
}
export function isNotFlow(job_kind: Job['job_kind'] | undefined) {
return (
job_kind !== 'flow' &&
job_kind !== 'singlescriptflow' &&
!isFlowPreview(job_kind)
)
}
export function isScriptPreview(job_kind: Job['job_kind'] | undefined) {
return (
!!job_kind && (job_kind === 'preview' || job_kind === 'flowscript' || job_kind === 'appscript')

View File

@@ -20,7 +20,6 @@
emptyString,
encodeState,
isFlowPreview,
isNotFlow,
isScriptPreview,
truncateHash,
truncateRev
@@ -120,7 +119,7 @@
let showExplicitProgressTip: boolean =
(localStorage.getItem('hideExplicitProgressTip') ?? 'false') == 'false'
$: job?.logs == undefined && job && viewTab == 'logs' && isNotFlow(job?.job_kind) && getLogs?.()
$: job?.logs == undefined && job && viewTab == 'logs' && getLogs?.()
let lastJobId: string | undefined = undefined
let concurrencyKey: string | undefined = undefined
@@ -223,34 +222,25 @@
})
}
if (
job &&
job.job_kind === 'script' &&
job.script_hash &&
persistentScriptDefinition === undefined
) {
const script = await ScriptService.getScriptByHash({
workspace: $workspaceStore!,
hash: job.script_hash
})
if (script.restart_unless_cancelled ?? false) {
persistentScriptDefinition = script
}
if (job === undefined || job.job_kind !== 'script' || job.script_hash === undefined) {
return
}
const script = await ScriptService.getScriptByHash({
workspace: $workspaceStore!,
hash: job.script_hash
})
if (script.restart_unless_cancelled ?? false) {
persistentScriptDefinition = script
}
}
function onRunsPageChangeWithLoader() {
forceCancel = false
getJob()
$: {
if ($workspaceStore && $page.params.run && testJobLoader) {
forceCancel = false
getJob()
}
}
function onRunsPageChange() {
job = undefined
persistentScriptDefinition = undefined
}
$: $workspaceStore && $page.params.run && onRunsPageChange()
$: $workspaceStore && $page.params.run && testJobLoader && onRunsPageChangeWithLoader()
$: selectedJobStep !== undefined && onSelectedJobStepChange()
$: job && onJobLoaded()
@@ -398,20 +388,19 @@
</DrawerContent>
</Drawer>
{/if}
{#if !job || (job?.job_kind != 'flow' && job?.job_kind != 'flownode' && job?.job_kind != 'flowpreview')}
<TestJobLoader
lazyLogs
bind:scriptProgress
on:done={() => job?.['result'] != undefined && (viewTab = 'result')}
bind:this={testJobLoader}
bind:getLogs
bind:isLoading={testIsLoading}
bind:job
bind:jobUpdateLastFetch
workspaceOverride={$workspaceStore}
bind:notfound
/>
{/if}
<TestJobLoader
lazyLogs
bind:scriptProgress
on:done={() => job?.['result'] != undefined && (viewTab = 'result')}
bind:this={testJobLoader}
bind:getLogs
bind:isLoading={testIsLoading}
bind:job
bind:jobUpdateLastFetch
workspaceOverride={$workspaceStore}
bind:notfound
/>
<Portal name="persistent-run">
<PersistentScriptDrawer bind:this={persistentScriptDrawer} />
@@ -852,7 +841,7 @@
<h2 class="mt-10">Scheduled to be executed later: {displayDate(job?.['scheduled_for'])}</h2>
</div>
{/if}
{#if isNotFlow(job?.job_kind)}
{#if job?.job_kind !== 'flow' && job?.job_kind !== 'singlescriptflow' && !isFlowPreview(job?.job_kind)}
{#if ['python3', 'bun', 'deno'].includes(job?.language ?? '') && (job?.job_kind == 'script' || isScriptPreview(job?.job_kind))}
<ExecutionDuration bind:job bind:longRunning={currentJobIsLongRunning} />
{/if}
@@ -933,9 +922,6 @@
on:jobsLoaded={({ detail }) => {
job = detail
}}
on:done={(e) => {
job = e.detail
}}
initialJob={job}
workspaceId={$workspaceStore}
bind:selectedJobStep

View File

@@ -447,14 +447,11 @@
if (emptyString($enterpriseLicense)) {
errorHandlerSelected = 'custom'
} else {
errorHandlerSelected = emptyString(errorHandlerScriptPath)
? 'custom'
: errorHandlerScriptPath.startsWith('hub/') &&
errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-slack')
? 'slack'
: errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-teams')
? 'teams'
: 'custom'
errorHandlerSelected =
emptyString(errorHandlerScriptPath) ? 'custom' :
(errorHandlerScriptPath.startsWith('hub/') && errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-slack')) ? 'slack' :
(errorHandlerScriptPath.endsWith('/workspace-or-schedule-error-handler-teams')) ? 'teams' :
'custom'
}
errorHandlerExtraArgs = settings.error_handler_extra_args ?? {}
workspaceDefaultAppPath = settings.default_app
@@ -815,8 +812,8 @@
{#if !$enterpriseLicense}
<div class="pt-4" />
<Alert type="info" title="Workspace Teams commands is an EE feature">
Workspace Teams commands is a Windmill EE feature. It enables using your current Slack
/ Teams connection to run a custom script and send notifications.
Workspace Teams commands is a Windmill EE feature. It enables using your current Slack / Teams
connection to run a custom script and send notifications.
</Alert>
<div class="pb-2" />
{/if}
@@ -870,7 +867,12 @@
<div class="mt-20" />
<PageHeader title="Delete workspace" primary={false} />
{#if !$superadmin}
{#if $superadmin}
<p class="italic text-xs">
When deleting the workspace, it will be archived for a short period of time and then
permanently deleted.
</p>
{:else}
<p class="italic text-xs"> Only instance superadmins can delete a workspace. </p>
{/if}
{#if $workspaceStore === 'admins' || $workspaceStore === 'starter'}

View File

@@ -4,8 +4,8 @@ verify_ssl = true
name = "pypi"
[packages]
wmill = ">=1.463.6"
wmill_pg = ">=1.463.6"
wmill = ">=1.462.2"
wmill_pg = ">=1.462.2"
sendgrid = "*"
mysql-connector-python = "*"
pymongo = "*"

View File

@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.463.6
version: 1.462.2
title: OpenFlow Spec
contact:
name: Ruben Fiszel

View File

@@ -12,7 +12,7 @@
RootModule = 'WindmillClient.psm1'
# Version number of this module.
ModuleVersion = '1.463.6'
ModuleVersion = '1.462.2'
# Supported PSEditions
# CompatiblePSEditions = @()

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "wmill"
version = "1.463.6"
version = "1.462.2"
description = "A client library for accessing Windmill server wrapping the Windmill client API"
license = "Apache-2.0"
homepage = "https://windmill.dev"

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "wmill-pg"
version = "1.463.6"
version = "1.462.2"
description = "An extension client for the wmill client library focused on pg"
license = "Apache-2.0"
homepage = "https://windmill.dev"

View File

@@ -1,6 +1,6 @@
{
"name": "@windmill/windmill",
"version": "1.463.6",
"version": "1.462.2",
"exports": "./src/index.ts",
"publish": {
"exclude": ["!src", "./s3Types.ts", "./client.ts"]

View File

@@ -1,7 +1,7 @@
{
"name": "windmill-client",
"description": "Windmill SDK client for browsers and Node.js",
"version": "1.463.6",
"version": "1.462.2",
"author": "Ruben Fiszel",
"license": "Apache 2.0",
"devDependencies": {

View File

@@ -1 +1 @@
1.463.6
1.462.2