From 32298e5bfcd9ad1ca2954642d789e0f5d03b1680 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 7 Feb 2025 16:55:16 -0500 Subject: [PATCH 001/667] fix(frontend): accordion list header on eval / background function (#5244) --- .../components/apps/components/display/AppAccordionList.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte b/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte index 9697a1f651..2966cf418d 100644 --- a/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte +++ b/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte @@ -102,7 +102,7 @@ )} > {activeIndex === index ? '-' : '+'} - {accordionInput?.value[index]?.header || `Header ${index}`} + {result[index]?.header || `Header ${index}`} {#if activeIndex === index}
From 61ac7e91de7da54bd405d721fe6e47ed8e5a5e9e Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Sat, 8 Feb 2025 07:09:14 +0100 Subject: [PATCH 002/667] fix: workflow as code status (#5246) * fix: get update endpoint * [WIP] fix: workflow as code * fix fix * Revert "fix: get update endpoint" This reverts commit 7af9abf868f86f5e72891191e6623492bb221aa9. * fix test --- ...f794f8be6c6bad3d06e74586e8ab668d91861.json | 16 ++++++++++ ...ff808ba646f4f99d0c8837097e747b481f03a.json | 22 +++++++++++++ backend/tests/worker.rs | 32 ++++++++++++++++--- backend/windmill-api/src/jobs.rs | 8 +++-- 4 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 backend/.sqlx/query-2e6935811a6d818bc523f076674f794f8be6c6bad3d06e74586e8ab668d91861.json create mode 100644 backend/.sqlx/query-99f74bf675120daf965e063e5eaff808ba646f4f99d0c8837097e747b481f03a.json diff --git a/backend/.sqlx/query-2e6935811a6d818bc523f076674f794f8be6c6bad3d06e74586e8ab668d91861.json b/backend/.sqlx/query-2e6935811a6d818bc523f076674f794f8be6c6bad3d06e74586e8ab668d91861.json new file mode 100644 index 0000000000..2ebfb49b8e --- /dev/null +++ b/backend/.sqlx/query-2e6935811a6d818bc523f076674f794f8be6c6bad3d06e74586e8ab668d91861.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO v2_job_status (id, workflow_as_code_status)\n VALUES ($1, JSONB_SET('{}'::JSONB, array[$2], $3))\n ON CONFLICT (id) DO UPDATE SET\n workflow_as_code_status = JSONB_SET(\n COALESCE(v2_job_status.workflow_as_code_status, '{}'::JSONB), \n array[$2],\n $3\n )", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Uuid", + "Text", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "2e6935811a6d818bc523f076674f794f8be6c6bad3d06e74586e8ab668d91861" +} diff --git a/backend/.sqlx/query-99f74bf675120daf965e063e5eaff808ba646f4f99d0c8837097e747b481f03a.json b/backend/.sqlx/query-99f74bf675120daf965e063e5eaff808ba646f4f99d0c8837097e747b481f03a.json new file mode 100644 index 0000000000..68982a2183 --- /dev/null +++ b/backend/.sqlx/query-99f74bf675120daf965e063e5eaff808ba646f4f99d0c8837097e747b481f03a.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id FROM v2_job WHERE parent_job = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Uuid" + } + ], + "parameters": { + "Left": [ + "Uuid" + ] + }, + "nullable": [ + false + ] + }, + "hash": "99f74bf675120daf965e063e5eaff808ba646f4f99d0c8837097e747b481f03a" +} diff --git a/backend/tests/worker.rs b/backend/tests/worker.rs index 12298795ad..1574cf64ca 100644 --- a/backend/tests/worker.rs +++ b/backend/tests/worker.rs @@ -3875,6 +3875,7 @@ async fn test_workflow_as_code(db: Pool) { .await; assert_eq!(job.json_result().unwrap(), json!(["OK", 3])); + let workflow_as_code_status = sqlx::query_scalar!( "SELECT workflow_as_code_status FROM v2_job_completed WHERE id = $1", job.id @@ -3883,10 +3884,33 @@ async fn test_workflow_as_code(db: Pool) { .await .unwrap() .unwrap(); - assert_eq!( - workflow_as_code_status.get("name"), - Some(&json!("send_result")) - ); + + #[derive(Deserialize)] + #[allow(dead_code)] + struct WorkflowJobStatus { + name: String, + started_at: String, + scheduled_for: String, + duration_ms: i64, + } + + let workflow_as_code_status: std::collections::HashMap = + serde_json::from_value(workflow_as_code_status).unwrap(); + + let uuids = sqlx::query_scalar!("SELECT id FROM v2_job WHERE parent_job = $1", job.id) + .fetch_all(db) + .await + .unwrap(); + + assert_eq!(uuids.len(), 4); + for uuid in uuids { + let status = workflow_as_code_status.get(&uuid.to_string()); + assert!(status.is_some()); + assert!( + status.unwrap().name == "send_result" + || status.unwrap().name == "heavy_compute" + ); + } }, port, ) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 483db02920..65d071518d 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -3427,8 +3427,12 @@ pub async fn run_workflow_as_code( sqlx::query!( "INSERT INTO v2_job_status (id, workflow_as_code_status) VALUES ($1, JSONB_SET('{}'::JSONB, array[$2], $3)) - ON CONFLICT (id) DO UPDATE SET workflow_as_code_status = - COALESCE(EXCLUDED.workflow_as_code_status, '{}'::JSONB) || $3", + ON CONFLICT (id) DO UPDATE SET + workflow_as_code_status = JSONB_SET( + COALESCE(v2_job_status.workflow_as_code_status, '{}'::JSONB), + array[$2], + $3 + )", job_id, uuid.to_string(), serde_json::json!({ "scheduled_for": Utc::now(), "name": entrypoint }), From 403826fca994535e59cc3c042f41bb47448dd951 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 8 Feb 2025 22:20:06 +0100 Subject: [PATCH 003/667] fix: worker name in job + better timeout handling for same_worker jobs (#5248) --- ...fff3e22de8332d0c6d8ca98d22d62137fe701.json | 67 ------ ...fad573d5c7cbdca975edc34f36890c824c44b.json | 71 ------- ...825b2166f1846b1bb684522607d5ca31a0df3.json | 17 -- ...9c035af6d763b7ee9577280785ccf0220a123.json | 23 -- ...ce9c656d7f0ad7b8d0709161047f0d8cdc4f4.json | 23 -- ...44b9a9759bdb034e73f3065cde6a2f88c8dce.json | 16 -- ...d493982dd1bfb63ca7373e035a98c268428e2.json | 22 -- ...a47faeee5c0a152cda8d62794c14dd200fac1.json | 16 -- ...e4a801e0c446c55fc9fd8bc75e36d58073bee.json | 48 ----- ...d9cfe9a2ec315d6589e940be157a0563f81af.json | 15 -- ...2138d5fded1e6360bb992046fe9711b5ea213.json | 67 ------ ...a4cbe80b0150827c6e90f6e4f9e512587ba1.json} | 4 +- ...9177a87e1accd192402e21db5ae09c3498ab0.json | 104 --------- ...be3210e3845b61551691bbef81c2b6fb01121.json | 15 -- ...ebab93a4bc1bcab166aae68244ab1f3d4df9f.json | 104 --------- ...486b78eae82901a0128b9c9c837c9e9e91212.json | 38 ---- ...c44d61782aaae68ffa413f37b13dc6cf4d83d.json | 15 -- ...1a6a1cb1b0f31e357b5370f9bb7eab1e20a7b.json | 27 --- ...f26e14a0ae955fabeecc4a936b95937bf04d1.json | 17 -- ...b26f6d4820a6a1fc8e028c3550c438248a82b.json | 15 -- ...e9a8da57b5204bb6b1207aed47143c17a20bc.json | 22 -- ...29610f671b7df0ab25da058e16c6654279d61.json | 24 --- ...a7ed2e67243e5c1522850045b2da42fa914bc.json | 91 -------- ...fb4f5709e0e1a02a0187e88fa5d9e94ffb91a.json | 104 --------- ...b441961aad80bf9fd0125bcf55a729e556d1e.json | 40 ---- ...a07472994d8942c684f5b75339fe71ea23cdd.json | 22 -- ...a3863d9db5fe736a0a34325b824d9cec9b1a0.json | 25 --- ...455942e30f932c5b97f1e5b508128f39a288f.json | 16 -- ...9e4d932d2f072b6c08ce419e4b95a2fd83e96.json | 34 --- ...41861dbfd5c08daea615dde081e29f7459b9d.json | 24 --- ...76641ba3c6f1f1b5e006fc75427c9b231d323.json | 16 -- ...ea33457bf8cff669e983431f1fd26ff275f83.json | 40 ---- ...534472a6cae70d7964ba019aa2121c3929234.json | 68 ------ ...24faa490a4649f74c37bcd0b47ebffc81a2a9.json | 16 -- ...60e26e644a9d939e74a8317c4a09335f110fe.json | 25 --- ...5f4a3e79c87fc1c5b43e787fd8e19c555b44b.json | 14 -- ...fac8e6773bc1db1f88cd60fd3c1e8c9781eb0.json | 15 -- ...dec706ba1cc2d5d432e397633a1f79e67589a.json | 69 ------ ...8a4eafb2456c123f9b6b96bb4ba2409166e5a.json | 14 -- ...481f406364d56a129089a268f6423c548bca6.json | 35 ---- ...93cced646632a76864b693ed2325d85b36c45.json | 22 -- ...6b2fe3f690da7bc8dfd36b47ec619c4e31995.json | 54 ----- ...94927c5d3d43c18cdb5e98e979e761ed6ed0e.json | 15 -- ...1e60c7c3b4e3ce7ed6b2b3eb78dd99b7d8fcf.json | 14 -- ...c96133b69542b01232295c26cc9e093c372f9.json | 29 --- ...026e8891576c7e87cdab41d7fcc3afc32d583.json | 24 --- ...dba29216a1aad733171c25cc4aae5b3c84d54.json | 17 -- ...914c14cd493f96005017c299a805c48aef092.json | 24 --- ...d3fb3221e04f3a7c1abe91dd763f366d06618.json | 22 -- ...35d9f990eaa3dbb396290477159012e86af14.json | 58 ----- ...98a03f751b246c40daf056fced0fd91f6dd73.json | 89 -------- ...1d68c5c902ee0a07ea69bff772ff10d0dc5aa.json | 25 --- ...bb09370b905d610b9ceb3cfac11365586320d.json | 23 -- ...7767b8a8fe0a638250f7c7777e5a9f7530e5c.json | 31 +++ ...19b24ffec46fa02d710544a3074745be9455f.json | 15 -- ...df664b4de9aabf1e0e219596b295d52438008.json | 31 --- ...ea026d8e94a3cb9cdcfa5fde19343acf81ecc.json | 17 -- ...4f2b9bf7c4bcaedb87c28f974e46c9c42200c.json | 23 -- ...fcc8f9b1909f255cdfce0fb83496aac0fc021.json | 29 --- ...34d9d30d3e86f231bb9d1d3cc3bad6a50dfff.json | 23 -- ...c3ce7f41a22e72c5180ef8cc910305e4d0fce.json | 73 ------- ...7cfb058a35a81314db981bc953a9505725082.json | 16 -- ...ae74134728899f6b59c68b246979bc5143e30.json | 29 --- ...625cae355fda673b9e85284e0fcd7d9232eb7.json | 73 ------- ...5e9ad2c9fcbd75f55817b2114c04207f66e4a.json | 15 -- ...0cd0a53a0395bc60e35817ff149c4f27a19fb.json | 14 -- ...e6e104b40f4b937914f56f01c299cddfc17e9.json | 15 -- ...be4da5447020e39398deedbcca9121492834a.json | 198 ------------------ ...7ac75c2c87c7c3036acd96ba72fb2a21700db.json | 22 -- ...59404a3a5889dd7c61cb077e17b877b027eff.json | 15 -- ...11ec677297009b71041d39019c4700a571c0f.json | 22 -- ...738478f3d93f6bb42aaf021794392328c8875.json | 30 --- ...c99135af62ccaae5ca122d88356fe7da6eedc.json | 22 -- ...46b116dba3211487c8408ce2777aafdf94a44.json | 19 -- ...83773a95de3b6694a398cb80d288bef4f130f.json | 14 -- ...937511bc8431c3652746684ee803172053885.json | 23 -- ...6ad7b3aa41d9b581738d16fbfff4cc5b72a7a.json | 22 -- ...63b5dedad61caa68e0e470252083d80df605f.json | 14 -- ...6559a1aa4ca9ebd4f9b535014cbcb113f9b92.json | 30 --- ...93546db5c5f0ad0c5f92f34aaf2cdd125d130.json | 15 -- ...f0a297a2e65c8e25a17d5c43715481e7633a0.json | 23 -- ...825e2671283fc70abba9a036e88699430af0f.json | 12 -- ...30f5ca4b3b0b0afbd5d9721c8b5d692af601b.json | 22 -- ...ef1117a15acf7d0d41b93de165e788b55d93f.json | 42 ---- ...ff3856fc4a732adf5796e9b06c826406584dc.json | 16 -- ...1680b2ee1ebe9258355a0db24ce4fd26f23de.json | 25 --- ...ddd7cd50a4782101e971175d0c5c798593a40.json | 23 -- ...e29d3ca1170a2ac0d3dce0b5df0e8677a4874.json | 16 -- ...465202213b7ada2198ea1d9b4d4d1f5ed658f.json | 15 ++ ...3ade1656cd403000a34a19a942993b60ff612.json | 16 -- ...9c009214eeaee8fd27a0d3050998b354c45ff.json | 15 -- ...5a1105d6c1cc58990937c9bcf693a8812920c.json | 24 --- ...09f81076c5317d590e1441b557555b4d7ad96.json | 26 --- ...9b61aa4d21a15a9bc06e0c2fd15b47eb7beb0.json | 29 --- ...3cf89f563e57d5d3e7981d58cecf147b9bf1e.json | 15 -- ...dcdd41de7f8e197b163f7865810391471db5b.json | 42 ---- ...a15eb87516c319c1fcbb3e46032bb9fdf718e.json | 38 ---- ...c36afdbc58470664b6cefa8cec25515a42f13.json | 24 --- ...d5397e04dbe771445818f88903ee5677b3631.json | 16 -- ...0a8c0319c5ae0b92f289ec1e74d2478c9e740.json | 42 ---- ...0406fe28923f51fc465ae0f45d7f317077bf5.json | 15 -- ...82c1df21ba601ac0989e175f834c569962d46.json | 23 -- ...62c3c267ca336a8b6bec5b29d4409030ed561.json | 78 ------- ...f174bbb48eef8952f91911b8d9b45357372d9.json | 24 --- ...ac47452a4ed4e8dff0e94f22e6225f4eebc7.json} | 4 +- ...4066db4e8735c0f717d91391a28bf832c0e71.json | 25 --- ...af22783c81bc757d735a4b247cc693dfed719.json | 15 -- ...1d7db9b956abd88b94db3948f2c579c3826d0.json | 23 -- ...cc5d8c7fb768a6ddc7cf337469a140fa37106.json | 15 -- ...8fed2e35cb1943d63692dfbf1b997e1263da0.json | 15 -- ...9469569c31e0234bb073af33f2cd4d6ca71d4.json | 14 -- ...62a95486f6da82cdc08f79dd6cef508256474.json | 25 --- ...b0bc4dbb9cd654307f5167d8dbe794f17a1cf.json | 23 -- ...57ae030463c139c39072777e453bfb7e9c0c3.json | 22 -- ...241060c93354de19f0fa80b8f45290e8b992d.json | 16 -- ...d26e44e6ce1308505d1fbc9c28eaabcbe463e.json | 16 -- ...ce999284f3d2d854a00fefcaf7c044dcf71ca.json | 16 -- ...315ed2fd4662975bf0d01cfbffac86a959368.json | 17 -- ...6c4d7e8cac594900ab0956c098e1cfa75e2f0.json | 16 -- ...ebbba2e1149d2e329d1d89eecc1c008c93a31.json | 14 -- ...5b57dc38dd3b2643361ed3b7cdcd1534d2e21.json | 15 -- ...e526ba5082e5d1945c76a98404fe5d92e32ee.json | 15 -- ...64d9ad745a4a2bb4c0fa36d3caf77fa60e035.json | 54 ----- ...85edc114add7a6b6c1e3845ffda344effa03c.json | 14 -- ...1ce0cd51d7f699ff296314c9801e115c52228.json | 17 -- ...6819d7b6a2f5531740a7deea1b51775335977.json | 24 --- ...f93697ee1edcee0acf4a0684a28ff66ef735a.json | 48 ----- ...5af05de561a8f9899e4ddca958982fdb67803.json | 24 --- ...eed57300b7792e1797a9cdd73c9b3967cd7b9.json | 22 -- ...9c6da2c3d1e04d49306adaaaaf06e54ee8357.json | 34 --- ...7eeb7e8487b02b13710c68be99057e2c32cb9.json | 16 -- ...e2397ee789f6732199a5259f5f4ee2c5a166d.json | 29 --- ...d6c1c24108e45c94be52595ca6cb82135f4eb.json | 15 -- ...972e5e805dae837a075da4e503494624b518a.json | 16 -- ...eda837cc63e4d8be912c0b5bfeea4a0c8db2e.json | 77 ------- ...5a07ff11d13472c25533824dec93c41ea609c.json | 23 -- ...76503cee1b45eba150c3082eb246ea3f98d47.json | 23 -- ...7287fa4ec2cc096c0060d14db421115d63e2d.json | 24 --- ...2a6d8f3d068c55cddf209eb6b6431ca26c910.json | 23 -- ...0ba1be406ee5167f7b8aa90213ef52c97441f.json | 22 -- ...700d38a0d1b9d25429021c08fc94d57f952d2.json | 16 -- ...e07cbb3eb08c5d2d22b057796e1156ae2a122.json | 30 --- ...a9818c93ea0b4c3aaacbd9dcef11fcd9e68a3.json | 92 -------- ...7430a1d61353b9122fd42777d92e4cbc9f4fa.json | 16 -- ...639ba9deaaef419ad4cb2655e7e95f602a688.json | 14 -- ...729639a6c0b468aa3f9108071d160d2dee250.json | 42 ---- ...5af33f84b22c24c92fcb870f37f0501f8ea9a.json | 22 -- ...10c86a24fe666884cfd49996dee961751ce51.json | 89 -------- ...0b766a018957c1a325940df8914b28df60aca.json | 26 --- ...3d71e03478e642a7999157a631a7ff0b7c63e.json | 15 -- ...7b2d9e014be9d0794e72dc8566485e61492cd.json | 41 ---- ...8497bcbfffea2570a3f3d1f8100207bc1557c.json | 20 -- ...c42fc22700e3cbf8cd44621a8380536d77552.json | 22 -- ...fd3b38546b1a718d0abff6b2795d7c2a29c97.json | 40 ---- ...04b8b6e4c6d711d0f6a557f929d831b8cfd3e.json | 22 -- ...12491341e745aef5e0e5090c2f4e4a4dc54fb.json | 34 --- ...acd5ecb22e6d5378ca6bc5a83dae6b8e525c1.json | 15 -- ...c4828611591c76dd32541735095c010d6cdf2.json | 28 --- ...5a15acefac87bedb2725827938c54a3c0e8f8.json | 16 -- ...e8aa1c097c94b01aad0d9f7bce76a2a272bcc.json | 23 -- ...5623bcb3dd4cbc37d570fc4273127bbf77c24.json | 67 ------ ...18b9517e256978512f014e1bf5c270f499772.json | 15 -- ...d15e6405de27d40b799b0a65b31fd41bcc625.json | 12 -- ...c83b8b4da98bda204a40f045a62172cfb4ebb.json | 29 --- ...2039809bc01e4a0aa05701d6607b06769caa5.json | 40 ---- ...bcec167f4044e45e932aeeefd3d9237e5042c.json | 22 -- ...20cfeee64fd47ded72fce55cc75e0bbb291a8.json | 15 -- ...d76ae2223d59e9f321a8b6d0c27adc09f741.json} | 4 +- ...01ac3fb932bbeafe3aecc0b14465cce7e192d.json | 22 -- ...2f40fd82605c456aff479890462f4d0202316.json | 15 -- ...311fdabf78d6d5bd12e71070b1dae24df2352.json | 16 -- ...e87df1799a0ea64822449350abab02ab570be.json | 15 -- ...a2a5c7448c919ae522e91332fa9a6212f5ddf.json | 15 -- ...0465945acdfa779f16b99cdc1a6b7ef84943e.json | 40 ---- ...23d0287bd34e463967fbaf0a3d590b59c9865.json | 75 ------- ...1ed44050bd28212540db50fe235463c15a900.json | 91 -------- ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 22 ++ ...5606940a089f6179e5443090afa9aba7c5b24.json | 24 --- ...d01993cd52e8e85943440081b8dbd3b9ae5a4.json | 14 -- ...abdeecb3fec75bf10773544339bd025fc45bb.json | 22 -- ...97d3c63a0fce3dd57c93f48a2136f7395fa3a.json | 22 -- ...36d6efe1dd6c4f719bc415222eba78d5e63fc.json | 20 -- ...b7527ececad87d218182ff723e6a6c43ecd50.json | 24 --- ...5d44fcfdb40a4764e1dc34896bd85b3d007f9.json | 22 -- ...39dc58460b6914440473fe94de7a7bc292af4.json | 14 -- ...a9d8d1a502796842f185374d2d0f69043086b.json | 22 -- ...bbae160e97faede6934d90f4882d806c14813.json | 16 -- ...b6b15b8f2303157b4c6e80ac9e3d84a57d8b1.json | 26 +++ ...cb38c5c204b3bc34c921b2f653c738af556a9.json | 29 --- ...c1b34ed806dda70592b0030067aed46a104d9.json | 41 ---- ...7430c1ccc0f410c377cde71c70c9211f9c1df.json | 23 -- ...ffc6b555371d6eeeadfc54f5bf0bcbe93d8b4.json | 30 --- ...3963042fa19d5eb15cfb3e0c291a29482aa5b.json | 14 -- ...2dbfce45209fbbccf3b4b9b13019e0cd55ddb.json | 22 -- ...62e3c75dbee326e0856944539b2c5574cb6d3.json | 17 -- ...c090a07fe82a2ccb17a1b3d903de499c2e7c8.json | 14 -- ...9f6f2ff93ce57b5afadabd618e1fb52951fef.json | 28 --- ...1679ba5e61ea88a5c65be9696312d2f455508.json | 34 --- ...30e7294bcac06bb7930dcf4d46427571662cb.json | 35 ---- ...1d888e1f22fb2300a78bbeafebf64e82658db.json | 23 -- ...42e7285f4266a1471e5ffdefadf421a67e44b.json | 25 --- ...b250fd64ee0e0b299471979db5ff8ee906929.json | 28 --- ...b6b493e53583017c18e2ab44f44125c52d548.json | 104 --------- ...79eb5e6d1e01fcf01cc05d3c7ddf47295c2f5.json | 35 ---- ...be6b9823af022195b80db8ccbc3737576462c.json | 34 --- ...213999ff64bbe4f8e2532a7aa48184cb008e7.json | 16 -- ...549b2fb27c90556484f3914666d5ad7f8f107.json | 70 ------- backend/src/monitor.rs | 87 ++++++-- backend/windmill-api/src/jobs.rs | 2 +- backend/windmill-common/src/worker.rs | 16 +- backend/windmill-queue/src/jobs.rs | 25 ++- backend/windmill-worker/src/worker.rs | 23 +- backend/windmill-worker/src/worker_flow.rs | 14 ++ .../src/lib/components/HistoricInputs.svelte | 6 +- 214 files changed, 237 insertions(+), 6058 deletions(-) delete mode 100644 backend/.sqlx/query-0128194fb539809e15bee670864fff3e22de8332d0c6d8ca98d22d62137fe701.json delete mode 100644 backend/.sqlx/query-016bf078cdea0aae4a05ae7e004fad573d5c7cbdca975edc34f36890c824c44b.json delete mode 100644 backend/.sqlx/query-029ed3dcba207c58aa6936e44bd825b2166f1846b1bb684522607d5ca31a0df3.json delete mode 100644 backend/.sqlx/query-02bb4ea17e83c79f870e2655d6d9c035af6d763b7ee9577280785ccf0220a123.json delete mode 100644 backend/.sqlx/query-0355b53b1d45955ca56b2829372ce9c656d7f0ad7b8d0709161047f0d8cdc4f4.json delete mode 100644 backend/.sqlx/query-036af7b1cf6d731647fd718458944b9a9759bdb034e73f3065cde6a2f88c8dce.json delete mode 100644 backend/.sqlx/query-04effcc6050250a02661323c880d493982dd1bfb63ca7373e035a98c268428e2.json delete mode 100644 backend/.sqlx/query-0721acae4f627df4687bb43b830a47faeee5c0a152cda8d62794c14dd200fac1.json delete mode 100644 backend/.sqlx/query-07a7f1da7ee77324a73eb5b3743e4a801e0c446c55fc9fd8bc75e36d58073bee.json delete mode 100644 backend/.sqlx/query-099e7c7a66968575f896e0c11ecd9cfe9a2ec315d6589e940be157a0563f81af.json delete mode 100644 backend/.sqlx/query-0a6a89e6ab3037f02c3c4c84ee02138d5fded1e6360bb992046fe9711b5ea213.json rename backend/.sqlx/{query-a68754521bf751450602f04dd4243199a18885e1739a5a0e7f6100eab6f3c803.json => query-0aa8f50fe377a23e2ae3821fd6eda4cbe80b0150827c6e90f6e4f9e512587ba1.json} (51%) delete mode 100644 backend/.sqlx/query-0ad36c1598ff4ece0c325eaeb9a9177a87e1accd192402e21db5ae09c3498ab0.json delete mode 100644 backend/.sqlx/query-0c0b5d5d1e6ab2fed7532f94b50be3210e3845b61551691bbef81c2b6fb01121.json delete mode 100644 backend/.sqlx/query-0df84fc35f2780ceb7c473b0165ebab93a4bc1bcab166aae68244ab1f3d4df9f.json delete mode 100644 backend/.sqlx/query-0ef638eb62cb8b285cb20855679486b78eae82901a0128b9c9c837c9e9e91212.json delete mode 100644 backend/.sqlx/query-0f9c4c2fda3beeafc940e14a6c2c44d61782aaae68ffa413f37b13dc6cf4d83d.json delete mode 100644 backend/.sqlx/query-119469ebfe8572c78ed3ee5ab5b1a6a1cb1b0f31e357b5370f9bb7eab1e20a7b.json delete mode 100644 backend/.sqlx/query-11d59fb24aeb40f82e6fd11b697f26e14a0ae955fabeecc4a936b95937bf04d1.json delete mode 100644 backend/.sqlx/query-126be8832776644e0d2c5d004acb26f6d4820a6a1fc8e028c3550c438248a82b.json delete mode 100644 backend/.sqlx/query-12a0fd7d8d99fb73b01bc24774fe9a8da57b5204bb6b1207aed47143c17a20bc.json delete mode 100644 backend/.sqlx/query-1438e8dc5738fc69bc6601eb11729610f671b7df0ab25da058e16c6654279d61.json delete mode 100644 backend/.sqlx/query-14540eef4594d9282cee3df4f92a7ed2e67243e5c1522850045b2da42fa914bc.json delete mode 100644 backend/.sqlx/query-15557c0acea71cee03f42516553fb4f5709e0e1a02a0187e88fa5d9e94ffb91a.json delete mode 100644 backend/.sqlx/query-15697f3b63f88b9cfa33ab0aa64b441961aad80bf9fd0125bcf55a729e556d1e.json delete mode 100644 backend/.sqlx/query-16be0560028361d46bf3b842a5fa07472994d8942c684f5b75339fe71ea23cdd.json delete mode 100644 backend/.sqlx/query-170f620fbd99269d194d14d56f6a3863d9db5fe736a0a34325b824d9cec9b1a0.json delete mode 100644 backend/.sqlx/query-17e3e2a3232865c33fa535b5d99455942e30f932c5b97f1e5b508128f39a288f.json delete mode 100644 backend/.sqlx/query-17f04341c5c52173a776b71672f9e4d932d2f072b6c08ce419e4b95a2fd83e96.json delete mode 100644 backend/.sqlx/query-1af5ccc82048df95a791949e7b141861dbfd5c08daea615dde081e29f7459b9d.json delete mode 100644 backend/.sqlx/query-1c2254c15696d3dbc091488311676641ba3c6f1f1b5e006fc75427c9b231d323.json delete mode 100644 backend/.sqlx/query-1c28baaadd7d0c86a92bf9880a4ea33457bf8cff669e983431f1fd26ff275f83.json delete mode 100644 backend/.sqlx/query-1d1098cc9367502faa1483627bf534472a6cae70d7964ba019aa2121c3929234.json delete mode 100644 backend/.sqlx/query-1d842b4c940d788372ed377465e24faa490a4649f74c37bcd0b47ebffc81a2a9.json delete mode 100644 backend/.sqlx/query-1e188d8e427cab25dbe18aa900260e26e644a9d939e74a8317c4a09335f110fe.json delete mode 100644 backend/.sqlx/query-1e43e6040ac95b586d4d73999025f4a3e79c87fc1c5b43e787fd8e19c555b44b.json delete mode 100644 backend/.sqlx/query-1f93b533fa6fee0db4340445da3fac8e6773bc1db1f88cd60fd3c1e8c9781eb0.json delete mode 100644 backend/.sqlx/query-20d9a1b3a6631f97836e7b8d96cdec706ba1cc2d5d432e397633a1f79e67589a.json delete mode 100644 backend/.sqlx/query-215e0d320a304c8cb9ef12e7ea98a4eafb2456c123f9b6b96bb4ba2409166e5a.json delete mode 100644 backend/.sqlx/query-217a5291438d23597b2c7f05d2c481f406364d56a129089a268f6423c548bca6.json delete mode 100644 backend/.sqlx/query-230d58732a08164268ca10d248a93cced646632a76864b693ed2325d85b36c45.json delete mode 100644 backend/.sqlx/query-25d05a1e10d1aaa3f7c3c3bea5f6b2fe3f690da7bc8dfd36b47ec619c4e31995.json delete mode 100644 backend/.sqlx/query-26106be4d94c159cc8d9eb37a3b94927c5d3d43c18cdb5e98e979e761ed6ed0e.json delete mode 100644 backend/.sqlx/query-262c7b21e77a8d2943fefb9cabe1e60c7c3b4e3ce7ed6b2b3eb78dd99b7d8fcf.json delete mode 100644 backend/.sqlx/query-28a878c59b6d52f42d315eabb34c96133b69542b01232295c26cc9e093c372f9.json delete mode 100644 backend/.sqlx/query-293054a4d6a2b00228a5029a81c026e8891576c7e87cdab41d7fcc3afc32d583.json delete mode 100644 backend/.sqlx/query-2a0b59e2770b27a1f2a8baddc67dba29216a1aad733171c25cc4aae5b3c84d54.json delete mode 100644 backend/.sqlx/query-2bfb918104568288bb57e64d1cf914c14cd493f96005017c299a805c48aef092.json delete mode 100644 backend/.sqlx/query-2cef109784efc04999e4537e0d1d3fb3221e04f3a7c1abe91dd763f366d06618.json delete mode 100644 backend/.sqlx/query-32fdc66931dcf34f6ef5cdf3fd335d9f990eaa3dbb396290477159012e86af14.json delete mode 100644 backend/.sqlx/query-337f31c2172194cd594042c561998a03f751b246c40daf056fced0fd91f6dd73.json delete mode 100644 backend/.sqlx/query-364248db86a9228bba6ff522e811d68c5c902ee0a07ea69bff772ff10d0dc5aa.json delete mode 100644 backend/.sqlx/query-36b26b3a6458d8a0b4f770d52c1bb09370b905d610b9ceb3cfac11365586320d.json create mode 100644 backend/.sqlx/query-36c4e57afcab22f4b6825ccebe47767b8a8fe0a638250f7c7777e5a9f7530e5c.json delete mode 100644 backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json delete mode 100644 backend/.sqlx/query-3a9441fe8fef1605d02e92b65d1df664b4de9aabf1e0e219596b295d52438008.json delete mode 100644 backend/.sqlx/query-3b4b62161a5197f37850c8c4197ea026d8e94a3cb9cdcfa5fde19343acf81ecc.json delete mode 100644 backend/.sqlx/query-3bc1919515120116705d7c250a34f2b9bf7c4bcaedb87c28f974e46c9c42200c.json delete mode 100644 backend/.sqlx/query-3c423bcb10668bdd131f7b6a9b0fcc8f9b1909f255cdfce0fb83496aac0fc021.json delete mode 100644 backend/.sqlx/query-3da0cf7edc975cb365c36d167df34d9d30d3e86f231bb9d1d3cc3bad6a50dfff.json delete mode 100644 backend/.sqlx/query-3df03ec2345c905f03450e1e3f0c3ce7f41a22e72c5180ef8cc910305e4d0fce.json delete mode 100644 backend/.sqlx/query-3eb447ed317f3d8724b2309cfdf7cfb058a35a81314db981bc953a9505725082.json delete mode 100644 backend/.sqlx/query-3ecb25b05d6c14b499f9b00af42ae74134728899f6b59c68b246979bc5143e30.json delete mode 100644 backend/.sqlx/query-402fd5bff6e8420c9b3477f05df625cae355fda673b9e85284e0fcd7d9232eb7.json delete mode 100644 backend/.sqlx/query-41f68f4ce5bed783cf69e42da115e9ad2c9fcbd75f55817b2114c04207f66e4a.json delete mode 100644 backend/.sqlx/query-42543450a5c1b988b258fb1e0c00cd0a53a0395bc60e35817ff149c4f27a19fb.json delete mode 100644 backend/.sqlx/query-43fcdf5243e17bfbdcd21f09feee6e104b40f4b937914f56f01c299cddfc17e9.json delete mode 100644 backend/.sqlx/query-4422b7183ede17a9cbde4afae41be4da5447020e39398deedbcca9121492834a.json delete mode 100644 backend/.sqlx/query-44a317f7647e2b515f90dc9c04f7ac75c2c87c7c3036acd96ba72fb2a21700db.json delete mode 100644 backend/.sqlx/query-4504f3a5d3cffd56d51bd263e6759404a3a5889dd7c61cb077e17b877b027eff.json delete mode 100644 backend/.sqlx/query-45950064cce9f53f73a01ddcd6911ec677297009b71041d39019c4700a571c0f.json delete mode 100644 backend/.sqlx/query-4671f1727d0563490534c426375738478f3d93f6bb42aaf021794392328c8875.json delete mode 100644 backend/.sqlx/query-4a1cb9f3ad7f2a692dadb9f75cdc99135af62ccaae5ca122d88356fe7da6eedc.json delete mode 100644 backend/.sqlx/query-4b923c94f6adcc7a76e8073de5e46b116dba3211487c8408ce2777aafdf94a44.json delete mode 100644 backend/.sqlx/query-4c97fcc93b31c4b3262419d6ee183773a95de3b6694a398cb80d288bef4f130f.json delete mode 100644 backend/.sqlx/query-4cdb9b9d562f3c692e5597598db937511bc8431c3652746684ee803172053885.json delete mode 100644 backend/.sqlx/query-4d3ef32120623584bf5c13d86ea6ad7b3aa41d9b581738d16fbfff4cc5b72a7a.json delete mode 100644 backend/.sqlx/query-4fb3a4712d88afed40082d8d8bd63b5dedad61caa68e0e470252083d80df605f.json delete mode 100644 backend/.sqlx/query-52bd8efeaec0d0c2aa77d777a0b6559a1aa4ca9ebd4f9b535014cbcb113f9b92.json delete mode 100644 backend/.sqlx/query-53ff0e14c35a3e84585a699e55093546db5c5f0ad0c5f92f34aaf2cdd125d130.json delete mode 100644 backend/.sqlx/query-55541316c690e4f2e1b7a41071ef0a297a2e65c8e25a17d5c43715481e7633a0.json delete mode 100644 backend/.sqlx/query-56eafd6d3c72f7114e3d6764184825e2671283fc70abba9a036e88699430af0f.json delete mode 100644 backend/.sqlx/query-5ba4b87528ad49f17d72b53c3db30f5ca4b3b0b0afbd5d9721c8b5d692af601b.json delete mode 100644 backend/.sqlx/query-5bce731932a35dbecc38c7b9665ef1117a15acf7d0d41b93de165e788b55d93f.json delete mode 100644 backend/.sqlx/query-5d79c4817696d0ba0d2062eef27ff3856fc4a732adf5796e9b06c826406584dc.json delete mode 100644 backend/.sqlx/query-5dfa6932d7c6d5006fe352da3041680b2ee1ebe9258355a0db24ce4fd26f23de.json delete mode 100644 backend/.sqlx/query-611e3cd49d38a37db8912397c4eddd7cd50a4782101e971175d0c5c798593a40.json delete mode 100644 backend/.sqlx/query-61656548991bf6d44c839373cb3e29d3ca1170a2ac0d3dce0b5df0e8677a4874.json create mode 100644 backend/.sqlx/query-61ecf606dec2978f3e63b2dec92465202213b7ada2198ea1d9b4d4d1f5ed658f.json delete mode 100644 backend/.sqlx/query-6239e15d2389e24e290d86bb96e3ade1656cd403000a34a19a942993b60ff612.json delete mode 100644 backend/.sqlx/query-631d4637e4137a0680ffa56e4639c009214eeaee8fd27a0d3050998b354c45ff.json delete mode 100644 backend/.sqlx/query-639dbfa0c98d8b91006823f4c645a1105d6c1cc58990937c9bcf693a8812920c.json delete mode 100644 backend/.sqlx/query-63e54fe57ec439b68eead00a02209f81076c5317d590e1441b557555b4d7ad96.json delete mode 100644 backend/.sqlx/query-641087f3166faee8baad063fd569b61aa4d21a15a9bc06e0c2fd15b47eb7beb0.json delete mode 100644 backend/.sqlx/query-6681048ee83236e9eb33b407b5d3cf89f563e57d5d3e7981d58cecf147b9bf1e.json delete mode 100644 backend/.sqlx/query-6682bf34caf7efa95b60c747b45dcdd41de7f8e197b163f7865810391471db5b.json delete mode 100644 backend/.sqlx/query-66bf488f2eeaf5b4c4cb8c579d7a15eb87516c319c1fcbb3e46032bb9fdf718e.json delete mode 100644 backend/.sqlx/query-672363560895871e4ab19e0dd0dc36afdbc58470664b6cefa8cec25515a42f13.json delete mode 100644 backend/.sqlx/query-6818cae88492f83baf55f54bf5dd5397e04dbe771445818f88903ee5677b3631.json delete mode 100644 backend/.sqlx/query-6b0115e40d4361b3ca72dbd071b0a8c0319c5ae0b92f289ec1e74d2478c9e740.json delete mode 100644 backend/.sqlx/query-6cb2c77bb90679a36189007b1f70406fe28923f51fc465ae0f45d7f317077bf5.json delete mode 100644 backend/.sqlx/query-6e7f234267fbb4720b29f288fba82c1df21ba601ac0989e175f834c569962d46.json delete mode 100644 backend/.sqlx/query-6f4817fad2739a11d89b6704edf62c3c267ca336a8b6bec5b29d4409030ed561.json delete mode 100644 backend/.sqlx/query-6fa6fa8eb511119c6adb18bd4f9f174bbb48eef8952f91911b8d9b45357372d9.json rename backend/.sqlx/{query-803b9c1373541cf52f416cde9e9e99ab79072e21dfaafb498aac25a059bd2f30.json => query-7315c588aac4ff3a1aa6972a7553ac47452a4ed4e8dff0e94f22e6225f4eebc7.json} (50%) delete mode 100644 backend/.sqlx/query-74a2a90d12ca0179c8a80f9bf574066db4e8735c0f717d91391a28bf832c0e71.json delete mode 100644 backend/.sqlx/query-76ca60e456022cf3d1931245b7daf22783c81bc757d735a4b247cc693dfed719.json delete mode 100644 backend/.sqlx/query-777190559e27c8c8fb6718b0a0c1d7db9b956abd88b94db3948f2c579c3826d0.json delete mode 100644 backend/.sqlx/query-7c31a680436fd91db30c089e694cc5d8c7fb768a6ddc7cf337469a140fa37106.json delete mode 100644 backend/.sqlx/query-7cf5a1c434c8d84eb2400cd394c8fed2e35cb1943d63692dfbf1b997e1263da0.json delete mode 100644 backend/.sqlx/query-7d3180d119da0f6215a571118439469569c31e0234bb073af33f2cd4d6ca71d4.json delete mode 100644 backend/.sqlx/query-7dc7bc4e22942792938d273655962a95486f6da82cdc08f79dd6cef508256474.json delete mode 100644 backend/.sqlx/query-7f717130a398c8d52f814a968c2b0bc4dbb9cd654307f5167d8dbe794f17a1cf.json delete mode 100644 backend/.sqlx/query-829130d74c107e4e1a86f3e772657ae030463c139c39072777e453bfb7e9c0c3.json delete mode 100644 backend/.sqlx/query-858db2a501abcfffbcce19d60cc241060c93354de19f0fa80b8f45290e8b992d.json delete mode 100644 backend/.sqlx/query-85bbf1244848682702be93527cad26e44e6ce1308505d1fbc9c28eaabcbe463e.json delete mode 100644 backend/.sqlx/query-866c1b86d63466df84877e81655ce999284f3d2d854a00fefcaf7c044dcf71ca.json delete mode 100644 backend/.sqlx/query-870d7feec169f70d140b7477562315ed2fd4662975bf0d01cfbffac86a959368.json delete mode 100644 backend/.sqlx/query-8929150cb9262623eb12c908cb96c4d7e8cac594900ab0956c098e1cfa75e2f0.json delete mode 100644 backend/.sqlx/query-8a44ca0cfe1e154138cbbf5ebddebbba2e1149d2e329d1d89eecc1c008c93a31.json delete mode 100644 backend/.sqlx/query-8d4235984f27d8b939ffd5c660d5b57dc38dd3b2643361ed3b7cdcd1534d2e21.json delete mode 100644 backend/.sqlx/query-8d655c34a00510699d2ad7044f7e526ba5082e5d1945c76a98404fe5d92e32ee.json delete mode 100644 backend/.sqlx/query-8dd93be44f66c0744ddaff12a9664d9ad745a4a2bb4c0fa36d3caf77fa60e035.json delete mode 100644 backend/.sqlx/query-9250b087485e51af83aef1f412c85edc114add7a6b6c1e3845ffda344effa03c.json delete mode 100644 backend/.sqlx/query-92b80a77d292ec734b097b815261ce0cd51d7f699ff296314c9801e115c52228.json delete mode 100644 backend/.sqlx/query-9422431d79de41518f651ef24e86819d7b6a2f5531740a7deea1b51775335977.json delete mode 100644 backend/.sqlx/query-94831baa639d7546f98f24847c0f93697ee1edcee0acf4a0684a28ff66ef735a.json delete mode 100644 backend/.sqlx/query-96a9357888af26e5ec1e314bb565af05de561a8f9899e4ddca958982fdb67803.json delete mode 100644 backend/.sqlx/query-971175f6169857c3e1cdc08ac8aeed57300b7792e1797a9cdd73c9b3967cd7b9.json delete mode 100644 backend/.sqlx/query-9a9b639611459659ae355a43f219c6da2c3d1e04d49306adaaaaf06e54ee8357.json delete mode 100644 backend/.sqlx/query-9b716307fdbd479879224ba60b77eeb7e8487b02b13710c68be99057e2c32cb9.json delete mode 100644 backend/.sqlx/query-9bdad9fbe8990588d8d769d4a38e2397ee789f6732199a5259f5f4ee2c5a166d.json delete mode 100644 backend/.sqlx/query-9c17ddca92e0a93051b36bb688ad6c1c24108e45c94be52595ca6cb82135f4eb.json delete mode 100644 backend/.sqlx/query-9c34c717b218c09e3784a5413f7972e5e805dae837a075da4e503494624b518a.json delete mode 100644 backend/.sqlx/query-9d3556319411a27a875bf6cf0e5eda837cc63e4d8be912c0b5bfeea4a0c8db2e.json delete mode 100644 backend/.sqlx/query-9d616812c5a6ae514f047ce2d035a07ff11d13472c25533824dec93c41ea609c.json delete mode 100644 backend/.sqlx/query-9f16a61d6a9a42f3fd3e30a1e7776503cee1b45eba150c3082eb246ea3f98d47.json delete mode 100644 backend/.sqlx/query-a241c56415759105ccbcbf7fff77287fa4ec2cc096c0060d14db421115d63e2d.json delete mode 100644 backend/.sqlx/query-a33e282d02c53e5d6142dc7e6882a6d8f3d068c55cddf209eb6b6431ca26c910.json delete mode 100644 backend/.sqlx/query-a405e637f5f3b3203de6d65dfcb0ba1be406ee5167f7b8aa90213ef52c97441f.json delete mode 100644 backend/.sqlx/query-a6feede7d9c3060b1e4c94bb4fa700d38a0d1b9d25429021c08fc94d57f952d2.json delete mode 100644 backend/.sqlx/query-a91798f58fa5948cd1739df4fa2e07cbb3eb08c5d2d22b057796e1156ae2a122.json delete mode 100644 backend/.sqlx/query-ac94c16bff27deab63b898c1cdca9818c93ea0b4c3aaacbd9dcef11fcd9e68a3.json delete mode 100644 backend/.sqlx/query-ad8f9e0b06f288051cbec3c91877430a1d61353b9122fd42777d92e4cbc9f4fa.json delete mode 100644 backend/.sqlx/query-ae25fae1aca2cffc43a6054cd54639ba9deaaef419ad4cb2655e7e95f602a688.json delete mode 100644 backend/.sqlx/query-afd0d1b0511f32ba1981bc8d09b729639a6c0b468aa3f9108071d160d2dee250.json delete mode 100644 backend/.sqlx/query-b053117536c067095e2fb2864ce5af33f84b22c24c92fcb870f37f0501f8ea9a.json delete mode 100644 backend/.sqlx/query-b06915e02398511033717ea13b710c86a24fe666884cfd49996dee961751ce51.json delete mode 100644 backend/.sqlx/query-b0890c1bac6931d848afd88539a0b766a018957c1a325940df8914b28df60aca.json delete mode 100644 backend/.sqlx/query-b08bf73ca7da6af302eeb5a5f443d71e03478e642a7999157a631a7ff0b7c63e.json delete mode 100644 backend/.sqlx/query-b3e41eaff54c5da5e38cff785c17b2d9e014be9d0794e72dc8566485e61492cd.json delete mode 100644 backend/.sqlx/query-b50b8d3367bd1f74986e6f923fe8497bcbfffea2570a3f3d1f8100207bc1557c.json delete mode 100644 backend/.sqlx/query-bb0ee03198bcad69a1777447cf5c42fc22700e3cbf8cd44621a8380536d77552.json delete mode 100644 backend/.sqlx/query-bb93ba18709648b47cfbd04d91afd3b38546b1a718d0abff6b2795d7c2a29c97.json delete mode 100644 backend/.sqlx/query-bc01d5ca0138527b796a373f76404b8b6e4c6d711d0f6a557f929d831b8cfd3e.json delete mode 100644 backend/.sqlx/query-bc8ac03254669951654cda4bcfa12491341e745aef5e0e5090c2f4e4a4dc54fb.json delete mode 100644 backend/.sqlx/query-bca733ef3969c055269db2bc20dacd5ecb22e6d5378ca6bc5a83dae6b8e525c1.json delete mode 100644 backend/.sqlx/query-bf04a017bc55f6e1f5f25f697b3c4828611591c76dd32541735095c010d6cdf2.json delete mode 100644 backend/.sqlx/query-bf282f7ed77ed09bb44b5e253725a15acefac87bedb2725827938c54a3c0e8f8.json delete mode 100644 backend/.sqlx/query-bf91cb319e5b83c2235292a9e3ce8aa1c097c94b01aad0d9f7bce76a2a272bcc.json delete mode 100644 backend/.sqlx/query-c0b96d2f421afc43e256a8475825623bcb3dd4cbc37d570fc4273127bbf77c24.json delete mode 100644 backend/.sqlx/query-c14009d133956710f4435a5984c18b9517e256978512f014e1bf5c270f499772.json delete mode 100644 backend/.sqlx/query-c24d63fb137b805f1e674261681d15e6405de27d40b799b0a65b31fd41bcc625.json delete mode 100644 backend/.sqlx/query-c3b5abbf2c9079d597a55f7c63bc83b8b4da98bda204a40f045a62172cfb4ebb.json delete mode 100644 backend/.sqlx/query-c75761c9aa900391251596771782039809bc01e4a0aa05701d6607b06769caa5.json delete mode 100644 backend/.sqlx/query-c845c06aa46b52a1e3672fd379dbcec167f4044e45e932aeeefd3d9237e5042c.json delete mode 100644 backend/.sqlx/query-ca3ba808e020c8c7a35eaef842b20cfeee64fd47ded72fce55cc75e0bbb291a8.json rename backend/.sqlx/{query-c732dcb4df5877560a3e75e0032179140cbe442f0b80ce1172d80903dd8a14fa.json => query-ca8bf3dda133556ee7051d5436a5d76ae2223d59e9f321a8b6d0c27adc09f741.json} (51%) delete mode 100644 backend/.sqlx/query-cb0eecb1130617f2132b8ec74a401ac3fb932bbeafe3aecc0b14465cce7e192d.json delete mode 100644 backend/.sqlx/query-cbf5a2b315a7e89689ee86acf452f40fd82605c456aff479890462f4d0202316.json delete mode 100644 backend/.sqlx/query-cf80f068b6a8906939f7ea0f1a8311fdabf78d6d5bd12e71070b1dae24df2352.json delete mode 100644 backend/.sqlx/query-d74d3511d394c7ab2931c413e5ae87df1799a0ea64822449350abab02ab570be.json delete mode 100644 backend/.sqlx/query-d7ce28c7cbd4974c72969858659a2a5c7448c919ae522e91332fa9a6212f5ddf.json delete mode 100644 backend/.sqlx/query-d7f1e2920aec0f4eab9238d01370465945acdfa779f16b99cdc1a6b7ef84943e.json delete mode 100644 backend/.sqlx/query-d91a447f3abcd39559d614ab7d423d0287bd34e463967fbaf0a3d590b59c9865.json delete mode 100644 backend/.sqlx/query-da9114fc6689ebc78422b3572de1ed44050bd28212540db50fe235463c15a900.json create mode 100644 backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json delete mode 100644 backend/.sqlx/query-df0454f75e819d7d3d03fef0a7d5606940a089f6179e5443090afa9aba7c5b24.json delete mode 100644 backend/.sqlx/query-df533f1988e409b70a3e0966825d01993cd52e8e85943440081b8dbd3b9ae5a4.json delete mode 100644 backend/.sqlx/query-e03b8e0360ed7c282742b9b8657abdeecb3fec75bf10773544339bd025fc45bb.json delete mode 100644 backend/.sqlx/query-e1923bc755bd6b8cc871ae9381a97d3c63a0fce3dd57c93f48a2136f7395fa3a.json delete mode 100644 backend/.sqlx/query-e207bbcdd478758562e3082330836d6efe1dd6c4f719bc415222eba78d5e63fc.json delete mode 100644 backend/.sqlx/query-e4e87539ae18f7e5c6bd9a28d16b7527ececad87d218182ff723e6a6c43ecd50.json delete mode 100644 backend/.sqlx/query-e58cf2e3deb9aa1e9f37313a33e5d44fcfdb40a4764e1dc34896bd85b3d007f9.json delete mode 100644 backend/.sqlx/query-e6f85cdbe681ace495fde31e67339dc58460b6914440473fe94de7a7bc292af4.json delete mode 100644 backend/.sqlx/query-e7a1c2b5d79e72f557181782419a9d8d1a502796842f185374d2d0f69043086b.json delete mode 100644 backend/.sqlx/query-e9d9edc030061c5ccf2fb4294acbbae160e97faede6934d90f4882d806c14813.json create mode 100644 backend/.sqlx/query-ebd25047d14bec8457465ba6ed9b6b15b8f2303157b4c6e80ac9e3d84a57d8b1.json delete mode 100644 backend/.sqlx/query-ef8868893643a1a71531c1113d5cb38c5c204b3bc34c921b2f653c738af556a9.json delete mode 100644 backend/.sqlx/query-f04fa0262091c5a4abf7dddafeec1b34ed806dda70592b0030067aed46a104d9.json delete mode 100644 backend/.sqlx/query-f33dd637181439ba7fa441dbd7d7430c1ccc0f410c377cde71c70c9211f9c1df.json delete mode 100644 backend/.sqlx/query-f3d20b0fa17836538ec93b84b08ffc6b555371d6eeeadfc54f5bf0bcbe93d8b4.json delete mode 100644 backend/.sqlx/query-f3f1b312bff773fe04a5dbfc2c03963042fa19d5eb15cfb3e0c291a29482aa5b.json delete mode 100644 backend/.sqlx/query-f4849960aff7387cb6b130d2bc62dbfce45209fbbccf3b4b9b13019e0cd55ddb.json delete mode 100644 backend/.sqlx/query-f4a792eca82e9974d13d0731e7862e3c75dbee326e0856944539b2c5574cb6d3.json delete mode 100644 backend/.sqlx/query-f5c6d52f69b99dab6d7ec3aad2ec090a07fe82a2ccb17a1b3d903de499c2e7c8.json delete mode 100644 backend/.sqlx/query-f6a275ad8bc7dfec7f9a6b60c669f6f2ff93ce57b5afadabd618e1fb52951fef.json delete mode 100644 backend/.sqlx/query-f790a016c4a1333e3d4d1ce468a1679ba5e61ea88a5c65be9696312d2f455508.json delete mode 100644 backend/.sqlx/query-f7b1445ec1f0d86efb6f8e0939430e7294bcac06bb7930dcf4d46427571662cb.json delete mode 100644 backend/.sqlx/query-f8f25948ae14fcb71c666cdc5e51d888e1f22fb2300a78bbeafebf64e82658db.json delete mode 100644 backend/.sqlx/query-f916ec232837ece9323675e5f5142e7285f4266a1471e5ffdefadf421a67e44b.json delete mode 100644 backend/.sqlx/query-f9e0e35b4789a4da89f7bb21fa6b250fd64ee0e0b299471979db5ff8ee906929.json delete mode 100644 backend/.sqlx/query-f9fc0084fe086ef80005bb64a8bb6b493e53583017c18e2ab44f44125c52d548.json delete mode 100644 backend/.sqlx/query-fb1a32318b35ec5c8129eb3660b79eb5e6d1e01fcf01cc05d3c7ddf47295c2f5.json delete mode 100644 backend/.sqlx/query-fce269376a0f08cb39359a3cb86be6b9823af022195b80db8ccbc3737576462c.json delete mode 100644 backend/.sqlx/query-fe5e941310ffdbbe7cc5f3e2beb213999ff64bbe4f8e2532a7aa48184cb008e7.json delete mode 100644 backend/.sqlx/query-ff14230469026418966ec79b77f549b2fb27c90556484f3914666d5ad7f8f107.json diff --git a/backend/.sqlx/query-0128194fb539809e15bee670864fff3e22de8332d0c6d8ca98d22d62137fe701.json b/backend/.sqlx/query-0128194fb539809e15bee670864fff3e22de8332d0c6d8ca98d22d62137fe701.json deleted file mode 100644 index 045993ce2e..0000000000 --- a/backend/.sqlx/query-0128194fb539809e15bee670864fff3e22de8332d0c6d8ca98d22d62137fe701.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n c.id IS NOT NULL AS completed,\n q.id IS NOT NULL AND q.running AS running,\n SUBSTR(logs, GREATEST($1 - log_offset, 0)) AS logs,\n COALESCE(r.memory_peak, c.memory_peak) AS mem_peak,\n CASE\n -- flow step:\n WHEN flow_step_id IS NOT NULL THEN NULL\n -- completed:\n WHEN c.id IS NOT NULL THEN COALESCE(\n c.workflow_as_code_status || c.flow_status,\n c.workflow_as_code_status,\n c.flow_status\n )\n -- not completed:\n ELSE COALESCE(\n f.workflow_as_code_status || f.flow_status,\n f.workflow_as_code_status,\n f.flow_status\n )\n END AS \"flow_status: sqlx::types::Json>\",\n job_logs.log_offset + CHAR_LENGTH(job_logs.logs) + 1 AS log_offset,\n created_by AS \"created_by!\",\n CASE WHEN $4::BOOLEAN THEN (\n SELECT scalar_int FROM job_stats WHERE job_id = $3 AND metric_id = 'progress_perc'\n ) END AS progress\n FROM v2_job j\n LEFT JOIN v2_job_queue q USING (id)\n LEFT JOIN v2_job_runtime r USING (id)\n LEFT JOIN v2_job_status f USING (id)\n LEFT JOIN v2_job_completed c USING (id)\n LEFT JOIN job_logs ON job_logs.job_id = $3\n WHERE j.workspace_id = $2 AND j.id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "completed", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "running", - "type_info": "Bool" - }, - { - "ordinal": 2, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 3, - "name": "mem_peak", - "type_info": "Int4" - }, - { - "ordinal": 4, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 5, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "progress", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Text", - "Uuid", - "Bool" - ] - }, - "nullable": [ - null, - null, - null, - null, - null, - null, - false, - null - ] - }, - "hash": "0128194fb539809e15bee670864fff3e22de8332d0c6d8ca98d22d62137fe701" -} diff --git a/backend/.sqlx/query-016bf078cdea0aae4a05ae7e004fad573d5c7cbdca975edc34f36890c824c44b.json b/backend/.sqlx/query-016bf078cdea0aae4a05ae7e004fad573d5c7cbdca975edc34f36890c824c44b.json deleted file mode 100644 index 28a9e33022..0000000000 --- a/backend/.sqlx/query-016bf078cdea0aae4a05ae7e004fad573d5c7cbdca975edc34f36890c824c44b.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n email AS \"email!\",\n created_by AS \"created_by!\",\n parent_job, permissioned_as AS \"permissioned_as!\",\n script_path, schedule_path, flow_step_id, root_job,\n scheduled_for AS \"scheduled_for!: chrono::DateTime\"\n FROM queue WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "email!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "parent_job", - "type_info": "Uuid" - }, - { - "ordinal": 3, - "name": "permissioned_as!", - "type_info": "Varchar" - }, - { - "ordinal": 4, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "schedule_path", - "type_info": "Varchar" - }, - { - "ordinal": 6, - "name": "flow_step_id", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "root_job", - "type_info": "Uuid" - }, - { - "ordinal": 8, - "name": "scheduled_for!: chrono::DateTime", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true, - true, - true, - true, - true, - true - ] - }, - "hash": "016bf078cdea0aae4a05ae7e004fad573d5c7cbdca975edc34f36890c824c44b" -} diff --git a/backend/.sqlx/query-029ed3dcba207c58aa6936e44bd825b2166f1846b1bb684522607d5ca31a0df3.json b/backend/.sqlx/query-029ed3dcba207c58aa6936e44bd825b2166f1846b1bb684522607d5ca31a0df3.json deleted file mode 100644 index d9cf2bd091..0000000000 --- a/backend/.sqlx/query-029ed3dcba207c58aa6936e44bd825b2166f1846b1bb684522607d5ca31a0df3.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET flow_status = jsonb_set(COALESCE(flow_status, '{}'::jsonb), array[$1], jsonb_set(jsonb_set('{}'::jsonb, '{scheduled_for}', to_jsonb(now()::text)), '{name}', to_jsonb($4::text))) WHERE id = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "029ed3dcba207c58aa6936e44bd825b2166f1846b1bb684522607d5ca31a0df3" -} diff --git a/backend/.sqlx/query-02bb4ea17e83c79f870e2655d6d9c035af6d763b7ee9577280785ccf0220a123.json b/backend/.sqlx/query-02bb4ea17e83c79f870e2655d6d9c035af6d763b7ee9577280785ccf0220a123.json deleted file mode 100644 index e8df1339ff..0000000000 --- a/backend/.sqlx/query-02bb4ea17e83c79f870e2655d6d9c035af6d763b7ee9577280785ccf0220a123.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT running FROM queue WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "running", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - false - ] - }, - "hash": "02bb4ea17e83c79f870e2655d6d9c035af6d763b7ee9577280785ccf0220a123" -} diff --git a/backend/.sqlx/query-0355b53b1d45955ca56b2829372ce9c656d7f0ad7b8d0709161047f0d8cdc4f4.json b/backend/.sqlx/query-0355b53b1d45955ca56b2829372ce9c656d7f0ad7b8d0709161047f0d8cdc4f4.json deleted file mode 100644 index 2f2cb27400..0000000000 --- a/backend/.sqlx/query-0355b53b1d45955ca56b2829372ce9c656d7f0ad7b8d0709161047f0d8cdc4f4.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM queue WHERE workspace_id = $1 AND id = $2 RETURNING 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "0355b53b1d45955ca56b2829372ce9c656d7f0ad7b8d0709161047f0d8cdc4f4" -} diff --git a/backend/.sqlx/query-036af7b1cf6d731647fd718458944b9a9759bdb034e73f3065cde6a2f88c8dce.json b/backend/.sqlx/query-036af7b1cf6d731647fd718458944b9a9759bdb034e73f3065cde6a2f88c8dce.json deleted file mode 100644 index 6f17ee0e9d..0000000000 --- a/backend/.sqlx/query-036af7b1cf6d731647fd718458944b9a9759bdb034e73f3065cde6a2f88c8dce.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET permissioned_as = ('u/' || $1) WHERE permissioned_as = ('u/' || $2) AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "036af7b1cf6d731647fd718458944b9a9759bdb034e73f3065cde6a2f88c8dce" -} diff --git a/backend/.sqlx/query-04effcc6050250a02661323c880d493982dd1bfb63ca7373e035a98c268428e2.json b/backend/.sqlx/query-04effcc6050250a02661323c880d493982dd1bfb63ca7373e035a98c268428e2.json deleted file mode 100644 index caf2c0b4c8..0000000000 --- a/backend/.sqlx/query-04effcc6050250a02661323c880d493982dd1bfb63ca7373e035a98c268428e2.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT script_path FROM queue WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "04effcc6050250a02661323c880d493982dd1bfb63ca7373e035a98c268428e2" -} diff --git a/backend/.sqlx/query-0721acae4f627df4687bb43b830a47faeee5c0a152cda8d62794c14dd200fac1.json b/backend/.sqlx/query-0721acae4f627df4687bb43b830a47faeee5c0a152cda8d62794c14dd200fac1.json deleted file mode 100644 index fde6a8d881..0000000000 --- a/backend/.sqlx/query-0721acae4f627df4687bb43b830a47faeee5c0a152cda8d62794c14dd200fac1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET created_by = $1 WHERE created_by = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "0721acae4f627df4687bb43b830a47faeee5c0a152cda8d62794c14dd200fac1" -} diff --git a/backend/.sqlx/query-07a7f1da7ee77324a73eb5b3743e4a801e0c446c55fc9fd8bc75e36d58073bee.json b/backend/.sqlx/query-07a7f1da7ee77324a73eb5b3743e4a801e0c446c55fc9fd8bc75e36d58073bee.json deleted file mode 100644 index 15f9729ee1..0000000000 --- a/backend/.sqlx/query-07a7f1da7ee77324a73eb5b3743e4a801e0c446c55fc9fd8bc75e36d58073bee.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n substr(concat(coalesce(completed_job.logs, ''), job_logs.logs), greatest($1 - job_logs.log_offset, 0)) AS logs,\n mem_peak,\n CASE WHEN is_flow_step is true then NULL else flow_status END AS \"flow_status: sqlx::types::Json>\",\n job_logs.log_offset + char_length(job_logs.logs) + 1 AS log_offset,\n created_by AS \"created_by!\"\n FROM completed_job\n LEFT JOIN job_logs ON job_logs.job_id = completed_job.id \n WHERE completed_job.workspace_id = $2 AND completed_job.id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "mem_peak", - "type_info": "Int4" - }, - { - "ordinal": 2, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 4, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Int4", - "Text", - "Uuid" - ] - }, - "nullable": [ - null, - true, - null, - null, - true - ] - }, - "hash": "07a7f1da7ee77324a73eb5b3743e4a801e0c446c55fc9fd8bc75e36d58073bee" -} diff --git a/backend/.sqlx/query-099e7c7a66968575f896e0c11ecd9cfe9a2ec315d6589e940be157a0563f81af.json b/backend/.sqlx/query-099e7c7a66968575f896e0c11ecd9cfe9a2ec315d6589e940be157a0563f81af.json deleted file mode 100644 index 59fb4a5dba..0000000000 --- a/backend/.sqlx/query-099e7c7a66968575f896e0c11ecd9cfe9a2ec315d6589e940be157a0563f81af.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET last_ping = now() WHERE id = $1 AND workspace_id = $2 AND canceled = false", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "099e7c7a66968575f896e0c11ecd9cfe9a2ec315d6589e940be157a0563f81af" -} diff --git a/backend/.sqlx/query-0a6a89e6ab3037f02c3c4c84ee02138d5fded1e6360bb992046fe9711b5ea213.json b/backend/.sqlx/query-0a6a89e6ab3037f02c3c4c84ee02138d5fded1e6360bb992046fe9711b5ea213.json deleted file mode 100644 index 460ce2bf8d..0000000000 --- a/backend/.sqlx/query-0a6a89e6ab3037f02c3c4c84ee02138d5fded1e6360bb992046fe9711b5ea213.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n job_kind AS \"job_kind: JobKind\",\n script_hash AS \"script_hash: ScriptHash\",\n flow_status AS \"flow_status!: Json>\",\n raw_flow AS \"raw_flow: Json>\"\n FROM queue WHERE id = $1 AND workspace_id = $2 LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "job_kind: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_hash: ScriptHash", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "flow_status!: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - false, - true, - true, - true - ] - }, - "hash": "0a6a89e6ab3037f02c3c4c84ee02138d5fded1e6360bb992046fe9711b5ea213" -} diff --git a/backend/.sqlx/query-a68754521bf751450602f04dd4243199a18885e1739a5a0e7f6100eab6f3c803.json b/backend/.sqlx/query-0aa8f50fe377a23e2ae3821fd6eda4cbe80b0150827c6e90f6e4f9e512587ba1.json similarity index 51% rename from backend/.sqlx/query-a68754521bf751450602f04dd4243199a18885e1739a5a0e7f6100eab6f3c803.json rename to backend/.sqlx/query-0aa8f50fe377a23e2ae3821fd6eda4cbe80b0150827c6e90f6e4f9e512587ba1.json index 8d6e6a2416..d48b865a92 100644 --- a/backend/.sqlx/query-a68754521bf751450602f04dd4243199a18885e1739a5a0e7f6100eab6f3c803.json +++ b/backend/.sqlx/query-0aa8f50fe377a23e2ae3821fd6eda4cbe80b0150827c6e90f6e4f9e512587ba1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "INSERT INTO v2_job_runtime (id) VALUES ($1)", + "query": "UPDATE v2_job_queue SET started_at = NOW() WHERE id = $1", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "a68754521bf751450602f04dd4243199a18885e1739a5a0e7f6100eab6f3c803" + "hash": "0aa8f50fe377a23e2ae3821fd6eda4cbe80b0150827c6e90f6e4f9e512587ba1" } diff --git a/backend/.sqlx/query-0ad36c1598ff4ece0c325eaeb9a9177a87e1accd192402e21db5ae09c3498ab0.json b/backend/.sqlx/query-0ad36c1598ff4ece0c325eaeb9a9177a87e1accd192402e21db5ae09c3498ab0.json deleted file mode 100644 index 2d06bac0c9..0000000000 --- a/backend/.sqlx/query-0ad36c1598ff4ece0c325eaeb9a9177a87e1accd192402e21db5ae09c3498ab0.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO queue\n (workspace_id, id, running, parent_job, created_by, permissioned_as, scheduled_for, \n script_hash, script_path, raw_code, raw_lock, args, job_kind, schedule_path, raw_flow, flow_status, is_flow_step, language, started_at, same_worker, pre_run_error, email, visible_to_owner, root_job, tag, concurrent_limit, concurrency_time_window_s, timeout, flow_step_id, cache_ttl, priority, last_ping)\n VALUES ($1, $2, $3, $4, $5, $6, COALESCE($7, now()), $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, CASE WHEN $3 THEN now() END, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, NULL) RETURNING id", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Uuid", - "Bool", - "Uuid", - "Varchar", - "Varchar", - "Timestamptz", - "Int8", - "Varchar", - "Text", - "Text", - "Jsonb", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - "Varchar", - "Jsonb", - "Jsonb", - "Bool", - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Bool", - "Text", - "Varchar", - "Bool", - "Uuid", - "Varchar", - "Int4", - "Int4", - "Int4", - "Varchar", - "Int4", - "Int2" - ] - }, - "nullable": [ - false - ] - }, - "hash": "0ad36c1598ff4ece0c325eaeb9a9177a87e1accd192402e21db5ae09c3498ab0" -} diff --git a/backend/.sqlx/query-0c0b5d5d1e6ab2fed7532f94b50be3210e3845b61551691bbef81c2b6fb01121.json b/backend/.sqlx/query-0c0b5d5d1e6ab2fed7532f94b50be3210e3845b61551691bbef81c2b6fb01121.json deleted file mode 100644 index 9b37241475..0000000000 --- a/backend/.sqlx/query-0c0b5d5d1e6ab2fed7532f94b50be3210e3845b61551691bbef81c2b6fb01121.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['failure_module'], $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "0c0b5d5d1e6ab2fed7532f94b50be3210e3845b61551691bbef81c2b6fb01121" -} diff --git a/backend/.sqlx/query-0df84fc35f2780ceb7c473b0165ebab93a4bc1bcab166aae68244ab1f3d4df9f.json b/backend/.sqlx/query-0df84fc35f2780ceb7c473b0165ebab93a4bc1bcab166aae68244ab1f3d4df9f.json deleted file mode 100644 index d34383496a..0000000000 --- a/backend/.sqlx/query-0df84fc35f2780ceb7c473b0165ebab93a4bc1bcab166aae68244ab1f3d4df9f.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO completed_job AS cj\n ( workspace_id\n , id\n , parent_job\n , created_by\n , created_at\n , started_at\n , duration_ms\n , success\n , script_hash\n , script_path\n , args\n , result\n , raw_code\n , raw_lock\n , canceled\n , canceled_by\n , canceled_reason\n , job_kind\n , schedule_path\n , permissioned_as\n , flow_status\n , raw_flow\n , is_flow_step\n , is_skipped\n , language\n , email\n , visible_to_owner\n , mem_peak\n , tag\n , priority\n )\n VALUES ($1, $2, $3, $4, $5, COALESCE($6, now()), COALESCE($30::bigint, (EXTRACT('epoch' FROM (now())) - EXTRACT('epoch' FROM (COALESCE($6, now()))))*1000), $7, $8, $9,$10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29)\n ON CONFLICT (id) DO UPDATE SET success = $7, result = $11 RETURNING duration_ms AS \"duration_ms!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "duration_ms!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Uuid", - "Uuid", - "Varchar", - "Timestamptz", - "Timestamptz", - "Bool", - "Int8", - "Varchar", - "Jsonb", - "Jsonb", - "Text", - "Text", - "Bool", - "Varchar", - "Text", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - "Varchar", - "Varchar", - "Jsonb", - "Jsonb", - "Bool", - "Bool", - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Varchar", - "Bool", - "Int4", - "Varchar", - "Int2", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "0df84fc35f2780ceb7c473b0165ebab93a4bc1bcab166aae68244ab1f3d4df9f" -} diff --git a/backend/.sqlx/query-0ef638eb62cb8b285cb20855679486b78eae82901a0128b9c9c837c9e9e91212.json b/backend/.sqlx/query-0ef638eb62cb8b285cb20855679486b78eae82901a0128b9c9c837c9e9e91212.json deleted file mode 100644 index 85523ee5c3..0000000000 --- a/backend/.sqlx/query-0ef638eb62cb8b285cb20855679486b78eae82901a0128b9c9c837c9e9e91212.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n success AS \"success!\",\n result AS \"result: Json>\",\n started_at AS \"started_at!\"FROM completed_job WHERE workspace_id = $1 AND schedule_path = $2 AND script_path = $3 AND id != $4\n ORDER BY created_at DESC\n LIMIT $5", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "result: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "started_at!", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Uuid", - "Int8" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "0ef638eb62cb8b285cb20855679486b78eae82901a0128b9c9c837c9e9e91212" -} diff --git a/backend/.sqlx/query-0f9c4c2fda3beeafc940e14a6c2c44d61782aaae68ffa413f37b13dc6cf4d83d.json b/backend/.sqlx/query-0f9c4c2fda3beeafc940e14a6c2c44d61782aaae68ffa413f37b13dc6cf4d83d.json deleted file mode 100644 index fc68dc313a..0000000000 --- a/backend/.sqlx/query-0f9c4c2fda3beeafc940e14a6c2c44d61782aaae68ffa413f37b13dc6cf4d83d.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job_status SET\n flow_status = jsonb_set(\n jsonb_set(\n COALESCE(flow_status, '{}'::jsonb),\n array[$1],\n COALESCE(flow_status->$1, '{}'::jsonb)\n ),\n array[$1, 'started_at'],\n to_jsonb(now()::text)\n )\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "0f9c4c2fda3beeafc940e14a6c2c44d61782aaae68ffa413f37b13dc6cf4d83d" -} diff --git a/backend/.sqlx/query-119469ebfe8572c78ed3ee5ab5b1a6a1cb1b0f31e357b5370f9bb7eab1e20a7b.json b/backend/.sqlx/query-119469ebfe8572c78ed3ee5ab5b1a6a1cb1b0f31e357b5370f9bb7eab1e20a7b.json deleted file mode 100644 index bb701df30d..0000000000 --- a/backend/.sqlx/query-119469ebfe8572c78ed3ee5ab5b1a6a1cb1b0f31e357b5370f9bb7eab1e20a7b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH uuid_table as (\n select gen_random_uuid() as uuid from generate_series(1, $6)\n )\n INSERT INTO job\n (id, workspace_id, raw_code, raw_lock, raw_flow, tag)\n (SELECT uuid, $1, $2, $3, $4, $5 FROM uuid_table)\n RETURNING id AS \"id!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text", - "Jsonb", - "Varchar", - "Int4" - ] - }, - "nullable": [ - true - ] - }, - "hash": "119469ebfe8572c78ed3ee5ab5b1a6a1cb1b0f31e357b5370f9bb7eab1e20a7b" -} diff --git a/backend/.sqlx/query-11d59fb24aeb40f82e6fd11b697f26e14a0ae955fabeecc4a936b95937bf04d1.json b/backend/.sqlx/query-11d59fb24aeb40f82e6fd11b697f26e14a0ae955fabeecc4a936b95937bf04d1.json deleted file mode 100644 index 3375abd07a..0000000000 --- a/backend/.sqlx/query-11d59fb24aeb40f82e6fd11b697f26e14a0ae955fabeecc4a936b95937bf04d1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = jsonb_set(\n jsonb_set(flow_status, ARRAY['modules', $4::INTEGER::TEXT, 'job'], to_jsonb($1::UUID::TEXT)),\n ARRAY['modules', $4::INTEGER::TEXT, 'type'],\n to_jsonb('InProgress'::text)\n )\n WHERE id = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Uuid", - "Text", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "11d59fb24aeb40f82e6fd11b697f26e14a0ae955fabeecc4a936b95937bf04d1" -} diff --git a/backend/.sqlx/query-126be8832776644e0d2c5d004acb26f6d4820a6a1fc8e028c3550c438248a82b.json b/backend/.sqlx/query-126be8832776644e0d2c5d004acb26f6d4820a6a1fc8e028c3550c438248a82b.json deleted file mode 100644 index ecc75e957a..0000000000 --- a/backend/.sqlx/query-126be8832776644e0d2c5d004acb26f6d4820a6a1fc8e028c3550c438248a82b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET running = false\n , started_at = null\n , scheduled_for = $1\n , last_ping = null\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Timestamptz", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "126be8832776644e0d2c5d004acb26f6d4820a6a1fc8e028c3550c438248a82b" -} diff --git a/backend/.sqlx/query-12a0fd7d8d99fb73b01bc24774fe9a8da57b5204bb6b1207aed47143c17a20bc.json b/backend/.sqlx/query-12a0fd7d8d99fb73b01bc24774fe9a8da57b5204bb6b1207aed47143c17a20bc.json deleted file mode 100644 index e60e67da63..0000000000 --- a/backend/.sqlx/query-12a0fd7d8d99fb73b01bc24774fe9a8da57b5204bb6b1207aed47143c17a20bc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COUNT(id) FROM queue WHERE running = true AND workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "12a0fd7d8d99fb73b01bc24774fe9a8da57b5204bb6b1207aed47143c17a20bc" -} diff --git a/backend/.sqlx/query-1438e8dc5738fc69bc6601eb11729610f671b7df0ab25da058e16c6654279d61.json b/backend/.sqlx/query-1438e8dc5738fc69bc6601eb11729610f671b7df0ab25da058e16c6654279d61.json deleted file mode 100644 index 452510a97f..0000000000 --- a/backend/.sqlx/query-1438e8dc5738fc69bc6601eb11729610f671b7df0ab25da058e16c6654279d61.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT flow_status->'user_states'->$1\n FROM queue\n WHERE id = $2 AND workspace_id = $3\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "1438e8dc5738fc69bc6601eb11729610f671b7df0ab25da058e16c6654279d61" -} diff --git a/backend/.sqlx/query-14540eef4594d9282cee3df4f92a7ed2e67243e5c1522850045b2da42fa914bc.json b/backend/.sqlx/query-14540eef4594d9282cee3df4f92a7ed2e67243e5c1522850045b2da42fa914bc.json deleted file mode 100644 index b10496550f..0000000000 --- a/backend/.sqlx/query-14540eef4594d9282cee3df4f92a7ed2e67243e5c1522850045b2da42fa914bc.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n queue.job_kind AS \"job_kind!: JobKind\",\n queue.script_hash AS \"script_hash: ScriptHash\",\n queue.raw_flow AS \"raw_flow: sqlx::types::Json>\",\n completed_job.parent_job AS \"parent_job: Uuid\",\n completed_job.created_at AS \"created_at!: chrono::NaiveDateTime\",\n completed_job.created_by AS \"created_by!\",\n queue.script_path,\n queue.args AS \"args: sqlx::types::Json>\"\n FROM queue\n JOIN completed_job ON completed_job.parent_job = queue.id\n WHERE completed_job.id = $1 AND completed_job.workspace_id = $2\n LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "job_kind!: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_hash: ScriptHash", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "raw_flow: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "parent_job: Uuid", - "type_info": "Uuid" - }, - { - "ordinal": 4, - "name": "created_at!: chrono::NaiveDateTime", - "type_info": "Timestamptz" - }, - { - "ordinal": 5, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 6, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "args: sqlx::types::Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true, - true, - true, - true, - true - ] - }, - "hash": "14540eef4594d9282cee3df4f92a7ed2e67243e5c1522850045b2da42fa914bc" -} diff --git a/backend/.sqlx/query-15557c0acea71cee03f42516553fb4f5709e0e1a02a0187e88fa5d9e94ffb91a.json b/backend/.sqlx/query-15557c0acea71cee03f42516553fb4f5709e0e1a02a0187e88fa5d9e94ffb91a.json deleted file mode 100644 index dc8718bda6..0000000000 --- a/backend/.sqlx/query-15557c0acea71cee03f42516553fb4f5709e0e1a02a0187e88fa5d9e94ffb91a.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO queue\n (workspace_id, id, running, parent_job, created_by, permissioned_as, scheduled_for, \n script_hash, script_path, raw_code, raw_lock, args, job_kind, schedule_path, raw_flow, flow_status, is_flow_step, language, started_at, same_worker, pre_run_error, email, visible_to_owner, root_job, tag, concurrent_limit, concurrency_time_window_s, timeout, flow_step_id, cache_ttl, priority, last_ping)\n VALUES ($1, $2, $3, $4, $5, $6, COALESCE($7, now()), $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, CASE WHEN $3 THEN now() END, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, NULL) RETURNING id AS \"id!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Uuid", - "Bool", - "Uuid", - "Varchar", - "Varchar", - "Timestamptz", - "Int8", - "Varchar", - "Text", - "Text", - "Jsonb", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - "Varchar", - "Jsonb", - "Jsonb", - "Bool", - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Bool", - "Text", - "Varchar", - "Bool", - "Uuid", - "Varchar", - "Int4", - "Int4", - "Int4", - "Varchar", - "Int4", - "Int2" - ] - }, - "nullable": [ - true - ] - }, - "hash": "15557c0acea71cee03f42516553fb4f5709e0e1a02a0187e88fa5d9e94ffb91a" -} diff --git a/backend/.sqlx/query-15697f3b63f88b9cfa33ab0aa64b441961aad80bf9fd0125bcf55a729e556d1e.json b/backend/.sqlx/query-15697f3b63f88b9cfa33ab0aa64b441961aad80bf9fd0125bcf55a729e556d1e.json deleted file mode 100644 index 4199d677a7..0000000000 --- a/backend/.sqlx/query-15697f3b63f88b9cfa33ab0aa64b441961aad80bf9fd0125bcf55a729e556d1e.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE\n FROM parallel_monitor_lock\n WHERE last_ping IS NOT NULL AND last_ping < NOW() - ($1 || ' seconds')::interval \n RETURNING parent_flow_id, job_id, last_ping, (SELECT workspace_id FROM queue q\n WHERE q.id = parent_flow_id AND q.running = true AND q.canceled = false) AS workspace_id\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "parent_flow_id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "job_id", - "type_info": "Uuid" - }, - { - "ordinal": 2, - "name": "last_ping", - "type_info": "Timestamptz" - }, - { - "ordinal": 3, - "name": "workspace_id", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - true, - null - ] - }, - "hash": "15697f3b63f88b9cfa33ab0aa64b441961aad80bf9fd0125bcf55a729e556d1e" -} diff --git a/backend/.sqlx/query-16be0560028361d46bf3b842a5fa07472994d8942c684f5b75339fe71ea23cdd.json b/backend/.sqlx/query-16be0560028361d46bf3b842a5fa07472994d8942c684f5b75339fe71ea23cdd.json deleted file mode 100644 index d273132682..0000000000 --- a/backend/.sqlx/query-16be0560028361d46bf3b842a5fa07472994d8942c684f5b75339fe71ea23cdd.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT script_path FROM completed_job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "16be0560028361d46bf3b842a5fa07472994d8942c684f5b75339fe71ea23cdd" -} diff --git a/backend/.sqlx/query-170f620fbd99269d194d14d56f6a3863d9db5fe736a0a34325b824d9cec9b1a0.json b/backend/.sqlx/query-170f620fbd99269d194d14d56f6a3863d9db5fe736a0a34325b824d9cec9b1a0.json deleted file mode 100644 index 61fd7ed3ef..0000000000 --- a/backend/.sqlx/query-170f620fbd99269d194d14d56f6a3863d9db5fe736a0a34325b824d9cec9b1a0.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO completed_job AS cj\n ( workspace_id\n , id\n , parent_job\n , created_by\n , created_at\n , started_at\n , duration_ms\n , success\n , script_hash\n , script_path\n , args\n , result\n , raw_code\n , raw_lock\n , canceled\n , canceled_by\n , canceled_reason\n , job_kind\n , schedule_path\n , permissioned_as\n , flow_status\n , raw_flow\n , is_flow_step\n , is_skipped\n , language\n , email\n , visible_to_owner\n , mem_peak\n , tag\n , priority\n )\n SELECT workspace_id\n , id\n , parent_job\n , created_by\n , created_at\n , now()\n , 0\n , false\n , script_hash\n , script_path\n , args\n , $4\n , raw_code\n , raw_lock\n , true\n , $1\n , canceled_reason\n , job_kind\n , schedule_path\n , permissioned_as\n , flow_status\n , raw_flow\n , is_flow_step\n , false\n , language\n , email\n , visible_to_owner\n , mem_peak\n , tag\n , priority FROM queue \n WHERE id = any($2) AND running = false AND parent_job IS NULL AND workspace_id = $3 AND schedule_path IS NULL FOR UPDATE SKIP LOCKED\n ON CONFLICT (id) DO NOTHING RETURNING id", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "UuidArray", - "Text", - "Jsonb" - ] - }, - "nullable": [ - false - ] - }, - "hash": "170f620fbd99269d194d14d56f6a3863d9db5fe736a0a34325b824d9cec9b1a0" -} diff --git a/backend/.sqlx/query-17e3e2a3232865c33fa535b5d99455942e30f932c5b97f1e5b508128f39a288f.json b/backend/.sqlx/query-17e3e2a3232865c33fa535b5d99455942e30f932c5b97f1e5b508128f39a288f.json deleted file mode 100644 index 4000bbb962..0000000000 --- a/backend/.sqlx/query-17e3e2a3232865c33fa535b5d99455942e30f932c5b97f1e5b508128f39a288f.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(\n JSONB_SET(flow_status, ARRAY['preprocessor_module'], $1), ARRAY['step'], $2)\n WHERE id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "17e3e2a3232865c33fa535b5d99455942e30f932c5b97f1e5b508128f39a288f" -} diff --git a/backend/.sqlx/query-17f04341c5c52173a776b71672f9e4d932d2f072b6c08ce419e4b95a2fd83e96.json b/backend/.sqlx/query-17f04341c5c52173a776b71672f9e4d932d2f072b6c08ce419e4b95a2fd83e96.json deleted file mode 100644 index 65ae96f587..0000000000 --- a/backend/.sqlx/query-17f04341c5c52173a776b71672f9e4d932d2f072b6c08ce419e4b95a2fd83e96.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH zombie_jobs AS (\n UPDATE queue SET running = false, started_at = null\n WHERE last_ping < now() - ($1 || ' seconds')::interval\n AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow') AND same_worker = false\n RETURNING id, workspace_id, last_ping\n ),\n update_concurrency AS (\n UPDATE concurrency_counter cc\n SET job_uuids = job_uuids - zj.id::text\n FROM zombie_jobs zj\n INNER JOIN concurrency_key ck ON ck.job_id = zj.id\n WHERE cc.concurrency_id = ck.key\n )\n SELECT id AS \"id!\", workspace_id AS \"workspace_id!\", last_ping FROM zombie_jobs", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "workspace_id!", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "last_ping", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "17f04341c5c52173a776b71672f9e4d932d2f072b6c08ce419e4b95a2fd83e96" -} diff --git a/backend/.sqlx/query-1af5ccc82048df95a791949e7b141861dbfd5c08daea615dde081e29f7459b9d.json b/backend/.sqlx/query-1af5ccc82048df95a791949e7b141861dbfd5c08daea615dde081e29f7459b9d.json deleted file mode 100644 index 9ab47f361b..0000000000 --- a/backend/.sqlx/query-1af5ccc82048df95a791949e7b141861dbfd5c08daea615dde081e29f7459b9d.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id FROM queue WHERE schedule_path = $1 AND workspace_id = $2 AND id != $3 AND running = true", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Uuid" - ] - }, - "nullable": [ - false - ] - }, - "hash": "1af5ccc82048df95a791949e7b141861dbfd5c08daea615dde081e29f7459b9d" -} diff --git a/backend/.sqlx/query-1c2254c15696d3dbc091488311676641ba3c6f1f1b5e006fc75427c9b231d323.json b/backend/.sqlx/query-1c2254c15696d3dbc091488311676641ba3c6f1f1b5e006fc75427c9b231d323.json deleted file mode 100644 index 110713fd0e..0000000000 --- a/backend/.sqlx/query-1c2254c15696d3dbc091488311676641ba3c6f1f1b5e006fc75427c9b231d323.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET script_path = REGEXP_REPLACE(script_path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1') WHERE script_path LIKE ('u/' || $2 || '/%') AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "1c2254c15696d3dbc091488311676641ba3c6f1f1b5e006fc75427c9b231d323" -} diff --git a/backend/.sqlx/query-1c28baaadd7d0c86a92bf9880a4ea33457bf8cff669e983431f1fd26ff275f83.json b/backend/.sqlx/query-1c28baaadd7d0c86a92bf9880a4ea33457bf8cff669e983431f1fd26ff275f83.json deleted file mode 100644 index 0cb39dcb9b..0000000000 --- a/backend/.sqlx/query-1c28baaadd7d0c86a92bf9880a4ea33457bf8cff669e983431f1fd26ff275f83.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT id, flow_status, suspend, script_path\n FROM queue\n WHERE id = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "flow_status", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "suspend", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - false, - true, - false, - true - ] - }, - "hash": "1c28baaadd7d0c86a92bf9880a4ea33457bf8cff669e983431f1fd26ff275f83" -} diff --git a/backend/.sqlx/query-1d1098cc9367502faa1483627bf534472a6cae70d7964ba019aa2121c3929234.json b/backend/.sqlx/query-1d1098cc9367502faa1483627bf534472a6cae70d7964ba019aa2121c3929234.json deleted file mode 100644 index abbd8b2a6d..0000000000 --- a/backend/.sqlx/query-1d1098cc9367502faa1483627bf534472a6cae70d7964ba019aa2121c3929234.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n result AS \"result: sqlx::types::Json>\",\n language AS \"language: ScriptLang\",\n flow_status AS \"flow_status: sqlx::types::Json>\",\n success AS \"success!\"\n FROM completed_job\n WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "result: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 1, - "name": "language: ScriptLang", - "type_info": { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - } - }, - { - "ordinal": 2, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "success!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "1d1098cc9367502faa1483627bf534472a6cae70d7964ba019aa2121c3929234" -} diff --git a/backend/.sqlx/query-1d842b4c940d788372ed377465e24faa490a4649f74c37bcd0b47ebffc81a2a9.json b/backend/.sqlx/query-1d842b4c940d788372ed377465e24faa490a4649f74c37bcd0b47ebffc81a2a9.json deleted file mode 100644 index 0d5b76374d..0000000000 --- a/backend/.sqlx/query-1d842b4c940d788372ed377465e24faa490a4649f74c37bcd0b47ebffc81a2a9.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job_status SET\n flow_status = jsonb_set(\n jsonb_set(\n COALESCE(flow_status, '{}'::jsonb),\n array[$1],\n COALESCE(flow_status->$1, '{}'::jsonb)\n ),\n array[$1, 'duration_ms'],\n to_jsonb($2::bigint)\n )\n WHERE id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "1d842b4c940d788372ed377465e24faa490a4649f74c37bcd0b47ebffc81a2a9" -} diff --git a/backend/.sqlx/query-1e188d8e427cab25dbe18aa900260e26e644a9d939e74a8317c4a09335f110fe.json b/backend/.sqlx/query-1e188d8e427cab25dbe18aa900260e26e644a9d939e74a8317c4a09335f110fe.json deleted file mode 100644 index 01fb19b1c2..0000000000 --- a/backend/.sqlx/query-1e188d8e427cab25dbe18aa900260e26e644a9d939e74a8317c4a09335f110fe.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(\n JSONB_SET(flow_status, ARRAY['modules', $1::TEXT, 'flow_jobs_success', $3::TEXT], $4),\n ARRAY['modules', $1::TEXT, 'branchall', 'branch'], ((flow_status->'modules'->$1::int->'branchall'->>'branch')::int + 1)::text::jsonb),\n last_ping = NULL\n WHERE id = $2\n RETURNING (flow_status->'modules'->$1::int->'branchall'->>'branch')::int", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "int4", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Uuid", - "Text", - "Jsonb" - ] - }, - "nullable": [ - null - ] - }, - "hash": "1e188d8e427cab25dbe18aa900260e26e644a9d939e74a8317c4a09335f110fe" -} diff --git a/backend/.sqlx/query-1e43e6040ac95b586d4d73999025f4a3e79c87fc1c5b43e787fd8e19c555b44b.json b/backend/.sqlx/query-1e43e6040ac95b586d4d73999025f4a3e79c87fc1c5b43e787fd8e19c555b44b.json deleted file mode 100644 index b64ace475a..0000000000 --- a/backend/.sqlx/query-1e43e6040ac95b586d4d73999025f4a3e79c87fc1c5b43e787fd8e19c555b44b.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET last_ping = null\n WHERE id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "1e43e6040ac95b586d4d73999025f4a3e79c87fc1c5b43e787fd8e19c555b44b" -} diff --git a/backend/.sqlx/query-1f93b533fa6fee0db4340445da3fac8e6773bc1db1f88cd60fd3c1e8c9781eb0.json b/backend/.sqlx/query-1f93b533fa6fee0db4340445da3fac8e6773bc1db1f88cd60fd3c1e8c9781eb0.json deleted file mode 100644 index abb52bb3c0..0000000000 --- a/backend/.sqlx/query-1f93b533fa6fee0db4340445da3fac8e6773bc1db1f88cd60fd3c1e8c9781eb0.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET suspend = $1 WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "1f93b533fa6fee0db4340445da3fac8e6773bc1db1f88cd60fd3c1e8c9781eb0" -} diff --git a/backend/.sqlx/query-20d9a1b3a6631f97836e7b8d96cdec706ba1cc2d5d432e397633a1f79e67589a.json b/backend/.sqlx/query-20d9a1b3a6631f97836e7b8d96cdec706ba1cc2d5d432e397633a1f79e67589a.json deleted file mode 100644 index 7a1fe7377e..0000000000 --- a/backend/.sqlx/query-20d9a1b3a6631f97836e7b8d96cdec706ba1cc2d5d432e397633a1f79e67589a.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n result AS \"result: sqlx::types::Json>\",\n flow_status AS \"flow_status: sqlx::types::Json>\",\n language AS \"language: ScriptLang\",\n created_by AS \"created_by!\"\n FROM completed_job\n WHERE id = $1 AND workspace_id = $2 AND ($3::text[] IS NULL OR tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "result: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 1, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "language: ScriptLang", - "type_info": { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - } - }, - { - "ordinal": 3, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "20d9a1b3a6631f97836e7b8d96cdec706ba1cc2d5d432e397633a1f79e67589a" -} diff --git a/backend/.sqlx/query-215e0d320a304c8cb9ef12e7ea98a4eafb2456c123f9b6b96bb4ba2409166e5a.json b/backend/.sqlx/query-215e0d320a304c8cb9ef12e7ea98a4eafb2456c123f9b6b96bb4ba2409166e5a.json deleted file mode 100644 index 0889a223e6..0000000000 --- a/backend/.sqlx/query-215e0d320a304c8cb9ef12e7ea98a4eafb2456c123f9b6b96bb4ba2409166e5a.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET running = false, started_at = null WHERE id = $1 AND canceled = false", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "215e0d320a304c8cb9ef12e7ea98a4eafb2456c123f9b6b96bb4ba2409166e5a" -} diff --git a/backend/.sqlx/query-217a5291438d23597b2c7f05d2c481f406364d56a129089a268f6423c548bca6.json b/backend/.sqlx/query-217a5291438d23597b2c7f05d2c481f406364d56a129089a268f6423c548bca6.json deleted file mode 100644 index 9dac2a2451..0000000000 --- a/backend/.sqlx/query-217a5291438d23597b2c7f05d2c481f406364d56a129089a268f6423c548bca6.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT raw_code, raw_lock, raw_flow AS \"raw_flow: Json>\"\n FROM queue WHERE id = $1 AND workspace_id = $2 LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "raw_code", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "raw_lock", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "217a5291438d23597b2c7f05d2c481f406364d56a129089a268f6423c548bca6" -} diff --git a/backend/.sqlx/query-230d58732a08164268ca10d248a93cced646632a76864b693ed2325d85b36c45.json b/backend/.sqlx/query-230d58732a08164268ca10d248a93cced646632a76864b693ed2325d85b36c45.json deleted file mode 100644 index 37d4e7d370..0000000000 --- a/backend/.sqlx/query-230d58732a08164268ca10d248a93cced646632a76864b693ed2325d85b36c45.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT canceled FROM queue WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "canceled", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - false - ] - }, - "hash": "230d58732a08164268ca10d248a93cced646632a76864b693ed2325d85b36c45" -} diff --git a/backend/.sqlx/query-25d05a1e10d1aaa3f7c3c3bea5f6b2fe3f690da7bc8dfd36b47ec619c4e31995.json b/backend/.sqlx/query-25d05a1e10d1aaa3f7c3c3bea5f6b2fe3f690da7bc8dfd36b47ec619c4e31995.json deleted file mode 100644 index eb652ef49d..0000000000 --- a/backend/.sqlx/query-25d05a1e10d1aaa3f7c3c3bea5f6b2fe3f690da7bc8dfd36b47ec619c4e31995.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n running AS \"running!\",\n substr(concat(coalesce(v2_as_queue.logs, ''), job_logs.logs), greatest($1 - job_logs.log_offset, 0)) AS logs,\n mem_peak,\n CASE WHEN is_flow_step is true then NULL else flow_status END AS \"flow_status: sqlx::types::Json>\",\n job_logs.log_offset + char_length(job_logs.logs) + 1 AS log_offset,\n created_by AS \"created_by!\"\n FROM v2_as_queue\n LEFT JOIN job_logs ON job_logs.job_id = v2_as_queue.id \n WHERE v2_as_queue.workspace_id = $2 AND v2_as_queue.id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "running!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "mem_peak", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Int4", - "Text", - "Uuid" - ] - }, - "nullable": [ - true, - null, - true, - null, - null, - true - ] - }, - "hash": "25d05a1e10d1aaa3f7c3c3bea5f6b2fe3f690da7bc8dfd36b47ec619c4e31995" -} diff --git a/backend/.sqlx/query-26106be4d94c159cc8d9eb37a3b94927c5d3d43c18cdb5e98e979e761ed6ed0e.json b/backend/.sqlx/query-26106be4d94c159cc8d9eb37a3b94927c5d3d43c18cdb5e98e979e761ed6ed0e.json deleted file mode 100644 index fa5e4bff4c..0000000000 --- a/backend/.sqlx/query-26106be4d94c159cc8d9eb37a3b94927c5d3d43c18cdb5e98e979e761ed6ed0e.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['step'], $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "26106be4d94c159cc8d9eb37a3b94927c5d3d43c18cdb5e98e979e761ed6ed0e" -} diff --git a/backend/.sqlx/query-262c7b21e77a8d2943fefb9cabe1e60c7c3b4e3ce7ed6b2b3eb78dd99b7d8fcf.json b/backend/.sqlx/query-262c7b21e77a8d2943fefb9cabe1e60c7c3b4e3ce7ed6b2b3eb78dd99b7d8fcf.json deleted file mode 100644 index 0025d31dc8..0000000000 --- a/backend/.sqlx/query-262c7b21e77a8d2943fefb9cabe1e60c7c3b4e3ce7ed6b2b3eb78dd99b7d8fcf.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET last_ping = now()\n WHERE id = $1 AND last_ping < now()", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "262c7b21e77a8d2943fefb9cabe1e60c7c3b4e3ce7ed6b2b3eb78dd99b7d8fcf" -} diff --git a/backend/.sqlx/query-28a878c59b6d52f42d315eabb34c96133b69542b01232295c26cc9e093c372f9.json b/backend/.sqlx/query-28a878c59b6d52f42d315eabb34c96133b69542b01232295c26cc9e093c372f9.json deleted file mode 100644 index fcdf2ac38d..0000000000 --- a/backend/.sqlx/query-28a878c59b6d52f42d315eabb34c96133b69542b01232295c26cc9e093c372f9.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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 queue WHERE (workspace_id = $1 OR $2) AND scheduled_for <= now()", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "database_length!", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "suspended!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Bool" - ] - }, - "nullable": [ - null, - null - ] - }, - "hash": "28a878c59b6d52f42d315eabb34c96133b69542b01232295c26cc9e093c372f9" -} diff --git a/backend/.sqlx/query-293054a4d6a2b00228a5029a81c026e8891576c7e87cdab41d7fcc3afc32d583.json b/backend/.sqlx/query-293054a4d6a2b00228a5029a81c026e8891576c7e87cdab41d7fcc3afc32d583.json deleted file mode 100644 index 291b3f3601..0000000000 --- a/backend/.sqlx/query-293054a4d6a2b00228a5029a81c026e8891576c7e87cdab41d7fcc3afc32d583.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COUNT(*) FROM queue LEFT JOIN concurrency_key ON concurrency_key.job_id = queue.id\n WHERE key = $1 AND running = false AND canceled = false AND scheduled_for >= $2 AND scheduled_for < $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Timestamptz", - "Timestamptz" - ] - }, - "nullable": [ - null - ] - }, - "hash": "293054a4d6a2b00228a5029a81c026e8891576c7e87cdab41d7fcc3afc32d583" -} diff --git a/backend/.sqlx/query-2a0b59e2770b27a1f2a8baddc67dba29216a1aad733171c25cc4aae5b3c84d54.json b/backend/.sqlx/query-2a0b59e2770b27a1f2a8baddc67dba29216a1aad733171c25cc4aae5b3c84d54.json deleted file mode 100644 index 8ff5e29db1..0000000000 --- a/backend/.sqlx/query-2a0b59e2770b27a1f2a8baddc67dba29216a1aad733171c25cc4aae5b3c84d54.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET\n flow_status = JSONB_SET(flow_status, ARRAY['modules', flow_status->>'step'::text], $1),\n suspend = $2,\n suspend_until = now() + $3\n WHERE id = $4", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Int4", - "Interval", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "2a0b59e2770b27a1f2a8baddc67dba29216a1aad733171c25cc4aae5b3c84d54" -} diff --git a/backend/.sqlx/query-2bfb918104568288bb57e64d1cf914c14cd493f96005017c299a805c48aef092.json b/backend/.sqlx/query-2bfb918104568288bb57e64d1cf914c14cd493f96005017c299a805c48aef092.json deleted file mode 100644 index 42d0fefc9f..0000000000 --- a/backend/.sqlx/query-2bfb918104568288bb57e64d1cf914c14cd493f96005017c299a805c48aef092.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT CASE WHEN pg_column_size(args) < 40000 OR $3 THEN args ELSE '\"WINDMILL_TOO_BIG\"'::jsonb END as args FROM completed_job WHERE id = $1 AND workspace_id = $2 UNION ALL SELECT CASE WHEN pg_column_size(args) < 40000 OR $3 THEN args ELSE '\"WINDMILL_TOO_BIG\"'::jsonb END as args FROM input WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "args", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "Bool" - ] - }, - "nullable": [ - null - ] - }, - "hash": "2bfb918104568288bb57e64d1cf914c14cd493f96005017c299a805c48aef092" -} diff --git a/backend/.sqlx/query-2cef109784efc04999e4537e0d1d3fb3221e04f3a7c1abe91dd763f366d06618.json b/backend/.sqlx/query-2cef109784efc04999e4537e0d1d3fb3221e04f3a7c1abe91dd763f366d06618.json deleted file mode 100644 index 3b7793dd05..0000000000 --- a/backend/.sqlx/query-2cef109784efc04999e4537e0d1d3fb3221e04f3a7c1abe91dd763f366d06618.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT success AS \"success!\" FROM completed_job WHERE id = ANY($1)", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "UuidArray" - ] - }, - "nullable": [ - true - ] - }, - "hash": "2cef109784efc04999e4537e0d1d3fb3221e04f3a7c1abe91dd763f366d06618" -} diff --git a/backend/.sqlx/query-32fdc66931dcf34f6ef5cdf3fd335d9f990eaa3dbb396290477159012e86af14.json b/backend/.sqlx/query-32fdc66931dcf34f6ef5cdf3fd335d9f990eaa3dbb396290477159012e86af14.json deleted file mode 100644 index 4767ba9a23..0000000000 --- a/backend/.sqlx/query-32fdc66931dcf34f6ef5cdf3fd335d9f990eaa3dbb396290477159012e86af14.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n id AS \"id!\", workspace_id AS \"workspace_id!\", parent_job, is_flow_step,\n flow_status AS \"flow_status: Box\", last_ping, same_worker\n FROM queue\n WHERE running = true AND suspend = 0 AND suspend_until IS null AND scheduled_for <= now()\n AND (job_kind = 'flow' OR job_kind = 'flowpreview' OR job_kind = 'flownode')\n AND last_ping IS NOT NULL AND last_ping < NOW() - ($1 || ' seconds')::interval\n AND canceled = false\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "workspace_id!", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "parent_job", - "type_info": "Uuid" - }, - { - "ordinal": 3, - "name": "is_flow_step", - "type_info": "Bool" - }, - { - "ordinal": 4, - "name": "flow_status: Box", - "type_info": "Jsonb" - }, - { - "ordinal": 5, - "name": "last_ping", - "type_info": "Timestamptz" - }, - { - "ordinal": 6, - "name": "same_worker", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true, - true, - true, - true - ] - }, - "hash": "32fdc66931dcf34f6ef5cdf3fd335d9f990eaa3dbb396290477159012e86af14" -} diff --git a/backend/.sqlx/query-337f31c2172194cd594042c561998a03f751b246c40daf056fced0fd91f6dd73.json b/backend/.sqlx/query-337f31c2172194cd594042c561998a03f751b246c40daf056fced0fd91f6dd73.json deleted file mode 100644 index 075a898e29..0000000000 --- a/backend/.sqlx/query-337f31c2172194cd594042c561998a03f751b246c40daf056fced0fd91f6dd73.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH uuid_table as (\n select unnest($11::uuid[]) as uuid\n )\n INSERT INTO queue \n (id, script_hash, script_path, job_kind, language, args, tag, created_by, permissioned_as, email, scheduled_for, workspace_id, concurrent_limit, concurrency_time_window_s, timeout, flow_status)\n (SELECT uuid, $1, $2, $3, $4, ('{ \"uuid\": \"' || uuid || '\" }')::jsonb, $5, $6, $7, $8, $9, $10, $12, $13, $14, $15 FROM uuid_table) \n RETURNING id", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Int8", - "Varchar", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Varchar", - "Varchar", - "Varchar", - "Varchar", - "Timestamptz", - "Varchar", - "UuidArray", - "Int4", - "Int4", - "Int4", - "Jsonb" - ] - }, - "nullable": [ - false - ] - }, - "hash": "337f31c2172194cd594042c561998a03f751b246c40daf056fced0fd91f6dd73" -} diff --git a/backend/.sqlx/query-364248db86a9228bba6ff522e811d68c5c902ee0a07ea69bff772ff10d0dc5aa.json b/backend/.sqlx/query-364248db86a9228bba6ff522e811d68c5c902ee0a07ea69bff772ff10d0dc5aa.json deleted file mode 100644 index 7ead72a26d..0000000000 --- a/backend/.sqlx/query-364248db86a9228bba6ff522e811d68c5c902ee0a07ea69bff772ff10d0dc5aa.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE queue SET flow_status = JSONB_SET(flow_status, ARRAY['user_states'], JSONB_SET(COALESCE(flow_status->'user_states', '{}'::jsonb), ARRAY[$1], $2))\n WHERE id = $3 AND workspace_id = $4 AND job_kind IN ('flow', 'flowpreview', 'flownode') RETURNING 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Text", - "Jsonb", - "Uuid", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "364248db86a9228bba6ff522e811d68c5c902ee0a07ea69bff772ff10d0dc5aa" -} diff --git a/backend/.sqlx/query-36b26b3a6458d8a0b4f770d52c1bb09370b905d610b9ceb3cfac11365586320d.json b/backend/.sqlx/query-36b26b3a6458d8a0b4f770d52c1bb09370b905d610b9ceb3cfac11365586320d.json deleted file mode 100644 index 3b3fa11ffb..0000000000 --- a/backend/.sqlx/query-36b26b3a6458d8a0b4f770d52c1bb09370b905d610b9ceb3cfac11365586320d.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT running AS \"running!\" FROM queue WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "running!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "36b26b3a6458d8a0b4f770d52c1bb09370b905d610b9ceb3cfac11365586320d" -} diff --git a/backend/.sqlx/query-36c4e57afcab22f4b6825ccebe47767b8a8fe0a638250f7c7777e5a9f7530e5c.json b/backend/.sqlx/query-36c4e57afcab22f4b6825ccebe47767b8a8fe0a638250f7c7777e5a9f7530e5c.json new file mode 100644 index 0000000000..e810fc4754 --- /dev/null +++ b/backend/.sqlx/query-36c4e57afcab22f4b6825ccebe47767b8a8fe0a638250f7c7777e5a9f7530e5c.json @@ -0,0 +1,31 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO v2_job_completed AS cj\n ( workspace_id\n , id\n , started_at\n , duration_ms\n , result\n , result_columns\n , canceled_by\n , canceled_reason\n , flow_status\n , workflow_as_code_status\n , memory_peak\n , status\n , worker\n )\n SELECT q.workspace_id, q.id, started_at, COALESCE($9::bigint, (EXTRACT('epoch' FROM (now())) - EXTRACT('epoch' FROM (COALESCE(started_at, now()))))*1000), $3, $10, $5, $6,\n flow_status, workflow_as_code_status,\n $8, CASE WHEN $4::BOOL THEN 'canceled'::job_status\n WHEN $7::BOOL THEN 'skipped'::job_status\n WHEN $2::BOOL THEN 'success'::job_status\n ELSE 'failure'::job_status END AS status,\n q.worker\n FROM v2_job_queue q LEFT JOIN v2_job_status USING (id) WHERE q.id = $1\n ON CONFLICT (id) DO UPDATE SET status = EXCLUDED.status, result = $3 RETURNING duration_ms AS \"duration_ms!\"", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "duration_ms!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Bool", + "Jsonb", + "Bool", + "Varchar", + "Text", + "Bool", + "Int4", + "Int8", + "TextArray" + ] + }, + "nullable": [ + false + ] + }, + "hash": "36c4e57afcab22f4b6825ccebe47767b8a8fe0a638250f7c7777e5a9f7530e5c" +} diff --git a/backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json b/backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json deleted file mode 100644 index f94429e4f9..0000000000 --- a/backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET suspend = 0 WHERE parent_job = $1 AND suspend = $2 AND (flow_status->'step')::int = 0", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f" -} diff --git a/backend/.sqlx/query-3a9441fe8fef1605d02e92b65d1df664b4de9aabf1e0e219596b295d52438008.json b/backend/.sqlx/query-3a9441fe8fef1605d02e92b65d1df664b4de9aabf1e0e219596b295d52438008.json deleted file mode 100644 index 4a789635ee..0000000000 --- a/backend/.sqlx/query-3a9441fe8fef1605d02e92b65d1df664b4de9aabf1e0e219596b295d52438008.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO v2_job_completed AS cj\n ( workspace_id\n , id\n , started_at\n , duration_ms\n , result\n , result_columns\n , canceled_by\n , canceled_reason\n , flow_status\n , workflow_as_code_status\n , memory_peak\n , status\n )\n SELECT q.workspace_id, q.id, started_at, COALESCE($9::bigint, (EXTRACT('epoch' FROM (now())) - EXTRACT('epoch' FROM (COALESCE(started_at, now()))))*1000), $3, $10, $5, $6,\n flow_status, workflow_as_code_status,\n $8, CASE WHEN $4::BOOL THEN 'canceled'::job_status\n WHEN $7::BOOL THEN 'skipped'::job_status\n WHEN $2::BOOL THEN 'success'::job_status\n ELSE 'failure'::job_status END AS status\n FROM v2_job_queue q LEFT JOIN v2_job_status USING (id) WHERE q.id = $1\n ON CONFLICT (id) DO UPDATE SET status = EXCLUDED.status, result = $3 RETURNING duration_ms AS \"duration_ms!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "duration_ms!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Bool", - "Jsonb", - "Bool", - "Varchar", - "Text", - "Bool", - "Int4", - "Int8", - "TextArray" - ] - }, - "nullable": [ - false - ] - }, - "hash": "3a9441fe8fef1605d02e92b65d1df664b4de9aabf1e0e219596b295d52438008" -} diff --git a/backend/.sqlx/query-3b4b62161a5197f37850c8c4197ea026d8e94a3cb9cdcfa5fde19343acf81ecc.json b/backend/.sqlx/query-3b4b62161a5197f37850c8c4197ea026d8e94a3cb9cdcfa5fde19343acf81ecc.json deleted file mode 100644 index 367aae4a31..0000000000 --- a/backend/.sqlx/query-3b4b62161a5197f37850c8c4197ea026d8e94a3cb9cdcfa5fde19343acf81ecc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET flow_status = JSONB_SET(flow_status, ARRAY['modules', $1::TEXT, 'flow_jobs_success', $3::TEXT], $4) WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "3b4b62161a5197f37850c8c4197ea026d8e94a3cb9cdcfa5fde19343acf81ecc" -} diff --git a/backend/.sqlx/query-3bc1919515120116705d7c250a34f2b9bf7c4bcaedb87c28f974e46c9c42200c.json b/backend/.sqlx/query-3bc1919515120116705d7c250a34f2b9bf7c4bcaedb87c28f974e46c9c42200c.json deleted file mode 100644 index 125c9593b6..0000000000 --- a/backend/.sqlx/query-3bc1919515120116705d7c250a34f2b9bf7c4bcaedb87c28f974e46c9c42200c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\" FROM queue WHERE id = ANY($1) AND schedule_path IS NULL AND ($2::text[] IS NULL OR tag = ANY($2))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "UuidArray", - "TextArray" - ] - }, - "nullable": [ - true - ] - }, - "hash": "3bc1919515120116705d7c250a34f2b9bf7c4bcaedb87c28f974e46c9c42200c" -} diff --git a/backend/.sqlx/query-3c423bcb10668bdd131f7b6a9b0fcc8f9b1909f255cdfce0fb83496aac0fc021.json b/backend/.sqlx/query-3c423bcb10668bdd131f7b6a9b0fcc8f9b1909f255cdfce0fb83496aac0fc021.json deleted file mode 100644 index 090efe4964..0000000000 --- a/backend/.sqlx/query-3c423bcb10668bdd131f7b6a9b0fcc8f9b1909f255cdfce0fb83496aac0fc021.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\", flow_status AS \"flow_status!: Json\"\n FROM completed_job\n WHERE parent_job = $1 AND workspace_id = $2 AND flow_status IS NOT NULL", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "flow_status!: Json", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true - ] - }, - "hash": "3c423bcb10668bdd131f7b6a9b0fcc8f9b1909f255cdfce0fb83496aac0fc021" -} diff --git a/backend/.sqlx/query-3da0cf7edc975cb365c36d167df34d9d30d3e86f231bb9d1d3cc3bad6a50dfff.json b/backend/.sqlx/query-3da0cf7edc975cb365c36d167df34d9d30d3e86f231bb9d1d3cc3bad6a50dfff.json deleted file mode 100644 index df93a90efc..0000000000 --- a/backend/.sqlx/query-3da0cf7edc975cb365c36d167df34d9d30d3e86f231bb9d1d3cc3bad6a50dfff.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT parent_job\n FROM queue\n WHERE id = $1 AND workspace_id = $2\n UNION ALL\n SELECT parent_job\n FROM completed_job\n WHERE id = $1 AND workspace_id = $2\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "parent_job", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "3da0cf7edc975cb365c36d167df34d9d30d3e86f231bb9d1d3cc3bad6a50dfff" -} diff --git a/backend/.sqlx/query-3df03ec2345c905f03450e1e3f0c3ce7f41a22e72c5180ef8cc910305e4d0fce.json b/backend/.sqlx/query-3df03ec2345c905f03450e1e3f0c3ce7f41a22e72c5180ef8cc910305e4d0fce.json deleted file mode 100644 index 3bfcb0a9f3..0000000000 --- a/backend/.sqlx/query-3df03ec2345c905f03450e1e3f0c3ce7f41a22e72c5180ef8cc910305e4d0fce.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n script_path, script_hash AS \"script_hash: ScriptHash\",\n job_kind AS \"job_kind: JobKind\",\n flow_status AS \"flow_status: Json>\",\n raw_flow AS \"raw_flow: Json>\"\n FROM completed_job WHERE id = $1 and workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "script_hash: ScriptHash", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "job_kind: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 3, - "name": "flow_status: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - false, - true, - true - ] - }, - "hash": "3df03ec2345c905f03450e1e3f0c3ce7f41a22e72c5180ef8cc910305e4d0fce" -} diff --git a/backend/.sqlx/query-3eb447ed317f3d8724b2309cfdf7cfb058a35a81314db981bc953a9505725082.json b/backend/.sqlx/query-3eb447ed317f3d8724b2309cfdf7cfb058a35a81314db981bc953a9505725082.json deleted file mode 100644 index 69266cc130..0000000000 --- a/backend/.sqlx/query-3eb447ed317f3d8724b2309cfdf7cfb058a35a81314db981bc953a9505725082.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO v2_job_status (id, workflow_as_code_status)\n VALUES ($1, JSONB_SET('{}'::JSONB, array[$2], $3))\n ON CONFLICT (id) DO UPDATE SET workflow_as_code_status =\n COALESCE(EXCLUDED.workflow_as_code_status, '{}'::JSONB) || $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Text", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "3eb447ed317f3d8724b2309cfdf7cfb058a35a81314db981bc953a9505725082" -} diff --git a/backend/.sqlx/query-3ecb25b05d6c14b499f9b00af42ae74134728899f6b59c68b246979bc5143e30.json b/backend/.sqlx/query-3ecb25b05d6c14b499f9b00af42ae74134728899f6b59c68b246979bc5143e30.json deleted file mode 100644 index a652b56bad..0000000000 --- a/backend/.sqlx/query-3ecb25b05d6c14b499f9b00af42ae74134728899f6b59c68b246979bc5143e30.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT COUNT(*) as count, \n MIN(scheduled_for) as oldest_job\n FROM queue \n WHERE tag = $1 \n AND scheduled_for <= NOW() - $2::interval \n AND running = false\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "oldest_job", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text", - "Interval" - ] - }, - "nullable": [ - null, - null - ] - }, - "hash": "3ecb25b05d6c14b499f9b00af42ae74134728899f6b59c68b246979bc5143e30" -} diff --git a/backend/.sqlx/query-402fd5bff6e8420c9b3477f05df625cae355fda673b9e85284e0fcd7d9232eb7.json b/backend/.sqlx/query-402fd5bff6e8420c9b3477f05df625cae355fda673b9e85284e0fcd7d9232eb7.json deleted file mode 100644 index 83d1b15744..0000000000 --- a/backend/.sqlx/query-402fd5bff6e8420c9b3477f05df625cae355fda673b9e85284e0fcd7d9232eb7.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n script_path, script_hash AS \"script_hash: ScriptHash\",\n job_kind AS \"job_kind!: JobKind\",\n flow_status AS \"flow_status: Json>\",\n raw_flow AS \"raw_flow: Json>\"\n FROM completed_job WHERE id = $1 and workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "script_hash: ScriptHash", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "job_kind!: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 3, - "name": "flow_status: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true, - true - ] - }, - "hash": "402fd5bff6e8420c9b3477f05df625cae355fda673b9e85284e0fcd7d9232eb7" -} diff --git a/backend/.sqlx/query-41f68f4ce5bed783cf69e42da115e9ad2c9fcbd75f55817b2114c04207f66e4a.json b/backend/.sqlx/query-41f68f4ce5bed783cf69e42da115e9ad2c9fcbd75f55817b2114c04207f66e4a.json deleted file mode 100644 index 9397f52b83..0000000000 --- a/backend/.sqlx/query-41f68f4ce5bed783cf69e42da115e9ad2c9fcbd75f55817b2114c04207f66e4a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO metrics (id, value)\n VALUES ($1, to_jsonb((SELECT EXTRACT(EPOCH FROM now() - scheduled_for)\n FROM queue WHERE tag = $2 AND running = false AND scheduled_for <= now() - ('3 seconds')::interval\n ORDER BY priority DESC NULLS LAST, scheduled_for LIMIT 1)))", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text" - ] - }, - "nullable": [] - }, - "hash": "41f68f4ce5bed783cf69e42da115e9ad2c9fcbd75f55817b2114c04207f66e4a" -} diff --git a/backend/.sqlx/query-42543450a5c1b988b258fb1e0c00cd0a53a0395bc60e35817ff149c4f27a19fb.json b/backend/.sqlx/query-42543450a5c1b988b258fb1e0c00cd0a53a0395bc60e35817ff149c4f27a19fb.json deleted file mode 100644 index 89287ed48d..0000000000 --- a/backend/.sqlx/query-42543450a5c1b988b258fb1e0c00cd0a53a0395bc60e35817ff149c4f27a19fb.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job\n SET logs = '##DELETED##', args = '{}'::jsonb, result = '{}'::jsonb\n WHERE id = ANY($1)", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "UuidArray" - ] - }, - "nullable": [] - }, - "hash": "42543450a5c1b988b258fb1e0c00cd0a53a0395bc60e35817ff149c4f27a19fb" -} diff --git a/backend/.sqlx/query-43fcdf5243e17bfbdcd21f09feee6e104b40f4b937914f56f01c299cddfc17e9.json b/backend/.sqlx/query-43fcdf5243e17bfbdcd21f09feee6e104b40f4b937914f56f01c299cddfc17e9.json deleted file mode 100644 index edbade4821..0000000000 --- a/backend/.sqlx/query-43fcdf5243e17bfbdcd21f09feee6e104b40f4b937914f56f01c299cddfc17e9.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE job SET workspace_id = $1 WHERE workspace_id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text" - ] - }, - "nullable": [] - }, - "hash": "43fcdf5243e17bfbdcd21f09feee6e104b40f4b937914f56f01c299cddfc17e9" -} diff --git a/backend/.sqlx/query-4422b7183ede17a9cbde4afae41be4da5447020e39398deedbcca9121492834a.json b/backend/.sqlx/query-4422b7183ede17a9cbde4afae41be4da5447020e39398deedbcca9121492834a.json deleted file mode 100644 index e16088e45a..0000000000 --- a/backend/.sqlx/query-4422b7183ede17a9cbde4afae41be4da5447020e39398deedbcca9121492834a.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT schedule.*, t.jobs FROM schedule, LATERAL ( SELECT ARRAY (SELECT json_build_object('id', id, 'success', success, 'duration_ms', duration_ms) FROM completed_job WHERE\n completed_job.schedule_path = schedule.path AND completed_job.workspace_id = $1 AND parent_job IS NULL AND is_skipped = False ORDER BY started_at DESC LIMIT 20) AS jobs ) t\n WHERE schedule.workspace_id = $1 ORDER BY schedule.edited_at desc LIMIT $2 OFFSET $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 4, - "name": "schedule", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "enabled", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "args", - "type_info": "Jsonb" - }, - { - "ordinal": 8, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 9, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 10, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 11, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 12, - "name": "timezone", - "type_info": "Varchar" - }, - { - "ordinal": 13, - "name": "on_failure", - "type_info": "Varchar" - }, - { - "ordinal": 14, - "name": "on_recovery", - "type_info": "Varchar" - }, - { - "ordinal": 15, - "name": "on_failure_times", - "type_info": "Int4" - }, - { - "ordinal": 16, - "name": "on_failure_exact", - "type_info": "Bool" - }, - { - "ordinal": 17, - "name": "on_failure_extra_args", - "type_info": "Json" - }, - { - "ordinal": 18, - "name": "on_recovery_times", - "type_info": "Int4" - }, - { - "ordinal": 19, - "name": "on_recovery_extra_args", - "type_info": "Json" - }, - { - "ordinal": 20, - "name": "ws_error_handler_muted", - "type_info": "Bool" - }, - { - "ordinal": 21, - "name": "retry", - "type_info": "Jsonb" - }, - { - "ordinal": 22, - "name": "summary", - "type_info": "Varchar" - }, - { - "ordinal": 23, - "name": "no_flow_overlap", - "type_info": "Bool" - }, - { - "ordinal": 24, - "name": "tag", - "type_info": "Varchar" - }, - { - "ordinal": 25, - "name": "paused_until", - "type_info": "Timestamptz" - }, - { - "ordinal": 26, - "name": "on_success", - "type_info": "Varchar" - }, - { - "ordinal": 27, - "name": "on_success_extra_args", - "type_info": "Json" - }, - { - "ordinal": 28, - "name": "cron_version", - "type_info": "Text" - }, - { - "ordinal": 29, - "name": "jobs", - "type_info": "JsonArray" - } - ], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - true, - false, - true, - true, - true, - true, - true, - true, - true, - false, - true, - true, - false, - true, - true, - true, - true, - true, - null - ] - }, - "hash": "4422b7183ede17a9cbde4afae41be4da5447020e39398deedbcca9121492834a" -} diff --git a/backend/.sqlx/query-44a317f7647e2b515f90dc9c04f7ac75c2c87c7c3036acd96ba72fb2a21700db.json b/backend/.sqlx/query-44a317f7647e2b515f90dc9c04f7ac75c2c87c7c3036acd96ba72fb2a21700db.json deleted file mode 100644 index 8885d178e2..0000000000 --- a/backend/.sqlx/query-44a317f7647e2b515f90dc9c04f7ac75c2c87c7c3036acd96ba72fb2a21700db.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM completed_job WHERE created_at <= now() - ($1::bigint::text || ' s')::interval AND started_at + ((duration_ms/1000 + $1::bigint) || ' s')::interval <= now() RETURNING id AS \"id!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "44a317f7647e2b515f90dc9c04f7ac75c2c87c7c3036acd96ba72fb2a21700db" -} diff --git a/backend/.sqlx/query-4504f3a5d3cffd56d51bd263e6759404a3a5889dd7c61cb077e17b877b027eff.json b/backend/.sqlx/query-4504f3a5d3cffd56d51bd263e6759404a3a5889dd7c61cb077e17b877b027eff.json deleted file mode 100644 index 76e4896aaa..0000000000 --- a/backend/.sqlx/query-4504f3a5d3cffd56d51bd263e6759404a3a5889dd7c61cb077e17b877b027eff.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE queue\n SET canceled = true\n , canceled_by = 'timeout'\n , canceled_reason = $1\n WHERE id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "4504f3a5d3cffd56d51bd263e6759404a3a5889dd7c61cb077e17b877b027eff" -} diff --git a/backend/.sqlx/query-45950064cce9f53f73a01ddcd6911ec677297009b71041d39019c4700a571c0f.json b/backend/.sqlx/query-45950064cce9f53f73a01ddcd6911ec677297009b71041d39019c4700a571c0f.json deleted file mode 100644 index ecba5ab5c0..0000000000 --- a/backend/.sqlx/query-45950064cce9f53f73a01ddcd6911ec677297009b71041d39019c4700a571c0f.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT raw_flow->'failure_module' != 'null'::jsonb FROM completed_job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "45950064cce9f53f73a01ddcd6911ec677297009b71041d39019c4700a571c0f" -} diff --git a/backend/.sqlx/query-4671f1727d0563490534c426375738478f3d93f6bb42aaf021794392328c8875.json b/backend/.sqlx/query-4671f1727d0563490534c426375738478f3d93f6bb42aaf021794392328c8875.json deleted file mode 100644 index e497d7f59e..0000000000 --- a/backend/.sqlx/query-4671f1727d0563490534c426375738478f3d93f6bb42aaf021794392328c8875.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by AS \"created_by!\", args as \"args: sqlx::types::Json>\"\n FROM completed_job \n WHERE id = $1 AND workspace_id = $2 AND ($3::text[] IS NULL OR tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "args: sqlx::types::Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - true, - true - ] - }, - "hash": "4671f1727d0563490534c426375738478f3d93f6bb42aaf021794392328c8875" -} diff --git a/backend/.sqlx/query-4a1cb9f3ad7f2a692dadb9f75cdc99135af62ccaae5ca122d88356fe7da6eedc.json b/backend/.sqlx/query-4a1cb9f3ad7f2a692dadb9f75cdc99135af62ccaae5ca122d88356fe7da6eedc.json deleted file mode 100644 index be6e8f22e7..0000000000 --- a/backend/.sqlx/query-4a1cb9f3ad7f2a692dadb9f75cdc99135af62ccaae5ca122d88356fe7da6eedc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT script_entrypoint_override FROM v2_job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_entrypoint_override", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "4a1cb9f3ad7f2a692dadb9f75cdc99135af62ccaae5ca122d88356fe7da6eedc" -} diff --git a/backend/.sqlx/query-4b923c94f6adcc7a76e8073de5e46b116dba3211487c8408ce2777aafdf94a44.json b/backend/.sqlx/query-4b923c94f6adcc7a76e8073de5e46b116dba3211487c8408ce2777aafdf94a44.json deleted file mode 100644 index 9d14bc62cc..0000000000 --- a/backend/.sqlx/query-4b923c94f6adcc7a76e8073de5e46b116dba3211487c8408ce2777aafdf94a44.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO job (id, workspace_id, raw_code, raw_lock, raw_flow, tag)\n VALUES ($1, $2, $3, $4, $5, $6)", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Varchar", - "Text", - "Text", - "Jsonb", - "Varchar" - ] - }, - "nullable": [] - }, - "hash": "4b923c94f6adcc7a76e8073de5e46b116dba3211487c8408ce2777aafdf94a44" -} diff --git a/backend/.sqlx/query-4c97fcc93b31c4b3262419d6ee183773a95de3b6694a398cb80d288bef4f130f.json b/backend/.sqlx/query-4c97fcc93b31c4b3262419d6ee183773a95de3b6694a398cb80d288bef4f130f.json deleted file mode 100644 index 53a59847e7..0000000000 --- a/backend/.sqlx/query-4c97fcc93b31c4b3262419d6ee183773a95de3b6694a398cb80d288bef4f130f.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET args = '{\"reason\":\"PREPROCESSOR_ARGS_ARE_DISCARDED\"}'::jsonb WHERE id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "4c97fcc93b31c4b3262419d6ee183773a95de3b6694a398cb80d288bef4f130f" -} diff --git a/backend/.sqlx/query-4cdb9b9d562f3c692e5597598db937511bc8431c3652746684ee803172053885.json b/backend/.sqlx/query-4cdb9b9d562f3c692e5597598db937511bc8431c3652746684ee803172053885.json deleted file mode 100644 index 48a2a5451d..0000000000 --- a/backend/.sqlx/query-4cdb9b9d562f3c692e5597598db937511bc8431c3652746684ee803172053885.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id FROM queue WHERE parent_job = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - false - ] - }, - "hash": "4cdb9b9d562f3c692e5597598db937511bc8431c3652746684ee803172053885" -} diff --git a/backend/.sqlx/query-4d3ef32120623584bf5c13d86ea6ad7b3aa41d9b581738d16fbfff4cc5b72a7a.json b/backend/.sqlx/query-4d3ef32120623584bf5c13d86ea6ad7b3aa41d9b581738d16fbfff4cc5b72a7a.json deleted file mode 100644 index 9fad8009ec..0000000000 --- a/backend/.sqlx/query-4d3ef32120623584bf5c13d86ea6ad7b3aa41d9b581738d16fbfff4cc5b72a7a.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT canceled AS \"canceled!\" FROM queue WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "canceled!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "4d3ef32120623584bf5c13d86ea6ad7b3aa41d9b581738d16fbfff4cc5b72a7a" -} diff --git a/backend/.sqlx/query-4fb3a4712d88afed40082d8d8bd63b5dedad61caa68e0e470252083d80df605f.json b/backend/.sqlx/query-4fb3a4712d88afed40082d8d8bd63b5dedad61caa68e0e470252083d80df605f.json deleted file mode 100644 index 90bdd1c9b8..0000000000 --- a/backend/.sqlx/query-4fb3a4712d88afed40082d8d8bd63b5dedad61caa68e0e470252083d80df605f.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET suspend = 0 WHERE id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "4fb3a4712d88afed40082d8d8bd63b5dedad61caa68e0e470252083d80df605f" -} diff --git a/backend/.sqlx/query-52bd8efeaec0d0c2aa77d777a0b6559a1aa4ca9ebd4f9b535014cbcb113f9b92.json b/backend/.sqlx/query-52bd8efeaec0d0c2aa77d777a0b6559a1aa4ca9ebd4f9b535014cbcb113f9b92.json deleted file mode 100644 index b4576d8682..0000000000 --- a/backend/.sqlx/query-52bd8efeaec0d0c2aa77d777a0b6559a1aa4ca9ebd4f9b535014cbcb113f9b92.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by AS \"created_by!\", args as \"args: sqlx::types::Json>\"\n FROM queue\n WHERE id = $1 AND workspace_id = $2 AND ($3::text[] IS NULL OR tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "args: sqlx::types::Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - true, - true - ] - }, - "hash": "52bd8efeaec0d0c2aa77d777a0b6559a1aa4ca9ebd4f9b535014cbcb113f9b92" -} diff --git a/backend/.sqlx/query-53ff0e14c35a3e84585a699e55093546db5c5f0ad0c5f92f34aaf2cdd125d130.json b/backend/.sqlx/query-53ff0e14c35a3e84585a699e55093546db5c5f0ad0c5f92f34aaf2cdd125d130.json deleted file mode 100644 index ba39c47062..0000000000 --- a/backend/.sqlx/query-53ff0e14c35a3e84585a699e55093546db5c5f0ad0c5f92f34aaf2cdd125d130.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET suspend = $1, suspend_until = now() + interval '14 day', running = true\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "53ff0e14c35a3e84585a699e55093546db5c5f0ad0c5f92f34aaf2cdd125d130" -} diff --git a/backend/.sqlx/query-55541316c690e4f2e1b7a41071ef0a297a2e65c8e25a17d5c43715481e7633a0.json b/backend/.sqlx/query-55541316c690e4f2e1b7a41071ef0a297a2e65c8e25a17d5c43715481e7633a0.json deleted file mode 100644 index bbcba9903c..0000000000 --- a/backend/.sqlx/query-55541316c690e4f2e1b7a41071ef0a297a2e65c8e25a17d5c43715481e7633a0.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id FROM queue WHERE id = ANY($1) AND schedule_path IS NULL AND ($2::text[] IS NULL OR tag = ANY($2))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "UuidArray", - "TextArray" - ] - }, - "nullable": [ - false - ] - }, - "hash": "55541316c690e4f2e1b7a41071ef0a297a2e65c8e25a17d5c43715481e7633a0" -} diff --git a/backend/.sqlx/query-56eafd6d3c72f7114e3d6764184825e2671283fc70abba9a036e88699430af0f.json b/backend/.sqlx/query-56eafd6d3c72f7114e3d6764184825e2671283fc70abba9a036e88699430af0f.json deleted file mode 100644 index 9f22b4df19..0000000000 --- a/backend/.sqlx/query-56eafd6d3c72f7114e3d6764184825e2671283fc70abba9a036e88699430af0f.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "CREATE INDEX CONCURRENTLY labeled_jobs_on_jobs ON completed_job USING GIN ((result -> 'wm_labels')) WHERE result ? 'wm_labels'", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "56eafd6d3c72f7114e3d6764184825e2671283fc70abba9a036e88699430af0f" -} diff --git a/backend/.sqlx/query-5ba4b87528ad49f17d72b53c3db30f5ca4b3b0b0afbd5d9721c8b5d692af601b.json b/backend/.sqlx/query-5ba4b87528ad49f17d72b53c3db30f5ca4b3b0b0afbd5d9721c8b5d692af601b.json deleted file mode 100644 index f8b5b54892..0000000000 --- a/backend/.sqlx/query-5ba4b87528ad49f17d72b53c3db30f5ca4b3b0b0afbd5d9721c8b5d692af601b.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COUNT(id) FROM queue WHERE email = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "5ba4b87528ad49f17d72b53c3db30f5ca4b3b0b0afbd5d9721c8b5d692af601b" -} diff --git a/backend/.sqlx/query-5bce731932a35dbecc38c7b9665ef1117a15acf7d0d41b93de165e788b55d93f.json b/backend/.sqlx/query-5bce731932a35dbecc38c7b9665ef1117a15acf7d0d41b93de165e788b55d93f.json deleted file mode 100644 index f3ff1e599d..0000000000 --- a/backend/.sqlx/query-5bce731932a35dbecc38c7b9665ef1117a15acf7d0d41b93de165e788b55d93f.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by AS \"created_by!\", CONCAT(coalesce(completed_job.logs, ''), coalesce(job_logs.logs, '')) as logs, job_logs.log_offset, job_logs.log_file_index\n FROM completed_job \n LEFT JOIN job_logs ON job_logs.job_id = completed_job.id \n WHERE completed_job.id = $1 AND completed_job.workspace_id = $2 AND ($3::text[] IS NULL OR completed_job.tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "log_file_index", - "type_info": "TextArray" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - true, - null, - false, - true - ] - }, - "hash": "5bce731932a35dbecc38c7b9665ef1117a15acf7d0d41b93de165e788b55d93f" -} diff --git a/backend/.sqlx/query-5d79c4817696d0ba0d2062eef27ff3856fc4a732adf5796e9b06c826406584dc.json b/backend/.sqlx/query-5d79c4817696d0ba0d2062eef27ff3856fc4a732adf5796e9b06c826406584dc.json deleted file mode 100644 index 9bdc6fac55..0000000000 --- a/backend/.sqlx/query-5d79c4817696d0ba0d2062eef27ff3856fc4a732adf5796e9b06c826406584dc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET permissioned_as = ('u/' || $1) WHERE permissioned_as = ('u/' || $2) AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "5d79c4817696d0ba0d2062eef27ff3856fc4a732adf5796e9b06c826406584dc" -} diff --git a/backend/.sqlx/query-5dfa6932d7c6d5006fe352da3041680b2ee1ebe9258355a0db24ce4fd26f23de.json b/backend/.sqlx/query-5dfa6932d7c6d5006fe352da3041680b2ee1ebe9258355a0db24ce4fd26f23de.json deleted file mode 100644 index 0416e38fb1..0000000000 --- a/backend/.sqlx/query-5dfa6932d7c6d5006fe352da3041680b2ee1ebe9258355a0db24ce4fd26f23de.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET canceled = true, canceled_by = $1, canceled_reason = $2, scheduled_for = now(), suspend = 0 WHERE id = $3 AND workspace_id = $4 AND (canceled = false OR canceled_reason != $2) RETURNING id", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [ - false - ] - }, - "hash": "5dfa6932d7c6d5006fe352da3041680b2ee1ebe9258355a0db24ce4fd26f23de" -} diff --git a/backend/.sqlx/query-611e3cd49d38a37db8912397c4eddd7cd50a4782101e971175d0c5c798593a40.json b/backend/.sqlx/query-611e3cd49d38a37db8912397c4eddd7cd50a4782101e971175d0c5c798593a40.json deleted file mode 100644 index 679b05d29d..0000000000 --- a/backend/.sqlx/query-611e3cd49d38a37db8912397c4eddd7cd50a4782101e971175d0c5c798593a40.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id FROM queue WHERE workspace_id = $1 and root_job = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid" - ] - }, - "nullable": [ - false - ] - }, - "hash": "611e3cd49d38a37db8912397c4eddd7cd50a4782101e971175d0c5c798593a40" -} diff --git a/backend/.sqlx/query-61656548991bf6d44c839373cb3e29d3ca1170a2ac0d3dce0b5df0e8677a4874.json b/backend/.sqlx/query-61656548991bf6d44c839373cb3e29d3ca1170a2ac0d3dce0b5df0e8677a4874.json deleted file mode 100644 index 1cb035f456..0000000000 --- a/backend/.sqlx/query-61656548991bf6d44c839373cb3e29d3ca1170a2ac0d3dce0b5df0e8677a4874.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\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": "61656548991bf6d44c839373cb3e29d3ca1170a2ac0d3dce0b5df0e8677a4874" -} diff --git a/backend/.sqlx/query-61ecf606dec2978f3e63b2dec92465202213b7ada2198ea1d9b4d4d1f5ed658f.json b/backend/.sqlx/query-61ecf606dec2978f3e63b2dec92465202213b7ada2198ea1d9b4d4d1f5ed658f.json new file mode 100644 index 0000000000..cb0a2c30c9 --- /dev/null +++ b/backend/.sqlx/query-61ecf606dec2978f3e63b2dec92465202213b7ada2198ea1d9b4d4d1f5ed658f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE v2_job_queue SET worker = $2 WHERE id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Uuid", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "61ecf606dec2978f3e63b2dec92465202213b7ada2198ea1d9b4d4d1f5ed658f" +} diff --git a/backend/.sqlx/query-6239e15d2389e24e290d86bb96e3ade1656cd403000a34a19a942993b60ff612.json b/backend/.sqlx/query-6239e15d2389e24e290d86bb96e3ade1656cd403000a34a19a942993b60ff612.json deleted file mode 100644 index 19ca4025d8..0000000000 --- a/backend/.sqlx/query-6239e15d2389e24e290d86bb96e3ade1656cd403000a34a19a942993b60ff612.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET schedule_path = REGEXP_REPLACE(schedule_path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1') WHERE schedule_path LIKE ('u/' || $2 || '/%') AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "6239e15d2389e24e290d86bb96e3ade1656cd403000a34a19a942993b60ff612" -} diff --git a/backend/.sqlx/query-631d4637e4137a0680ffa56e4639c009214eeaee8fd27a0d3050998b354c45ff.json b/backend/.sqlx/query-631d4637e4137a0680ffa56e4639c009214eeaee8fd27a0d3050998b354c45ff.json deleted file mode 100644 index d38bf22973..0000000000 --- a/backend/.sqlx/query-631d4637e4137a0680ffa56e4639c009214eeaee8fd27a0d3050998b354c45ff.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET last_ping = null\n WHERE id = $1 AND last_ping = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Timestamptz" - ] - }, - "nullable": [] - }, - "hash": "631d4637e4137a0680ffa56e4639c009214eeaee8fd27a0d3050998b354c45ff" -} diff --git a/backend/.sqlx/query-639dbfa0c98d8b91006823f4c645a1105d6c1cc58990937c9bcf693a8812920c.json b/backend/.sqlx/query-639dbfa0c98d8b91006823f4c645a1105d6c1cc58990937c9bcf693a8812920c.json deleted file mode 100644 index 739be2be53..0000000000 --- a/backend/.sqlx/query-639dbfa0c98d8b91006823f4c645a1105d6c1cc58990937c9bcf693a8812920c.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT result #> $3 AS \"result: Json>\"\n FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "result: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - null - ] - }, - "hash": "639dbfa0c98d8b91006823f4c645a1105d6c1cc58990937c9bcf693a8812920c" -} diff --git a/backend/.sqlx/query-63e54fe57ec439b68eead00a02209f81076c5317d590e1441b557555b4d7ad96.json b/backend/.sqlx/query-63e54fe57ec439b68eead00a02209f81076c5317d590e1441b557555b4d7ad96.json deleted file mode 100644 index a30a87991e..0000000000 --- a/backend/.sqlx/query-63e54fe57ec439b68eead00a02209f81076c5317d590e1441b557555b4d7ad96.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH uuid_table as (\n select gen_random_uuid() as uuid from generate_series(1, $5)\n )\n INSERT INTO job\n (id, workspace_id, raw_code, raw_lock, raw_flow)\n (SELECT uuid, $1, $2, $3, $4 FROM uuid_table)\n RETURNING id", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text", - "Jsonb", - "Int4" - ] - }, - "nullable": [ - false - ] - }, - "hash": "63e54fe57ec439b68eead00a02209f81076c5317d590e1441b557555b4d7ad96" -} diff --git a/backend/.sqlx/query-641087f3166faee8baad063fd569b61aa4d21a15a9bc06e0c2fd15b47eb7beb0.json b/backend/.sqlx/query-641087f3166faee8baad063fd569b61aa4d21a15a9bc06e0c2fd15b47eb7beb0.json deleted file mode 100644 index b070f8eb7f..0000000000 --- a/backend/.sqlx/query-641087f3166faee8baad063fd569b61aa4d21a15a9bc06e0c2fd15b47eb7beb0.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n id As \"id!\",\n flow_status->'restarted_from'->'flow_job_id' AS \"restarted_from: Json\"\n FROM queue\n WHERE COALESCE((SELECT root_job FROM queue WHERE id = $1), $1) = id AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "restarted_from: Json", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - null - ] - }, - "hash": "641087f3166faee8baad063fd569b61aa4d21a15a9bc06e0c2fd15b47eb7beb0" -} diff --git a/backend/.sqlx/query-6681048ee83236e9eb33b407b5d3cf89f563e57d5d3e7981d58cecf147b9bf1e.json b/backend/.sqlx/query-6681048ee83236e9eb33b407b5d3cf89f563e57d5d3e7981d58cecf147b9bf1e.json deleted file mode 100644 index 0ca0331f8f..0000000000 --- a/backend/.sqlx/query-6681048ee83236e9eb33b407b5d3cf89f563e57d5d3e7981d58cecf147b9bf1e.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET workspace_id = $1 WHERE workspace_id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text" - ] - }, - "nullable": [] - }, - "hash": "6681048ee83236e9eb33b407b5d3cf89f563e57d5d3e7981d58cecf147b9bf1e" -} diff --git a/backend/.sqlx/query-6682bf34caf7efa95b60c747b45dcdd41de7f8e197b163f7865810391471db5b.json b/backend/.sqlx/query-6682bf34caf7efa95b60c747b45dcdd41de7f8e197b163f7865810391471db5b.json deleted file mode 100644 index 86968663f2..0000000000 --- a/backend/.sqlx/query-6682bf34caf7efa95b60c747b45dcdd41de7f8e197b163f7865810391471db5b.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by, CONCAT(coalesce(queue.logs, ''), coalesce(job_logs.logs, '')) as logs, coalesce(job_logs.log_offset, 0) as log_offset, job_logs.log_file_index\n FROM queue \n LEFT JOIN job_logs ON job_logs.job_id = queue.id \n WHERE queue.id = $1 AND queue.workspace_id = $2 AND ($3::text[] IS NULL OR queue.tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "log_file_index", - "type_info": "TextArray" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - false, - null, - null, - true - ] - }, - "hash": "6682bf34caf7efa95b60c747b45dcdd41de7f8e197b163f7865810391471db5b" -} diff --git a/backend/.sqlx/query-66bf488f2eeaf5b4c4cb8c579d7a15eb87516c319c1fcbb3e46032bb9fdf718e.json b/backend/.sqlx/query-66bf488f2eeaf5b4c4cb8c579d7a15eb87516c319c1fcbb3e46032bb9fdf718e.json deleted file mode 100644 index faf1201af1..0000000000 --- a/backend/.sqlx/query-66bf488f2eeaf5b4c4cb8c579d7a15eb87516c319c1fcbb3e46032bb9fdf718e.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n success AS \"success!\",\n result AS \"result: Json>\",\n started_at AS \"started_at!\"\n FROM completed_job\n WHERE workspace_id = $1 AND schedule_path = $2 AND script_path = $3 AND id != $4\n ORDER BY created_at DESC\n LIMIT $5", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "result: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "started_at!", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Uuid", - "Int8" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "66bf488f2eeaf5b4c4cb8c579d7a15eb87516c319c1fcbb3e46032bb9fdf718e" -} diff --git a/backend/.sqlx/query-672363560895871e4ab19e0dd0dc36afdbc58470664b6cefa8cec25515a42f13.json b/backend/.sqlx/query-672363560895871e4ab19e0dd0dc36afdbc58470664b6cefa8cec25515a42f13.json deleted file mode 100644 index 53ed43a6e0..0000000000 --- a/backend/.sqlx/query-672363560895871e4ab19e0dd0dc36afdbc58470664b6cefa8cec25515a42f13.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT result #> $3 AS \"result: Json>\"\n FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "result: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - null - ] - }, - "hash": "672363560895871e4ab19e0dd0dc36afdbc58470664b6cefa8cec25515a42f13" -} diff --git a/backend/.sqlx/query-6818cae88492f83baf55f54bf5dd5397e04dbe771445818f88903ee5677b3631.json b/backend/.sqlx/query-6818cae88492f83baf55f54bf5dd5397e04dbe771445818f88903ee5677b3631.json deleted file mode 100644 index 19ac6b90d3..0000000000 --- a/backend/.sqlx/query-6818cae88492f83baf55f54bf5dd5397e04dbe771445818f88903ee5677b3631.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET script_path = REGEXP_REPLACE(script_path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1') WHERE script_path LIKE ('u/' || $2 || '/%') AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "6818cae88492f83baf55f54bf5dd5397e04dbe771445818f88903ee5677b3631" -} diff --git a/backend/.sqlx/query-6b0115e40d4361b3ca72dbd071b0a8c0319c5ae0b92f289ec1e74d2478c9e740.json b/backend/.sqlx/query-6b0115e40d4361b3ca72dbd071b0a8c0319c5ae0b92f289ec1e74d2478c9e740.json deleted file mode 100644 index 265ededd17..0000000000 --- a/backend/.sqlx/query-6b0115e40d4361b3ca72dbd071b0a8c0319c5ae0b92f289ec1e74d2478c9e740.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by AS \"created_by!\", CONCAT(coalesce(queue.logs, ''), coalesce(job_logs.logs, '')) as logs, coalesce(job_logs.log_offset, 0) as log_offset, job_logs.log_file_index\n FROM queue \n LEFT JOIN job_logs ON job_logs.job_id = queue.id \n WHERE queue.id = $1 AND queue.workspace_id = $2 AND ($3::text[] IS NULL OR queue.tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "log_file_index", - "type_info": "TextArray" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - true, - null, - null, - true - ] - }, - "hash": "6b0115e40d4361b3ca72dbd071b0a8c0319c5ae0b92f289ec1e74d2478c9e740" -} diff --git a/backend/.sqlx/query-6cb2c77bb90679a36189007b1f70406fe28923f51fc465ae0f45d7f317077bf5.json b/backend/.sqlx/query-6cb2c77bb90679a36189007b1f70406fe28923f51fc465ae0f45d7f317077bf5.json deleted file mode 100644 index e41413a7bf..0000000000 --- a/backend/.sqlx/query-6cb2c77bb90679a36189007b1f70406fe28923f51fc465ae0f45d7f317077bf5.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['cleanup_module', 'flow_jobs_to_clean'], COALESCE(flow_status->'cleanup_module'->'flow_jobs_to_clean', '[]'::jsonb) || $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "6cb2c77bb90679a36189007b1f70406fe28923f51fc465ae0f45d7f317077bf5" -} diff --git a/backend/.sqlx/query-6e7f234267fbb4720b29f288fba82c1df21ba601ac0989e175f834c569962d46.json b/backend/.sqlx/query-6e7f234267fbb4720b29f288fba82c1df21ba601ac0989e175f834c569962d46.json deleted file mode 100644 index e8db78adbd..0000000000 --- a/backend/.sqlx/query-6e7f234267fbb4720b29f288fba82c1df21ba601ac0989e175f834c569962d46.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['modules', $1::TEXT, 'iterator', 'index'], ((flow_status->'modules'->$1::int->'iterator'->>'index')::int + 1)::text::jsonb),\n last_ping = NULL\n WHERE id = $2\n RETURNING (flow_status->'modules'->$1::int->'iterator'->>'index')::int", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "int4", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "6e7f234267fbb4720b29f288fba82c1df21ba601ac0989e175f834c569962d46" -} diff --git a/backend/.sqlx/query-6f4817fad2739a11d89b6704edf62c3c267ca336a8b6bec5b29d4409030ed561.json b/backend/.sqlx/query-6f4817fad2739a11d89b6704edf62c3c267ca336a8b6bec5b29d4409030ed561.json deleted file mode 100644 index 3e2098f170..0000000000 --- a/backend/.sqlx/query-6f4817fad2739a11d89b6704edf62c3c267ca336a8b6bec5b29d4409030ed561.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO queue (id, script_hash, script_path, job_kind, language, tag, created_by, permissioned_as, email, scheduled_for, workspace_id, raw_flow, flow_status) (SELECT gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12 FROM generate_series(1, 1))", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Varchar", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Varchar", - "Varchar", - "Varchar", - "Varchar", - "Timestamptz", - "Varchar", - "Jsonb", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "6f4817fad2739a11d89b6704edf62c3c267ca336a8b6bec5b29d4409030ed561" -} diff --git a/backend/.sqlx/query-6fa6fa8eb511119c6adb18bd4f9f174bbb48eef8952f91911b8d9b45357372d9.json b/backend/.sqlx/query-6fa6fa8eb511119c6adb18bd4f9f174bbb48eef8952f91911b8d9b45357372d9.json deleted file mode 100644 index 9623039711..0000000000 --- a/backend/.sqlx/query-6fa6fa8eb511119c6adb18bd4f9f174bbb48eef8952f91911b8d9b45357372d9.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT CASE WHEN pg_column_size(args) < 40000 OR $3 THEN args ELSE '\"WINDMILL_TOO_BIG\"'::jsonb END as args FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "args", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "Bool" - ] - }, - "nullable": [ - null - ] - }, - "hash": "6fa6fa8eb511119c6adb18bd4f9f174bbb48eef8952f91911b8d9b45357372d9" -} diff --git a/backend/.sqlx/query-803b9c1373541cf52f416cde9e9e99ab79072e21dfaafb498aac25a059bd2f30.json b/backend/.sqlx/query-7315c588aac4ff3a1aa6972a7553ac47452a4ed4e8dff0e94f22e6225f4eebc7.json similarity index 50% rename from backend/.sqlx/query-803b9c1373541cf52f416cde9e9e99ab79072e21dfaafb498aac25a059bd2f30.json rename to backend/.sqlx/query-7315c588aac4ff3a1aa6972a7553ac47452a4ed4e8dff0e94f22e6225f4eebc7.json index b416f93d3b..ebbd00889d 100644 --- a/backend/.sqlx/query-803b9c1373541cf52f416cde9e9e99ab79072e21dfaafb498aac25a059bd2f30.json +++ b/backend/.sqlx/query-7315c588aac4ff3a1aa6972a7553ac47452a4ed4e8dff0e94f22e6225f4eebc7.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "DELETE FROM job WHERE id = ANY($1)", + "query": "INSERT INTO v2_job_runtime (id, ping) SELECT unnest($1::uuid[]), null", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "803b9c1373541cf52f416cde9e9e99ab79072e21dfaafb498aac25a059bd2f30" + "hash": "7315c588aac4ff3a1aa6972a7553ac47452a4ed4e8dff0e94f22e6225f4eebc7" } diff --git a/backend/.sqlx/query-74a2a90d12ca0179c8a80f9bf574066db4e8735c0f717d91391a28bf832c0e71.json b/backend/.sqlx/query-74a2a90d12ca0179c8a80f9bf574066db4e8735c0f717d91391a28bf832c0e71.json deleted file mode 100644 index fc80d816cf..0000000000 --- a/backend/.sqlx/query-74a2a90d12ca0179c8a80f9bf574066db4e8735c0f717d91391a28bf832c0e71.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET canceled = true, canceled_by = $1, canceled_reason = $2, scheduled_for = now(), suspend = 0 WHERE id = $3 AND workspace_id = $4 AND (canceled = false OR canceled_reason != $2) RETURNING id AS \"id!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "74a2a90d12ca0179c8a80f9bf574066db4e8735c0f717d91391a28bf832c0e71" -} diff --git a/backend/.sqlx/query-76ca60e456022cf3d1931245b7daf22783c81bc757d735a4b247cc693dfed719.json b/backend/.sqlx/query-76ca60e456022cf3d1931245b7daf22783c81bc757d735a4b247cc693dfed719.json deleted file mode 100644 index 530638af1f..0000000000 --- a/backend/.sqlx/query-76ca60e456022cf3d1931245b7daf22783c81bc757d735a4b247cc693dfed719.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['modules', flow_status->>'step', 'progress'], $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "76ca60e456022cf3d1931245b7daf22783c81bc757d735a4b247cc693dfed719" -} diff --git a/backend/.sqlx/query-777190559e27c8c8fb6718b0a0c1d7db9b956abd88b94db3948f2c579c3826d0.json b/backend/.sqlx/query-777190559e27c8c8fb6718b0a0c1d7db9b956abd88b94db3948f2c579c3826d0.json deleted file mode 100644 index 0c1d65bb6b..0000000000 --- a/backend/.sqlx/query-777190559e27c8c8fb6718b0a0c1d7db9b956abd88b94db3948f2c579c3826d0.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['modules', $1::TEXT, 'branchall', 'branch'], ((flow_status->'modules'->$1::int->'branchall'->>'branch')::int + 1)::text::jsonb),\n last_ping = NULL\n WHERE id = $2\n RETURNING (flow_status->'modules'->$1::int->'branchall'->>'branch')::int", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "int4", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "777190559e27c8c8fb6718b0a0c1d7db9b956abd88b94db3948f2c579c3826d0" -} diff --git a/backend/.sqlx/query-7c31a680436fd91db30c089e694cc5d8c7fb768a6ddc7cf337469a140fa37106.json b/backend/.sqlx/query-7c31a680436fd91db30c089e694cc5d8c7fb768a6ddc7cf337469a140fa37106.json deleted file mode 100644 index b3483a00ab..0000000000 --- a/backend/.sqlx/query-7c31a680436fd91db30c089e694cc5d8c7fb768a6ddc7cf337469a140fa37106.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job SET args = $1 WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "7c31a680436fd91db30c089e694cc5d8c7fb768a6ddc7cf337469a140fa37106" -} diff --git a/backend/.sqlx/query-7cf5a1c434c8d84eb2400cd394c8fed2e35cb1943d63692dfbf1b997e1263da0.json b/backend/.sqlx/query-7cf5a1c434c8d84eb2400cd394c8fed2e35cb1943d63692dfbf1b997e1263da0.json deleted file mode 100644 index c171169e32..0000000000 --- a/backend/.sqlx/query-7cf5a1c434c8d84eb2400cd394c8fed2e35cb1943d63692dfbf1b997e1263da0.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job SET\n args = (SELECT result FROM v2_job_completed WHERE id = $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "7cf5a1c434c8d84eb2400cd394c8fed2e35cb1943d63692dfbf1b997e1263da0" -} diff --git a/backend/.sqlx/query-7d3180d119da0f6215a571118439469569c31e0234bb073af33f2cd4d6ca71d4.json b/backend/.sqlx/query-7d3180d119da0f6215a571118439469569c31e0234bb073af33f2cd4d6ca71d4.json deleted file mode 100644 index b332ab2871..0000000000 --- a/backend/.sqlx/query-7d3180d119da0f6215a571118439469569c31e0234bb073af33f2cd4d6ca71d4.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM queue WHERE workspace_id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [] - }, - "hash": "7d3180d119da0f6215a571118439469569c31e0234bb073af33f2cd4d6ca71d4" -} diff --git a/backend/.sqlx/query-7dc7bc4e22942792938d273655962a95486f6da82cdc08f79dd6cef508256474.json b/backend/.sqlx/query-7dc7bc4e22942792938d273655962a95486f6da82cdc08f79dd6cef508256474.json deleted file mode 100644 index 94ad208788..0000000000 --- a/backend/.sqlx/query-7dc7bc4e22942792938d273655962a95486f6da82cdc08f79dd6cef508256474.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO completed_job AS cj\n ( workspace_id\n , id\n , parent_job\n , created_by\n , created_at\n , started_at\n , duration_ms\n , success\n , script_hash\n , script_path\n , args\n , result\n , raw_code\n , raw_lock\n , canceled\n , canceled_by\n , canceled_reason\n , job_kind\n , schedule_path\n , permissioned_as\n , flow_status\n , raw_flow\n , is_flow_step\n , is_skipped\n , language\n , email\n , visible_to_owner\n , mem_peak\n , tag\n , priority\n )\n SELECT workspace_id\n , id\n , parent_job\n , created_by\n , created_at\n , now()\n , 0\n , false\n , script_hash\n , script_path\n , args\n , $4\n , raw_code\n , raw_lock\n , true\n , $1\n , canceled_reason\n , job_kind\n , schedule_path\n , permissioned_as\n , flow_status\n , raw_flow\n , is_flow_step\n , false\n , language\n , email\n , visible_to_owner\n , mem_peak\n , tag\n , priority FROM queue \n WHERE id = any($2) AND running = false AND parent_job IS NULL AND workspace_id = $3 AND schedule_path IS NULL FOR UPDATE SKIP LOCKED\n ON CONFLICT (id) DO NOTHING RETURNING id AS \"id!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Varchar", - "UuidArray", - "Text", - "Jsonb" - ] - }, - "nullable": [ - true - ] - }, - "hash": "7dc7bc4e22942792938d273655962a95486f6da82cdc08f79dd6cef508256474" -} diff --git a/backend/.sqlx/query-7f717130a398c8d52f814a968c2b0bc4dbb9cd654307f5167d8dbe794f17a1cf.json b/backend/.sqlx/query-7f717130a398c8d52f814a968c2b0bc4dbb9cd654307f5167d8dbe794f17a1cf.json deleted file mode 100644 index 1df4da3a93..0000000000 --- a/backend/.sqlx/query-7f717130a398c8d52f814a968c2b0bc4dbb9cd654307f5167d8dbe794f17a1cf.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT success FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - false - ] - }, - "hash": "7f717130a398c8d52f814a968c2b0bc4dbb9cd654307f5167d8dbe794f17a1cf" -} diff --git a/backend/.sqlx/query-829130d74c107e4e1a86f3e772657ae030463c139c39072777e453bfb7e9c0c3.json b/backend/.sqlx/query-829130d74c107e4e1a86f3e772657ae030463c139c39072777e453bfb7e9c0c3.json deleted file mode 100644 index e00aba3aab..0000000000 --- a/backend/.sqlx/query-829130d74c107e4e1a86f3e772657ae030463c139c39072777e453bfb7e9c0c3.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT job_kind = 'identity' FROM completed_job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "829130d74c107e4e1a86f3e772657ae030463c139c39072777e453bfb7e9c0c3" -} diff --git a/backend/.sqlx/query-858db2a501abcfffbcce19d60cc241060c93354de19f0fa80b8f45290e8b992d.json b/backend/.sqlx/query-858db2a501abcfffbcce19d60cc241060c93354de19f0fa80b8f45290e8b992d.json deleted file mode 100644 index f3d1c484fe..0000000000 --- a/backend/.sqlx/query-858db2a501abcfffbcce19d60cc241060c93354de19f0fa80b8f45290e8b992d.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\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": "858db2a501abcfffbcce19d60cc241060c93354de19f0fa80b8f45290e8b992d" -} diff --git a/backend/.sqlx/query-85bbf1244848682702be93527cad26e44e6ce1308505d1fbc9c28eaabcbe463e.json b/backend/.sqlx/query-85bbf1244848682702be93527cad26e44e6ce1308505d1fbc9c28eaabcbe463e.json deleted file mode 100644 index de49a218fe..0000000000 --- a/backend/.sqlx/query-85bbf1244848682702be93527cad26e44e6ce1308505d1fbc9c28eaabcbe463e.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job_status SET flow_status = jsonb_set(COALESCE(flow_status, '{}'::jsonb), array[$1], jsonb_set(jsonb_set('{}'::jsonb, '{scheduled_for}', to_jsonb(now()::text)), '{name}', to_jsonb($3::text))) WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "85bbf1244848682702be93527cad26e44e6ce1308505d1fbc9c28eaabcbe463e" -} diff --git a/backend/.sqlx/query-866c1b86d63466df84877e81655ce999284f3d2d854a00fefcaf7c044dcf71ca.json b/backend/.sqlx/query-866c1b86d63466df84877e81655ce999284f3d2d854a00fefcaf7c044dcf71ca.json deleted file mode 100644 index c4905590b6..0000000000 --- a/backend/.sqlx/query-866c1b86d63466df84877e81655ce999284f3d2d854a00fefcaf7c044dcf71ca.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = jsonb_set(\n jsonb_set(flow_status, ARRAY['failure_module', 'job'], to_jsonb($1::UUID::TEXT)),\n ARRAY['failure_module', 'type'],\n to_jsonb('InProgress'::text)\n )\n WHERE id = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "866c1b86d63466df84877e81655ce999284f3d2d854a00fefcaf7c044dcf71ca" -} diff --git a/backend/.sqlx/query-870d7feec169f70d140b7477562315ed2fd4662975bf0d01cfbffac86a959368.json b/backend/.sqlx/query-870d7feec169f70d140b7477562315ed2fd4662975bf0d01cfbffac86a959368.json deleted file mode 100644 index f5c36ed27f..0000000000 --- a/backend/.sqlx/query-870d7feec169f70d140b7477562315ed2fd4662975bf0d01cfbffac86a959368.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(\n JSONB_SET(flow_status, ARRAY['modules', $1::TEXT], $2), ARRAY['step'], $3)\n WHERE id = $4", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Jsonb", - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "870d7feec169f70d140b7477562315ed2fd4662975bf0d01cfbffac86a959368" -} diff --git a/backend/.sqlx/query-8929150cb9262623eb12c908cb96c4d7e8cac594900ab0956c098e1cfa75e2f0.json b/backend/.sqlx/query-8929150cb9262623eb12c908cb96c4d7e8cac594900ab0956c098e1cfa75e2f0.json deleted file mode 100644 index 9e66b2ae2c..0000000000 --- a/backend/.sqlx/query-8929150cb9262623eb12c908cb96c4d7e8cac594900ab0956c098e1cfa75e2f0.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET leaf_jobs = JSONB_SET(coalesce(leaf_jobs, '{}'::jsonb), ARRAY[$1::TEXT], $2)\n WHERE COALESCE((SELECT root_job FROM queue WHERE id = $3), $3) = id", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "8929150cb9262623eb12c908cb96c4d7e8cac594900ab0956c098e1cfa75e2f0" -} diff --git a/backend/.sqlx/query-8a44ca0cfe1e154138cbbf5ebddebbba2e1149d2e329d1d89eecc1c008c93a31.json b/backend/.sqlx/query-8a44ca0cfe1e154138cbbf5ebddebbba2e1149d2e329d1d89eecc1c008c93a31.json deleted file mode 100644 index fdfaa0c029..0000000000 --- a/backend/.sqlx/query-8a44ca0cfe1e154138cbbf5ebddebbba2e1149d2e329d1d89eecc1c008c93a31.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job\n SET logs = '##DELETED##', args = '{}'::jsonb, result = '{}'::jsonb\n WHERE id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "8a44ca0cfe1e154138cbbf5ebddebbba2e1149d2e329d1d89eecc1c008c93a31" -} diff --git a/backend/.sqlx/query-8d4235984f27d8b939ffd5c660d5b57dc38dd3b2643361ed3b7cdcd1534d2e21.json b/backend/.sqlx/query-8d4235984f27d8b939ffd5c660d5b57dc38dd3b2643361ed3b7cdcd1534d2e21.json deleted file mode 100644 index 824deba7fa..0000000000 --- a/backend/.sqlx/query-8d4235984f27d8b939ffd5c660d5b57dc38dd3b2643361ed3b7cdcd1534d2e21.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM queue WHERE schedule_path = $1 AND running = false AND workspace_id = $2 AND is_flow_step = false", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "8d4235984f27d8b939ffd5c660d5b57dc38dd3b2643361ed3b7cdcd1534d2e21" -} diff --git a/backend/.sqlx/query-8d655c34a00510699d2ad7044f7e526ba5082e5d1945c76a98404fe5d92e32ee.json b/backend/.sqlx/query-8d655c34a00510699d2ad7044f7e526ba5082e5d1945c76a98404fe5d92e32ee.json deleted file mode 100644 index 028e35f5dc..0000000000 --- a/backend/.sqlx/query-8d655c34a00510699d2ad7044f7e526ba5082e5d1945c76a98404fe5d92e32ee.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM queue WHERE id = any($1) AND workspace_id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "UuidArray", - "Text" - ] - }, - "nullable": [] - }, - "hash": "8d655c34a00510699d2ad7044f7e526ba5082e5d1945c76a98404fe5d92e32ee" -} diff --git a/backend/.sqlx/query-8dd93be44f66c0744ddaff12a9664d9ad745a4a2bb4c0fa36d3caf77fa60e035.json b/backend/.sqlx/query-8dd93be44f66c0744ddaff12a9664d9ad745a4a2bb4c0fa36d3caf77fa60e035.json deleted file mode 100644 index dead4b0a55..0000000000 --- a/backend/.sqlx/query-8dd93be44f66c0744ddaff12a9664d9ad745a4a2bb4c0fa36d3caf77fa60e035.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n running AS \"running!\",\n substr(concat(coalesce(queue.logs, ''), job_logs.logs), greatest($1 - job_logs.log_offset, 0)) AS logs,\n mem_peak,\n CASE WHEN is_flow_step is true then NULL else flow_status END AS \"flow_status: sqlx::types::Json>\",\n job_logs.log_offset + char_length(job_logs.logs) + 1 AS log_offset,\n created_by AS \"created_by!\"\n FROM queue\n LEFT JOIN job_logs ON job_logs.job_id = queue.id \n WHERE queue.workspace_id = $2 AND queue.id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "running!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "mem_peak", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Int4", - "Text", - "Uuid" - ] - }, - "nullable": [ - true, - null, - true, - null, - null, - true - ] - }, - "hash": "8dd93be44f66c0744ddaff12a9664d9ad745a4a2bb4c0fa36d3caf77fa60e035" -} diff --git a/backend/.sqlx/query-9250b087485e51af83aef1f412c85edc114add7a6b6c1e3845ffda344effa03c.json b/backend/.sqlx/query-9250b087485e51af83aef1f412c85edc114add7a6b6c1e3845ffda344effa03c.json deleted file mode 100644 index b46a8f1a22..0000000000 --- a/backend/.sqlx/query-9250b087485e51af83aef1f412c85edc114add7a6b6c1e3845ffda344effa03c.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = flow_status - 'approval_conditions'\n WHERE id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "9250b087485e51af83aef1f412c85edc114add7a6b6c1e3845ffda344effa03c" -} diff --git a/backend/.sqlx/query-92b80a77d292ec734b097b815261ce0cd51d7f699ff296314c9801e115c52228.json b/backend/.sqlx/query-92b80a77d292ec734b097b815261ce0cd51d7f699ff296314c9801e115c52228.json deleted file mode 100644 index 1975b59d5a..0000000000 --- a/backend/.sqlx/query-92b80a77d292ec734b097b815261ce0cd51d7f699ff296314c9801e115c52228.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(JSONB_SET(flow_status, ARRAY['retry'], $1), ARRAY['modules', $3::TEXT, 'failed_retries'], $4)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid", - "Text", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "92b80a77d292ec734b097b815261ce0cd51d7f699ff296314c9801e115c52228" -} diff --git a/backend/.sqlx/query-9422431d79de41518f651ef24e86819d7b6a2f5531740a7deea1b51775335977.json b/backend/.sqlx/query-9422431d79de41518f651ef24e86819d7b6a2f5531740a7deea1b51775335977.json deleted file mode 100644 index 7f2936f195..0000000000 --- a/backend/.sqlx/query-9422431d79de41518f651ef24e86819d7b6a2f5531740a7deea1b51775335977.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT scalar_int FROM job_stats WHERE workspace_id = $1 AND job_id = $2 AND metric_id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "scalar_int", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "9422431d79de41518f651ef24e86819d7b6a2f5531740a7deea1b51775335977" -} diff --git a/backend/.sqlx/query-94831baa639d7546f98f24847c0f93697ee1edcee0acf4a0684a28ff66ef735a.json b/backend/.sqlx/query-94831baa639d7546f98f24847c0f93697ee1edcee0acf4a0684a28ff66ef735a.json deleted file mode 100644 index 01a61edd5f..0000000000 --- a/backend/.sqlx/query-94831baa639d7546f98f24847c0f93697ee1edcee0acf4a0684a28ff66ef735a.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n substr(concat(coalesce(v2_as_completed_job.logs, ''), job_logs.logs), greatest($1 - job_logs.log_offset, 0)) AS logs,\n mem_peak,\n CASE WHEN is_flow_step is true then NULL else flow_status END AS \"flow_status: sqlx::types::Json>\",\n job_logs.log_offset + char_length(job_logs.logs) + 1 AS log_offset,\n created_by AS \"created_by!\"\n FROM v2_as_completed_job\n LEFT JOIN job_logs ON job_logs.job_id = v2_as_completed_job.id \n WHERE v2_as_completed_job.workspace_id = $2 AND v2_as_completed_job.id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "mem_peak", - "type_info": "Int4" - }, - { - "ordinal": 2, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 4, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Int4", - "Text", - "Uuid" - ] - }, - "nullable": [ - null, - true, - null, - null, - true - ] - }, - "hash": "94831baa639d7546f98f24847c0f93697ee1edcee0acf4a0684a28ff66ef735a" -} diff --git a/backend/.sqlx/query-96a9357888af26e5ec1e314bb565af05de561a8f9899e4ddca958982fdb67803.json b/backend/.sqlx/query-96a9357888af26e5ec1e314bb565af05de561a8f9899e4ddca958982fdb67803.json deleted file mode 100644 index 5fbab5bf20..0000000000 --- a/backend/.sqlx/query-96a9357888af26e5ec1e314bb565af05de561a8f9899e4ddca958982fdb67803.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\" FROM queue WHERE schedule_path = $1 AND workspace_id = $2 AND id != $3 AND running = true", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "96a9357888af26e5ec1e314bb565af05de561a8f9899e4ddca958982fdb67803" -} diff --git a/backend/.sqlx/query-971175f6169857c3e1cdc08ac8aeed57300b7792e1797a9cdd73c9b3967cd7b9.json b/backend/.sqlx/query-971175f6169857c3e1cdc08ac8aeed57300b7792e1797a9cdd73c9b3967cd7b9.json deleted file mode 100644 index f389cb6432..0000000000 --- a/backend/.sqlx/query-971175f6169857c3e1cdc08ac8aeed57300b7792e1797a9cdd73c9b3967cd7b9.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT root_job FROM queue WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "root_job", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "971175f6169857c3e1cdc08ac8aeed57300b7792e1797a9cdd73c9b3967cd7b9" -} diff --git a/backend/.sqlx/query-9a9b639611459659ae355a43f219c6da2c3d1e04d49306adaaaaf06e54ee8357.json b/backend/.sqlx/query-9a9b639611459659ae355a43f219c6da2c3d1e04d49306adaaaaf06e54ee8357.json deleted file mode 100644 index 8ae3d80ca6..0000000000 --- a/backend/.sqlx/query-9a9b639611459659ae355a43f219c6da2c3d1e04d49306adaaaaf06e54ee8357.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH zombie_jobs AS (\n UPDATE queue SET running = false, started_at = null\n WHERE last_ping < now() - ($1 || ' seconds')::interval\n AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow') AND same_worker = false \n RETURNING id, workspace_id, last_ping\n ),\n update_concurrency AS (\n UPDATE concurrency_counter cc\n SET job_uuids = job_uuids - zj.id::text\n FROM zombie_jobs zj\n INNER JOIN concurrency_key ck ON ck.job_id = zj.id\n WHERE cc.concurrency_id = ck.key\n )\n SELECT id, workspace_id, last_ping FROM zombie_jobs", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "last_ping", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - true - ] - }, - "hash": "9a9b639611459659ae355a43f219c6da2c3d1e04d49306adaaaaf06e54ee8357" -} diff --git a/backend/.sqlx/query-9b716307fdbd479879224ba60b77eeb7e8487b02b13710c68be99057e2c32cb9.json b/backend/.sqlx/query-9b716307fdbd479879224ba60b77eeb7e8487b02b13710c68be99057e2c32cb9.json deleted file mode 100644 index 49663a5013..0000000000 --- a/backend/.sqlx/query-9b716307fdbd479879224ba60b77eeb7e8487b02b13710c68be99057e2c32cb9.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET flow_status = jsonb_set(jsonb_set(COALESCE(flow_status, '{}'::jsonb), array[$1], COALESCE(flow_status->$1, '{}'::jsonb)), array[$1, 'started_at'], to_jsonb(now()::text)) WHERE id = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "9b716307fdbd479879224ba60b77eeb7e8487b02b13710c68be99057e2c32cb9" -} diff --git a/backend/.sqlx/query-9bdad9fbe8990588d8d769d4a38e2397ee789f6732199a5259f5f4ee2c5a166d.json b/backend/.sqlx/query-9bdad9fbe8990588d8d769d4a38e2397ee789f6732199a5259f5f4ee2c5a166d.json deleted file mode 100644 index b49d76d6cf..0000000000 --- a/backend/.sqlx/query-9bdad9fbe8990588d8d769d4a38e2397ee789f6732199a5259f5f4ee2c5a166d.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\", result AS \"result: Json>\"\n FROM completed_job WHERE id = ANY($1) AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "result: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "UuidArray", - "Text" - ] - }, - "nullable": [ - true, - true - ] - }, - "hash": "9bdad9fbe8990588d8d769d4a38e2397ee789f6732199a5259f5f4ee2c5a166d" -} diff --git a/backend/.sqlx/query-9c17ddca92e0a93051b36bb688ad6c1c24108e45c94be52595ca6cb82135f4eb.json b/backend/.sqlx/query-9c17ddca92e0a93051b36bb688ad6c1c24108e45c94be52595ca6cb82135f4eb.json deleted file mode 100644 index 5de165462e..0000000000 --- a/backend/.sqlx/query-9c17ddca92e0a93051b36bb688ad6c1c24108e45c94be52595ca6cb82135f4eb.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET args = (select result FROM completed_job WHERE id = $1) WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "9c17ddca92e0a93051b36bb688ad6c1c24108e45c94be52595ca6cb82135f4eb" -} diff --git a/backend/.sqlx/query-9c34c717b218c09e3784a5413f7972e5e805dae837a075da4e503494624b518a.json b/backend/.sqlx/query-9c34c717b218c09e3784a5413f7972e5e805dae837a075da4e503494624b518a.json deleted file mode 100644 index d22420d6e4..0000000000 --- a/backend/.sqlx/query-9c34c717b218c09e3784a5413f7972e5e805dae837a075da4e503494624b518a.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = jsonb_set(\n jsonb_set(flow_status, ARRAY['preprocessor_module', 'job'], to_jsonb($1::UUID::TEXT)),\n ARRAY['preprocessor_module', 'type'],\n to_jsonb('InProgress'::text)\n )\n WHERE id = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "9c34c717b218c09e3784a5413f7972e5e805dae837a075da4e503494624b518a" -} diff --git a/backend/.sqlx/query-9d3556319411a27a875bf6cf0e5eda837cc63e4d8be912c0b5bfeea4a0c8db2e.json b/backend/.sqlx/query-9d3556319411a27a875bf6cf0e5eda837cc63e4d8be912c0b5bfeea4a0c8db2e.json deleted file mode 100644 index 2abc565def..0000000000 --- a/backend/.sqlx/query-9d3556319411a27a875bf6cf0e5eda837cc63e4d8be912c0b5bfeea4a0c8db2e.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO queue (id, script_hash, script_path, job_kind, language, tag, created_by, permissioned_as, email, scheduled_for, workspace_id) (SELECT gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10 FROM generate_series(1, $11))", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Varchar", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Varchar", - "Varchar", - "Varchar", - "Varchar", - "Timestamptz", - "Varchar", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "9d3556319411a27a875bf6cf0e5eda837cc63e4d8be912c0b5bfeea4a0c8db2e" -} diff --git a/backend/.sqlx/query-9d616812c5a6ae514f047ce2d035a07ff11d13472c25533824dec93c41ea609c.json b/backend/.sqlx/query-9d616812c5a6ae514f047ce2d035a07ff11d13472c25533824dec93c41ea609c.json deleted file mode 100644 index 7471bb0bf3..0000000000 --- a/backend/.sqlx/query-9d616812c5a6ae514f047ce2d035a07ff11d13472c25533824dec93c41ea609c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT args AS \"args: Json>>\"\n FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "args: Json>>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "9d616812c5a6ae514f047ce2d035a07ff11d13472c25533824dec93c41ea609c" -} diff --git a/backend/.sqlx/query-9f16a61d6a9a42f3fd3e30a1e7776503cee1b45eba150c3082eb246ea3f98d47.json b/backend/.sqlx/query-9f16a61d6a9a42f3fd3e30a1e7776503cee1b45eba150c3082eb246ea3f98d47.json deleted file mode 100644 index aa64996dc8..0000000000 --- a/backend/.sqlx/query-9f16a61d6a9a42f3fd3e30a1e7776503cee1b45eba150c3082eb246ea3f98d47.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT EXISTS(SELECT 1 FROM completed_job WHERE id = $1 AND workspace_id = $2)", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "exists", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "9f16a61d6a9a42f3fd3e30a1e7776503cee1b45eba150c3082eb246ea3f98d47" -} diff --git a/backend/.sqlx/query-a241c56415759105ccbcbf7fff77287fa4ec2cc096c0060d14db421115d63e2d.json b/backend/.sqlx/query-a241c56415759105ccbcbf7fff77287fa4ec2cc096c0060d14db421115d63e2d.json deleted file mode 100644 index 226f49f2fe..0000000000 --- a/backend/.sqlx/query-a241c56415759105ccbcbf7fff77287fa4ec2cc096c0060d14db421115d63e2d.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT EXISTS (SELECT 1 FROM queue WHERE workspace_id = $1 AND schedule_path = $2 AND scheduled_for = $3)", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "exists", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Timestamptz" - ] - }, - "nullable": [ - null - ] - }, - "hash": "a241c56415759105ccbcbf7fff77287fa4ec2cc096c0060d14db421115d63e2d" -} diff --git a/backend/.sqlx/query-a33e282d02c53e5d6142dc7e6882a6d8f3d068c55cddf209eb6b6431ca26c910.json b/backend/.sqlx/query-a33e282d02c53e5d6142dc7e6882a6d8f3d068c55cddf209eb6b6431ca26c910.json deleted file mode 100644 index 20d1bfb045..0000000000 --- a/backend/.sqlx/query-a33e282d02c53e5d6142dc7e6882a6d8f3d068c55cddf209eb6b6431ca26c910.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\" FROM queue WHERE workspace_id = $1 and root_job = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "a33e282d02c53e5d6142dc7e6882a6d8f3d068c55cddf209eb6b6431ca26c910" -} diff --git a/backend/.sqlx/query-a405e637f5f3b3203de6d65dfcb0ba1be406ee5167f7b8aa90213ef52c97441f.json b/backend/.sqlx/query-a405e637f5f3b3203de6d65dfcb0ba1be406ee5167f7b8aa90213ef52c97441f.json deleted file mode 100644 index 21dacfcc9b..0000000000 --- a/backend/.sqlx/query-a405e637f5f3b3203de6d65dfcb0ba1be406ee5167f7b8aa90213ef52c97441f.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT usage.usage + 1 FROM usage \n WHERE is_workspace IS TRUE AND\n month_ = EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date)\n AND id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "a405e637f5f3b3203de6d65dfcb0ba1be406ee5167f7b8aa90213ef52c97441f" -} diff --git a/backend/.sqlx/query-a6feede7d9c3060b1e4c94bb4fa700d38a0d1b9d25429021c08fc94d57f952d2.json b/backend/.sqlx/query-a6feede7d9c3060b1e4c94bb4fa700d38a0d1b9d25429021c08fc94d57f952d2.json deleted file mode 100644 index c3658e02a2..0000000000 --- a/backend/.sqlx/query-a6feede7d9c3060b1e4c94bb4fa700d38a0d1b9d25429021c08fc94d57f952d2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET created_by = $1 WHERE created_by = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "a6feede7d9c3060b1e4c94bb4fa700d38a0d1b9d25429021c08fc94d57f952d2" -} diff --git a/backend/.sqlx/query-a91798f58fa5948cd1739df4fa2e07cbb3eb08c5d2d22b057796e1156ae2a122.json b/backend/.sqlx/query-a91798f58fa5948cd1739df4fa2e07cbb3eb08c5d2d22b057796e1156ae2a122.json deleted file mode 100644 index 3dfa6d79e2..0000000000 --- a/backend/.sqlx/query-a91798f58fa5948cd1739df4fa2e07cbb3eb08c5d2d22b057796e1156ae2a122.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT leaf_jobs->$1::text AS \"leaf_jobs: Json>\", parent_job\n FROM queue\n WHERE COALESCE((SELECT root_job FROM queue WHERE id = $2), $2) = id AND workspace_id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "leaf_jobs: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 1, - "name": "parent_job", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [ - null, - true - ] - }, - "hash": "a91798f58fa5948cd1739df4fa2e07cbb3eb08c5d2d22b057796e1156ae2a122" -} diff --git a/backend/.sqlx/query-ac94c16bff27deab63b898c1cdca9818c93ea0b4c3aaacbd9dcef11fcd9e68a3.json b/backend/.sqlx/query-ac94c16bff27deab63b898c1cdca9818c93ea0b4c3aaacbd9dcef11fcd9e68a3.json deleted file mode 100644 index 602dcb8206..0000000000 --- a/backend/.sqlx/query-ac94c16bff27deab63b898c1cdca9818c93ea0b4c3aaacbd9dcef11fcd9e68a3.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO v2_job (id, workspace_id, raw_code, raw_lock, raw_flow, tag, parent_job,\n created_by, permissioned_as, runnable_id, runnable_path, args, kind, trigger,\n script_lang, same_worker, pre_run_error, permissioned_as_email, visible_to_owner,\n flow_innermost_root_job, concurrent_limit, concurrency_time_window_s, timeout, flow_step_id,\n cache_ttl, priority, trigger_kind, script_entrypoint_override)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18,\n $19, $20, $21, $22, $23, $24, $25, $26,\n CASE WHEN $14::VARCHAR IS NOT NULL THEN 'schedule'::job_trigger_kind END,\n ($12::JSONB)->>'_ENTRYPOINT_OVERRIDE')", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Varchar", - "Text", - "Text", - "Jsonb", - "Varchar", - "Uuid", - "Varchar", - "Varchar", - "Int8", - "Varchar", - "Jsonb", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - "Varchar", - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Bool", - "Text", - "Varchar", - "Bool", - "Uuid", - "Int4", - "Int4", - "Int4", - "Varchar", - "Int4", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "ac94c16bff27deab63b898c1cdca9818c93ea0b4c3aaacbd9dcef11fcd9e68a3" -} diff --git a/backend/.sqlx/query-ad8f9e0b06f288051cbec3c91877430a1d61353b9122fd42777d92e4cbc9f4fa.json b/backend/.sqlx/query-ad8f9e0b06f288051cbec3c91877430a1d61353b9122fd42777d92e4cbc9f4fa.json deleted file mode 100644 index 00453be45b..0000000000 --- a/backend/.sqlx/query-ad8f9e0b06f288051cbec3c91877430a1d61353b9122fd42777d92e4cbc9f4fa.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(\n JSONB_SET(flow_status, ARRAY['failure_module'], $1), ARRAY['step'], $2)\n WHERE id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "ad8f9e0b06f288051cbec3c91877430a1d61353b9122fd42777d92e4cbc9f4fa" -} diff --git a/backend/.sqlx/query-ae25fae1aca2cffc43a6054cd54639ba9deaaef419ad4cb2655e7e95f602a688.json b/backend/.sqlx/query-ae25fae1aca2cffc43a6054cd54639ba9deaaef419ad4cb2655e7e95f602a688.json deleted file mode 100644 index 5634e60233..0000000000 --- a/backend/.sqlx/query-ae25fae1aca2cffc43a6054cd54639ba9deaaef419ad4cb2655e7e95f602a688.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO job_logs (job_id, logs) VALUES ($1,'Restarted job after not receiving job''s ping for too long the ' || now() || '\n\n') \n ON CONFLICT (job_id) DO UPDATE SET logs = job_logs.logs || '\nRestarted job after not receiving job''s ping for too long the ' || now() || '\n\n' WHERE job_logs.job_id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "ae25fae1aca2cffc43a6054cd54639ba9deaaef419ad4cb2655e7e95f602a688" -} diff --git a/backend/.sqlx/query-afd0d1b0511f32ba1981bc8d09b729639a6c0b468aa3f9108071d160d2dee250.json b/backend/.sqlx/query-afd0d1b0511f32ba1981bc8d09b729639a6c0b468aa3f9108071d160d2dee250.json deleted file mode 100644 index 5ccb236cc6..0000000000 --- a/backend/.sqlx/query-afd0d1b0511f32ba1981bc8d09b729639a6c0b468aa3f9108071d160d2dee250.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by, CONCAT(coalesce(completed_job.logs, ''), coalesce(job_logs.logs, '')) as logs, job_logs.log_offset, job_logs.log_file_index\n FROM completed_job \n LEFT JOIN job_logs ON job_logs.job_id = completed_job.id \n WHERE completed_job.id = $1 AND completed_job.workspace_id = $2 AND ($3::text[] IS NULL OR completed_job.tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "log_file_index", - "type_info": "TextArray" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - false, - null, - false, - true - ] - }, - "hash": "afd0d1b0511f32ba1981bc8d09b729639a6c0b468aa3f9108071d160d2dee250" -} diff --git a/backend/.sqlx/query-b053117536c067095e2fb2864ce5af33f84b22c24c92fcb870f37f0501f8ea9a.json b/backend/.sqlx/query-b053117536c067095e2fb2864ce5af33f84b22c24c92fcb870f37f0501f8ea9a.json deleted file mode 100644 index 316f6d7eda..0000000000 --- a/backend/.sqlx/query-b053117536c067095e2fb2864ce5af33f84b22c24c92fcb870f37f0501f8ea9a.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COUNT(id) FROM queue WHERE running = true AND email = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "b053117536c067095e2fb2864ce5af33f84b22c24c92fcb870f37f0501f8ea9a" -} diff --git a/backend/.sqlx/query-b06915e02398511033717ea13b710c86a24fe666884cfd49996dee961751ce51.json b/backend/.sqlx/query-b06915e02398511033717ea13b710c86a24fe666884cfd49996dee961751ce51.json deleted file mode 100644 index 194fda66ef..0000000000 --- a/backend/.sqlx/query-b06915e02398511033717ea13b710c86a24fe666884cfd49996dee961751ce51.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH uuid_table as (\n select unnest($11::uuid[]) as uuid\n )\n INSERT INTO queue \n (id, script_hash, script_path, job_kind, language, args, tag, created_by, permissioned_as, email, scheduled_for, workspace_id, concurrent_limit, concurrency_time_window_s, timeout, flow_status)\n (SELECT uuid, $1, $2, $3, $4, ('{ \"uuid\": \"' || uuid || '\" }')::jsonb, $5, $6, $7, $8, $9, $10, $12, $13, $14, $15 FROM uuid_table) \n RETURNING id AS \"id!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Int8", - "Varchar", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Varchar", - "Varchar", - "Varchar", - "Varchar", - "Timestamptz", - "Varchar", - "UuidArray", - "Int4", - "Int4", - "Int4", - "Jsonb" - ] - }, - "nullable": [ - true - ] - }, - "hash": "b06915e02398511033717ea13b710c86a24fe666884cfd49996dee961751ce51" -} diff --git a/backend/.sqlx/query-b0890c1bac6931d848afd88539a0b766a018957c1a325940df8914b28df60aca.json b/backend/.sqlx/query-b0890c1bac6931d848afd88539a0b766a018957c1a325940df8914b28df60aca.json deleted file mode 100644 index 15b7b27002..0000000000 --- a/backend/.sqlx/query-b0890c1bac6931d848afd88539a0b766a018957c1a325940df8914b28df60aca.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT tag AS \"tag!\", count(*) AS \"count!\" FROM queue WHERE\n scheduled_for <= now() - ('3 seconds')::interval AND running = false\n GROUP BY tag", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "tag!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "count!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - null - ] - }, - "hash": "b0890c1bac6931d848afd88539a0b766a018957c1a325940df8914b28df60aca" -} diff --git a/backend/.sqlx/query-b08bf73ca7da6af302eeb5a5f443d71e03478e642a7999157a631a7ff0b7c63e.json b/backend/.sqlx/query-b08bf73ca7da6af302eeb5a5f443d71e03478e642a7999157a631a7ff0b7c63e.json deleted file mode 100644 index 53fc18f0fc..0000000000 --- a/backend/.sqlx/query-b08bf73ca7da6af302eeb5a5f443d71e03478e642a7999157a631a7ff0b7c63e.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET flow_status = q.flow_status FROM queue q WHERE completed_job.id = $1 AND q.id = $1 AND q.workspace_id = $2 AND completed_job.workspace_id = $2 AND q.flow_status IS NOT NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "b08bf73ca7da6af302eeb5a5f443d71e03478e642a7999157a631a7ff0b7c63e" -} diff --git a/backend/.sqlx/query-b3e41eaff54c5da5e38cff785c17b2d9e014be9d0794e72dc8566485e61492cd.json b/backend/.sqlx/query-b3e41eaff54c5da5e38cff785c17b2d9e014be9d0794e72dc8566485e61492cd.json deleted file mode 100644 index ce125516d2..0000000000 --- a/backend/.sqlx/query-b3e41eaff54c5da5e38cff785c17b2d9e014be9d0794e72dc8566485e61492cd.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n script_path, args AS \"args: sqlx::types::Json>>\",\n tag AS \"tag!\", priority\n FROM completed_job\n WHERE id = $1 and workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "args: sqlx::types::Json>>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "tag!", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "priority", - "type_info": "Int2" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "b3e41eaff54c5da5e38cff785c17b2d9e014be9d0794e72dc8566485e61492cd" -} diff --git a/backend/.sqlx/query-b50b8d3367bd1f74986e6f923fe8497bcbfffea2570a3f3d1f8100207bc1557c.json b/backend/.sqlx/query-b50b8d3367bd1f74986e6f923fe8497bcbfffea2570a3f3d1f8100207bc1557c.json deleted file mode 100644 index dd2a7b9ede..0000000000 --- a/backend/.sqlx/query-b50b8d3367bd1f74986e6f923fe8497bcbfffea2570a3f3d1f8100207bc1557c.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COUNT(*) FROM queue WHERE canceled = false AND (scheduled_for <= now()\n OR (suspend_until IS NOT NULL\n AND ( suspend <= 0\n OR suspend_until <= now())))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - null - ] - }, - "hash": "b50b8d3367bd1f74986e6f923fe8497bcbfffea2570a3f3d1f8100207bc1557c" -} diff --git a/backend/.sqlx/query-bb0ee03198bcad69a1777447cf5c42fc22700e3cbf8cd44621a8380536d77552.json b/backend/.sqlx/query-bb0ee03198bcad69a1777447cf5c42fc22700e3cbf8cd44621a8380536d77552.json deleted file mode 100644 index 91a88794f4..0000000000 --- a/backend/.sqlx/query-bb0ee03198bcad69a1777447cf5c42fc22700e3cbf8cd44621a8380536d77552.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM completed_job WHERE created_at <= now() - ($1::bigint::text || ' s')::interval AND started_at + ((duration_ms/1000 + $1::bigint) || ' s')::interval <= now() RETURNING id", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "bb0ee03198bcad69a1777447cf5c42fc22700e3cbf8cd44621a8380536d77552" -} diff --git a/backend/.sqlx/query-bb93ba18709648b47cfbd04d91afd3b38546b1a718d0abff6b2795d7c2a29c97.json b/backend/.sqlx/query-bb93ba18709648b47cfbd04d91afd3b38546b1a718d0abff6b2795d7c2a29c97.json deleted file mode 100644 index d6288765fe..0000000000 --- a/backend/.sqlx/query-bb93ba18709648b47cfbd04d91afd3b38546b1a718d0abff6b2795d7c2a29c97.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT id AS \"id!\", flow_status, suspend AS \"suspend!\", script_path\n FROM queue\n WHERE id = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "flow_status", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "suspend!", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "bb93ba18709648b47cfbd04d91afd3b38546b1a718d0abff6b2795d7c2a29c97" -} diff --git a/backend/.sqlx/query-bc01d5ca0138527b796a373f76404b8b6e4c6d711d0f6a557f929d831b8cfd3e.json b/backend/.sqlx/query-bc01d5ca0138527b796a373f76404b8b6e4c6d711d0f6a557f929d831b8cfd3e.json deleted file mode 100644 index 6fcbd0a266..0000000000 --- a/backend/.sqlx/query-bc01d5ca0138527b796a373f76404b8b6e4c6d711d0f6a557f929d831b8cfd3e.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT null FROM queue WHERE id = $1 FOR UPDATE", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "bc01d5ca0138527b796a373f76404b8b6e4c6d711d0f6a557f929d831b8cfd3e" -} diff --git a/backend/.sqlx/query-bc8ac03254669951654cda4bcfa12491341e745aef5e0e5090c2f4e4a4dc54fb.json b/backend/.sqlx/query-bc8ac03254669951654cda4bcfa12491341e745aef5e0e5090c2f4e4a4dc54fb.json deleted file mode 100644 index fc27de30d0..0000000000 --- a/backend/.sqlx/query-bc8ac03254669951654cda4bcfa12491341e745aef5e0e5090c2f4e4a4dc54fb.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT raw_code, raw_lock, raw_flow AS \"raw_flow: Json>\" FROM job WHERE id = $1 LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "raw_code", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "raw_lock", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "bc8ac03254669951654cda4bcfa12491341e745aef5e0e5090c2f4e4a4dc54fb" -} diff --git a/backend/.sqlx/query-bca733ef3969c055269db2bc20dacd5ecb22e6d5378ca6bc5a83dae6b8e525c1.json b/backend/.sqlx/query-bca733ef3969c055269db2bc20dacd5ecb22e6d5378ca6bc5a83dae6b8e525c1.json deleted file mode 100644 index 2307dbbce5..0000000000 --- a/backend/.sqlx/query-bca733ef3969c055269db2bc20dacd5ecb22e6d5378ca6bc5a83dae6b8e525c1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job_completed SET flow_status = f.flow_status FROM v2_job_status f WHERE v2_job_completed.id = $1 AND f.id = $1 AND v2_job_completed.workspace_id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "bca733ef3969c055269db2bc20dacd5ecb22e6d5378ca6bc5a83dae6b8e525c1" -} diff --git a/backend/.sqlx/query-bf04a017bc55f6e1f5f25f697b3c4828611591c76dd32541735095c010d6cdf2.json b/backend/.sqlx/query-bf04a017bc55f6e1f5f25f697b3c4828611591c76dd32541735095c010d6cdf2.json deleted file mode 100644 index aad7404583..0000000000 --- a/backend/.sqlx/query-bf04a017bc55f6e1f5f25f697b3c4828611591c76dd32541735095c010d6cdf2.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT coalesce(COUNT(*), 0) as \"database_length!\", null::bigint as suspended FROM completed_job WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "database_length!", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "suspended", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null, - null - ] - }, - "hash": "bf04a017bc55f6e1f5f25f697b3c4828611591c76dd32541735095c010d6cdf2" -} diff --git a/backend/.sqlx/query-bf282f7ed77ed09bb44b5e253725a15acefac87bedb2725827938c54a3c0e8f8.json b/backend/.sqlx/query-bf282f7ed77ed09bb44b5e253725a15acefac87bedb2725827938c54a3c0e8f8.json deleted file mode 100644 index 356aa78547..0000000000 --- a/backend/.sqlx/query-bf282f7ed77ed09bb44b5e253725a15acefac87bedb2725827938c54a3c0e8f8.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET canceled_by = $1 WHERE canceled_by = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "bf282f7ed77ed09bb44b5e253725a15acefac87bedb2725827938c54a3c0e8f8" -} diff --git a/backend/.sqlx/query-bf91cb319e5b83c2235292a9e3ce8aa1c097c94b01aad0d9f7bce76a2a272bcc.json b/backend/.sqlx/query-bf91cb319e5b83c2235292a9e3ce8aa1c097c94b01aad0d9f7bce76a2a272bcc.json deleted file mode 100644 index 25caf0d4fe..0000000000 --- a/backend/.sqlx/query-bf91cb319e5b83c2235292a9e3ce8aa1c097c94b01aad0d9f7bce76a2a272bcc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT success AS \"success!\"\n FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "bf91cb319e5b83c2235292a9e3ce8aa1c097c94b01aad0d9f7bce76a2a272bcc" -} diff --git a/backend/.sqlx/query-c0b96d2f421afc43e256a8475825623bcb3dd4cbc37d570fc4273127bbf77c24.json b/backend/.sqlx/query-c0b96d2f421afc43e256a8475825623bcb3dd4cbc37d570fc4273127bbf77c24.json deleted file mode 100644 index 2015ab01d6..0000000000 --- a/backend/.sqlx/query-c0b96d2f421afc43e256a8475825623bcb3dd4cbc37d570fc4273127bbf77c24.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n job_kind AS \"job_kind!: JobKind\",\n script_hash AS \"script_hash: ScriptHash\",\n flow_status AS \"flow_status!: Json>\",\n raw_flow AS \"raw_flow: Json>\"\n FROM queue WHERE id = $1 AND workspace_id = $2 LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "job_kind!: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_hash: ScriptHash", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "flow_status!: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "c0b96d2f421afc43e256a8475825623bcb3dd4cbc37d570fc4273127bbf77c24" -} diff --git a/backend/.sqlx/query-c14009d133956710f4435a5984c18b9517e256978512f014e1bf5c270f499772.json b/backend/.sqlx/query-c14009d133956710f4435a5984c18b9517e256978512f014e1bf5c270f499772.json deleted file mode 100644 index 7e9e9b84aa..0000000000 --- a/backend/.sqlx/query-c14009d133956710f4435a5984c18b9517e256978512f014e1bf5c270f499772.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['preprocessor_module'], $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "c14009d133956710f4435a5984c18b9517e256978512f014e1bf5c270f499772" -} diff --git a/backend/.sqlx/query-c24d63fb137b805f1e674261681d15e6405de27d40b799b0a65b31fd41bcc625.json b/backend/.sqlx/query-c24d63fb137b805f1e674261681d15e6405de27d40b799b0a65b31fd41bcc625.json deleted file mode 100644 index d30c48c5ca..0000000000 --- a/backend/.sqlx/query-c24d63fb137b805f1e674261681d15e6405de27d40b799b0a65b31fd41bcc625.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "VACUUM (skip_locked) queue", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "c24d63fb137b805f1e674261681d15e6405de27d40b799b0a65b31fd41bcc625" -} diff --git a/backend/.sqlx/query-c3b5abbf2c9079d597a55f7c63bc83b8b4da98bda204a40f045a62172cfb4ebb.json b/backend/.sqlx/query-c3b5abbf2c9079d597a55f7c63bc83b8b4da98bda204a40f045a62172cfb4ebb.json deleted file mode 100644 index b545c48599..0000000000 --- a/backend/.sqlx/query-c3b5abbf2c9079d597a55f7c63bc83b8b4da98bda204a40f045a62172cfb4ebb.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT tag as \"tag!\", COUNT(*) as \"count!\"\n FROM completed_job\n WHERE started_at > NOW() - make_interval(secs => $1) AND ($2::text IS NULL OR workspace_id = $2)\n GROUP BY tag\n ORDER BY \"count!\" DESC\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "tag!", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "count!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Float8", - "Text" - ] - }, - "nullable": [ - false, - null - ] - }, - "hash": "c3b5abbf2c9079d597a55f7c63bc83b8b4da98bda204a40f045a62172cfb4ebb" -} diff --git a/backend/.sqlx/query-c75761c9aa900391251596771782039809bc01e4a0aa05701d6607b06769caa5.json b/backend/.sqlx/query-c75761c9aa900391251596771782039809bc01e4a0aa05701d6607b06769caa5.json deleted file mode 100644 index abe61cf520..0000000000 --- a/backend/.sqlx/query-c75761c9aa900391251596771782039809bc01e4a0aa05701d6607b06769caa5.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT id, flow_status, suspend, script_path\n FROM queue\n WHERE id = ( SELECT parent_job FROM queue WHERE id = $1 UNION ALL SELECT parent_job FROM completed_job WHERE id = $1)\n FOR UPDATE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "flow_status", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "suspend", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - false, - true, - false, - true - ] - }, - "hash": "c75761c9aa900391251596771782039809bc01e4a0aa05701d6607b06769caa5" -} diff --git a/backend/.sqlx/query-c845c06aa46b52a1e3672fd379dbcec167f4044e45e932aeeefd3d9237e5042c.json b/backend/.sqlx/query-c845c06aa46b52a1e3672fd379dbcec167f4044e45e932aeeefd3d9237e5042c.json deleted file mode 100644 index e698dac427..0000000000 --- a/backend/.sqlx/query-c845c06aa46b52a1e3672fd379dbcec167f4044e45e932aeeefd3d9237e5042c.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT CAST(ROUND(AVG(duration_ms), 0) AS BIGINT) AS avg_duration_s FROM\n (SELECT duration_ms FROM concurrency_key LEFT JOIN completed_job ON completed_job.id = concurrency_key.job_id WHERE key = $1 AND ended_at IS NOT NULL\n ORDER BY ended_at\n DESC LIMIT 10) AS t", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "avg_duration_s", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "c845c06aa46b52a1e3672fd379dbcec167f4044e45e932aeeefd3d9237e5042c" -} diff --git a/backend/.sqlx/query-ca3ba808e020c8c7a35eaef842b20cfeee64fd47ded72fce55cc75e0bbb291a8.json b/backend/.sqlx/query-ca3ba808e020c8c7a35eaef842b20cfeee64fd47ded72fce55cc75e0bbb291a8.json deleted file mode 100644 index 6d44fb2840..0000000000 --- a/backend/.sqlx/query-ca3ba808e020c8c7a35eaef842b20cfeee64fd47ded72fce55cc75e0bbb291a8.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO usage (id, is_workspace, month_, usage) \n VALUES ($1, TRUE, EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date), $2) \n ON CONFLICT (id, is_workspace, month_) DO UPDATE SET usage = usage.usage + $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "ca3ba808e020c8c7a35eaef842b20cfeee64fd47ded72fce55cc75e0bbb291a8" -} diff --git a/backend/.sqlx/query-c732dcb4df5877560a3e75e0032179140cbe442f0b80ce1172d80903dd8a14fa.json b/backend/.sqlx/query-ca8bf3dda133556ee7051d5436a5d76ae2223d59e9f321a8b6d0c27adc09f741.json similarity index 51% rename from backend/.sqlx/query-c732dcb4df5877560a3e75e0032179140cbe442f0b80ce1172d80903dd8a14fa.json rename to backend/.sqlx/query-ca8bf3dda133556ee7051d5436a5d76ae2223d59e9f321a8b6d0c27adc09f741.json index d19fc9d699..b7a302213a 100644 --- a/backend/.sqlx/query-c732dcb4df5877560a3e75e0032179140cbe442f0b80ce1172d80903dd8a14fa.json +++ b/backend/.sqlx/query-ca8bf3dda133556ee7051d5436a5d76ae2223d59e9f321a8b6d0c27adc09f741.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "UPDATE queue SET canceled = true WHERE id = $1", + "query": "INSERT INTO v2_job_runtime (id, ping) VALUES ($1, null)", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "c732dcb4df5877560a3e75e0032179140cbe442f0b80ce1172d80903dd8a14fa" + "hash": "ca8bf3dda133556ee7051d5436a5d76ae2223d59e9f321a8b6d0c27adc09f741" } diff --git a/backend/.sqlx/query-cb0eecb1130617f2132b8ec74a401ac3fb932bbeafe3aecc0b14465cce7e192d.json b/backend/.sqlx/query-cb0eecb1130617f2132b8ec74a401ac3fb932bbeafe3aecc0b14465cce7e192d.json deleted file mode 100644 index 128863559f..0000000000 --- a/backend/.sqlx/query-cb0eecb1130617f2132b8ec74a401ac3fb932bbeafe3aecc0b14465cce7e192d.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT 1 FROM queue WHERE id = $1 UNION ALL select 1 FROM completed_job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "cb0eecb1130617f2132b8ec74a401ac3fb932bbeafe3aecc0b14465cce7e192d" -} diff --git a/backend/.sqlx/query-cbf5a2b315a7e89689ee86acf452f40fd82605c456aff479890462f4d0202316.json b/backend/.sqlx/query-cbf5a2b315a7e89689ee86acf452f40fd82605c456aff479890462f4d0202316.json deleted file mode 100644 index 889f2433d7..0000000000 --- a/backend/.sqlx/query-cbf5a2b315a7e89689ee86acf452f40fd82605c456aff479890462f4d0202316.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET workspace_id = $1 WHERE workspace_id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text" - ] - }, - "nullable": [] - }, - "hash": "cbf5a2b315a7e89689ee86acf452f40fd82605c456aff479890462f4d0202316" -} diff --git a/backend/.sqlx/query-cf80f068b6a8906939f7ea0f1a8311fdabf78d6d5bd12e71070b1dae24df2352.json b/backend/.sqlx/query-cf80f068b6a8906939f7ea0f1a8311fdabf78d6d5bd12e71070b1dae24df2352.json deleted file mode 100644 index 7373aec488..0000000000 --- a/backend/.sqlx/query-cf80f068b6a8906939f7ea0f1a8311fdabf78d6d5bd12e71070b1dae24df2352.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['modules', $1::TEXT, 'approvers'], $2)\n WHERE id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "cf80f068b6a8906939f7ea0f1a8311fdabf78d6d5bd12e71070b1dae24df2352" -} diff --git a/backend/.sqlx/query-d74d3511d394c7ab2931c413e5ae87df1799a0ea64822449350abab02ab570be.json b/backend/.sqlx/query-d74d3511d394c7ab2931c413e5ae87df1799a0ea64822449350abab02ab570be.json deleted file mode 100644 index e4f5aed798..0000000000 --- a/backend/.sqlx/query-d74d3511d394c7ab2931c413e5ae87df1799a0ea64822449350abab02ab570be.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['approval_conditions'], $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "d74d3511d394c7ab2931c413e5ae87df1799a0ea64822449350abab02ab570be" -} diff --git a/backend/.sqlx/query-d7ce28c7cbd4974c72969858659a2a5c7448c919ae522e91332fa9a6212f5ddf.json b/backend/.sqlx/query-d7ce28c7cbd4974c72969858659a2a5c7448c919ae522e91332fa9a6212f5ddf.json deleted file mode 100644 index d1b5b0030c..0000000000 --- a/backend/.sqlx/query-d7ce28c7cbd4974c72969858659a2a5c7448c919ae522e91332fa9a6212f5ddf.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(flow_status, ARRAY['retry'], $1)\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "d7ce28c7cbd4974c72969858659a2a5c7448c919ae522e91332fa9a6212f5ddf" -} diff --git a/backend/.sqlx/query-d7f1e2920aec0f4eab9238d01370465945acdfa779f16b99cdc1a6b7ef84943e.json b/backend/.sqlx/query-d7f1e2920aec0f4eab9238d01370465945acdfa779f16b99cdc1a6b7ef84943e.json deleted file mode 100644 index dbc893740b..0000000000 --- a/backend/.sqlx/query-d7f1e2920aec0f4eab9238d01370465945acdfa779f16b99cdc1a6b7ef84943e.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT id AS \"id!\", flow_status, suspend AS \"suspend!\", script_path\n FROM queue\n WHERE id = ( SELECT parent_job FROM queue WHERE id = $1 UNION ALL SELECT parent_job FROM completed_job WHERE id = $1)\n FOR UPDATE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "flow_status", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "suspend!", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "d7f1e2920aec0f4eab9238d01370465945acdfa779f16b99cdc1a6b7ef84943e" -} diff --git a/backend/.sqlx/query-d91a447f3abcd39559d614ab7d423d0287bd34e463967fbaf0a3d590b59c9865.json b/backend/.sqlx/query-d91a447f3abcd39559d614ab7d423d0287bd34e463967fbaf0a3d590b59c9865.json deleted file mode 100644 index bce712700f..0000000000 --- a/backend/.sqlx/query-d91a447f3abcd39559d614ab7d423d0287bd34e463967fbaf0a3d590b59c9865.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n result AS \"result: sqlx::types::Json>\", success AS \"success!\",\n language AS \"language: ScriptLang\",\n flow_status AS \"flow_status: sqlx::types::Json>\",\n created_by AS \"created_by!\"\n FROM completed_job\n WHERE id = $1 AND workspace_id = $2 AND ($3::text[] IS NULL OR tag = ANY($3))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "result: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 1, - "name": "success!", - "type_info": "Bool" - }, - { - "ordinal": 2, - "name": "language: ScriptLang", - "type_info": { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - } - }, - { - "ordinal": 3, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray" - ] - }, - "nullable": [ - true, - true, - true, - true, - true - ] - }, - "hash": "d91a447f3abcd39559d614ab7d423d0287bd34e463967fbaf0a3d590b59c9865" -} diff --git a/backend/.sqlx/query-da9114fc6689ebc78422b3572de1ed44050bd28212540db50fe235463c15a900.json b/backend/.sqlx/query-da9114fc6689ebc78422b3572de1ed44050bd28212540db50fe235463c15a900.json deleted file mode 100644 index 0e259af63c..0000000000 --- a/backend/.sqlx/query-da9114fc6689ebc78422b3572de1ed44050bd28212540db50fe235463c15a900.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n queue.job_kind AS \"job_kind: JobKind\",\n queue.script_hash AS \"script_hash: ScriptHash\",\n queue.raw_flow AS \"raw_flow: sqlx::types::Json>\",\n completed_job.parent_job AS \"parent_job: Uuid\",\n completed_job.created_at AS \"created_at: chrono::NaiveDateTime\",\n completed_job.created_by AS \"created_by!\",\n queue.script_path,\n queue.args AS \"args: sqlx::types::Json>\"\n FROM queue\n JOIN completed_job ON completed_job.parent_job = queue.id\n WHERE completed_job.id = $1 AND completed_job.workspace_id = $2\n LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "job_kind: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_hash: ScriptHash", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "raw_flow: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "parent_job: Uuid", - "type_info": "Uuid" - }, - { - "ordinal": 4, - "name": "created_at: chrono::NaiveDateTime", - "type_info": "Timestamptz" - }, - { - "ordinal": 5, - "name": "created_by!", - "type_info": "Varchar" - }, - { - "ordinal": 6, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "args: sqlx::types::Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - false, - true, - true, - true, - false, - false, - true, - true - ] - }, - "hash": "da9114fc6689ebc78422b3572de1ed44050bd28212540db50fe235463c15a900" -} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json new file mode 100644 index 0000000000..c2dfed73a2 --- /dev/null +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH worker_ids AS (SELECT unnest($1::text[]) as worker) \n SELECT worker_ids.worker FROM worker_ids \n LEFT JOIN worker_ping ON worker_ids.worker = worker_ping.worker \n WHERE worker_ping.worker IS NULL OR worker_ping.ping_at < now() - ('60 seconds')::interval", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "worker", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "TextArray" + ] + }, + "nullable": [ + null + ] + }, + "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" +} diff --git a/backend/.sqlx/query-df0454f75e819d7d3d03fef0a7d5606940a089f6179e5443090afa9aba7c5b24.json b/backend/.sqlx/query-df0454f75e819d7d3d03fef0a7d5606940a089f6179e5443090afa9aba7c5b24.json deleted file mode 100644 index 166dc4a5d8..0000000000 --- a/backend/.sqlx/query-df0454f75e819d7d3d03fef0a7d5606940a089f6179e5443090afa9aba7c5b24.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT EXISTS (\n SELECT 1 FROM completed_job \n WHERE workspace_id = $2 \n AND (job_kind = 'appscript' OR job_kind = 'preview')\n AND created_by = 'anonymous' \n AND started_at > now() - interval '3 hours'\n AND script_path LIKE $3 || '/%' \n AND result @> ('{\"s3\":\"' || $1 || '\"}')::jsonb \n )", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "exists", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "df0454f75e819d7d3d03fef0a7d5606940a089f6179e5443090afa9aba7c5b24" -} diff --git a/backend/.sqlx/query-df533f1988e409b70a3e0966825d01993cd52e8e85943440081b8dbd3b9ae5a4.json b/backend/.sqlx/query-df533f1988e409b70a3e0966825d01993cd52e8e85943440081b8dbd3b9ae5a4.json deleted file mode 100644 index a4f3b96782..0000000000 --- a/backend/.sqlx/query-df533f1988e409b70a3e0966825d01993cd52e8e85943440081b8dbd3b9ae5a4.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = flow_status - 'retry'\n WHERE id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "df533f1988e409b70a3e0966825d01993cd52e8e85943440081b8dbd3b9ae5a4" -} diff --git a/backend/.sqlx/query-e03b8e0360ed7c282742b9b8657abdeecb3fec75bf10773544339bd025fc45bb.json b/backend/.sqlx/query-e03b8e0360ed7c282742b9b8657abdeecb3fec75bf10773544339bd025fc45bb.json deleted file mode 100644 index e17fd3f203..0000000000 --- a/backend/.sqlx/query-e03b8e0360ed7c282742b9b8657abdeecb3fec75bf10773544339bd025fc45bb.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT script_path FROM completed_job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "script_path", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "e03b8e0360ed7c282742b9b8657abdeecb3fec75bf10773544339bd025fc45bb" -} diff --git a/backend/.sqlx/query-e1923bc755bd6b8cc871ae9381a97d3c63a0fce3dd57c93f48a2136f7395fa3a.json b/backend/.sqlx/query-e1923bc755bd6b8cc871ae9381a97d3c63a0fce3dd57c93f48a2136f7395fa3a.json deleted file mode 100644 index a477ebf141..0000000000 --- a/backend/.sqlx/query-e1923bc755bd6b8cc871ae9381a97d3c63a0fce3dd57c93f48a2136f7395fa3a.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT raw_flow->'failure_module' != 'null'::jsonb FROM job WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "e1923bc755bd6b8cc871ae9381a97d3c63a0fce3dd57c93f48a2136f7395fa3a" -} diff --git a/backend/.sqlx/query-e207bbcdd478758562e3082330836d6efe1dd6c4f719bc415222eba78d5e63fc.json b/backend/.sqlx/query-e207bbcdd478758562e3082330836d6efe1dd6c4f719bc415222eba78d5e63fc.json deleted file mode 100644 index ac91e4f1d1..0000000000 --- a/backend/.sqlx/query-e207bbcdd478758562e3082330836d6efe1dd6c4f719bc415222eba78d5e63fc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id FROM queue", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "e207bbcdd478758562e3082330836d6efe1dd6c4f719bc415222eba78d5e63fc" -} diff --git a/backend/.sqlx/query-e4e87539ae18f7e5c6bd9a28d16b7527ececad87d218182ff723e6a6c43ecd50.json b/backend/.sqlx/query-e4e87539ae18f7e5c6bd9a28d16b7527ececad87d218182ff723e6a6c43ecd50.json deleted file mode 100644 index 3148f59bb4..0000000000 --- a/backend/.sqlx/query-e4e87539ae18f7e5c6bd9a28d16b7527ececad87d218182ff723e6a6c43ecd50.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT \n flow_status->>'step' = '0' \n AND (\n jsonb_array_length(flow_status->'modules') = 0 \n OR flow_status->'modules'->0->>'type' = 'WaitingForPriorSteps' \n OR (\n flow_status->'modules'->0->>'type' = 'Failure' \n AND flow_status->'modules'->0->>'job' = $1\n )\n )\n FROM completed_job WHERE id = $2 AND workspace_id = $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text", - "Uuid", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "e4e87539ae18f7e5c6bd9a28d16b7527ececad87d218182ff723e6a6c43ecd50" -} diff --git a/backend/.sqlx/query-e58cf2e3deb9aa1e9f37313a33e5d44fcfdb40a4764e1dc34896bd85b3d007f9.json b/backend/.sqlx/query-e58cf2e3deb9aa1e9f37313a33e5d44fcfdb40a4764e1dc34896bd85b3d007f9.json deleted file mode 100644 index ab1bd399ea..0000000000 --- a/backend/.sqlx/query-e58cf2e3deb9aa1e9f37313a33e5d44fcfdb40a4764e1dc34896bd85b3d007f9.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT success FROM completed_job WHERE id = ANY($1)", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "UuidArray" - ] - }, - "nullable": [ - false - ] - }, - "hash": "e58cf2e3deb9aa1e9f37313a33e5d44fcfdb40a4764e1dc34896bd85b3d007f9" -} diff --git a/backend/.sqlx/query-e6f85cdbe681ace495fde31e67339dc58460b6914440473fe94de7a7bc292af4.json b/backend/.sqlx/query-e6f85cdbe681ace495fde31e67339dc58460b6914440473fe94de7a7bc292af4.json deleted file mode 100644 index b35f375b8c..0000000000 --- a/backend/.sqlx/query-e6f85cdbe681ace495fde31e67339dc58460b6914440473fe94de7a7bc292af4.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM completed_job WHERE workspace_id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [] - }, - "hash": "e6f85cdbe681ace495fde31e67339dc58460b6914440473fe94de7a7bc292af4" -} diff --git a/backend/.sqlx/query-e7a1c2b5d79e72f557181782419a9d8d1a502796842f185374d2d0f69043086b.json b/backend/.sqlx/query-e7a1c2b5d79e72f557181782419a9d8d1a502796842f185374d2d0f69043086b.json deleted file mode 100644 index 829d4f6768..0000000000 --- a/backend/.sqlx/query-e7a1c2b5d79e72f557181782419a9d8d1a502796842f185374d2d0f69043086b.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COUNT(id) FROM queue WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "count", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "e7a1c2b5d79e72f557181782419a9d8d1a502796842f185374d2d0f69043086b" -} diff --git a/backend/.sqlx/query-e9d9edc030061c5ccf2fb4294acbbae160e97faede6934d90f4882d806c14813.json b/backend/.sqlx/query-e9d9edc030061c5ccf2fb4294acbbae160e97faede6934d90f4882d806c14813.json deleted file mode 100644 index 8b79600c50..0000000000 --- a/backend/.sqlx/query-e9d9edc030061c5ccf2fb4294acbbae160e97faede6934d90f4882d806c14813.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET canceled_by = $1 WHERE canceled_by = $2 AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "e9d9edc030061c5ccf2fb4294acbbae160e97faede6934d90f4882d806c14813" -} diff --git a/backend/.sqlx/query-ebd25047d14bec8457465ba6ed9b6b15b8f2303157b4c6e80ac9e3d84a57d8b1.json b/backend/.sqlx/query-ebd25047d14bec8457465ba6ed9b6b15b8f2303157b4c6e80ac9e3d84a57d8b1.json new file mode 100644 index 0000000000..6c92e12f6a --- /dev/null +++ b/backend/.sqlx/query-ebd25047d14bec8457465ba6ed9b6b15b8f2303157b4c6e80ac9e3d84a57d8b1.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT worker, array_agg(v2_job_queue.id) as ids FROM v2_job_queue LEFT JOIN v2_job ON v2_job_queue.id = v2_job.id LEFT JOIN v2_job_runtime ON v2_job_queue.id = v2_job_runtime.id WHERE v2_job_queue.created_at < now() - ('60 seconds')::interval \n AND running = true AND ping IS NULL AND same_worker = true AND worker IS NOT NULL GROUP BY worker", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "worker", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "ids", + "type_info": "UuidArray" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + null + ] + }, + "hash": "ebd25047d14bec8457465ba6ed9b6b15b8f2303157b4c6e80ac9e3d84a57d8b1" +} diff --git a/backend/.sqlx/query-ef8868893643a1a71531c1113d5cb38c5c204b3bc34c921b2f653c738af556a9.json b/backend/.sqlx/query-ef8868893643a1a71531c1113d5cb38c5c204b3bc34c921b2f653c738af556a9.json deleted file mode 100644 index 055944bd70..0000000000 --- a/backend/.sqlx/query-ef8868893643a1a71531c1113d5cb38c5c204b3bc34c921b2f653c738af556a9.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\", flow_status AS \"flow_status!: Json\"\n FROM completed_job WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "flow_status!: Json", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true - ] - }, - "hash": "ef8868893643a1a71531c1113d5cb38c5c204b3bc34c921b2f653c738af556a9" -} diff --git a/backend/.sqlx/query-f04fa0262091c5a4abf7dddafeec1b34ed806dda70592b0030067aed46a104d9.json b/backend/.sqlx/query-f04fa0262091c5a4abf7dddafeec1b34ed806dda70592b0030067aed46a104d9.json deleted file mode 100644 index 58fec1a0d0..0000000000 --- a/backend/.sqlx/query-f04fa0262091c5a4abf7dddafeec1b34ed806dda70592b0030067aed46a104d9.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT created_by, CONCAT(coalesce(completed_job.logs, ''), coalesce(job_logs.logs, '')) as logs, job_logs.log_offset, job_logs.log_file_index\n FROM completed_job\n LEFT JOIN job_logs ON job_logs.job_id = completed_job.id\n WHERE completed_job.id = $1 AND completed_job.workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "created_by", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "logs", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "log_offset", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "log_file_index", - "type_info": "TextArray" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - false, - null, - false, - true - ] - }, - "hash": "f04fa0262091c5a4abf7dddafeec1b34ed806dda70592b0030067aed46a104d9" -} diff --git a/backend/.sqlx/query-f33dd637181439ba7fa441dbd7d7430c1ccc0f410c377cde71c70c9211f9c1df.json b/backend/.sqlx/query-f33dd637181439ba7fa441dbd7d7430c1ccc0f410c377cde71c70c9211f9c1df.json deleted file mode 100644 index 536a8116f4..0000000000 --- a/backend/.sqlx/query-f33dd637181439ba7fa441dbd7d7430c1ccc0f410c377cde71c70c9211f9c1df.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT parent_job FROM queue WHERE id = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "parent_job", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "f33dd637181439ba7fa441dbd7d7430c1ccc0f410c377cde71c70c9211f9c1df" -} diff --git a/backend/.sqlx/query-f3d20b0fa17836538ec93b84b08ffc6b555371d6eeeadfc54f5bf0bcbe93d8b4.json b/backend/.sqlx/query-f3d20b0fa17836538ec93b84b08ffc6b555371d6eeeadfc54f5bf0bcbe93d8b4.json deleted file mode 100644 index 2cfac3a744..0000000000 --- a/backend/.sqlx/query-f3d20b0fa17836538ec93b84b08ffc6b555371d6eeeadfc54f5bf0bcbe93d8b4.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT COALESCE((SELECT MIN(started_at) as min_started_at\n FROM queue\n WHERE script_path = $1 AND job_kind != 'dependencies' AND running = true AND workspace_id = $2 AND canceled = false AND concurrent_limit > 0), $3) as min_started_at, now() AS now", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "min_started_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 1, - "name": "now", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Timestamptz" - ] - }, - "nullable": [ - null, - null - ] - }, - "hash": "f3d20b0fa17836538ec93b84b08ffc6b555371d6eeeadfc54f5bf0bcbe93d8b4" -} diff --git a/backend/.sqlx/query-f3f1b312bff773fe04a5dbfc2c03963042fa19d5eb15cfb3e0c291a29482aa5b.json b/backend/.sqlx/query-f3f1b312bff773fe04a5dbfc2c03963042fa19d5eb15cfb3e0c291a29482aa5b.json deleted file mode 100644 index 99d4d7075c..0000000000 --- a/backend/.sqlx/query-f3f1b312bff773fe04a5dbfc2c03963042fa19d5eb15cfb3e0c291a29482aa5b.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE job_logs\n SET logs = '##DELETED##'\n WHERE job_id = $1", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "f3f1b312bff773fe04a5dbfc2c03963042fa19d5eb15cfb3e0c291a29482aa5b" -} diff --git a/backend/.sqlx/query-f4849960aff7387cb6b130d2bc62dbfce45209fbbccf3b4b9b13019e0cd55ddb.json b/backend/.sqlx/query-f4849960aff7387cb6b130d2bc62dbfce45209fbbccf3b4b9b13019e0cd55ddb.json deleted file mode 100644 index f97b5d1da4..0000000000 --- a/backend/.sqlx/query-f4849960aff7387cb6b130d2bc62dbfce45209fbbccf3b4b9b13019e0cd55ddb.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT flow_status->'failure_module'->>'parent_module' FROM queue WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null - ] - }, - "hash": "f4849960aff7387cb6b130d2bc62dbfce45209fbbccf3b4b9b13019e0cd55ddb" -} diff --git a/backend/.sqlx/query-f4a792eca82e9974d13d0731e7862e3c75dbee326e0856944539b2c5574cb6d3.json b/backend/.sqlx/query-f4a792eca82e9974d13d0731e7862e3c75dbee326e0856944539b2c5574cb6d3.json deleted file mode 100644 index a0ec3da44b..0000000000 --- a/backend/.sqlx/query-f4a792eca82e9974d13d0731e7862e3c75dbee326e0856944539b2c5574cb6d3.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET flow_status = jsonb_set(jsonb_set(COALESCE(flow_status, '{}'::jsonb), array[$1], COALESCE(flow_status->$1, '{}'::jsonb)), array[$1, 'duration_ms'], to_jsonb($2::bigint)) WHERE id = $3 AND workspace_id = $4", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Uuid", - "Text" - ] - }, - "nullable": [] - }, - "hash": "f4a792eca82e9974d13d0731e7862e3c75dbee326e0856944539b2c5574cb6d3" -} diff --git a/backend/.sqlx/query-f5c6d52f69b99dab6d7ec3aad2ec090a07fe82a2ccb17a1b3d903de499c2e7c8.json b/backend/.sqlx/query-f5c6d52f69b99dab6d7ec3aad2ec090a07fe82a2ccb17a1b3d903de499c2e7c8.json deleted file mode 100644 index 19b691bbe5..0000000000 --- a/backend/.sqlx/query-f5c6d52f69b99dab6d7ec3aad2ec090a07fe82a2ccb17a1b3d903de499c2e7c8.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job SET\n args = '{\"reason\":\"PREPROCESSOR_ARGS_ARE_DISCARDED\"}'::jsonb\n WHERE id = $1 AND args->'wm_trigger' IS NOT NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "f5c6d52f69b99dab6d7ec3aad2ec090a07fe82a2ccb17a1b3d903de499c2e7c8" -} diff --git a/backend/.sqlx/query-f6a275ad8bc7dfec7f9a6b60c669f6f2ff93ce57b5afadabd618e1fb52951fef.json b/backend/.sqlx/query-f6a275ad8bc7dfec7f9a6b60c669f6f2ff93ce57b5afadabd618e1fb52951fef.json deleted file mode 100644 index fc5dce48f3..0000000000 --- a/backend/.sqlx/query-f6a275ad8bc7dfec7f9a6b60c669f6f2ff93ce57b5afadabd618e1fb52951fef.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT usr.email, usage.executions\n FROM usr\n , LATERAL (\n SELECT COALESCE(SUM(duration_ms + 1000)/1000 , 0)::BIGINT executions\n FROM completed_job\n WHERE workspace_id = $1\n AND job_kind NOT IN ('flow', 'flowpreview', 'flownode')\n AND email = usr.email\n AND now() - '1 week'::interval < created_at \n ) usage\n WHERE workspace_id = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "executions", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - null - ] - }, - "hash": "f6a275ad8bc7dfec7f9a6b60c669f6f2ff93ce57b5afadabd618e1fb52951fef" -} diff --git a/backend/.sqlx/query-f790a016c4a1333e3d4d1ce468a1679ba5e61ea88a5c65be9696312d2f455508.json b/backend/.sqlx/query-f790a016c4a1333e3d4d1ce468a1679ba5e61ea88a5c65be9696312d2f455508.json deleted file mode 100644 index d64348ef46..0000000000 --- a/backend/.sqlx/query-f790a016c4a1333e3d4d1ce468a1679ba5e61ea88a5c65be9696312d2f455508.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE\n FROM parallel_monitor_lock\n WHERE last_ping IS NOT NULL AND last_ping < NOW() - ($1 || ' seconds')::interval \n RETURNING parent_flow_id, job_id, last_ping\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "parent_flow_id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "job_id", - "type_info": "Uuid" - }, - { - "ordinal": 2, - "name": "last_ping", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - true - ] - }, - "hash": "f790a016c4a1333e3d4d1ce468a1679ba5e61ea88a5c65be9696312d2f455508" -} diff --git a/backend/.sqlx/query-f7b1445ec1f0d86efb6f8e0939430e7294bcac06bb7930dcf4d46427571662cb.json b/backend/.sqlx/query-f7b1445ec1f0d86efb6f8e0939430e7294bcac06bb7930dcf4d46427571662cb.json deleted file mode 100644 index 5948eedef5..0000000000 --- a/backend/.sqlx/query-f7b1445ec1f0d86efb6f8e0939430e7294bcac06bb7930dcf4d46427571662cb.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue SET mem_peak = $1, last_ping = now()\n WHERE id = $2\n RETURNING canceled AS \"canceled!\", canceled_by, canceled_reason", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "canceled!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "canceled_by", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "canceled_reason", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int4", - "Uuid" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "f7b1445ec1f0d86efb6f8e0939430e7294bcac06bb7930dcf4d46427571662cb" -} diff --git a/backend/.sqlx/query-f8f25948ae14fcb71c666cdc5e51d888e1f22fb2300a78bbeafebf64e82658db.json b/backend/.sqlx/query-f8f25948ae14fcb71c666cdc5e51d888e1f22fb2300a78bbeafebf64e82658db.json deleted file mode 100644 index 5167523212..0000000000 --- a/backend/.sqlx/query-f8f25948ae14fcb71c666cdc5e51d888e1f22fb2300a78bbeafebf64e82658db.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\" FROM queue WHERE parent_job = $1 AND workspace_id = $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true - ] - }, - "hash": "f8f25948ae14fcb71c666cdc5e51d888e1f22fb2300a78bbeafebf64e82658db" -} diff --git a/backend/.sqlx/query-f916ec232837ece9323675e5f5142e7285f4266a1471e5ffdefadf421a67e44b.json b/backend/.sqlx/query-f916ec232837ece9323675e5f5142e7285f4266a1471e5ffdefadf421a67e44b.json deleted file mode 100644 index 2cf1fb31e9..0000000000 --- a/backend/.sqlx/query-f916ec232837ece9323675e5f5142e7285f4266a1471e5ffdefadf421a67e44b.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE queue\n SET flow_status = JSONB_SET(\n JSONB_SET(flow_status, ARRAY['modules', $1::TEXT, 'flow_jobs_success', $3::TEXT], $4),\n ARRAY['modules', $1::TEXT, 'iterator', 'index'],\n ((flow_status->'modules'->$1::int->'iterator'->>'index')::int + 1)::text::jsonb\n ),\n last_ping = NULL\n WHERE id = $2\n RETURNING (flow_status->'modules'->$1::int->'iterator'->>'index')::int", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "int4", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Uuid", - "Text", - "Jsonb" - ] - }, - "nullable": [ - null - ] - }, - "hash": "f916ec232837ece9323675e5f5142e7285f4266a1471e5ffdefadf421a67e44b" -} diff --git a/backend/.sqlx/query-f9e0e35b4789a4da89f7bb21fa6b250fd64ee0e0b299471979db5ff8ee906929.json b/backend/.sqlx/query-f9e0e35b4789a4da89f7bb21fa6b250fd64ee0e0b299471979db5ff8ee906929.json deleted file mode 100644 index 39c96b8989..0000000000 --- a/backend/.sqlx/query-f9e0e35b4789a4da89f7bb21fa6b250fd64ee0e0b299471979db5ff8ee906929.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT (flow_status->'step')::integer as step, jsonb_array_length(flow_status->'modules') as len FROM queue WHERE id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "step", - "type_info": "Int4" - }, - { - "ordinal": 1, - "name": "len", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Uuid" - ] - }, - "nullable": [ - null, - null - ] - }, - "hash": "f9e0e35b4789a4da89f7bb21fa6b250fd64ee0e0b299471979db5ff8ee906929" -} diff --git a/backend/.sqlx/query-f9fc0084fe086ef80005bb64a8bb6b493e53583017c18e2ab44f44125c52d548.json b/backend/.sqlx/query-f9fc0084fe086ef80005bb64a8bb6b493e53583017c18e2ab44f44125c52d548.json deleted file mode 100644 index bad609fb21..0000000000 --- a/backend/.sqlx/query-f9fc0084fe086ef80005bb64a8bb6b493e53583017c18e2ab44f44125c52d548.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO completed_job AS cj\n ( workspace_id\n , id\n , parent_job\n , created_by\n , created_at\n , started_at\n , duration_ms\n , success\n , script_hash\n , script_path\n , args\n , result\n , raw_code\n , raw_lock\n , canceled\n , canceled_by\n , canceled_reason\n , job_kind\n , schedule_path\n , permissioned_as\n , flow_status\n , raw_flow\n , is_flow_step\n , is_skipped\n , language\n , email\n , visible_to_owner\n , mem_peak\n , tag\n , priority\n )\n VALUES ($1, $2, $3, $4, $5, COALESCE($6, now()), COALESCE($30::bigint, (EXTRACT('epoch' FROM (now())) - EXTRACT('epoch' FROM (COALESCE($6, now()))))*1000), $7, $8, $9,$10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29)\n ON CONFLICT (id) DO UPDATE SET success = $7, result = $11 RETURNING duration_ms", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "duration_ms", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Uuid", - "Uuid", - "Varchar", - "Timestamptz", - "Timestamptz", - "Bool", - "Int8", - "Varchar", - "Jsonb", - "Jsonb", - "Text", - "Text", - "Bool", - "Varchar", - "Text", - { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - }, - "Varchar", - "Varchar", - "Jsonb", - "Jsonb", - "Bool", - "Bool", - { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - }, - "Varchar", - "Bool", - "Int4", - "Varchar", - "Int2", - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "f9fc0084fe086ef80005bb64a8bb6b493e53583017c18e2ab44f44125c52d548" -} diff --git a/backend/.sqlx/query-fb1a32318b35ec5c8129eb3660b79eb5e6d1e01fcf01cc05d3c7ddf47295c2f5.json b/backend/.sqlx/query-fb1a32318b35ec5c8129eb3660b79eb5e6d1e01fcf01cc05d3c7ddf47295c2f5.json deleted file mode 100644 index 6997a5e2f4..0000000000 --- a/backend/.sqlx/query-fb1a32318b35ec5c8129eb3660b79eb5e6d1e01fcf01cc05d3c7ddf47295c2f5.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT raw_code, raw_lock, raw_flow AS \"raw_flow: Json>\"\n FROM job WHERE id = $1 AND workspace_id = $2 LIMIT 1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "raw_code", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "raw_lock", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "raw_flow: Json>", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "fb1a32318b35ec5c8129eb3660b79eb5e6d1e01fcf01cc05d3c7ddf47295c2f5" -} diff --git a/backend/.sqlx/query-fce269376a0f08cb39359a3cb86be6b9823af022195b80db8ccbc3737576462c.json b/backend/.sqlx/query-fce269376a0f08cb39359a3cb86be6b9823af022195b80db8ccbc3737576462c.json deleted file mode 100644 index 367f01ba75..0000000000 --- a/backend/.sqlx/query-fce269376a0f08cb39359a3cb86be6b9823af022195b80db8ccbc3737576462c.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO v2_job_completed AS cj\n ( workspace_id\n , id\n , started_at\n , duration_ms\n , result\n , result_columns\n , canceled_by\n , canceled_reason\n , flow_status\n , memory_peak\n , status\n )\n VALUES ($1, $2, $3, COALESCE($12::bigint, (EXTRACT('epoch' FROM (now())) - EXTRACT('epoch' FROM (COALESCE($3, now()))))*1000), $5, $13, $7, $8, $9,$11, CASE WHEN $6::BOOL THEN 'canceled'::job_status\n WHEN $10::BOOL THEN 'skipped'::job_status\n WHEN $4::BOOL THEN 'success'::job_status\n ELSE 'failure'::job_status END)\n ON CONFLICT (id) DO UPDATE SET status = EXCLUDED.status, result = $5 RETURNING duration_ms AS \"duration_ms!\"", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "duration_ms!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Uuid", - "Timestamptz", - "Bool", - "Jsonb", - "Bool", - "Varchar", - "Text", - "Jsonb", - "Bool", - "Int4", - "Int8", - "TextArray" - ] - }, - "nullable": [ - false - ] - }, - "hash": "fce269376a0f08cb39359a3cb86be6b9823af022195b80db8ccbc3737576462c" -} diff --git a/backend/.sqlx/query-fe5e941310ffdbbe7cc5f3e2beb213999ff64bbe4f8e2532a7aa48184cb008e7.json b/backend/.sqlx/query-fe5e941310ffdbbe7cc5f3e2beb213999ff64bbe4f8e2532a7aa48184cb008e7.json deleted file mode 100644 index ca0ef918e9..0000000000 --- a/backend/.sqlx/query-fe5e941310ffdbbe7cc5f3e2beb213999ff64bbe4f8e2532a7aa48184cb008e7.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE completed_job SET schedule_path = REGEXP_REPLACE(schedule_path,'u/' || $2 || '/(.*)','u/' || $1 || '/\\1') WHERE schedule_path LIKE ('u/' || $2 || '/%') AND workspace_id = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "fe5e941310ffdbbe7cc5f3e2beb213999ff64bbe4f8e2532a7aa48184cb008e7" -} diff --git a/backend/.sqlx/query-ff14230469026418966ec79b77f549b2fb27c90556484f3914666d5ad7f8f107.json b/backend/.sqlx/query-ff14230469026418966ec79b77f549b2fb27c90556484f3914666d5ad7f8f107.json deleted file mode 100644 index 1744aa7167..0000000000 --- a/backend/.sqlx/query-ff14230469026418966ec79b77f549b2fb27c90556484f3914666d5ad7f8f107.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n result #> $3 AS \"result: sqlx::types::Json>\",\n flow_status AS \"flow_status: sqlx::types::Json>\",\n language AS \"language: ScriptLang\",\n created_by AS \"created_by!\"\n FROM completed_job\n WHERE id = $1 AND workspace_id = $2 AND ($4::text[] IS NULL OR tag = ANY($4))", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "result: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 1, - "name": "flow_status: sqlx::types::Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "language: ScriptLang", - "type_info": { - "Custom": { - "name": "script_lang", - "kind": { - "Enum": [ - "python3", - "deno", - "go", - "bash", - "postgresql", - "nativets", - "bun", - "mysql", - "bigquery", - "snowflake", - "graphql", - "powershell", - "mssql", - "php", - "bunnative", - "rust", - "ansible", - "csharp", - "oracledb" - ] - } - } - } - }, - { - "ordinal": 3, - "name": "created_by!", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Uuid", - "Text", - "TextArray", - "TextArray" - ] - }, - "nullable": [ - null, - true, - true, - true - ] - }, - "hash": "ff14230469026418966ec79b77f549b2fb27c90556484f3914666d5ad7f8f107" -} diff --git a/backend/src/monitor.rs b/backend/src/monitor.rs index cb57d94622..aecefbff9f 100644 --- a/backend/src/monitor.rs +++ b/backend/src/monitor.rs @@ -1577,28 +1577,88 @@ async fn handle_zombie_jobs(db: &Pool, base_internal_url: &str, worker } } - let mut timeout_query = - "SELECT * FROM v2_as_queue WHERE last_ping < now() - ($1 || ' seconds')::interval - AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow')" - .to_string(); - if *RESTART_ZOMBIE_JOBS { - timeout_query.push_str(" AND same_worker = true"); - }; - let timeouts = sqlx::query_as::<_, QueuedJob>(&timeout_query) - .bind(ZOMBIE_JOB_TIMEOUT.as_str()) + let same_worker_timeout_jobs = { + let long_same_worker_jobs = sqlx::query!( + "SELECT worker, array_agg(v2_job_queue.id) as ids FROM v2_job_queue LEFT JOIN v2_job ON v2_job_queue.id = v2_job.id LEFT JOIN v2_job_runtime ON v2_job_queue.id = v2_job_runtime.id WHERE v2_job_queue.created_at < now() - ('60 seconds')::interval + AND running = true AND ping IS NULL AND same_worker = true AND worker IS NOT NULL GROUP BY worker", + ) .fetch_all(db) .await .ok() .unwrap_or_else(|| vec![]); + let worker_ids = long_same_worker_jobs + .iter() + .map(|x| x.worker.clone().unwrap_or_default()) + .collect::>(); + + let long_dead_workers: std::collections::HashSet = sqlx::query_scalar!( + "WITH worker_ids AS (SELECT unnest($1::text[]) as worker) + SELECT worker_ids.worker FROM worker_ids + LEFT JOIN worker_ping ON worker_ids.worker = worker_ping.worker + WHERE worker_ping.worker IS NULL OR worker_ping.ping_at < now() - ('60 seconds')::interval", + &worker_ids[..] + ) + .fetch_all(db) + .await + .ok() + .unwrap_or_else(|| vec![]) + .into_iter() + .filter_map(|x| x) + .collect(); + + let mut timeouts: Vec = vec![]; + for worker in long_same_worker_jobs { + if worker.worker.is_some() && long_dead_workers.contains(&worker.worker.unwrap()) { + if let Some(ids) = worker.ids { + timeouts.extend(ids); + } + } + } + if !timeouts.is_empty() { + tracing::error!( + "Failing same worker zombie jobs: {:?}", + timeouts + .iter() + .map(|x| x.hyphenated().to_string()) + .collect::>() + .join(",") + ); + } + + let jobs = sqlx::query_as::<_, QueuedJob>("SELECT * FROM v2_as_queue WHERE id = ANY($1)") + .bind(&timeouts[..]) + .fetch_all(db) + .await + .map_err(|e| tracing::error!("Error fetching same worker jobs: {:?}", e)) + .unwrap_or_default(); + + jobs + }; + + let non_restartable_jobs = if *RESTART_ZOMBIE_JOBS { + vec![] + } else { + sqlx::query_as::<_, QueuedJob>("SELECT * FROM v2_as_queue WHERE last_ping < now() - ($1 || ' seconds')::interval + AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow') AND same_worker = false") + .bind(ZOMBIE_JOB_TIMEOUT.as_str()) + .fetch_all(db) + .await + .ok() + .unwrap_or_else(|| vec![]) + }; + + let timeouts = non_restartable_jobs + .into_iter() + .chain(same_worker_timeout_jobs) + .collect::>(); + #[cfg(feature = "prometheus")] if METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed) { QUEUE_ZOMBIE_DELETE_COUNT.inc_by(timeouts.len() as _); } for job in timeouts { - tracing::info!("timedout zombie job {} {}", job.id, job.workspace_id,); - // since the job is unrecoverable, the same worker queue should never be sent anything let (same_worker_tx_never_used, _same_worker_rx_never_used) = mpsc::channel::(1); @@ -1640,11 +1700,12 @@ async fn handle_zombie_jobs(db: &Pool, base_internal_url: &str, worker 0, None, error::Error::ExecutionErr(format!( - "Job timed out after no ping from job since {} (ZOMBIE_JOB_TIMEOUT: {})", + "Job timed out after no ping from job since {} (ZOMBIE_JOB_TIMEOUT: {}, same_worker: {})", last_ping .map(|x| x.to_string()) .unwrap_or_else(|| "no ping".to_string()), - *ZOMBIE_JOB_TIMEOUT + *ZOMBIE_JOB_TIMEOUT, + job.same_worker )), true, same_worker_tx_never_used, diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 65d071518d..90caf92518 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -4898,7 +4898,7 @@ async fn add_batch_jobs( .await?; sqlx::query!( - "INSERT INTO v2_job_runtime (id) SELECT unnest($1::uuid[])", + "INSERT INTO v2_job_runtime (id, ping) SELECT unnest($1::uuid[]), null", &uuids, ) .execute(&mut *tx) diff --git a/backend/windmill-common/src/worker.rs b/backend/windmill-common/src/worker.rs index 65c77a5ee7..4478601e7e 100644 --- a/backend/windmill-common/src/worker.rs +++ b/backend/windmill-common/src/worker.rs @@ -107,22 +107,22 @@ fn format_pull_query(peek: String) -> String { format!( "WITH peek AS ( {} - ), q AS ( + ), q AS NOT MATERIALIZED ( UPDATE v2_job_queue SET running = true, started_at = coalesce(started_at, now()), - suspend_until = null + suspend_until = null, + worker = $1 WHERE id = (SELECT id FROM peek) RETURNING started_at, scheduled_for, running, canceled_by, canceled_reason, canceled_by IS NOT NULL AS canceled, suspend, suspend_until - ), r AS ( + ), r AS NOT MATERIALIZED ( UPDATE v2_job_runtime SET ping = now() WHERE id = (SELECT id FROM peek) - RETURNING ping AS last_ping, memory_peak AS mem_peak - ), j AS ( + ), j AS NOT MATERIALIZED ( SELECT id, workspace_id, parent_job, created_by, created_at, runnable_id AS script_hash, runnable_path AS script_path, args, kind AS job_kind, @@ -136,13 +136,13 @@ fn format_pull_query(peek: String) -> String { WHERE id = (SELECT id FROM peek) ) SELECT id, workspace_id, parent_job, created_by, created_at, started_at, scheduled_for, running, script_hash, script_path, args, null as logs, canceled, canceled_by, - canceled_reason, last_ping, job_kind, schedule_path, permissioned_as, + canceled_reason, null as last_ping, job_kind, schedule_path, permissioned_as, flow_status, is_flow_step, language, suspend, suspend_until, - same_worker, pre_run_error, email, visible_to_owner, mem_peak, + same_worker, pre_run_error, email, visible_to_owner, null as mem_peak, root_job, flow_leaf_jobs as leaf_jobs, tag, concurrent_limit, concurrency_time_window_s, timeout, flow_step_id, cache_ttl, priority, raw_code, raw_lock, raw_flow, script_entrypoint_override, preprocessed - FROM q, r, j + FROM q, j LEFT JOIN v2_job_status f USING (id)", peek ) diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index c76747af5a..1b9df8a673 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -594,13 +594,15 @@ pub async fn add_completed_job( , workflow_as_code_status , memory_peak , status + , worker ) SELECT q.workspace_id, q.id, started_at, COALESCE($9::bigint, (EXTRACT('epoch' FROM (now())) - EXTRACT('epoch' FROM (COALESCE(started_at, now()))))*1000), $3, $10, $5, $6, flow_status, workflow_as_code_status, $8, CASE WHEN $4::BOOL THEN 'canceled'::job_status WHEN $7::BOOL THEN 'skipped'::job_status WHEN $2::BOOL THEN 'success'::job_status - ELSE 'failure'::job_status END AS status + ELSE 'failure'::job_status END AS status, + q.worker FROM v2_job_queue q LEFT JOIN v2_job_status USING (id) WHERE q.id = $1 ON CONFLICT (id) DO UPDATE SET status = EXCLUDED.status, result = $3 RETURNING duration_ms AS \"duration_ms!\"", /* $1 */ queued_job.id, @@ -1826,10 +1828,15 @@ impl std::ops::Deref for PulledJob { pub async fn pull( db: &Pool, suspend_first: bool, + worker_name: &str, ) -> windmill_common::error::Result<(Option, bool)> { loop { - let (job, suspended) = - pull_single_job_and_mark_as_running_no_concurrency_limit(db, suspend_first).await?; + let (job, suspended) = pull_single_job_and_mark_as_running_no_concurrency_limit( + db, + suspend_first, + worker_name, + ) + .await?; let Some(job) = job else { return Ok((None, suspended)); @@ -2047,6 +2054,7 @@ pub async fn pull( async fn pull_single_job_and_mark_as_running_no_concurrency_limit<'c>( db: &Pool, suspend_first: bool, + worker_name: &str, ) -> windmill_common::error::Result<(Option, bool)> { let job_and_suspended: (Option, bool) = { /* Jobs can be started if they: @@ -2066,6 +2074,7 @@ async fn pull_single_job_and_mark_as_running_no_concurrency_limit<'c>( let r = if suspend_first { // tracing::info!("Pulling job with query: {}", query); sqlx::query_as::<_, PulledJob>(&query) + .bind(worker_name) .fetch_optional(db) .await? } else { @@ -2086,6 +2095,7 @@ 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 r = sqlx::query_as::<_, PulledJob>(query) + .bind(worker_name) .fetch_optional(db) .await?; @@ -3779,9 +3789,12 @@ pub async fn push<'c, 'd>( .await .map_err(|e| Error::internal_err(format!("Could not insert into queue {job_id} with tag {tag}, schedule_path {schedule_path:?}, script_path: {script_path:?}, email {email}, workspace_id {workspace_id}: {e:#}")))?; - sqlx::query!("INSERT INTO v2_job_runtime (id) VALUES ($1)", job_id) - .execute(&mut *tx) - .await?; + sqlx::query!( + "INSERT INTO v2_job_runtime (id, ping) VALUES ($1, null)", + job_id + ) + .execute(&mut *tx) + .await?; if let Some(flow_status) = flow_status { sqlx::query!( "INSERT INTO v2_job_status (id, flow_status) VALUES ($1, $2)", diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 31c076de9d..0f57dc2f10 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -1325,16 +1325,28 @@ pub async fn run_worker( same_worker_job.job_id ); let r = sqlx::query_as::<_, PulledJob>( - "WITH ping AS ( + " + WITH ping AS ( UPDATE v2_job_runtime SET ping = NOW() WHERE id = $1 RETURNING id - ) SELECT * FROM v2_as_queue WHERE id = (SELECT id FROM ping)", + ) + SELECT * FROM v2_as_queue WHERE id = (SELECT id FROM ping) + ", ) .bind(same_worker_job.job_id) .fetch_optional(db) .await - .map_err(|_| { - Error::internal_err("Impossible to fetch same_worker job".to_string()) + .map_err(|e| { + Error::internal_err(format!( + "Impossible to fetch same_worker job {}: {}", + same_worker_job.job_id, e + )) }); + let _ = sqlx::query!( + "UPDATE v2_job_queue SET started_at = NOW() WHERE id = $1", + same_worker_job.job_id + ) + .execute(db) + .await; if r.is_err() && !same_worker_job.recoverable { tracing::error!( worker = %worker_name, hostname = %hostname, @@ -1381,7 +1393,7 @@ pub async fn run_worker( last_suspend_first = Instant::now(); } - let job = pull(&db, suspend_first).await; + let job = pull(&db, suspend_first, &worker_name).await; add_time!(bench, "job pulled from DB"); let duration_pull_s = pull_time.elapsed().as_secs_f64(); @@ -2104,6 +2116,7 @@ async fn handle_queued_job( same_worker_tx, worker_dir, job_completed_tx.0.clone(), + worker_name, ) .warn_after_seconds(10) .await?; diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 97ffc30719..0de59963db 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -1137,6 +1137,7 @@ pub async fn update_flow_status_after_job_completion_internal( same_worker_tx.clone(), worker_dir, job_completed_tx, + worker_name, ) .warn_after_seconds(10) .await @@ -1528,6 +1529,7 @@ pub async fn handle_flow( same_worker_tx: SameWorkerSender, worker_dir: &str, job_completed_tx: Sender, + worker_name: &str, ) -> anyhow::Result<()> { let flow = flow_data.value(); let status = flow_job @@ -1581,6 +1583,7 @@ pub async fn handle_flow( same_worker_tx, worker_dir, job_completed_tx, + worker_name, ) .warn_after_seconds(10) .await?; @@ -1638,6 +1641,7 @@ async fn push_next_flow_job( same_worker_tx: SameWorkerSender, worker_dir: &str, job_completed_tx: Sender, + worker_name: &str, ) -> error::Result<()> { let job_root = flow_job .root_job @@ -2646,6 +2650,16 @@ async fn push_next_flow_job( .warn_after_seconds(2) .await?; + if continue_on_same_worker { + let _ = sqlx::query!( + "UPDATE v2_job_queue SET worker = $2 WHERE id = $1", + uuid, + worker_name + ) + .execute(&mut *inner_tx) + .await; + } + tracing::debug!(id = %flow_job.id, root_id = %job_root, "pushed next flow job: {uuid}"); if value_with_parallel.type_ == "forloopflow" { diff --git a/frontend/src/lib/components/HistoricInputs.svelte b/frontend/src/lib/components/HistoricInputs.svelte index d03ea8a8fe..e2d633ba7c 100644 --- a/frontend/src/lib/components/HistoricInputs.svelte +++ b/frontend/src/lib/components/HistoricInputs.svelte @@ -121,9 +121,9 @@ /> {/each} {#if jobs?.length == 5} -
... there may be more runs not displayed here as the limit is 5
+ + limited to 5 runs + {/if} {:else} From 61fad02dd10da7df6f413c28cf98e6c4935a87c1 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 11:56:35 +0100 Subject: [PATCH 004/667] increase number of cached statements --- backend/windmill-common/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 4bb224e21b..d642b29961 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -8,6 +8,7 @@ use std::{ net::SocketAddr, + str::FromStr, sync::{atomic::AtomicBool, Arc}, }; @@ -272,10 +273,12 @@ pub async fn connect( use std::time::Duration; sqlx::postgres::PgPoolOptions::new() - .min_connections(3) + .min_connections(max_connections) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins - .connect(database_url) + .connect_with( + sqlx::postgres::PgConnectOptions::from_str(database_url)?.statement_cache_capacity(400), + ) .await .map_err(|err| Error::ConnectingToDatabase(err.to_string())) } From 3a68892a2b53cc1b27972bfcde25f3d355c5741c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 12:02:25 +0100 Subject: [PATCH 005/667] nits clamp min connections --- backend/windmill-common/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index d642b29961..550745d31a 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -273,7 +273,7 @@ pub async fn connect( use std::time::Duration; sqlx::postgres::PgPoolOptions::new() - .min_connections(max_connections) + .min_connections((max_connections / 5).clamp(3, max_connections)) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins .connect_with( From 920002a9babf884222930da239ae8769fd5f01aa Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 18:13:59 +0100 Subject: [PATCH 006/667] disable seqscan for workers --- backend/src/main.rs | 32 +++++++++-------- backend/windmill-common/src/lib.rs | 49 +++++++++++++++++++++------ backend/windmill-common/src/worker.rs | 6 ++-- 3 files changed, 59 insertions(+), 28 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 3a1899c23b..d9ae5c6e58 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -320,7 +320,7 @@ async fn windmill_main() -> anyhow::Result<()> { .unwrap_or(DEFAULT_NUM_WORKERS as i32) }; - if num_workers > 1 { + if num_workers > 1 && !std::env::var("WORKER_GROUP").is_ok_and(|x| x == "native") { println!( "We STRONGLY recommend using at most 1 worker per container, use at your own risks" ); @@ -344,8 +344,17 @@ async fn windmill_main() -> anyhow::Result<()> { }; println!("Connecting to database..."); - let db = windmill_common::connect_db(server_mode, indexer_mode).await?; + let db = windmill_common::initial_connection().await?; + let num_version = sqlx::query_scalar!("SELECT version()").fetch_one(&db).await; + + tracing::info!( + "PostgreSQL version: {} (windmill require PG >= 14)", + num_version + .ok() + .flatten() + .unwrap_or_else(|| "UNKNOWN".to_string()) + ); load_otel(&db).await; tracing::info!("Database connected"); @@ -362,16 +371,6 @@ async fn windmill_main() -> anyhow::Result<()> { let _guard = windmill_common::tracing_init::initialize_tracing(&hostname, &mode, &environment); - let num_version = sqlx::query_scalar!("SELECT version()").fetch_one(&db).await; - - tracing::info!( - "PostgreSQL version: {} (windmill require PG >= 14)", - num_version - .ok() - .flatten() - .unwrap_or_else(|| "UNKNOWN".to_string()) - ); - let is_agent = mode == Mode::Agent; #[cfg(feature = "parquet")] @@ -379,7 +378,7 @@ async fn windmill_main() -> anyhow::Result<()> { .ok() .is_some_and(|x| x == "1" || x == "true"); - if !is_agent { + if !is_agent && !indexer_mode { let skip_migration = std::env::var("SKIP_MIGRATION") .map(|val| val == "true") .unwrap_or(false); @@ -392,6 +391,11 @@ async fn windmill_main() -> anyhow::Result<()> { } } + drop(db); + let worker_mode = num_workers > 0; + + let db = windmill_common::connect_db(server_mode, indexer_mode, worker_mode).await?; + let (killpill_tx, mut killpill_rx) = tokio::sync::broadcast::channel::<()>(2); let mut monitor_killpill_rx = killpill_tx.subscribe(); let (killpill_phase2_tx, _killpill_phase2_rx) = tokio::sync::broadcast::channel::<()>(2); @@ -455,8 +459,6 @@ Windmill Community Edition {GIT_VERSION} } } - let worker_mode = num_workers > 0; - if server_mode || worker_mode || indexer_mode { let port_var = std::env::var("PORT").ok().and_then(|x| x.parse().ok()); diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 550745d31a..4bf68f59f9 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -221,28 +221,42 @@ async fn reset() -> () { todo!() } -pub async fn connect_db( - server_mode: bool, - indexer_mode: bool, -) -> anyhow::Result> { - use anyhow::Context; +pub async fn get_database_url() -> Result { use std::env::var; use tokio::fs::File; use tokio::io::AsyncReadExt; - - let database_url = match var("DATABASE_URL_FILE") { + match var("DATABASE_URL_FILE") { Ok(file_path) => { let mut file = File::open(file_path).await?; let mut contents = String::new(); file.read_to_string(&mut contents).await?; - contents.trim().to_string() + Ok(contents.trim().to_string()) } Err(_) => var("DATABASE_URL").map_err(|_| { Error::BadConfig( "Either DATABASE_URL_FILE or DATABASE_URL env var is missing".to_string(), ) - })?, - }; + }), + } +} + +pub async fn initial_connection() -> Result, error::Error> { + let database_url = get_database_url().await?; + sqlx::postgres::PgPoolOptions::new() + .max_connections(2) + .connect_with(sqlx::postgres::PgConnectOptions::from_str(&database_url)?) + .await + .map_err(|err| Error::ConnectingToDatabase(err.to_string())) +} + +pub async fn connect_db( + server_mode: bool, + indexer_mode: bool, + worker_mode: bool, +) -> anyhow::Result> { + use anyhow::Context; + + let database_url = get_database_url().await?; let max_connections = match std::env::var("DATABASE_CONNECTIONS") { Ok(n) => n.parse::().context("invalid DATABASE_CONNECTIONS")?, @@ -263,12 +277,13 @@ pub async fn connect_db( } }; - Ok(connect(&database_url, max_connections).await?) + Ok(connect(&database_url, max_connections, worker_mode).await?) } pub async fn connect( database_url: &str, max_connections: u32, + worker_mode: bool, ) -> Result, error::Error> { use std::time::Duration; @@ -276,6 +291,18 @@ pub async fn connect( .min_connections((max_connections / 5).clamp(3, max_connections)) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins + .after_connect(move |conn, _| { + if worker_mode { + Box::pin(async move { + sqlx::query("SET enable_seqscan = OFF;") + .execute(conn) + .await?; + Ok(()) + }) + } else { + Box::pin(async move { Ok(()) }) + } + }) .connect_with( sqlx::postgres::PgConnectOptions::from_str(database_url)?.statement_cache_capacity(400), ) diff --git a/backend/windmill-common/src/worker.rs b/backend/windmill-common/src/worker.rs index 4478601e7e..23b5ed8f3e 100644 --- a/backend/windmill-common/src/worker.rs +++ b/backend/windmill-common/src/worker.rs @@ -104,7 +104,7 @@ lazy_static::lazy_static! { } fn format_pull_query(peek: String) -> String { - format!( + let r = format!( "WITH peek AS ( {} ), q AS NOT MATERIALIZED ( @@ -145,7 +145,9 @@ fn format_pull_query(peek: String) -> String { FROM q, j LEFT JOIN v2_job_status f USING (id)", peek - ) + ); + tracing::debug!("pull query: {}", r); + r } pub async fn make_suspended_pull_query(wc: &WorkerConfig) { From f4eeddf857f53aba4dc80dec2a135c0e5236800b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 18:37:56 +0100 Subject: [PATCH 007/667] chore(main): release 1.458.2 (#5247) * chore(main): release 1.458.2 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 9 +++ backend/Cargo.lock | 79 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 65 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58de9ee921..9f08bcc0bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.458.2](https://github.com/windmill-labs/windmill/compare/v1.458.1...v1.458.2) (2025-02-09) + + +### Bug Fixes + +* **frontend:** accordion list header on eval / background function ([#5244](https://github.com/windmill-labs/windmill/issues/5244)) ([32298e5](https://github.com/windmill-labs/windmill/commit/32298e5bfcd9ad1ca2954642d789e0f5d03b1680)) +* worker name in job + better timeout handling for same_worker jobs ([#5248](https://github.com/windmill-labs/windmill/issues/5248)) ([403826f](https://github.com/windmill-labs/windmill/commit/403826fca994535e59cc3c042f41bb47448dd951)) +* workflow as code status ([#5246](https://github.com/windmill-labs/windmill/issues/5246)) ([61ac7e9](https://github.com/windmill-labs/windmill/commit/61ac7e91de7da54bd405d721fe6e47ed8e5a5e9e)) + ## [1.458.1](https://github.com/windmill-labs/windmill/compare/v1.458.0...v1.458.1) (2025-02-07) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 13c8c06a15..2dc26263e6 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1552,9 +1552,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.12" +version = "1.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755717a7de9ec452bf7f3f1a3099085deabd7f2962b861dae91ecd7a365903d2" +checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda" dependencies = [ "jobserver", "libc", @@ -1723,12 +1723,11 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "comfy-table" -version = "7.1.3" +version = "7.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9" +checksum = "4a65ebfec4fb190b6f90e944a817d60499ee0744e582530e2c9900a22e591d9a" dependencies = [ - "strum 0.26.3", - "strum_macros 0.26.4", + "unicode-segmentation", "unicode-width 0.2.0", ] @@ -2205,9 +2204,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" [[package]] name = "data-url" @@ -4019,9 +4018,9 @@ dependencies = [ [[package]] name = "hickory-proto" -version = "0.24.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447afdcdb8afb9d0a852af6dc65d9b285ce720ed7a59e42a8bf2e931c67bc1b5" +checksum = "2ad3d6d98c648ed628df039541a5577bee1a7c83e9e16fe3dbedeea4cdfeb971" dependencies = [ "async-trait", "cfg-if", @@ -4044,9 +4043,9 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.24.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2e2aba9c389ce5267d31cf1e4dace82390ae276b0b364ea55630b1fa1b44b4" +checksum = "dcf287bde7b776e85d7188e6e5db7cf410a2f9531fe82817eb87feed034c8d14" dependencies = [ "cfg-if", "futures-util", @@ -10246,11 +10245,11 @@ dependencies = [ [[package]] name = "ulid" -version = "1.1.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f294bff79170ed1c5633812aff1e565c35d993a36e757f9bc0accf5eec4e6045" +checksum = "ab82fc73182c29b02e2926a6df32f2241dbadb5cfc111fd595515b3598f46bb3" dependencies = [ - "rand 0.8.5", + "rand 0.9.0", "uuid 1.13.1", "web-time", ] @@ -10859,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "axum", @@ -10902,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10994,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.458.1" +version = "1.458.2" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11012,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.458.1" +version = "1.458.2" dependencies = [ "chrono", "serde", @@ -11026,7 +11025,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "serde", @@ -11040,7 +11039,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11098,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.458.1" +version = "1.458.2" dependencies = [ "regex", "serde", @@ -11113,7 +11112,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11135,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.458.1" +version = "1.458.2" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11147,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.458.1" +version = "1.458.2" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11156,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11168,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11180,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11192,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11204,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11215,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11226,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11246,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11263,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11275,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11293,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11315,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11325,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11358,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.458.1" +version = "1.458.2" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11368,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.458.1" +version = "1.458.2" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 45f45b1caf..fdaa0f65ec 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.458.1" +version = "1.458.2" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.458.1" +version = "1.458.2" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 0736e7b6ac..da96c451cd 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.458.1 + version: 1.458.2 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 880999a48a..8c14ff1f62 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.458.1"; +export const VERSION = "v1.458.2"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 947088dae3..33afd3cdc2 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -60,7 +60,7 @@ export { // } // }); -export const VERSION = "1.458.1"; +export const VERSION = "1.458.2"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ec2c715166..555357291e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.458.1", + "version": "1.458.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.458.1", + "version": "1.458.2", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 4e68746b2c..8ae56b9cba 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.458.1", + "version": "1.458.2", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index badef83a27..34fd850c47 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.458.1" -wmill_pg = ">=1.458.1" +wmill = ">=1.458.2" +wmill_pg = ">=1.458.2" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 1dc9fabc98..d6e0d7c206 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.458.1 + version: 1.458.2 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 5a941bedd3..dcbac6fdaa 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.458.1' + ModuleVersion = '1.458.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 54f3c0cdba..07ed1cdb43 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.458.1" +version = "1.458.2" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index c5c0534dc6..0f57ea0293 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.458.1" +version = "1.458.2" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index b9b1834133..2ad7758166 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.458.1", + "version": "1.458.2", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 264a8960b1..f45c913a2a 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.458.1", + "version": "1.458.2", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 423a5aa919..94d6638f38 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.458.1 +1.458.2 From a0c6555ab51906287b464480c219d944482307d8 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 23:05:14 +0100 Subject: [PATCH 008/667] update benchs --- .github/workflows/benchmark.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 14735dc246..abb4dccb9a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -17,6 +17,10 @@ jobs: options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + --shm-size=2g + -c shared_buffers=2GB + -c work_mem=32MB + -c effective_cache_size=4GB windmill: image: ghcr.io/windmill-labs/windmill-ee:main env: From 82cb4a626eddbdc903bf244b5d9721aa3cc450d4 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 23:12:15 +0100 Subject: [PATCH 009/667] update benchs --- .github/workflows/benchmark.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index abb4dccb9a..77e9286307 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -14,13 +14,13 @@ jobs: env: POSTGRES_DB: windmill POSTGRES_PASSWORD: changeme + POSTGRES_INITDB_ARGS: "-c shared_buffers=2GB -c work_mem=32MB -c effective_cache_size=4GB" options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 --shm-size=2g - -c shared_buffers=2GB - -c work_mem=32MB - -c effective_cache_size=4GB + + windmill: image: ghcr.io/windmill-labs/windmill-ee:main env: From 3f2007d0fa7ce4fada5b3c18c47a062183931762 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 9 Feb 2025 23:12:59 +0100 Subject: [PATCH 010/667] update benchs --- .github/workflows/benchmark.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 77e9286307..f95dee00da 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -59,6 +59,7 @@ jobs: env: POSTGRES_DB: windmill POSTGRES_PASSWORD: changeme + POSTGRES_INITDB_ARGS: "-c shared_buffers=2GB -c work_mem=32MB -c effective_cache_size=4GB" options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -100,6 +101,7 @@ jobs: env: POSTGRES_DB: windmill POSTGRES_PASSWORD: changeme + POSTGRES_INITDB_ARGS: "-c shared_buffers=2GB -c work_mem=32MB -c effective_cache_size=4GB" options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -175,6 +177,7 @@ jobs: env: POSTGRES_DB: windmill POSTGRES_PASSWORD: changeme + POSTGRES_INITDB_ARGS: "-c shared_buffers=2GB -c work_mem=32MB -c effective_cache_size=4GB" options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From bf7f67e42faa5b3e4448291ecaf920475296c59c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 10 Feb 2025 04:38:29 +0100 Subject: [PATCH 011/667] load previous flow steps even for just test this steps --- backend/windmill-worker/src/worker_flow.rs | 2 +- .../components/FlowHistoryJobPicker.svelte | 2 ++ .../lib/components/FlowPreviewContent.svelte | 36 ++++++++++++++++++- .../propertyPicker/ObjectViewer.svelte | 4 +-- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 0de59963db..e25aa6b8ab 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -3077,7 +3077,7 @@ fn get_path(flow_job: &QueuedJob, status: &FlowStatus, module: &FlowModule) -> S { format!("{}/preprocessor", flow_job.script_path()) } else { - format!("{}/step-{}", flow_job.script_path(), status.step) + format!("{}/{}", flow_job.script_path(), module.id) } } diff --git a/frontend/src/lib/components/FlowHistoryJobPicker.svelte b/frontend/src/lib/components/FlowHistoryJobPicker.svelte index a631a2a595..5a9a661a74 100644 --- a/frontend/src/lib/components/FlowHistoryJobPicker.svelte +++ b/frontend/src/lib/components/FlowHistoryJobPicker.svelte @@ -20,6 +20,8 @@ }) if (jobs.length > 0) { dispatch('select', { jobId: jobs[0].id, initial: true }) + } else { + dispatch('nohistory') } } diff --git a/frontend/src/lib/components/FlowPreviewContent.svelte b/frontend/src/lib/components/FlowPreviewContent.svelte index 2863a246ed..93dbb0f6a6 100644 --- a/frontend/src/lib/components/FlowPreviewContent.svelte +++ b/frontend/src/lib/components/FlowPreviewContent.svelte @@ -169,6 +169,34 @@ } $: selectedJobStep !== undefined && onSelectedJobStepChange() + + async function loadIndividualStepsStates() { + dfs($flowStore.value.modules, async (module) => { + if ($flowStateStore[module.id]?.previewResult) { + return + } + const previousJobId = await JobService.listJobs({ + workspace: $workspaceStore!, + scriptPathExact: (initialPath == '' ? $pathStore : initialPath) + '/' + module.id, + jobKinds: ['preview', 'script', 'flowpreview', 'flow'].join(','), + page: 1, + perPage: 1 + }) + + if (previousJobId.length > 0) { + const getJobResult = await JobService.getCompletedJobResultMaybe({ + workspace: $workspaceStore!, + id: previousJobId[0].id + }) + if (getJobResult.result) { + $flowStateStore[module.id] = { + ...($flowStateStore[module.id] ?? {}), + previewResult: getJobResult.result + } + } + } + }) + } @@ -401,6 +429,9 @@ class="absolute top-[22px] right-2 border p-1.5 hover:bg-surface-hover rounded-md center-center" > { + loadIndividualStepsStates() + }} on:select={(e) => { if (!currentJobId) { currentJobId = jobId @@ -439,11 +470,14 @@ {flowStateStore} {jobId} on:done={() => { - console.log('done') $executionCount = $executionCount + 1 }} on:jobsLoaded={({ detail }) => { job = detail + if (initial) { + console.log('loading initial steps after initial job loaded') + loadIndividualStepsStates() + } }} bind:selectedJobStep /> diff --git a/frontend/src/lib/components/propertyPicker/ObjectViewer.svelte b/frontend/src/lib/components/propertyPicker/ObjectViewer.svelte index 87ab307034..31cb5d554a 100644 --- a/frontend/src/lib/components/propertyPicker/ObjectViewer.svelte +++ b/frontend/src/lib/components/propertyPicker/ObjectViewer.svelte @@ -93,7 +93,7 @@ size="xs2" variant="border" on:click={collapse} - wrapperClasses="inline-flex w-fit" + wrapperClasses="!inline-flex w-fit" btnClasses="font-mono h-4 text-2xs px-1 font-thin text-primary rounded-[0.275rem]" >- @@ -218,7 +218,7 @@ size="xs2" variant="border" on:click={collapse} - wrapperClasses="inline-flex w-fit" + wrapperClasses="!inline-flex w-fit" btnClasses="h-4 text-[9px] px-1 text-primary rounded-[0.275rem]" > {openBracket}{collapsedSymbol}{closeBracket} From 3d8dee9e6ac10a59caf8e1ef9eff077fd78d2e20 Mon Sep 17 00:00:00 2001 From: Rudo Kemper <31662219+rudokemper@users.noreply.github.com> Date: Sun, 9 Feb 2025 22:54:55 -0500 Subject: [PATCH 012/667] fix: Support authentication with auth0 (#5249) --- .../src/lib/components/Auth0Setting.svelte | 102 ++++++++++++++++++ .../src/lib/components/AuthSettings.svelte | 4 +- frontend/src/lib/components/Login.svelte | 6 ++ .../src/lib/components/icons/Auth0Icon.svelte | 18 ++++ .../lib/components/icons/brands/Auth0.svelte | 26 +++++ frontend/src/lib/components/icons/index.ts | 3 + 6 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/Auth0Setting.svelte create mode 100644 frontend/src/lib/components/icons/Auth0Icon.svelte create mode 100644 frontend/src/lib/components/icons/brands/Auth0.svelte diff --git a/frontend/src/lib/components/Auth0Setting.svelte b/frontend/src/lib/components/Auth0Setting.svelte new file mode 100644 index 0000000000..5ff0781c72 --- /dev/null +++ b/frontend/src/lib/components/Auth0Setting.svelte @@ -0,0 +1,102 @@ + + +
+ + + {#if enabled} +
+ + + + + +
+ From your Admin page, setup a Windmill application
+ Create a new application
+ For "application type" select "Regular Web Application"
+ Copy down the "Client ID" and "Client Secret" and paste them into the fields above
+ Under "Application URIs", set the following:
+ a. Application Login URI: `BASE_URL/user/login`
+ b. Allowed Callback URLs: `BASE_URL/user/login_callback/auth0`
+ c. Allowed Logout URLs: `BASE_URL/auth/logout`
+ d. Allowed Web Origins: `BASE_URL`
+ e. Allowed Origins (CORS): `BASE_URL`
+
+
+
+ {/if} +
diff --git a/frontend/src/lib/components/AuthSettings.svelte b/frontend/src/lib/components/AuthSettings.svelte index 195e760114..f6db65526a 100644 --- a/frontend/src/lib/components/AuthSettings.svelte +++ b/frontend/src/lib/components/AuthSettings.svelte @@ -4,6 +4,7 @@ import OAuthSetting from '$lib/components/OAuthSetting.svelte' import OktaSetting from './OktaSetting.svelte' + import Auth0Setting from './Auth0Setting.svelte' import CloseButton from './common/CloseButton.svelte' import KeycloakSetting from './KeycloakSetting.svelte' import CustomSso from './CustomSso.svelte' @@ -81,6 +82,7 @@ + @@ -90,7 +92,7 @@ {#each Object.keys(oauths) as k} - {#if !['authelia', 'authentik', 'google', 'microsoft', 'github', 'gitlab', 'jumpcloud', 'okta', 'keycloak', 'slack', 'kanidm', 'zitadel'].includes(k) && 'login_config' in oauths[k]} + {#if !['authelia', 'authentik', 'google', 'microsoft', 'github', 'gitlab', 'jumpcloud', 'okta', 'auth0', 'keycloak', 'slack', 'kanidm', 'zitadel'].includes(k) && 'login_config' in oauths[k]} {#if oauths[k]}
diff --git a/frontend/src/lib/components/Login.svelte b/frontend/src/lib/components/Login.svelte index 8b073e4d8a..3046afd53c 100644 --- a/frontend/src/lib/components/Login.svelte +++ b/frontend/src/lib/components/Login.svelte @@ -5,6 +5,7 @@ import Google from '$lib/components/icons/brands/Google.svelte' import Microsoft from '$lib/components/icons/brands/Microsoft.svelte' import Okta from '$lib/components/icons/brands/Okta.svelte' + import Auth0 from '$lib/components/icons/brands/Auth0.svelte' import { OauthService, UserService, WorkspaceService } from '$lib/gen' import { usersWorkspaceStore, workspaceStore, userStore } from '$lib/stores' @@ -49,6 +50,11 @@ type: 'okta', name: 'Okta', icon: Okta + }, + { + type: 'auth0', + name: 'Auth0', + icon: Auth0 } ] as const diff --git a/frontend/src/lib/components/icons/Auth0Icon.svelte b/frontend/src/lib/components/icons/Auth0Icon.svelte new file mode 100644 index 0000000000..bf6ae23b48 --- /dev/null +++ b/frontend/src/lib/components/icons/Auth0Icon.svelte @@ -0,0 +1,18 @@ + + auth0ddd-svg + + + diff --git a/frontend/src/lib/components/icons/brands/Auth0.svelte b/frontend/src/lib/components/icons/brands/Auth0.svelte new file mode 100644 index 0000000000..43e0a89880 --- /dev/null +++ b/frontend/src/lib/components/icons/brands/Auth0.svelte @@ -0,0 +1,26 @@ + + + + auth0ddd-svg + + + diff --git a/frontend/src/lib/components/icons/index.ts b/frontend/src/lib/components/icons/index.ts index adc460624b..20c541a14c 100644 --- a/frontend/src/lib/components/icons/index.ts +++ b/frontend/src/lib/components/icons/index.ts @@ -68,6 +68,7 @@ import GraphqlIcon from './GraphqlIcon.svelte' import NocoDbIcon from './NocoDbIcon.svelte' import AzureIcon from './AzureIcon.svelte' import OktaIcon from './OktaIcon.svelte' +import Auth0Icon from './Auth0Icon.svelte' import MsSqlServerIcon from './MSSqlServerIcon.svelte' import AuthentikIcon from './AuthentikIcon.svelte' import AutheliaIcon from './AutheliaIcon.svelte' @@ -170,6 +171,7 @@ export const APP_TO_ICON_COMPONENT = { nocodb: NocoDbIcon, azure: AzureIcon, okta: OktaIcon, + auth0: Auth0Icon, authentik: AuthentikIcon, authelia: AutheliaIcon, kanidm: KanidmIcon, @@ -268,6 +270,7 @@ export { AzureIcon, MicrosoftIcon, OktaIcon, + Auth0Icon, AuthentikIcon, AutheliaIcon, KanidmIcon, From d2fe25d1ceb55338f839aaeefb31aa7fa22fbc20 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 10 Feb 2025 05:40:08 +0100 Subject: [PATCH 013/667] fix flow input failing on schema change --- frontend/src/lib/components/ArgInput.svelte | 6 +++++- frontend/src/lib/components/SchemaForm.svelte | 5 ++++- frontend/src/lib/components/flows/content/FlowInput.svelte | 2 +- .../src/lib/components/schema/FlowPropertyEditor.svelte | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index f5b6eeda27..f2d652286e 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -230,7 +230,11 @@ let oldDefaultValue = structuredClone(defaultValue) function handleDefaultValueChange() { - if (deepEqual(value, oldDefaultValue)) { + if ( + deepEqual(value, oldDefaultValue) && + !deepEqual(value, defaultValue) && + !deepEqual(defaultValue, oldDefaultValue) + ) { value = defaultValue } oldDefaultValue = structuredClone(defaultValue) diff --git a/frontend/src/lib/components/SchemaForm.svelte b/frontend/src/lib/components/SchemaForm.svelte index 3720bc585b..3991f1c3e5 100644 --- a/frontend/src/lib/components/SchemaForm.svelte +++ b/frontend/src/lib/components/SchemaForm.svelte @@ -265,7 +265,10 @@ dispatch('click', argName) }} > - {#if typeof args == 'object' && schema?.properties[argName]} + {#if args && typeof args == 'object' && schema?.properties[argName]} + {#if !hidden[argName]} { diff --git a/frontend/src/lib/components/flows/content/FlowInput.svelte b/frontend/src/lib/components/flows/content/FlowInput.svelte index 00f4083f12..5ae31191b1 100644 --- a/frontend/src/lib/components/flows/content/FlowInput.svelte +++ b/frontend/src/lib/components/flows/content/FlowInput.svelte @@ -304,7 +304,7 @@ function resetArgs() { if (!previewSchema) { - previewArguments = undefined + // previewArguments = undefined savedPreviewArgs = undefined } } diff --git a/frontend/src/lib/components/schema/FlowPropertyEditor.svelte b/frontend/src/lib/components/schema/FlowPropertyEditor.svelte index e8bc5d6fb5..921f912366 100644 --- a/frontend/src/lib/components/schema/FlowPropertyEditor.svelte +++ b/frontend/src/lib/components/schema/FlowPropertyEditor.svelte @@ -304,7 +304,7 @@ {/if} {:else if type === 'object' && format !== 'resource-s3_object'} { if (e.detail === 'custom-object') { format = '' @@ -327,7 +327,7 @@ {/if} - {#if !(type === 'object' && oneOf && oneOf.length >= 2)} + {#if !(type === 'object' && oneOf && oneOf.length >= 2) && !(type == 'object' && initialObjectSelected == 'custom-object')}
{:else if suspendTabSelected === 'permissions'}
From 41e542900ffeb7cb3fb6ebddfeac4d61933d812f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 10 Feb 2025 20:57:07 +0100 Subject: [PATCH 024/667] whileloop flow inputs show correct flow_input --- frontend/src/lib/components/flows/previousResults.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/flows/previousResults.ts b/frontend/src/lib/components/flows/previousResults.ts index d383b30a04..9f74b62de3 100644 --- a/frontend/src/lib/components/flows/previousResults.ts +++ b/frontend/src/lib/components/flows/previousResults.ts @@ -88,7 +88,7 @@ function getFlowInput( } } else { let parentFlowInput = getFlowInput(parentModules, flowState, args, schema) - if (parentModule.value.type === 'forloopflow') { + if (parentModule.value.type === 'forloopflow' || parentModule.value.type === 'whileloopflow') { let parentFlowInputIter = { ...parentFlowInput } if (parentFlowInputIter.hasOwnProperty('iter')) { parentFlowInputIter['iter_parent'] = parentFlowInputIter['iter'] @@ -263,9 +263,8 @@ declare const results = ${JSON.stringify(results)}; */ declare const previous_result: ${previousId ? JSON.stringify(results[previousId]) : 'any'}; -${ - resume - ? ` +${resume + ? ` /** * resume payload */ @@ -276,8 +275,8 @@ declare const resume: any */ declare const approvers: string ` - : '' -} + : '' + } ` } From deb18615c20c4650e1bf765350f7abf4d2320a0a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 10 Feb 2025 21:50:59 +0100 Subject: [PATCH 025/667] fix: if user is authed, no need to use anonymous path for display result in apps --- frontend/src/lib/components/DisplayResult.svelte | 14 ++++++++++---- .../components/display/AppDisplayComponent.svelte | 3 ++- .../display/AppDisplayComponentByJobId.svelte | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index b5088c0a5f..80f7ce999f 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -677,16 +677,22 @@ preview rendered
{:else if result?.s3?.endsWith('.pdf')}
{/if} diff --git a/frontend/src/lib/components/apps/components/display/AppDisplayComponent.svelte b/frontend/src/lib/components/apps/components/display/AppDisplayComponent.svelte index 4b09156da2..c15855f873 100644 --- a/frontend/src/lib/components/apps/components/display/AppDisplayComponent.svelte +++ b/frontend/src/lib/components/apps/components/display/AppDisplayComponent.svelte @@ -15,6 +15,7 @@ import ResolveStyle from '../helpers/ResolveStyle.svelte' import { components } from '../../editor/component' import ResolveConfig from '../helpers/ResolveConfig.svelte' + import { userStore } from '$lib/stores' export let id: string export let componentInput: AppInput | undefined @@ -96,7 +97,7 @@ {result} {requireHtmlApproval} disableExpand={resolvedConfig?.hideDetails} - appPath={$appPath} + appPath={$userStore ? undefined : $appPath} />
diff --git a/frontend/src/lib/components/apps/components/display/AppDisplayComponentByJobId.svelte b/frontend/src/lib/components/apps/components/display/AppDisplayComponentByJobId.svelte index bb5aa888d6..f61db83517 100644 --- a/frontend/src/lib/components/apps/components/display/AppDisplayComponentByJobId.svelte +++ b/frontend/src/lib/components/apps/components/display/AppDisplayComponentByJobId.svelte @@ -16,6 +16,7 @@ import ResolveStyle from '../helpers/ResolveStyle.svelte' import InitializeComponent from '../helpers/InitializeComponent.svelte' import DisplayResult from '$lib/components/DisplayResult.svelte' + import { userStore } from '$lib/stores' export let id: string export let initializing: boolean | undefined = false @@ -23,7 +24,7 @@ export let configuration: RichConfigurations export let render: boolean - const { app, worldStore, workspace } = getContext('AppViewerContext') + const { app, worldStore, workspace, appPath } = getContext('AppViewerContext') const requireHtmlApproval = getContext(IS_APP_PUBLIC_CONTEXT_KEY) let resolvedConfig = initConfig( @@ -115,6 +116,7 @@ {result} {requireHtmlApproval} disableExpand={resolvedConfig?.hideDetails} + appPath={$userStore ? undefined : $appPath} /> From 5c7930a4afe5166967c5e57ce8d02f8980a00f71 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Mon, 10 Feb 2025 15:57:32 -0500 Subject: [PATCH 026/667] fix typo in open drawer helper doc (#5258) --- frontend/src/lib/components/apps/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/utils.ts b/frontend/src/lib/components/apps/utils.ts index cb30aac94f..5e41d4ccfa 100644 --- a/frontend/src/lib/components/apps/utils.ts +++ b/frontend/src/lib/components/apps/utils.ts @@ -248,7 +248,7 @@ declare function setValue(id: string, value: any): void; */ declare function setSelectedIndex(id: string, index: number): void; -/** close a drawer or modal +/** open a drawer or modal * @param id component's id */ declare function open(id: string): void; From d0c0eca732bc675fa2edf71ac30c982913134b5e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 10 Feb 2025 21:59:07 +0100 Subject: [PATCH 027/667] chore(main): release 1.459.0 (#5256) --- CHANGELOG.md | 12 ++++++++++++ version.txt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d2b05e2f2..8dec2071f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.459.0](https://github.com/windmill-labs/windmill/compare/v1.458.4...v1.459.0) (2025-02-10) + + +### Features + +* triggers cli sync ([#5243](https://github.com/windmill-labs/windmill/issues/5243)) ([df62925](https://github.com/windmill-labs/windmill/commit/df6292589479766acfe642d757f3736dfc369e33)) + + +### Bug Fixes + +* if user is authed, no need to use anonymous path for display result in apps ([deb1861](https://github.com/windmill-labs/windmill/commit/deb18615c20c4650e1bf765350f7abf4d2320a0a)) + ## [1.458.4](https://github.com/windmill-labs/windmill/compare/v1.458.3...v1.458.4) (2025-02-10) diff --git a/version.txt b/version.txt index dcd4fcaeb2..d22eaab6f1 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.458.4 +1.459.0 From 69c316576c785037c37b949dcbc709fca01d7d01 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 15:57:36 +0100 Subject: [PATCH 028/667] add grants to v2 tables --- backend/migrations/20250205131516_v2_grant.down.sql | 1 + backend/migrations/20250205131516_v2_grant.up.sql | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 backend/migrations/20250205131516_v2_grant.down.sql create mode 100644 backend/migrations/20250205131516_v2_grant.up.sql diff --git a/backend/migrations/20250205131516_v2_grant.down.sql b/backend/migrations/20250205131516_v2_grant.down.sql new file mode 100644 index 0000000000..d2f607c5b8 --- /dev/null +++ b/backend/migrations/20250205131516_v2_grant.down.sql @@ -0,0 +1 @@ +-- Add down migration script here diff --git a/backend/migrations/20250205131516_v2_grant.up.sql b/backend/migrations/20250205131516_v2_grant.up.sql new file mode 100644 index 0000000000..3d58575b41 --- /dev/null +++ b/backend/migrations/20250205131516_v2_grant.up.sql @@ -0,0 +1,6 @@ +-- Add up migration script here +GRANT ALL ON v2_as_queue TO windmill_admin; +GRANT ALL ON v2_as_queue TO windmill_user; + +GRANT ALL ON v2_as_completed_job TO windmill_admin; +GRANT ALL ON v2_as_completed_job TO windmill_user; From 6357ed3d5e1188bb92ccaf4710e526ab2ec7e874 Mon Sep 17 00:00:00 2001 From: wendrul <53628737+wendrul@users.noreply.github.com> Date: Tue, 11 Feb 2025 16:08:19 +0100 Subject: [PATCH 029/667] fix: Remove cache dir mount and mount only the cache executable (Rust, C#) (#5270) --- backend/windmill-worker/nsjail/run.csharp.config.proto | 5 ++--- backend/windmill-worker/nsjail/run.rust.config.proto | 5 ++--- backend/windmill-worker/src/csharp_executor.rs | 1 + backend/windmill-worker/src/rust_executor.rs | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/windmill-worker/nsjail/run.csharp.config.proto b/backend/windmill-worker/nsjail/run.csharp.config.proto index 4a6de952a7..389448eff0 100644 --- a/backend/windmill-worker/nsjail/run.csharp.config.proto +++ b/backend/windmill-worker/nsjail/run.csharp.config.proto @@ -104,10 +104,9 @@ mount { iface_no_lo: true mount { - src: "{CACHE_DIR}" - dst: "/tmp/.cache/csharp" + src: "{CACHE_DIR}/{CACHE_HASH}" + dst: "/tmp/.cache/csharp/{CACHE_HASH}" is_bind: true - rw: true mandatory: false } diff --git a/backend/windmill-worker/nsjail/run.rust.config.proto b/backend/windmill-worker/nsjail/run.rust.config.proto index 502011049c..3357cd88a9 100644 --- a/backend/windmill-worker/nsjail/run.rust.config.proto +++ b/backend/windmill-worker/nsjail/run.rust.config.proto @@ -97,10 +97,9 @@ mount { iface_no_lo: true mount { - src: "{CACHE_DIR}" - dst: "/tmp/.cache/rust" + src: "{CACHE_DIR}/{CACHE_HASH}" + dst: "/tmp/.cache/rust/{CACHE_HASH}" is_bind: true - rw: true mandatory: false } diff --git a/backend/windmill-worker/src/csharp_executor.rs b/backend/windmill-worker/src/csharp_executor.rs index 61f53ab65a..5694920e88 100644 --- a/backend/windmill-worker/src/csharp_executor.rs +++ b/backend/windmill-worker/src/csharp_executor.rs @@ -543,6 +543,7 @@ pub async fn handle_csharp_job( &NSJAIL_CONFIG_RUN_CSHARP_CONTENT .replace("{JOB_DIR}", job_dir) .replace("{CACHE_DIR}", CSHARP_CACHE_DIR) + .replace("{CACHE_HASH}", &hash) .replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string()) .replace("{SHARED_MOUNT}", shared_mount), )?; diff --git a/backend/windmill-worker/src/rust_executor.rs b/backend/windmill-worker/src/rust_executor.rs index 639adc709a..95fd822100 100644 --- a/backend/windmill-worker/src/rust_executor.rs +++ b/backend/windmill-worker/src/rust_executor.rs @@ -353,6 +353,7 @@ pub async fn handle_rust_job( &NSJAIL_CONFIG_RUN_RUST_CONTENT .replace("{JOB_DIR}", job_dir) .replace("{CACHE_DIR}", RUST_CACHE_DIR) + .replace("{CACHE_HASH}", &hash) .replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string()) .replace("{SHARED_MOUNT}", shared_mount), )?; From aae3683fe90adc0eea055238f7776b96140706bd Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 18:05:24 +0100 Subject: [PATCH 030/667] feat: improve large apps performances (#5265) --- .../components/buttons/AppFormButton.svelte | 144 +-- .../display/AppAccordionList.svelte | 85 +- .../components/display/AppCarouselList.svelte | 223 ++-- .../display/AppCustomComponent.svelte | 2 + .../apps/components/display/AppHtml.svelte | 46 +- .../components/display/AppMarkdown.svelte | 60 +- .../apps/components/display/AppText.svelte | 6 +- .../apps/components/display/PlotlyHtml.svelte | 28 +- .../components/display/PlotlyHtmlV2.svelte | 28 +- .../components/display/VegaLiteHtml.svelte | 14 +- .../display/dbtable/AppDbExplorer.svelte | 1 + .../helpers/NonRunnableComponent.svelte | 2 - .../layout/AppConditionalWrapper.svelte | 49 +- .../components/layout/AppContainer.svelte | 49 +- .../components/layout/AppDecisionTree.svelte | 109 +- .../apps/components/layout/AppDrawer.svelte | 188 ++-- .../apps/components/layout/AppList.svelte | 261 ++--- .../apps/components/layout/AppModal.svelte | 165 +-- .../components/layout/AppSplitpanes.svelte | 96 +- .../apps/components/layout/AppStepper.svelte | 191 ++-- .../apps/components/layout/AppTabs.svelte | 222 ++-- .../components/apps/editor/AppPreview.svelte | 4 - .../components/apps/editor/GridEditor.svelte | 5 +- .../components/apps/editor/GridViewer.svelte | 36 +- .../apps/editor/SubGridEditor.svelte | 296 +++--- .../apps/editor/component/Component.svelte | 976 +----------------- .../editor/component/ComponentInner.svelte | 778 ++++++++++++++ .../editor/component/ComponentRendered.svelte | 219 ++++ .../components/apps/svelte-grid/Grid.svelte | 232 +++-- .../apps/svelte-grid/MoveResize.svelte | 3 +- 30 files changed, 2374 insertions(+), 2144 deletions(-) create mode 100644 frontend/src/lib/components/apps/editor/component/ComponentInner.svelte create mode 100644 frontend/src/lib/components/apps/editor/component/ComponentRendered.svelte diff --git a/frontend/src/lib/components/apps/components/buttons/AppFormButton.svelte b/frontend/src/lib/components/apps/components/buttons/AppFormButton.svelte index 68b52e515c..453d964d45 100644 --- a/frontend/src/lib/components/apps/components/buttons/AppFormButton.svelte +++ b/frontend/src/lib/components/apps/components/buttons/AppFormButton.svelte @@ -89,75 +89,79 @@ configuration={configuration[key]} /> {/each} - -
- - {#if noInputs} -
- Run forms are associated with a runnable that has user inputs. -
- Once a script or flow is chosen, set some Runnable Inputs to - - User Input - - +{#if render} + +
+ + {#if noInputs} +
+ Run forms are associated with a runnable that has user inputs. +
+ Once a script or flow is chosen, set some Runnable Inputs to + + User Input + + +
+ {/if} +
+
- {/if} -
- -
-
-
-
+ +
+ - - {#if errorsMessage} -
{errorsMessage}
- {/if} - -
+ + {#if errorsMessage} +
{errorsMessage}
+ {/if} + +
+{:else} + +{/if} diff --git a/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte b/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte index 2966cf418d..e322e9e783 100644 --- a/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte +++ b/frontend/src/lib/components/apps/components/display/AppAccordionList.svelte @@ -18,17 +18,21 @@ export let initializing: boolean | undefined export let componentContainerHeight: number - type AccordionListValue = { header: string; [key: string]: any }; + type AccordionListValue = { header: string; [key: string]: any } type InternalAccordionListInput = AppInput & { - value: AccordionListValue[]; - }; + value: AccordionListValue[] + } - $: accordionInput = componentInput as InternalAccordionListInput; + $: accordionInput = componentInput as InternalAccordionListInput const { app, focusedGrid, selectedComponent, worldStore, connectingInput } = getContext('AppViewerContext') + let everRender = render + + $: render && !everRender && (everRender = true) + let activeIndex: number = 0 const outputs = initOutput($worldStore, id, { @@ -61,7 +65,6 @@ activeIndex = activeIndex === index ? -1 : index outputs.activeIndex.set(activeIndex) } - {#each Object.keys(css ?? {}) as key (key)} @@ -85,27 +88,27 @@ bind:initializing bind:result > -
- {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result) && result.length > 0} - {#each result ?? [] as value, index} -
- - {#if activeIndex === index} -
+ {#if everRender} +
+ {#if $app.subgrids?.[`${id}-0`]} + {#if Array.isArray(result) && result.length > 0} + {#each result ?? [] as value, index} +
+ +
{ if (!inputs[id]) { @@ -133,8 +136,8 @@ >
- {/if} -
- {/each} - {:else} - - - - {#if !Array.isArray(result)} -
Input data is not an array
+
+ {/each} + {:else} + + + + {#if !Array.isArray(result)} +
Input data is not an array
+ {/if} {/if} {/if} - {/if} -
+
+ {:else if $app.subgrids} + + + + {/if} diff --git a/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte b/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte index 8ce89208dd..a8a2dce0e9 100644 --- a/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte +++ b/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte @@ -27,6 +27,9 @@ const { app, focusedGrid, selectedComponent, worldStore, connectingInput } = getContext('AppViewerContext') + let everRender = render + $: render && !everRender && (everRender = true) + const outputs = initOutput($worldStore, id, { result: undefined, loading: false, @@ -90,117 +93,123 @@ bind:initializing bind:result > -
- {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result) && result.length > 0} - {#key result} - { - currentPageIndex = event.detail - $focusedGrid = { - parentComponentId: id, - subGridIndex: event.detail - } - }} - > -
-
- -
-
-
-
- -
-
- {#each result ?? [] as value, index} -
- { - if (!inputs[id]) { - inputs[id] = { [index]: value } - } else { - inputs[id] = { ...inputs[id], [index]: value } - } - outputs?.inputs.set(inputs, true) - }} - onRemove={(id) => { - if (inputs?.[id] == undefined) { - return - } - if (index == 0) { - delete inputs[id] - inputs = { ...inputs } - } else { - delete inputs[id][index] - inputs[id] = { ...inputs[id] } - } - outputs?.inputs.set(inputs, true) - }} - {value} - {index} - > - { - if (!$connectingInput.opened) { - $selectedComponent = [id] + if (currentPageIndex > 0) { + carousel.goTo(currentPageIndex - 1) + } else { + carousel.goTo(pagesCount - 1) } - onFocus() }} - /> - + > + + +
- {/each} - - {/key} - {:else} - - - - {#if !Array.isArray(result)} -
Input data is not an array
+
+
+ +
+
+ {#each result ?? [] as value, index} +
+ { + if (!inputs[id]) { + inputs[id] = { [index]: value } + } else { + inputs[id] = { ...inputs[id], [index]: value } + } + outputs?.inputs.set(inputs, true) + }} + onRemove={(id) => { + if (inputs?.[id] == undefined) { + return + } + if (index == 0) { + delete inputs[id] + inputs = { ...inputs } + } else { + delete inputs[id][index] + inputs[id] = { ...inputs[id] } + } + outputs?.inputs.set(inputs, true) + }} + {value} + {index} + > + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + } + onFocus() + }} + /> + +
+ {/each} + + {/key} + {:else} + + + + {#if !Array.isArray(result)} +
Input data is not an array
+ {/if} {/if} {/if} - {/if} -
+
+ {:else if $app.subgrids} + + + + {/if} diff --git a/frontend/src/lib/components/apps/components/display/AppCustomComponent.svelte b/frontend/src/lib/components/apps/components/display/AppCustomComponent.svelte index d481de1a1b..192cf569ef 100644 --- a/frontend/src/lib/components/apps/components/display/AppCustomComponent.svelte +++ b/frontend/src/lib/components/apps/components/display/AppCustomComponent.svelte @@ -119,4 +119,6 @@
+{:else} + {/if} diff --git a/frontend/src/lib/components/apps/components/display/AppHtml.svelte b/frontend/src/lib/components/apps/components/display/AppHtml.svelte index 7d0b4e873c..7a79efc6f2 100644 --- a/frontend/src/lib/components/apps/components/display/AppHtml.svelte +++ b/frontend/src/lib/components/apps/components/display/AppHtml.svelte @@ -35,25 +35,29 @@ /> {/each} -
{ - e?.preventDefault() - }} - class="h-full w-full" -> - { + e?.preventDefault() + }} + class="h-full w-full" > -
- {#key result} - {@html result} - {/key} -
-
-
+ +
+ {#key result} + {@html result} + {/key} +
+
+ +{:else} + +{/if} diff --git a/frontend/src/lib/components/apps/components/display/AppMarkdown.svelte b/frontend/src/lib/components/apps/components/display/AppMarkdown.svelte index 8ff485a4ae..bdd6fc1658 100644 --- a/frontend/src/lib/components/apps/components/display/AppMarkdown.svelte +++ b/frontend/src/lib/components/apps/components/display/AppMarkdown.svelte @@ -62,32 +62,36 @@ /> {/each} -
{ - e?.preventDefault() - }} - class={classNames( - 'h-full w-full overflow-y-auto prose max-w-full', - resolvedConfig?.size ? proseMapping[resolvedConfig.size] : '', - css?.container?.class, - ' dark:prose-invert', - 'wm-markdown' - )} - style={css?.container?.style} -> - { + e?.preventDefault() + }} + class={classNames( + 'h-full w-full overflow-y-auto prose max-w-full', + resolvedConfig?.size ? proseMapping[resolvedConfig.size] : '', + css?.container?.class, + ' dark:prose-invert', + 'wm-markdown' + )} + style={css?.container?.style} > - {#if result} - {#key result} - - {/key} - {/if} - -
+ + {#if result} + {#key result} + + {/key} + {/if} + + +{:else} + +{/if} diff --git a/frontend/src/lib/components/apps/components/display/AppText.svelte b/frontend/src/lib/components/apps/components/display/AppText.svelte index 78e10402b6..f83b5ab6a8 100644 --- a/frontend/src/lib/components/apps/components/display/AppText.svelte +++ b/frontend/src/lib/components/apps/components/display/AppText.svelte @@ -217,7 +217,7 @@ {:else}
{#if resolvedConfig.copyButton && result} -
+
+ {/if} + +
{/if} - {#if getFirstNode(nodes)?.id !== currentNodeId} - - {/if} - -
+{:else if $app.subgrids} + {#each Object.values(nodes) ?? [] as _node, i} + + {/each} +{/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppDrawer.svelte b/frontend/src/lib/components/apps/components/layout/AppDrawer.svelte index e5e73536d0..9504399bc7 100644 --- a/frontend/src/lib/components/apps/components/layout/AppDrawer.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppDrawer.svelte @@ -24,6 +24,9 @@ export let onOpenRecomputeIds: string[] | undefined = undefined export let onCloseRecomputeIds: string[] | undefined = undefined + let everRender = render + $: render && !everRender && (everRender = true) + const { app, focusedGrid, @@ -77,98 +80,103 @@ {/each} - -
- - - -
- - - { - outputs?.open.set(true) - onOpenRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) - }} - on:close={() => { - outputs?.open.set(false) - onCloseRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) - }} - > - { - appDrawer?.toggleDrawer() - $focusedGrid = undefined - }} - fullScreen={$mode !== 'dnd'} - > -
+ +
-
-
-
+ + +
+{/if} + +{#if everRender} + + { + outputs?.open.set(true) + onOpenRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) + }} + on:close={() => { + outputs?.open.set(false) + onCloseRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) + }} + > + { + appDrawer?.toggleDrawer() + $focusedGrid = undefined + }} + fullScreen={$mode !== 'dnd'} + > +
{ + e?.stopPropagation() + if (!$connectingInput.opened) { + $selectedComponent = [id] + $focusedGrid = { + parentComponentId: id, + subGridIndex: 0 + } + } + }} + > + {#if $app.subgrids?.[`${id}-0`]} + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + $focusedGrid = { + parentComponentId: id, + subGridIndex: 0 + } + } + }} + /> + {/if} +
+
+
+
+{:else if $app.subgrids?.[`${id}-0`]} + +{/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppList.svelte b/frontend/src/lib/components/apps/components/layout/AppList.svelte index a0e708670c..44e0a56509 100644 --- a/frontend/src/lib/components/apps/components/layout/AppList.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppList.svelte @@ -26,6 +26,9 @@ getContext('AppViewerContext') let page = 0 + let everRender = render + $: render && !everRender && (everRender = true) + const outputs = initOutput($worldStore, id, { result: undefined, loading: false, @@ -72,8 +75,8 @@ const l = initialData ? initialData.length : 0 if (mode === 'auto') { const pageSize: number = configuration.auto.pageSize ?? 0 - const shouldDisplayPagination = pageSize < l ?? false - const total = Math.ceil(l / pageSize ?? 0) + const shouldDisplayPagination = (pageSize ?? 0) < l + const total = Math.ceil(l / (pageSize ?? 0)) return { shouldDisplayPagination, @@ -136,136 +139,144 @@ bind:result bind:loading > -
+ {#if everRender}
- {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result) && result.length > 0} - {#each result ?? [] as value, index (index)} - {@const inRange = index <= pagination.maxIndex && index >= pagination.indexOffset} -
- { - if (!inputs[id]) { - inputs[id] = { [index]: value } - } else { - inputs[id] = { ...inputs[id], [index]: value } - } - outputs?.inputs.set(inputs, true) - }} - onRemove={(id) => { - if (inputs?.[id] == undefined) { - return - } - if (index == 0) { - delete inputs[id] - inputs = { ...inputs } - } else { - delete inputs[id][index] - inputs[id] = { ...inputs[id] } - } - outputs?.inputs.set(inputs, true) - }} - {value} - {index} +
+ {#if $app.subgrids?.[`${id}-0`]} + {#if Array.isArray(result) && result.length > 0} + {#each result ?? [] as value, index (index)} + {@const inRange = index <= pagination.maxIndex && index >= pagination.indexOffset} +
- { - if (!$connectingInput.opened) { - $selectedComponent = [id] + { + if (!inputs[id]) { + inputs[id] = { [index]: value } + } else { + inputs[id] = { ...inputs[id], [index]: value } } - onFocus() + outputs?.inputs.set(inputs, true) }} - /> - -
- {/each} - {:else} - - - - {#if !Array.isArray(result)} -
Input data is not an array
+ onRemove={(id) => { + if (inputs?.[id] == undefined) { + return + } + if (index == 0) { + delete inputs[id] + inputs = { ...inputs } + } else { + delete inputs[id][index] + inputs[id] = { ...inputs[id] } + } + outputs?.inputs.set(inputs, true) + }} + {value} + {index} + > + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + } + onFocus() + }} + /> + +
+ {/each} + {:else} + + + + {#if !Array.isArray(result)} +
Input data is not an array
+ {/if} {/if} {/if} +
+ {#if pagination.shouldDisplayPagination} +
+ + +
{page + 1} {pagination.total > 0 ? `of ${pagination.total}` : ''}
+
{/if}
- {#if pagination.shouldDisplayPagination} -
- - -
{page + 1} {pagination.total > 0 ? `of ${pagination.total}` : ''}
-
- {/if} -
+ {:else if $app.subgrids} + + + + {/if}
diff --git a/frontend/src/lib/components/apps/components/layout/AppModal.svelte b/frontend/src/lib/components/apps/components/layout/AppModal.svelte index 1a4bd62cce..ccb25145a6 100644 --- a/frontend/src/lib/components/apps/components/layout/AppModal.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppModal.svelte @@ -40,6 +40,9 @@ breakpoint } = getContext('AppViewerContext') + let everRender = render + $: render && !everRender && (everRender = true) + //used so that we can count number of outputs setup for first refresh const outputs = initOutput($worldStore, id, { open: false @@ -110,7 +113,7 @@ /> {/each} -{#if render} +{#if everRender}
-{/if} - - { - outputs?.open.set(true) - onOpenRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) - }} - on:close={() => { - outputs?.open.set(false) - onCloseRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) - }} - > -
+ { + outputs?.open.set(true) + onOpenRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) + }} + on:close={() => { + outputs?.open.set(false) + onCloseRecomputeIds?.forEach((id) => $runnableComponents?.[id]?.cb?.map((cb) => cb?.())) + }} >
{ - if ($mode !== 'dnd' && !unclickableOutside) { - handleClickAway(e) - } - }} + class={twMerge( + `${ + $mode == 'dnd' ? 'absolute' : 'fixed' + } top-0 bottom-0 left-0 right-0 transition-all duration-50`, + open ? ' bg-black bg-opacity-60' : 'h-0 overflow-hidden invisible' + )} + style="z-index: {zIndex}" + bind:clientHeight={wrapperHeight} >
-
{resolvedConfig.modalTitle}
-
- -
-
- -
{ - e?.stopPropagation() - if (!$connectingInput.opened) { - $selectedComponent = [id] - $focusedGrid = { - parentComponentId: id, - subGridIndex: 0 - } + style={css?.popup?.style} + class={twMerge('mx-24 mt-8 bg-surface rounded-lg relative', css?.popup?.class)} + use:clickOutside={false} + on:click_outside={(e) => { + if ($mode !== 'dnd' && !unclickableOutside) { + handleClickAway(e) } }} > - {#if $app.subgrids?.[`${id}-0`]} - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - $focusedGrid = { - parentComponentId: id, - subGridIndex: 0 - } +
+
{resolvedConfig.modalTitle}
+
+ +
+
+ +
{ + e?.stopPropagation() + if (!$connectingInput.opened) { + $selectedComponent = [id] + $focusedGrid = { + parentComponentId: id, + subGridIndex: 0 } - }} - /> - {/if} + } + }} + > + {#if $app.subgrids?.[`${id}-0`]} + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + $focusedGrid = { + parentComponentId: id, + subGridIndex: 0 + } + } + }} + /> + {/if} +
-
-
-
+ + +{:else if $app.subgrids?.[`${id}-0`]} + +{/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppSplitpanes.svelte b/frontend/src/lib/components/apps/components/layout/AppSplitpanes.svelte index 384000a06b..90dbf14618 100644 --- a/frontend/src/lib/components/apps/components/layout/AppSplitpanes.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppSplitpanes.svelte @@ -25,6 +25,10 @@ //used so that we can count number of outputs setup for first refresh initOutput($worldStore, id, {}) + let everRender = render + + $: render && !everRender && (everRender = true) + function onFocus() { $focusedGrid = { parentComponentId: id, @@ -82,47 +86,53 @@ -
- {#key sumedup} - - {#each sumedup as paneSize, index (index)} - -
{ - $selectedComponent = [id] - $focusedGrid = { - parentComponentId: id, - subGridIndex: index - } - }} - > - {#if $app.subgrids?.[`${id}-${index}`]} - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - $focusedGrid = { - parentComponentId: id, - subGridIndex: index +{#if everRender} +
+ {#key sumedup} + + {#each sumedup as paneSize, index (index)} + +
{ + $selectedComponent = [id] + $focusedGrid = { + parentComponentId: id, + subGridIndex: index + } + }} + > + {#if $app.subgrids?.[`${id}-${index}`]} + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + $focusedGrid = { + parentComponentId: id, + subGridIndex: index + } } - } - }} - /> - {/if} -
-
- {/each} -
- {/key} -
+ }} + /> + {/if} +
+
+ {/each} +
+ {/key} +
+{:else} + {#each sumedup as _paneSize, index (index)} + + {/each} +{/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppStepper.svelte b/frontend/src/lib/components/apps/components/layout/AppStepper.svelte index 9a15955ec6..eb47b3e928 100644 --- a/frontend/src/lib/components/apps/components/layout/AppStepper.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppStepper.svelte @@ -36,6 +36,9 @@ runnableComponents } = getContext('AppViewerContext') + let everRender = render + $: render && !everRender && (everRender = true) + let selected = tabs[0] let tabHeight: number = 0 let footerHeight: number = 0 @@ -155,97 +158,109 @@ bind:result errorHandledByComponent={true} > -
-
- { - const index = e.detail.index - if (index <= maxReachedIndex || $mode === 'dnd') { - runStep(index) - } - }} - {tabs} - {selectedIndex} - {maxReachedIndex} - {statusByStep} - hasValidations={Boolean(runnableComponent)} - /> -
- -
- {#if $app.subgrids} - {#each tabs ?? [] as _res, i} - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - handleTabSelection() + {#if everRender} +
+ {#if render} +
+ { + const index = e.detail.index + if (index <= maxReachedIndex || $mode === 'dnd') { + runStep(index) } }} + {tabs} + {selectedIndex} + {maxReachedIndex} + {statusByStep} + hasValidations={Boolean(runnableComponent)} /> - {/each} +
+ {/if} + +
+ {#if $app.subgrids} + {#each tabs ?? [] as _res, i} + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + handleTabSelection() + } + }} + /> + {/each} + {/if} +
+ + {#if render} +
+
+
+ + Step {selectedIndex + 1} of {tabs.length} + +
+
+ + + +
+
+
{/if}
- -
-
-
- - Step {selectedIndex + 1} of {tabs.length} - -
-
- - - -
-
-
-
+ {:else if $app.subgrids} + {#each tabs ?? [] as _res, i} + + {/each} + {/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppTabs.svelte b/frontend/src/lib/components/apps/components/layout/AppTabs.svelte index 553e6db4f1..f57d7c46f0 100644 --- a/frontend/src/lib/components/apps/components/layout/AppTabs.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppTabs.svelte @@ -29,6 +29,8 @@ components['tabscomponent'].initialData.configuration, configuration ) + let everRender = render + $: render && !everRender && (everRender = true) const { app, @@ -117,128 +119,134 @@ /> {/each} -
- {#if !resolvedConfig.tabsKind || resolvedConfig.tabsKind == 'tabs' || (resolvedConfig.tabsKind == 'invisibleOnView' && $mode == 'dnd')} -
- + {#if !resolvedConfig.tabsKind || resolvedConfig.tabsKind == 'tabs' || (resolvedConfig.tabsKind == 'invisibleOnView' && $mode == 'dnd')} +
+ + {#each tabs ?? [] as res, index} + + {res} + + {/each} + +
+ {:else if resolvedConfig.tabsKind == 'sidebar'} +
- {#each tabs ?? [] as res, index} - - {res} - - {/each} - -
- {:else if resolvedConfig.tabsKind == 'sidebar'} -
- {#each tabs ?? [] as res} - - {/each} -
- {/if} - {#if resolvedConfig.tabsKind == 'accordion'} -
- {#each tabs ?? [] as res, index} -
+ {#each tabs ?? [] as res} - {#if selected == res} -
- { - if (!$connectingInput.opened) { - $selectedComponent = [id] - handleTabSelection() - } - }} - /> -
- {/if} -
- {/each} -
- {:else} -
- {#if $app.subgrids} - {#each tabs ?? [] as _res, i} - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - handleTabSelection() - } - }} - /> {/each} - {/if} -
- {/if} -
+
+ {/if} + {#if resolvedConfig.tabsKind == 'accordion'} +
+ {#each tabs ?? [] as res, index} +
+ + {#if selected == res} +
+ { + if (!$connectingInput.opened) { + $selectedComponent = [id] + handleTabSelection() + } + }} + /> +
+ {/if} +
+ {/each} +
+ {:else} +
+ {#if $app.subgrids} + {#each tabs ?? [] as _res, i} + { + if (!$connectingInput.opened) { + $selectedComponent = [id] + handleTabSelection() + } + }} + /> + {/each} + {/if} +
+ {/if} +
+{:else if $app.subgrids} + {#each tabs ?? [] as _res, i} + + {/each} +{/if} diff --git a/frontend/src/lib/components/apps/editor/AppPreview.svelte b/frontend/src/lib/components/apps/editor/AppPreview.svelte index e286988b42..ca1841c7b2 100644 --- a/frontend/src/lib/components/apps/editor/AppPreview.svelte +++ b/frontend/src/lib/components/apps/editor/AppPreview.svelte @@ -15,7 +15,6 @@ import GridViewer from './GridViewer.svelte' import Component from './component/Component.svelte' import { twMerge } from 'tailwind-merge' - import { columnConfiguration } from '../gridUtils' import { deepEqual } from 'fast-equals' import { dfs, maxHeight } from './appUtils' import { BG_PREFIX, migrateApp } from '../utils' @@ -292,8 +291,6 @@ allIdsInPath={$allIdsInPath} items={app.grid} let:dataItem - let:hidden - cols={columnConfiguration} {maxRow} breakpoint={$breakpoint} > @@ -308,7 +305,6 @@ selected={false} locked={true} fullHeight={dataItem?.[$breakpoint === 'sm' ? 3 : 12]?.fullHeight} - {hidden} /> diff --git a/frontend/src/lib/components/apps/editor/GridEditor.svelte b/frontend/src/lib/components/apps/editor/GridEditor.svelte index 5460f92cdc..9407e8714a 100644 --- a/frontend/src/lib/components/apps/editor/GridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/GridEditor.svelte @@ -1,7 +1,7 @@
- {#if xPerPx} + {#if xPerPx && getComputedCols} {#each items as item (item.id)} {@const onTop = allIdsInPath?.includes(item.id)} {@const width = @@ -103,10 +117,14 @@ : ''} top: {top}px; left: {left}px;" > {#if item[getComputedCols]} -
{/each} + {:else if showSkeleton} +
{/if}
diff --git a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte index 76cd8167eb..96b4b6cbb8 100644 --- a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte @@ -3,7 +3,7 @@ import { classNames } from '$lib/utils' import { createEventDispatcher, getContext, onDestroy } from 'svelte' import { twMerge } from 'tailwind-merge' - import { columnConfiguration, gridColumns, isFixed, toggleFixed } from '../gridUtils' + import { gridColumns, isFixed, toggleFixed } from '../gridUtils' import Grid from '../svelte-grid/Grid.svelte' import type { AppEditorContext, AppViewerContext, GridItem } from '../types' import { @@ -53,6 +53,10 @@ let isActive = false let sber = editorContext?.componentActive?.subscribe((x) => (isActive = x)) + let everVisible = visible + + $: visible && !everVisible && (everVisible = true) + onDestroy(() => { sber?.() }) @@ -173,160 +177,156 @@ } - - +{/if} diff --git a/frontend/src/lib/components/apps/editor/component/Component.svelte b/frontend/src/lib/components/apps/editor/component/Component.svelte index 6d4d0a396e..51d1891cd1 100644 --- a/frontend/src/lib/components/apps/editor/component/Component.svelte +++ b/frontend/src/lib/components/apps/editor/component/Component.svelte @@ -1,969 +1,39 @@ - - - - -
{ - outTimeout && clearTimeout(outTimeout) - if (component.id !== $hoverStore) { - $hoverStore = component.id - } - }} - on:mouseout|stopPropagation={mouseOut} - class={twMerge( - 'h-full flex flex-col w-full component relative', - initializing ? 'overflow-hidden h-0' : '', - hidden && $mode === 'preview' ? 'hidden' : '' - )} - data-connection-button -> - {#if locked && componentActive && $componentActive && moveMode === 'move' && componentDraggedId && componentDraggedId !== component.id && cachedAreOnTheSameSubgrid} -
-
- -
Anchored: The component cannot be moved.
-
-
- {:else if moveMode === 'insert' && isContainer(component.type) && componentDraggedId && componentDraggedId !== component.id && cachedComponentDraggedIsNotChild} -
- {/if} - {#if $mode !== 'preview'} - { - outTimeout && clearTimeout(outTimeout) - - if (component.id !== $hoverStore) { - $hoverStore = component.id - } - }} - hover={$hoverStore === component.id} - {component} - {selected} - {fullHeight} - connecting={$connectingInput.opened} - on:lock - on:expand - on:fillHeight - {locked} - {inlineEditorOpened} - hasInlineEditor={component.type === 'textcomponent' && - component.componentInput && - component.componentInput.type !== 'connected'} - on:triggerInlineEditor={() => { - inlineEditorOpened = !inlineEditorOpened - }} - {errorHandledByComponent} - {componentContainerWidth} - /> - {/if} - - {#if ismoving} -
- -
- {/if} -
- {#if component.type === 'displaycomponent'} - - {:else if component.type === 'logcomponent'} - - {:else if component.type === 'jobidlogcomponent'} - - {:else if component.type === 'flowstatuscomponent'} - - {:else if component.type === 'jobidflowstatuscomponent'} - - {:else if component.type === 'barchartcomponent'} - - {:else if component.type === 'timeseriescomponent'} - - {:else if component.type === 'htmlcomponent'} - - {:else if component.type === 'customcomponent'} - - {:else if component.type === 'mardowncomponent'} - - {:else if component.type === 'vegalitecomponent'} - - {:else if component.type === 'plotlycomponent'} - - {:else if component.type === 'plotlycomponentv2'} - - {:else if component.type === 'scatterchartcomponent'} - - {:else if component.type === 'piechartcomponent'} - - {:else if component.type === 'agchartscomponent'} - - {:else if component.type === 'agchartscomponentee'} - - {:else if component.type === 'tablecomponent'} - - {:else if component.type === 'dbexplorercomponent'} - - {:else if component.type === 'aggridcomponent'} - - {:else if component.type === 'aggridcomponentee'} - - {:else if component.type === 'aggridinfinitecomponent'} - - {:else if component.type === 'aggridinfinitecomponentee'} - - {:else if component.type === 'textcomponent'} - - {:else if component.type === 'buttoncomponent'} - - {:else if component.type === 'downloadcomponent'} - - {:else if component.type === 'selectcomponent' || component.type === 'resourceselectcomponent'} - - {:else if component.type === 'userresourcecomponent'} - - {:else if component.type === 'multiselectcomponent'} - - {:else if component.type === 'multiselectcomponentv2'} - - {:else if component.type === 'formcomponent'} - - {:else if component.type === 'formbuttoncomponent'} - - {:else if component.type === 'checkboxcomponent'} - - {:else if component.type === 'textinputcomponent'} - - {:else if component.type === 'quillcomponent'} - - {:else if component.type === 'textareainputcomponent'} - - {:else if component.type === 'emailinputcomponent'} - - {:else if component.type === 'passwordinputcomponent'} - - {:else if component.type === 'dateinputcomponent'} - - {:else if component.type === 'timeinputcomponent'} - - {:else if component.type === 'datetimeinputcomponent'} - - {:else if component.type === 'numberinputcomponent'} - - {:else if component.type === 'currencycomponent'} - - {:else if component.type === 'slidercomponent'} - - {:else if component.type === 'dateslidercomponent'} - - {:else if component.type === 'horizontaldividercomponent'} - - {:else if component.type === 'verticaldividercomponent'} - - {:else if component.type === 'rangecomponent'} - - {:else if component.type === 'tabscomponent' && component.tabs} - - {:else if component.type === 'steppercomponent' && component.tabs} - - {:else if component.type === 'conditionalwrapper' && component.conditions} - - {:else if component.type === 'containercomponent'} - - {:else if component.type === 'listcomponent'} - - {:else if component.type === 'verticalsplitpanescomponent'} - - {:else if component.type === 'horizontalsplitpanescomponent'} - - {:else if component.type === 'iconcomponent'} - - {:else if component.type === 'fileinputcomponent'} - - {:else if component.type === 's3fileinputcomponent'} - - {:else if component.type === 'imagecomponent'} - - {:else if component.type === 'drawercomponent'} - - {:else if component.type === 'mapcomponent'} - - {:else if component.type === 'pdfcomponent'} - - {:else if component.type === 'modalcomponent'} - - {:else if component.type === 'schemaformcomponent'} - - {:else if component.type === 'selecttabcomponent'} - - {:else if component.type === 'selectstepcomponent'} - - {:else if component.type === 'chartjscomponent'} - - {:else if component.type === 'chartjscomponentv2'} - - {:else if component.type === 'carousellistcomponent'} - - {:else if component.type === 'accordionlistcomponent'} - - {:else if component.type === 'statcomponent'} - - {:else if component.type === 'menucomponent'} - - {:else if component.type === 'decisiontreecomponent' && component.nodes} - - {:else if component.type === 'alertcomponent'} - - {:else if component.type === 'navbarcomponent'} - - {:else if component.type === 'dateselectcomponent'} - - {:else if component.type === 'jobiddisplaycomponent'} - - {:else if component.type === 'recomputeallcomponent'} - - {/if} -
-
-{#if initializing} - - -
{ - if (component.id !== $hoverStore) { - $hoverStore = component.id - } - }} - on:mouseout|stopPropagation={() => { - if ($hoverStore !== undefined) { - $hoverStore = undefined - } - }} - class="absolute inset-0 center-center flex-col bg- border animate-skeleton" +{#if everRender} + +{:else} + {/if} diff --git a/frontend/src/lib/components/apps/editor/component/ComponentInner.svelte b/frontend/src/lib/components/apps/editor/component/ComponentInner.svelte new file mode 100644 index 0000000000..9973ebbcbf --- /dev/null +++ b/frontend/src/lib/components/apps/editor/component/ComponentInner.svelte @@ -0,0 +1,778 @@ + + +{#if component.type === 'displaycomponent'} + +{:else if component.type === 'logcomponent'} + +{:else if component.type === 'jobidlogcomponent'} + +{:else if component.type === 'flowstatuscomponent'} + +{:else if component.type === 'jobidflowstatuscomponent'} + +{:else if component.type === 'barchartcomponent'} + +{:else if component.type === 'timeseriescomponent'} + +{:else if component.type === 'htmlcomponent'} + +{:else if component.type === 'customcomponent'} + +{:else if component.type === 'mardowncomponent'} + +{:else if component.type === 'vegalitecomponent'} + +{:else if component.type === 'plotlycomponent'} + +{:else if component.type === 'plotlycomponentv2'} + +{:else if component.type === 'scatterchartcomponent'} + +{:else if component.type === 'piechartcomponent'} + +{:else if component.type === 'agchartscomponent'} + +{:else if component.type === 'agchartscomponentee'} + +{:else if component.type === 'tablecomponent'} + +{:else if component.type === 'dbexplorercomponent'} + +{:else if component.type === 'aggridcomponent'} + +{:else if component.type === 'aggridcomponentee'} + +{:else if component.type === 'aggridinfinitecomponent'} + +{:else if component.type === 'aggridinfinitecomponentee'} + +{:else if component.type === 'textcomponent'} + +{:else if component.type === 'buttoncomponent'} + +{:else if component.type === 'downloadcomponent'} + +{:else if component.type === 'selectcomponent' || component.type === 'resourceselectcomponent'} + +{:else if component.type === 'userresourcecomponent'} + +{:else if component.type === 'multiselectcomponent'} + +{:else if component.type === 'multiselectcomponentv2'} + +{:else if component.type === 'formcomponent'} + +{:else if component.type === 'formbuttoncomponent'} + +{:else if component.type === 'checkboxcomponent'} + +{:else if component.type === 'textinputcomponent'} + +{:else if component.type === 'quillcomponent'} + +{:else if component.type === 'textareainputcomponent'} + +{:else if component.type === 'emailinputcomponent'} + +{:else if component.type === 'passwordinputcomponent'} + +{:else if component.type === 'dateinputcomponent'} + +{:else if component.type === 'timeinputcomponent'} + +{:else if component.type === 'datetimeinputcomponent'} + +{:else if component.type === 'numberinputcomponent'} + +{:else if component.type === 'currencycomponent'} + +{:else if component.type === 'slidercomponent'} + +{:else if component.type === 'dateslidercomponent'} + +{:else if component.type === 'horizontaldividercomponent'} + +{:else if component.type === 'verticaldividercomponent'} + +{:else if component.type === 'rangecomponent'} + +{:else if component.type === 'tabscomponent' && component.tabs} + +{:else if component.type === 'steppercomponent' && component.tabs} + +{:else if component.type === 'conditionalwrapper' && component.conditions} + +{:else if component.type === 'containercomponent'} + +{:else if component.type === 'listcomponent'} + +{:else if component.type === 'verticalsplitpanescomponent'} + +{:else if component.type === 'horizontalsplitpanescomponent'} + +{:else if component.type === 'iconcomponent'} + +{:else if component.type === 'fileinputcomponent'} + +{:else if component.type === 's3fileinputcomponent'} + +{:else if component.type === 'imagecomponent'} + +{:else if component.type === 'drawercomponent'} + +{:else if component.type === 'mapcomponent'} + +{:else if component.type === 'pdfcomponent'} + +{:else if component.type === 'modalcomponent'} + +{:else if component.type === 'schemaformcomponent'} + +{:else if component.type === 'selecttabcomponent'} + +{:else if component.type === 'selectstepcomponent'} + +{:else if component.type === 'chartjscomponent'} + +{:else if component.type === 'chartjscomponentv2'} + +{:else if component.type === 'carousellistcomponent'} + +{:else if component.type === 'accordionlistcomponent'} + +{:else if component.type === 'statcomponent'} + +{:else if component.type === 'menucomponent'} + +{:else if component.type === 'decisiontreecomponent' && component.nodes} + +{:else if component.type === 'alertcomponent'} + +{:else if component.type === 'navbarcomponent'} + +{:else if component.type === 'dateselectcomponent'} + +{:else if component.type === 'jobiddisplaycomponent'} + +{:else if component.type === 'recomputeallcomponent'} + +{/if} diff --git a/frontend/src/lib/components/apps/editor/component/ComponentRendered.svelte b/frontend/src/lib/components/apps/editor/component/ComponentRendered.svelte new file mode 100644 index 0000000000..0a7c79fd1b --- /dev/null +++ b/frontend/src/lib/components/apps/editor/component/ComponentRendered.svelte @@ -0,0 +1,219 @@ + + + + + + +
{ + outTimeout && clearTimeout(outTimeout) + if (component.id !== $hoverStore) { + $hoverStore = component.id + } + }} + on:mouseout|stopPropagation={mouseOut} + class={twMerge( + 'h-full flex flex-col w-full component relative', + initializing ? 'overflow-hidden h-0' : '' + )} + data-connection-button +> + {#if render} + {#if locked && componentActive && $componentActive && moveMode === 'move' && componentDraggedId && componentDraggedId !== component.id && cachedAreOnTheSameSubgrid} +
+
+ +
Anchored: The component cannot be moved.
+
+
+ {:else if moveMode === 'insert' && isContainer(component.type) && componentDraggedId && componentDraggedId !== component.id && cachedComponentDraggedIsNotChild} +
+ {/if} + {#if $mode !== 'preview'} + { + outTimeout && clearTimeout(outTimeout) + + if (component.id !== $hoverStore) { + $hoverStore = component.id + } + }} + hover={$hoverStore === component.id} + {component} + {selected} + {fullHeight} + connecting={$connectingInput.opened} + on:lock + on:expand + on:fillHeight + {locked} + {inlineEditorOpened} + hasInlineEditor={component.type === 'textcomponent' && + component.componentInput && + component.componentInput.type !== 'connected'} + on:triggerInlineEditor={() => { + inlineEditorOpened = !inlineEditorOpened + }} + {errorHandledByComponent} + {componentContainerWidth} + /> + {/if} + + {#if ismoving} +
+ +
+ {/if} + {/if} +
+ +
+
+{#if initializing && render && showSkeleton} + + +
{ + if (component.id !== $hoverStore) { + $hoverStore = component.id + } + }} + on:mouseout|stopPropagation={() => { + if ($hoverStore !== undefined) { + $hoverStore = undefined + } + }} + class="absolute inset-0 center-center flex-col border animate-skeleton dark:bg-frost-900/50 [animation-delay:1000ms]" + /> +{/if} diff --git a/frontend/src/lib/components/apps/svelte-grid/Grid.svelte b/frontend/src/lib/components/apps/svelte-grid/Grid.svelte index 6a4d0da8d1..fa74b33d9a 100644 --- a/frontend/src/lib/components/apps/svelte-grid/Grid.svelte +++ b/frontend/src/lib/components/apps/svelte-grid/Grid.svelte @@ -9,6 +9,8 @@ -
- -
+{#if !noButton} +
+ +
+{/if} diff --git a/frontend/src/lib/components/triggers/TriggersEditor.svelte b/frontend/src/lib/components/triggers/TriggersEditor.svelte index 29d739036b..68bf72a88b 100644 --- a/frontend/src/lib/components/triggers/TriggersEditor.svelte +++ b/frontend/src/lib/components/triggers/TriggersEditor.svelte @@ -140,7 +140,18 @@
{:else if $selectedTrigger === 'postgres'}
- +
{:else if $selectedTrigger === 'kafka' || $selectedTrigger === 'nats'}
diff --git a/frontend/src/lib/components/triggers/TriggersEditorSection.svelte b/frontend/src/lib/components/triggers/TriggersEditorSection.svelte index f684bf69a0..8c01f3468e 100644 --- a/frontend/src/lib/components/triggers/TriggersEditorSection.svelte +++ b/frontend/src/lib/components/triggers/TriggersEditorSection.svelte @@ -31,7 +31,8 @@ webhook: 'Webhook', kafka: '+ New Kafka trigger', email: 'Email trigger', - nats: '+ New NATS trigger' + nats: '+ New NATS trigger', + postgres: '+ New Postgres trigger' } const { captureOn } = getContext('TriggerContext') diff --git a/frontend/src/lib/components/triggers/TriggersWrapper.svelte b/frontend/src/lib/components/triggers/TriggersWrapper.svelte index 90db46c6d9..150414795a 100644 --- a/frontend/src/lib/components/triggers/TriggersWrapper.svelte +++ b/frontend/src/lib/components/triggers/TriggersWrapper.svelte @@ -8,6 +8,7 @@ import EmailTriggerConfigSection from '../details/EmailTriggerConfigSection.svelte' import KafkaTriggersConfigSection from './kafka/KafkaTriggersConfigSection.svelte' import NatsTriggersConfigSection from './nats/NatsTriggersConfigSection.svelte' + import PostgresEditorConfigSection from './postgres/PostgresEditorConfigSection.svelte' export let triggerType: CaptureTriggerKind = 'webhook' export let cloudDisabled: boolean = false @@ -30,6 +31,14 @@ bind:url_runnable_args={args.url_runnable_args} showCapture={false} /> + {:else if triggerType === 'postgres'} + {:else if triggerType === 'webhook'} + import { Button } from '$lib/components/common' + import Tooltip from '$lib/components/Tooltip.svelte' + import { PostgresTriggerService } from '$lib/gen' + import { workspaceStore } from '$lib/stores' + import { sendUserToast } from '$lib/toast' + import { emptyString } from '$lib/utils' + + let loadingConfiguration = false + + const checkDatabaseConfiguration = async () => { + if (emptyString(postgres_resource_path)) { + sendUserToast('You must first pick a database resource', true) + return + } + try { + const invalidConfig = !(await PostgresTriggerService.isValidPostgresConfiguration({ + workspace: $workspaceStore!, + path: postgres_resource_path + })) + + let msg = 'Database is in logical mode. Triggers can be used.' + + if (invalidConfig) { + msg = + 'Database is NOT in logical mode. Triggers cannot be used. Refer to the PostgreSQL documentation for configuration requirements.' + } + + sendUserToast(msg, invalidConfig) + } catch (error) { + sendUserToast(error.body, true) + } + + loadingConfiguration = false + } + + const checkConnectionAndDatabaseConfiguration = async () => { + try { + loadingConfiguration = true + if (checkConnection) { + await checkConnection() + } + await checkDatabaseConfiguration() + } catch (error) { + sendUserToast(error.body, true) + } + loadingConfiguration = false + } + + export let can_write: boolean + export let postgres_resource_path: string + export let checkConnection: any | undefined = undefined + + console.log('dbg check connection', checkConnection) + + +{#if postgres_resource_path} +
+ +
+{/if} diff --git a/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte b/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte new file mode 100644 index 0000000000..d6a6340584 --- /dev/null +++ b/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte @@ -0,0 +1,158 @@ + + +
+ {#if showCapture && captureInfo} + + {/if} +
+
+
+

+ Pick a database to connect to +

+ { + if (emptyString(postgres_resource_path)) { + selectedTable = 'specific' + publication = { ...DEFAULT_PUBLICATION } + } + }} + /> + {#if postgres_resource_path} + + + {/if} +
+ {#if postgres_resource_path} + + + {/if} +
+
+
diff --git a/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditor.svelte b/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditor.svelte index d5f410e594..9b46ac2b0b 100644 --- a/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditor.svelte +++ b/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditor.svelte @@ -9,10 +9,10 @@ drawer?.openEdit(ePath, isFlow) } - export async function openNew(is_flow: boolean, initial_script_path?: string) { + export async function openNew(is_flow: boolean, initial_script_path?: string, defaultValues?: Record) { open = true await tick() - drawer?.openNew(is_flow, initial_script_path) + drawer?.openNew(is_flow, initial_script_path, defaultValues) } let drawer: PostgresTriggerEditorInner diff --git a/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte b/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte index 14310d1e9d..71919774c9 100644 --- a/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte +++ b/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte @@ -10,7 +10,7 @@ import { canWrite, emptyString, emptyStringTrimmed, sendUserToast } from '$lib/utils' import { createEventDispatcher } from 'svelte' import Section from '$lib/components/Section.svelte' - import { Loader2, Save } from 'lucide-svelte' + import { Loader2, Save, X } from 'lucide-svelte' import Label from '$lib/components/Label.svelte' import Toggle from '$lib/components/Toggle.svelte' import ResourcePicker from '$lib/components/ResourcePicker.svelte' @@ -25,6 +25,8 @@ import Tabs from '$lib/components/common/tabs/Tabs.svelte' import Tab from '$lib/components/common/tabs/Tab.svelte' import RelationPicker from './RelationPicker.svelte' + import { invalidRelations } from './utils' + import CheckPostgresRequirement from './CheckPostgresRequirement.svelte' let drawer: Drawer let is_flow: boolean = false @@ -53,13 +55,7 @@ let publicationItems: string[] = [] let transactionType: string[] = ['Insert', 'Update', 'Delete'] let selectedTable: 'all' | 'specific' = 'specific' - let tab: 'advanced' | 'basic' - let config: { isLogical: boolean; show: boolean } = { isLogical: false, show: false } - let loadingConfiguration = false - $: table_to_track = selectedTable === 'all' ? [] : relations - $: if (postgres_resource_path === undefined) { - config.show = false - } + let tab: 'advanced' | 'basic' = 'basic' async function createPublication() { try { const message = await PostgresTriggerService.createPostgresPublication({ @@ -68,7 +64,7 @@ workspace: $workspaceStore!, requestBody: { transaction_to_track: transaction_to_track, - table_to_track + table_to_track: relations } }) @@ -107,7 +103,6 @@ dirtyPath = false selectedPublicationAction = 'get' selectedSlotAction = 'get' - config.show = false selectedPublicationAction = selectedPublicationAction selectedSlotAction = selectedSlotAction relations = [] @@ -121,7 +116,11 @@ } } - export async function openNew(nis_flow: boolean, fixedScriptPath_?: string) { + export async function openNew( + nis_flow: boolean, + fixedScriptPath_?: string, + defaultValues?: Record + ) { drawerLoading = true try { selectedPublicationAction = 'create' @@ -137,16 +136,17 @@ script_path = fixedScriptPath path = '' initialPath = '' - replication_slot_name = '' - publication_name = '' - postgres_resource_path = '' + postgres_resource_path = defaultValues?.postgres_resource_path ?? '' edit = false dirtyPath = false - config.show = false publication_name = `windmill_publication_${random_adj()}` replication_slot_name = `windmill_replication_${random_adj()}` - transaction_to_track = ['Insert', 'Update', 'Delete'] - relations = [ + transaction_to_track = defaultValues?.publication.transaction_to_track || [ + 'Insert', + 'Update', + 'Delete' + ] + relations = defaultValues?.publication.table_to_track || [ { schema_name: 'public', table_to_track: [] @@ -184,6 +184,15 @@ } async function updateTrigger(): Promise { + if ( + selectedTable === 'specific' && + invalidRelations(relations, { + showError: true, + trackSchemaTableError: true + }) === true + ) { + return + } if (edit) { await PostgresTriggerService.updatePostgresTrigger({ workspace: $workspaceStore!, @@ -200,7 +209,7 @@ tab === 'basic' ? { transaction_to_track, - table_to_track + table_to_track: relations } : undefined } @@ -219,7 +228,7 @@ publication_name: tab === 'basic' ? undefined : publication_name, publication: { transaction_to_track, - table_to_track + table_to_track: relations } } }) @@ -256,24 +265,6 @@ sendUserToast(error.body, true) } } - - const checkDatabaseConfiguration = async () => { - if (emptyString(postgres_resource_path)) { - sendUserToast('You must first pick a database resource', true) - return - } - try { - loadingConfiguration = true - config.isLogical = await PostgresTriggerService.isValidPostgresConfiguration({ - workspace: $workspaceStore!, - path: postgres_resource_path - }) - config.show = true - } catch (error) { - sendUserToast(error.body, true) - } - loadingConfiguration = false - } @@ -311,9 +302,10 @@ disabled={pathError != '' || emptyString(postgres_resource_path) || emptyString(script_path) || - ((emptyString(replication_slot_name) || emptyString(publication_name)) && - tab === 'advanced') || - (relations.length === 0 && tab === 'basic') || + (tab === 'advanced' && emptyString(replication_slot_name)) || + emptyString(publication_name) || + (selectedTable !== 'all' && tab === 'basic' && relations.length === 0) || + transaction_to_track.length === 0 || !can_write} on:click={updateTrigger} > @@ -327,74 +319,28 @@

Loading...

{:else} -
- - {#if edit} - Changes can take up to 30 seconds to take effect. - {:else} - New postgres triggers can take up to 30 seconds to start listening. - {/if} - -
+ + {#if edit} + Changes can take up to 30 seconds to take effect. + {:else} + New postgres triggers can take up to 30 seconds to start listening. + {/if} +
-
- -
- -
-

- Pick a database to connect to -

-
- - {#if postgres_resource_path} - - {#if config.show} - - {#if config.isLogical} - Your database is correctly configured with logical replication enabled. You can - proceed with using the streaming feature - {:else} - Logical replication is not enabled on your database. To use this feature, your - Postgres database must have wal_level configured as 'logical' in your - database configuration. - {/if} - - {/if} - {/if} -
-
+
-

+

Pick a script or flow to be triggered

@@ -411,6 +357,7 @@ {#if script_path === undefined && is_flow === false}
- {#if postgres_resource_path} -
-
-

- Choose which table of your database to track as well as what kind of transaction - should fire the script.
- You must pick a database resource first to make the configuration of your trigger - -

-
-

- Choose the types of database transactions that should trigger a script or flow. - You can select from Insert, Update, - Delete, or any combination of these operations to define when the - trigger should activate. -

+
+

+ Pick a database to connect to +

+
+
+ + +
+ + {#if postgres_resource_path} +
-
-

- Select the tables to track. You can choose to track - all tables in your database, - all tables within a specific schema, - specific tables in a schema, or even - specific columns of a table. Additionally, you can apply a - filter to retrieve only rows that do not match the specified criteria. -

+ ulOptionsClass={'!bg-surface !text-sm'} + ulSelectedClass="!text-sm" + outerDivClass="!bg-surface !min-h-[38px] !border-[#d1d5db]" + placeholder="Select transactions" + --sms-options-margin="4px" + --sms-open-z-index="100" + > + +
+ +
+
+ + +
-
-
- {/if} + + {/if} +
+
{/if} diff --git a/frontend/src/lib/components/triggers/postgres/PostgresTriggersPanel.svelte b/frontend/src/lib/components/triggers/postgres/PostgresTriggersPanel.svelte index 15742bd04c..cd707bb5d3 100644 --- a/frontend/src/lib/components/triggers/postgres/PostgresTriggersPanel.svelte +++ b/frontend/src/lib/components/triggers/postgres/PostgresTriggersPanel.svelte @@ -1,29 +1,48 @@ -
- - - - +
+
+
+ { + if (selectedTable === 'all') { + cached = relations + relations = [] + } else { + relations = cached + } + }} + bind:selected={selectedTable} + > + + + +
+
{#if selectedTable !== 'all'} {#if relations && relations.length > 0} - {#each relations as v, i} -
-
- - {#each v.table_to_track as table_to_track, j} -
-
- - -
+
- -
- {/each} + {/each} +
{/if} -
- + + + +
{/if}
diff --git a/frontend/src/lib/components/triggers/postgres/utils.ts b/frontend/src/lib/components/triggers/postgres/utils.ts new file mode 100644 index 0000000000..6b4e3e91b5 --- /dev/null +++ b/frontend/src/lib/components/triggers/postgres/utils.ts @@ -0,0 +1,102 @@ +import type { Relations } from '$lib/gen' +import { sendUserToast } from '$lib/toast' +import { emptyString } from '$lib/utils' + +type RelationError = { + schemaIndex: number + tableIndex: number + schemaError: boolean + tableError: boolean + schemaName?: string + trackAllTablesInSchema: boolean + trackSpecificColumnsInTable: boolean + duplicateSchemaName: boolean | undefined +} +export function invalidRelations( + relations: Relations[], + options?: { + trackSchemaTableError?: boolean + showError?: boolean + } +): boolean { + let error: RelationError = { + schemaIndex: -1, + tableIndex: -1, + schemaError: false, + tableError: false, + trackAllTablesInSchema: false, + trackSpecificColumnsInTable: false, + duplicateSchemaName: undefined + } + + const duplicateName: Set = new Set() + for (const [schemaIndex, relation] of relations.entries()) { + error.schemaIndex = schemaIndex + 1 + error.schemaName = relation.schema_name + if (emptyString(relation.schema_name)) { + error.schemaError = true + break + } else { + if (duplicateName.has(relation.schema_name)) { + error.duplicateSchemaName = true + break + } + duplicateName.add(relation.schema_name) + const tableToTrack = relation.table_to_track + if (tableToTrack.length > 0) { + for (const [tableIndex, table] of tableToTrack.entries()) { + if (emptyString(table.table_name)) { + error.tableError = true + error.tableIndex = tableIndex + 1 + break + } + if ( + !error.trackSpecificColumnsInTable && + table.columns_name && + table.columns_name.length > 0 + ) { + error.trackSpecificColumnsInTable = true + } + } + if (error.tableError) { + break + } + } else if (!error.trackAllTablesInSchema) { + error.trackAllTablesInSchema = true + } + + if ( + options?.trackSchemaTableError && + error.trackAllTablesInSchema && + error.trackSpecificColumnsInTable + ) { + break + } + } + } + const errorFound = + error.tableError || + error.schemaError || + error.duplicateSchemaName || + ((options?.trackSchemaTableError ?? false) && + error.trackAllTablesInSchema && + error.trackSpecificColumnsInTable) + if ((options?.showError ?? false) && errorFound) { + let errorMessage: string = '' + + if (error.schemaError) { + errorMessage = `Schema Error: Please enter a name for schema number ${error.schemaIndex}` + } else if (error.tableError) { + errorMessage = `Table Error: Please enter a name for table number ${error.tableIndex} inside schema number ${error.schemaIndex}` + errorMessage += emptyString(error.schemaName) ? '' : ` named: ${error.schemaName}` + } else if (error.duplicateSchemaName) { + errorMessage = `Schema Error: schema name '${error.schemaName}' is already taken` + } else { + errorMessage = + 'Configuration Error: Schema-level tracking and specific table tracking with column selection cannot be used together. Refer to the documentation for valid configurations.' + } + sendUserToast(errorMessage, true) + } + + return errorFound +} diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index a314073626..3cf9735a7f 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -705,7 +705,7 @@ class Nats(TypedDict): length: int class WmTrigger(TypedDict): - kind: Literal["http", "email", "webhook", "websocket", "kafka", "nats"] + kind: Literal["http", "email", "webhook", "websocket", "kafka", "nats", "postgres"] http: Http | None websocket: Websocket | None kafka: Kafka | None diff --git a/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte index c69a447f3b..76bb1f4bac 100644 --- a/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte @@ -389,7 +389,7 @@ displayName: canWrite ? 'Share' : 'See Permissions', icon: Share, action: () => { - shareModal.openDrawer(path, 'websocket_trigger') + shareModal.openDrawer(path, 'postgres_trigger') } } ]} From 15a1582f5e86d81aa8247a7d58be38264c3e0666 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 19:13:46 +0100 Subject: [PATCH 032/667] subgrid fix --- .../layout/AppConditionalWrapper.svelte | 2 + .../apps/components/layout/AppList.svelte | 130 +++++++++--------- .../apps/editor/SubGridEditor.svelte | 4 + 3 files changed, 70 insertions(+), 66 deletions(-) diff --git a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte index cc6c38a364..5862a9883e 100644 --- a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte @@ -122,7 +122,9 @@ {/if}
{:else if $app.subgrids} + {JSON.stringify(resolvedConditions)} {#each resolvedConditions ?? [] as _res, i} + {i} {/each} {/if} diff --git a/frontend/src/lib/components/apps/components/layout/AppList.svelte b/frontend/src/lib/components/apps/components/layout/AppList.svelte index 44e0a56509..6498410036 100644 --- a/frontend/src/lib/components/apps/components/layout/AppList.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppList.svelte @@ -153,75 +153,73 @@ ? 'divide-y flex-col' : 'flex-col'}" > - {#if $app.subgrids?.[`${id}-0`]} - {#if Array.isArray(result) && result.length > 0} - {#each result ?? [] as value, index (index)} - {@const inRange = index <= pagination.maxIndex && index >= pagination.indexOffset} -
0} + {#each result ?? [] as value, index (index)} + {@const inRange = index <= pagination.maxIndex && index >= pagination.indexOffset} +
+ { + if (!inputs[id]) { + inputs[id] = { [index]: value } + } else { + inputs[id] = { ...inputs[id], [index]: value } + } + outputs?.inputs.set(inputs, true) + }} + onRemove={(id) => { + if (inputs?.[id] == undefined) { + return + } + if (index == 0) { + delete inputs[id] + inputs = { ...inputs } + } else { + delete inputs[id][index] + inputs[id] = { ...inputs[id] } + } + outputs?.inputs.set(inputs, true) + }} + {value} + {index} > - { - if (!inputs[id]) { - inputs[id] = { [index]: value } - } else { - inputs[id] = { ...inputs[id], [index]: value } + { + if (!$connectingInput.opened) { + $selectedComponent = [id] } - outputs?.inputs.set(inputs, true) + onFocus() }} - onRemove={(id) => { - if (inputs?.[id] == undefined) { - return - } - if (index == 0) { - delete inputs[id] - inputs = { ...inputs } - } else { - delete inputs[id][index] - inputs[id] = { ...inputs[id] } - } - outputs?.inputs.set(inputs, true) - }} - {value} - {index} - > - { - if (!$connectingInput.opened) { - $selectedComponent = [id] - } - onFocus() - }} - /> - -
- {/each} - {:else} - - - - {#if !Array.isArray(result)} -
Input data is not an array
- {/if} + /> + +
+ {/each} + {:else} + + + + {#if !Array.isArray(result)} +
Input data is not an array
{/if} {/if}
diff --git a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte index 96b4b6cbb8..30cb92bfa6 100644 --- a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte @@ -329,4 +329,8 @@ {/if}
+{:else} + {#each $app?.subgrids?.[subGridId] ?? [] as item} + + {/each} {/if} From 9cdc1a2a34afabaeb4189c206c5d5401cd097c79 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 19:14:22 +0100 Subject: [PATCH 033/667] subgrid fix --- .../apps/components/layout/AppConditionalWrapper.svelte | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte index 5862a9883e..cc6c38a364 100644 --- a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte @@ -122,9 +122,7 @@ {/if} {:else if $app.subgrids} - {JSON.stringify(resolvedConditions)} {#each resolvedConditions ?? [] as _res, i} - {i} {/each} {/if} From c4b4cc51fc734242f6a7164a794e4419dbb45e5c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 19:38:03 +0100 Subject: [PATCH 034/667] fix nit on conditionnal wrapper in disabled subcomponents --- .../apps/components/helpers/eval.ts | 23 ++++++++----------- .../layout/AppConditionalWrapper.svelte | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/frontend/src/lib/components/apps/components/helpers/eval.ts b/frontend/src/lib/components/apps/components/helpers/eval.ts index ede329350b..78147dc22b 100644 --- a/frontend/src/lib/components/apps/components/helpers/eval.ts +++ b/frontend/src/lib/components/apps/components/helpers/eval.ts @@ -28,17 +28,15 @@ function create_context_function_template( return ` return async function (context, state, createProxy, goto, setTab, recompute, getAgGrid, setValue, setSelectedIndex, openModal, closeModal, open, close, validate, invalidate, validateAll, clearFiles, showToast, waitJob, askNewResource, downloadFile) { "use strict"; -${ - contextKeys && contextKeys.length > 0 - ? `let ${contextKeys.map((key) => ` ${key} = createProxy('${key}', context['${key}'])`)};` - : `` -} -${ - hasReturnAsLastLine - ? eval_string - : ` +${contextKeys && contextKeys.length > 0 + ? `let ${contextKeys.map((key) => ` ${key} = createProxy('${key}', context['${key}'])`)};` + : `` + } +${hasReturnAsLastLine + ? eval_string + : ` return ${eval_string.startsWith('return ') ? eval_string.substring(7) : eval_string}` -} + } } ` @@ -271,9 +269,8 @@ export async function eval_like( if (typeof input === 'object' && input.s3) { const workspaceId = computeGlobalContext(worldStore).ctx.workspace - const s3href = `${base}/api/w/${workspaceId}/job_helpers/download_s3_file?file_key=${ - input?.s3 - }${input?.storage ? `&storage=${input.storage}` : ''}` + const s3href = `${base}/api/w/${workspaceId}/job_helpers/download_s3_file?file_key=${input?.s3 + }${input?.storage ? `&storage=${input.storage}` : ''}` downloadFile(s3href, filename || input.s3) } else if (typeof input === 'string') { if (input.startsWith('data:')) { diff --git a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte index cc6c38a364..915a1963b6 100644 --- a/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppConditionalWrapper.svelte @@ -43,7 +43,7 @@ let css = initCss($app.css?.conditionalwrapper, customCss) - let resolvedConditions: boolean[] = [] + let resolvedConditions: boolean[] = conditions.map((_x) => false) let selectedConditionIndex = 0 function handleResolvedConditions() { From bb11bfe874fe4543d87da8a9334b6376b056a323 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 19:43:33 +0100 Subject: [PATCH 035/667] clarify frontend draft storage error message --- frontend/src/lib/components/apps/editor/AppEditor.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/editor/AppEditor.svelte b/frontend/src/lib/components/apps/editor/AppEditor.svelte index a1acf8e681..fcaf9af1db 100644 --- a/frontend/src/lib/components/apps/editor/AppEditor.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditor.svelte @@ -225,7 +225,7 @@ try { localStorage.setItem(path != '' ? `app-${path}` : 'app', encodeState($appStore)) } catch (err) { - console.error(err) + console.error('Error storing frontend draft in localStorage', err) } }, 500) } From 7c4b8a7e1dca870b51b60f33a352d344ef34218f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 20:38:13 +0100 Subject: [PATCH 036/667] feat: lazy mode --- .../apps/editor/AppEditorHeader.svelte | 17 ++++++- .../apps/editor/RecomputeAllComponents.svelte | 23 ++++++--- .../apps/editor/RecomputeAllWrapper.svelte | 12 +---- .../apps/editor/SubGridEditor.svelte | 2 +- .../editor/contextPanel/LazyModePanel.svelte | 50 +++++++++++++++++++ frontend/src/lib/components/apps/types.ts | 13 ++--- 6 files changed, 92 insertions(+), 25 deletions(-) create mode 100644 frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte diff --git a/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte b/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte index eaeeb096ba..ad4312efbf 100644 --- a/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditorHeader.svelte @@ -31,7 +31,8 @@ FileClock, Sun, Moon, - SunMoon + SunMoon, + Zap } from 'lucide-svelte' import { createEventDispatcher, getContext } from 'svelte' import { Pane, Splitpanes } from 'svelte-splitpanes' @@ -92,6 +93,7 @@ import { isCloudHosted } from '$lib/cloud' import { base } from '$lib/base' import ClipboardPanel from '$lib/components/details/ClipboardPanel.svelte' + import LazyModePanel from './contextPanel/LazyModePanel.svelte' async function hash(message) { try { @@ -175,6 +177,7 @@ let inputsDrawerOpen = fromHub let historyBrowserDrawerOpen = false let debugAppDrawerOpen = false + let lazyDrawerOpen = false let deploymentMsg: string | undefined = undefined function closeSaveDrawer() { @@ -871,6 +874,13 @@ action: () => { debugAppDrawerOpen = true } + }, + { + displayName: 'Lazy mode', + icon: Zap, + action: () => { + lazyDrawerOpen = true + } } ] @@ -1267,6 +1277,11 @@ + + (lazyDrawerOpen = false)}> + + + import { getContext, onMount } from 'svelte' - import type { AppEditorContext, AppViewerContext } from '../types' - import { allItems } from '../utils' + import type { App, AppEditorContext, AppViewerContext } from '../types' + import { allItems, BG_PREFIX } from '../utils' import RecomputeAllButton from './RecomputeAllButton.svelte' const { runnableComponents, app, initialized, recomputeAllContext } = @@ -13,10 +13,21 @@ let firstLoad = false let progressTimer: NodeJS.Timeout | undefined = undefined - $: !firstLoad && - $initialized.initializedComponents?.length == - allItems($app.grid, $app.subgrids).length + ($app.hiddenInlineScripts?.length ?? 0) && - refresh() + $: !firstLoad && canInitializeAll($initialized?.initializedComponents, $app) && refresh() + + function canInitializeAll(initialized: string[] | undefined, app: App) { + if (app.lazyInitRequire == undefined) { + return ( + initialized?.length == + allItems(app.grid, app.subgrids).length + (app.hiddenInlineScripts?.length ?? 0) + ) + } else { + return ( + app.hiddenInlineScripts?.every((x, i) => initialized?.includes(BG_PREFIX + i)) && + app.lazyInitRequire?.every((x) => initialized?.includes(x)) + ) + } + } $: $recomputeAllContext.componentNumber = Object.values($runnableComponents).filter((x) => x.autoRefresh).length ?? 0 diff --git a/frontend/src/lib/components/apps/editor/RecomputeAllWrapper.svelte b/frontend/src/lib/components/apps/editor/RecomputeAllWrapper.svelte index 83c1fef5be..46a464d71b 100644 --- a/frontend/src/lib/components/apps/editor/RecomputeAllWrapper.svelte +++ b/frontend/src/lib/components/apps/editor/RecomputeAllWrapper.svelte @@ -1,8 +1,6 @@
-{:else} +{:else if $app.lazyInitRequire == undefined} {#each $app?.subgrids?.[subGridId] ?? [] as item} {/each} diff --git a/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte b/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte new file mode 100644 index 0000000000..0ae456e7f8 --- /dev/null +++ b/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte @@ -0,0 +1,50 @@ + + +
+ + Lazy mode is a feature that allows you to lazy render components which is ideal for apps with + many components where most are not directly visible to the user. +
+ When lazy mode is enabled, components are not rendered until they are needed. This can significantly + improve the performance of your app, especially on mobile devices. +
+ You can enable lazy mode below, but you will need to declare the list of components whose initialization + is expected to see initialized before the initial refresh of the app happens. +
+ + { + $app.lazyInitRequire = e.detail ? [] : undefined + code = JSON.stringify($app.lazyInitRequire) + }} + options={{ + right: 'Lazy mode' + }} + /> + +
+ {#if $app.lazyInitRequire} + + + {'e.g: ["a", "b"]'}, no need to put background runnables ids + + {:else} + Without lazy mode, all components' initialization will be waited on the initial refresh. + {/if} +
+
diff --git a/frontend/src/lib/components/apps/types.ts b/frontend/src/lib/components/apps/types.ts index 7debc557f1..c20fe5e561 100644 --- a/frontend/src/lib/components/apps/types.ts +++ b/frontend/src/lib/components/apps/types.ts @@ -139,13 +139,13 @@ export type HiddenRunnable = { export type AppTheme = | { - type: 'path' - path: string - } + type: 'path' + path: string + } | { - type: 'inlined' - css: string - } + type: 'inlined' + css: string + } export type App = { grid: GridItem[] @@ -162,6 +162,7 @@ export type App = { css?: Partial>> subgrids?: Record theme: AppTheme | undefined + lazyInitRequire?: string[] | undefined hideLegacyTopBar?: boolean | undefined mobileViewOnSmallerScreens?: boolean | undefined version?: number From 09950fb3fb970142c8788c10f110ad5a306e12d3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 20:41:17 +0100 Subject: [PATCH 037/667] nit lazy mode --- .../components/apps/editor/contextPanel/LazyModePanel.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte b/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte index 0ae456e7f8..f60f053fe9 100644 --- a/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte +++ b/frontend/src/lib/components/apps/editor/contextPanel/LazyModePanel.svelte @@ -25,7 +25,7 @@ { $app.lazyInitRequire = e.detail ? [] : undefined code = JSON.stringify($app.lazyInitRequire) @@ -36,7 +36,7 @@ />
- {#if $app.lazyInitRequire} + {#if $app.lazyInitRequire != undefined} {'e.g: ["a", "b"]'}, no need to put background runnables ids From 4da0fc69183630dbe7adffc0321e8e98670966a7 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 20:47:43 +0100 Subject: [PATCH 038/667] nit --- frontend/src/lib/components/apps/editor/SubGridEditor.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte index 34505f83fd..093fb41032 100644 --- a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte @@ -331,6 +331,6 @@ {:else if $app.lazyInitRequire == undefined} {#each $app?.subgrids?.[subGridId] ?? [] as item} - + {/each} {/if} From 3a490728a818a9d5f509c163115dea369661028f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 11 Feb 2025 20:47:56 +0100 Subject: [PATCH 039/667] chore(main): release 1.460.0 (#5272) * chore(main): release 1.460.0 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 14 ++ backend/Cargo.lock | 175 +++++++++++------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 135 insertions(+), 88 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dec2071f2..5624b84212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.460.0](https://github.com/windmill-labs/windmill/compare/v1.459.0...v1.460.0) (2025-02-11) + + +### Features + +* add postgres trigger captures ([#5165](https://github.com/windmill-labs/windmill/issues/5165)) ([57cfa40](https://github.com/windmill-labs/windmill/commit/57cfa4045bf9aa7c2ef625cf3b24067567466aff)) +* improve large apps performances ([#5265](https://github.com/windmill-labs/windmill/issues/5265)) ([aae3683](https://github.com/windmill-labs/windmill/commit/aae3683fe90adc0eea055238f7776b96140706bd)) +* lazy mode ([7c4b8a7](https://github.com/windmill-labs/windmill/commit/7c4b8a7e1dca870b51b60f33a352d344ef34218f)) + + +### Bug Fixes + +* Remove cache dir mount and mount only the cache executable (Rust, C#) ([#5270](https://github.com/windmill-labs/windmill/issues/5270)) ([6357ed3](https://github.com/windmill-labs/windmill/commit/6357ed3d5e1188bb92ccaf4710e526ab2ec7e874)) + ## [1.459.0](https://github.com/windmill-labs/windmill/compare/v1.458.4...v1.459.0) (2025-02-10) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 335f1a7fa5..e38bf4fb5e 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1025,7 +1025,7 @@ dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.8.3", + "miniz_oxide 0.8.4", "object", "rustc-demangle", "windows-targets 0.52.6", @@ -1474,9 +1474,9 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.12+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "72ebc2f1a417f01e1da30ef264ee86ae31d2dcd2d603ea283d3c244a883ca2a9" dependencies = [ "cc", "libc", @@ -1668,9 +1668,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.28" +version = "4.5.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" +checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" dependencies = [ "clap_builder", "clap_derive", @@ -1678,9 +1678,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.27" +version = "4.5.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" dependencies = [ "anstream", "anstyle", @@ -2776,7 +2776,7 @@ checksum = "688175eed35e7b3053ec114227894ef24786855405d8844058a48bffa997d85a" dependencies = [ "deno_core", "deno_native_certs", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "rustls-tokio-stream", "rustls-webpki 0.102.8", @@ -3345,7 +3345,7 @@ checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.8.3", + "miniz_oxide 0.8.4", ] [[package]] @@ -4302,7 +4302,7 @@ dependencies = [ "http 1.2.0", "hyper 1.6.0", "hyper-util", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -5077,7 +5077,7 @@ dependencies = [ "base64 0.22.1", "gethostname", "mail-builder", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pki-types", "smtp-proto", "tokio", @@ -5265,9 +5265,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b" dependencies = [ "adler2", ] @@ -5808,9 +5808,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.4.1+3.4.0" +version = "300.4.2+3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" dependencies = [ "cc", ] @@ -5842,13 +5842,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "opentelemetry" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "236e667b670a5cdf90c258f5a55794ec5ac5027e960c224bff8367a59e1e6426" +dependencies = [ + "futures-core", + "futures-sink", + "js-sys", + "pin-project-lite", + "thiserror 2.0.11", + "tracing", +] + [[package]] name = "opentelemetry-appender-tracing" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5feffc321035ad94088a7e5333abb4d84a8726e54a802e736ce9dd7237e85b" dependencies = [ - "opentelemetry", + "opentelemetry 0.27.1", "tracing", "tracing-core", "tracing-subscriber", @@ -5863,9 +5877,9 @@ dependencies = [ "async-trait", "futures-core", "http 1.2.0", - "opentelemetry", + "opentelemetry 0.27.1", "opentelemetry-proto", - "opentelemetry_sdk", + "opentelemetry_sdk 0.27.1", "prost", "thiserror 1.0.69", "tokio", @@ -5879,17 +5893,17 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05acbfada5ec79023c85368af14abd0b307c015e9064d249b2a950ef459a6" dependencies = [ - "opentelemetry", - "opentelemetry_sdk", + "opentelemetry 0.27.1", + "opentelemetry_sdk 0.27.1", "prost", "tonic", ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc1b6902ff63b32ef6c489e8048c5e253e2e4a803ea3ea7e783914536eb15c52" +checksum = "2fb3a2f78c2d55362cd6c313b8abedfbc0142ab3c2676822068fd2ab7d51f9b7" [[package]] name = "opentelemetry_sdk" @@ -5902,11 +5916,29 @@ dependencies = [ "futures-executor", "futures-util", "glob", - "opentelemetry", + "opentelemetry 0.27.1", "percent-encoding", "rand 0.8.5", "serde_json", "thiserror 1.0.69", +] + +[[package]] +name = "opentelemetry_sdk" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84dfad6042089c7fc1f6118b7040dc2eb4ab520abbf410b79dc481032af39570" +dependencies = [ + "async-trait", + "futures-channel", + "futures-executor", + "futures-util", + "glob", + "opentelemetry 0.28.0", + "percent-encoding", + "rand 0.8.5", + "serde_json", + "thiserror 2.0.11", "tokio", "tokio-stream", "tracing", @@ -6425,7 +6457,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.23", + "toml_edit 0.22.24", ] [[package]] @@ -6708,7 +6740,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", - "rustls 0.23.22", + "rustls 0.23.23", "socket2", "thiserror 2.0.11", "tokio", @@ -6726,7 +6758,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.1.1", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pki-types", "slab", "thiserror 2.0.11", @@ -7129,7 +7161,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -7395,9 +7427,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.22" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "log", "once_cell", @@ -7479,7 +7511,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22557157d7395bc30727745b365d923f1ecc230c4c80b176545f3f4f08c46e33" dependencies = [ "futures", - "rustls 0.23.22", + "rustls 0.23.23", "socket2", "tokio", ] @@ -7786,12 +7818,13 @@ dependencies = [ [[package]] name = "serde-aux" -version = "4.5.0" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2e8bfba469d06512e11e3311d4d051a4a387a5b42d010404fecf3200321c95" +checksum = "5290c39c5f6992b9dddbda28541d965dba46468294e6018a408fa297e6c602de" dependencies = [ "chrono", "serde", + "serde-value", "serde_json", ] @@ -8375,7 +8408,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "serde", "serde_json", @@ -9679,7 +9712,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.22", + "rustls 0.23.23", "tokio", ] @@ -9791,7 +9824,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.23", + "toml_edit 0.22.24", ] [[package]] @@ -9818,15 +9851,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.23" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap 2.7.1", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.1", + "winnow 0.7.2", ] [[package]] @@ -10056,8 +10089,8 @@ checksum = "97a971f6058498b5c0f1affa23e7ea202057a7301dbff68e968b2d578bcbd053" dependencies = [ "js-sys", "once_cell", - "opentelemetry", - "opentelemetry_sdk", + "opentelemetry 0.27.1", + "opentelemetry_sdk 0.27.1", "smallvec", "tracing", "tracing-core", @@ -10453,7 +10486,7 @@ dependencies = [ "log", "native-tls", "once_cell", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pki-types", "serde", "serde_json", @@ -10858,7 +10891,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "axum", @@ -10901,7 +10934,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "argon2", @@ -10994,7 +11027,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.458.4" +version = "1.460.0" dependencies = [ "base64 0.22.1", "chrono", @@ -11012,7 +11045,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.458.4" +version = "1.460.0" dependencies = [ "chrono", "serde", @@ -11025,7 +11058,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "serde", @@ -11039,7 +11072,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "async-stream", @@ -11066,11 +11099,11 @@ dependencies = [ "magic-crypt", "mail-send", "object_store", - "opentelemetry", + "opentelemetry 0.27.1", "opentelemetry-appender-tracing", "opentelemetry-otlp", "opentelemetry-semantic-conventions", - "opentelemetry_sdk", + "opentelemetry_sdk 0.28.0", "pin-project-lite", "prometheus", "quick_cache", @@ -11098,7 +11131,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.458.4" +version = "1.460.0" dependencies = [ "regex", "serde", @@ -11112,7 +11145,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "bytes", @@ -11135,7 +11168,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.458.4" +version = "1.460.0" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11147,7 +11180,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.458.4" +version = "1.460.0" dependencies = [ "convert_case 0.6.0", "serde", @@ -11156,7 +11189,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "lazy_static", @@ -11168,7 +11201,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "serde_json", @@ -11180,7 +11213,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "gosyn", @@ -11192,7 +11225,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "lazy_static", @@ -11204,7 +11237,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11215,7 +11248,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11226,7 +11259,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "async-recursion", @@ -11246,7 +11279,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11263,7 +11296,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "lazy_static", @@ -11275,7 +11308,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "lazy_static", @@ -11293,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11315,7 +11348,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "serde_json", @@ -11325,7 +11358,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "async-recursion", @@ -11358,7 +11391,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.458.4" +version = "1.460.0" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11368,7 +11401,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.458.4" +version = "1.460.0" dependencies = [ "anyhow", "async-recursion", @@ -11405,7 +11438,7 @@ dependencies = [ "nix", "object_store", "once_cell", - "opentelemetry", + "opentelemetry 0.27.1", "oracle", "pem 3.0.4", "postgres-native-tls 0.5.1", @@ -11652,9 +11685,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" +checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603" dependencies = [ "memchr", ] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index fe9c780d14..ba97c07be3 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.458.4" +version = "1.460.0" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.458.4" +version = "1.460.0" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index a710904334..980ac64eca 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.458.4 + version: 1.460.0 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 7221d958bb..a0985351a5 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.458.4"; +export const VERSION = "v1.460.0"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index aad1a2ec83..622cbed0bf 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.458.4"; +export const VERSION = "1.460.0"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1d4f18629b..3286a321fd 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.458.4", + "version": "1.460.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.458.4", + "version": "1.460.0", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 5f29a86923..04ea910822 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.458.4", + "version": "1.460.0", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 4808e50712..4a4e123f81 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.458.4" -wmill_pg = ">=1.458.4" +wmill = ">=1.460.0" +wmill_pg = ">=1.460.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 252d9ced7e..2b05e1695e 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.458.4 + version: 1.460.0 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 4964ae3ec4..4e67ebe729 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.458.4' + ModuleVersion = '1.460.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 03ec4e6c26..e2c95e9f4c 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.458.4" +version = "1.460.0" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 871e6fa5c4..b1d3612145 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.458.4" +version = "1.460.0" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 6d21e4d8c7..27fe399e7a 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.458.4", + "version": "1.460.0", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 5357cc3dd2..5c36777045 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.458.4", + "version": "1.460.0", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index d22eaab6f1..75369ae609 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.459.0 +1.460.0 From e92a90907f41568e4e04c932e1fbef64ab4c48a9 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 12 Feb 2025 12:11:57 +0100 Subject: [PATCH 040/667] fix: pin opentelemetry to 0.27.1 --- backend/Cargo.lock | 72 +++++++++++++--------------------------------- backend/Cargo.toml | 4 +-- 2 files changed, 22 insertions(+), 54 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index e38bf4fb5e..377df7996c 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -5842,27 +5842,13 @@ dependencies = [ "tracing", ] -[[package]] -name = "opentelemetry" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236e667b670a5cdf90c258f5a55794ec5ac5027e960c224bff8367a59e1e6426" -dependencies = [ - "futures-core", - "futures-sink", - "js-sys", - "pin-project-lite", - "thiserror 2.0.11", - "tracing", -] - [[package]] name = "opentelemetry-appender-tracing" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5feffc321035ad94088a7e5333abb4d84a8726e54a802e736ce9dd7237e85b" dependencies = [ - "opentelemetry 0.27.1", + "opentelemetry", "tracing", "tracing-core", "tracing-subscriber", @@ -5877,9 +5863,9 @@ dependencies = [ "async-trait", "futures-core", "http 1.2.0", - "opentelemetry 0.27.1", + "opentelemetry", "opentelemetry-proto", - "opentelemetry_sdk 0.27.1", + "opentelemetry_sdk", "prost", "thiserror 1.0.69", "tokio", @@ -5893,17 +5879,17 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05acbfada5ec79023c85368af14abd0b307c015e9064d249b2a950ef459a6" dependencies = [ - "opentelemetry 0.27.1", - "opentelemetry_sdk 0.27.1", + "opentelemetry", + "opentelemetry_sdk", "prost", "tonic", ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fb3a2f78c2d55362cd6c313b8abedfbc0142ab3c2676822068fd2ab7d51f9b7" +checksum = "bc1b6902ff63b32ef6c489e8048c5e253e2e4a803ea3ea7e783914536eb15c52" [[package]] name = "opentelemetry_sdk" @@ -5916,29 +5902,11 @@ dependencies = [ "futures-executor", "futures-util", "glob", - "opentelemetry 0.27.1", + "opentelemetry", "percent-encoding", "rand 0.8.5", "serde_json", "thiserror 1.0.69", -] - -[[package]] -name = "opentelemetry_sdk" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84dfad6042089c7fc1f6118b7040dc2eb4ab520abbf410b79dc481032af39570" -dependencies = [ - "async-trait", - "futures-channel", - "futures-executor", - "futures-util", - "glob", - "opentelemetry 0.28.0", - "percent-encoding", - "rand 0.8.5", - "serde_json", - "thiserror 2.0.11", "tokio", "tokio-stream", "tracing", @@ -6608,9 +6576,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", "prost-derive", @@ -6618,12 +6586,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.14.0", "proc-macro2", "quote", "syn 2.0.98", @@ -6631,9 +6599,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ "prost", ] @@ -10089,8 +10057,8 @@ checksum = "97a971f6058498b5c0f1affa23e7ea202057a7301dbff68e968b2d578bcbd053" dependencies = [ "js-sys", "once_cell", - "opentelemetry 0.27.1", - "opentelemetry_sdk 0.27.1", + "opentelemetry", + "opentelemetry_sdk", "smallvec", "tracing", "tracing-core", @@ -11099,11 +11067,11 @@ dependencies = [ "magic-crypt", "mail-send", "object_store", - "opentelemetry 0.27.1", + "opentelemetry", "opentelemetry-appender-tracing", "opentelemetry-otlp", "opentelemetry-semantic-conventions", - "opentelemetry_sdk 0.28.0", + "opentelemetry_sdk", "pin-project-lite", "prometheus", "quick_cache", @@ -11438,7 +11406,7 @@ dependencies = [ "nix", "object_store", "once_cell", - "opentelemetry 0.27.1", + "opentelemetry", "oracle", "pem 3.0.4", "postgres-native-tls 0.5.1", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index ba97c07be3..2bbb4399c1 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -315,10 +315,10 @@ async-stream = "^0" opentelemetry = "0.27.0" tracing-opentelemetry = "0.28.0" -opentelemetry_sdk = { version = "*", features = ["rt-tokio"] } +opentelemetry_sdk = { version = "0.27.1", features = ["rt-tokio"] } opentelemetry-otlp = { version = "0.27.0", features = ["grpc-tonic", "tls"] } opentelemetry-appender-tracing = "0.27.0" -opentelemetry-semantic-conventions = { version = "*", features = ["semconv_experimental"] } +opentelemetry-semantic-conventions = { version = "0.27.0", features = ["semconv_experimental"] } bollard = "0.18.1" From 55cff6d2d2de341b4ea9db5e1fca4c46fee2d107 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 12 Feb 2025 12:16:14 +0100 Subject: [PATCH 041/667] chore(main): release 1.460.1 (#5274) * chore(main): release 1.460.1 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 +++ backend/Cargo.lock | 50 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 49 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5624b84212..fc17ef924d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.460.1](https://github.com/windmill-labs/windmill/compare/v1.460.0...v1.460.1) (2025-02-12) + + +### Bug Fixes + +* pin opentelemetry to 0.27.1 ([e92a909](https://github.com/windmill-labs/windmill/commit/e92a90907f41568e4e04c932e1fbef64ab4c48a9)) + ## [1.460.0](https://github.com/windmill-labs/windmill/compare/v1.459.0...v1.460.0) (2025-02-11) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 377df7996c..a6473bff94 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -10859,7 +10859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "axum", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.460.0" +version = "1.460.1" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.460.0" +version = "1.460.1" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.460.0" +version = "1.460.1" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.460.0" +version = "1.460.1" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.460.0" +version = "1.460.1" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.460.0" +version = "1.460.1" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.460.0" +version = "1.460.1" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 2bbb4399c1..21060519be 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.460.0" +version = "1.460.1" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.460.0" +version = "1.460.1" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 980ac64eca..a34706a011 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.460.0 + version: 1.460.1 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index a0985351a5..7e4f36a358 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.460.0"; +export const VERSION = "v1.460.1"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 622cbed0bf..bd377e5168 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.460.0"; +export const VERSION = "1.460.1"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3286a321fd..6edef5b202 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.460.0", + "version": "1.460.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.460.0", + "version": "1.460.1", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 04ea910822..167351899e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.460.0", + "version": "1.460.1", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 4a4e123f81..b02c64fb49 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.460.0" -wmill_pg = ">=1.460.0" +wmill = ">=1.460.1" +wmill_pg = ">=1.460.1" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 2b05e1695e..876fc85dcc 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.460.0 + version: 1.460.1 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 4e67ebe729..4098939492 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.460.0' + ModuleVersion = '1.460.1' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index e2c95e9f4c..96c744abf6 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.460.0" +version = "1.460.1" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index b1d3612145..a2274c752b 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.460.0" +version = "1.460.1" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 27fe399e7a..705982e0f9 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.460.0", + "version": "1.460.1", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 5c36777045..2ab30279c3 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.460.0", + "version": "1.460.1", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 75369ae609..3194fbf29a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.460.0 +1.460.1 From bf206515e8653bbe431e106277b72082e0c9e388 Mon Sep 17 00:00:00 2001 From: Lucas Abel <22837557+uael@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:34:03 +0100 Subject: [PATCH 042/667] fix(backend): improve schedule queries plan to leverage indices better for performance (#5273) * backend: fix schedule queries plan * rework * fix skipped as non success * update sqlx * update * all * fix npm run check --------- Co-authored-by: Ruben Fiszel --- ...3fad4878f48db8c17c6d58590bd5df2e3350a.json | 24 - ...4210d39f405016ffec374e4b15a2528baccb5.json | 198 ------- ...34bbabdd8703bfdf4d43df2c65e50d4ca2c85.json | 40 -- ...4c9f769ffe5004871a049e4232e0092532062.json | 25 + ...36c93f43dec5df570f869580056702b7d1e09.json | 118 ----- ...53afc1f1ad354599de11ebc6e256b58543265.json | 12 + ...5708dcc4811857b7e5631f0decf5d75ef3aa3.json | 30 ++ ...15251f0b32afa2445401170d931e0fe1febb8.json | 119 ----- ...97dfd5eeda5977a8746be77c8aa65a7ec299e.json | 12 + ...e3935e9d57be68a1811ffdee904a5f56e7023.json | 118 ----- ...7a47667b6f9f3dc0d51987cce159433459ab0.json | 12 + ...d964fda13a1091a8206ee174ed3a161248126.json | 25 + ...8c6395e2440ea27553b7ccb18d7149b106728.json | 12 + ...89569fe5666e36ca2650dabd9b494dc30f435.json | 12 + ...044812f8103498080a24246063e06b0ebfccf.json | 106 ---- ...2a540f1d147948e1b1a7523b21151ffa22305.json | 38 -- ...fe682b023d1868a182b7cac16ce799433c257.json | 25 - ...b1bf1f70e17486a9d315db130852d5e325200.json | 12 + ...6f8377ec190669e2e22f8d511871d6fbe07b8.json | 38 -- ...97d0a03f6c26f0b14fc92900f7600e70a7a8b.json | 26 + ...dde4395ab6ef1181237a886fa398dcfa0b589.json | 130 ----- ...a6854a34a99d2bf107feaafc499588f7330a0.json | 12 + ...587d8cad3b67d4dfa9de52777d4ea9490b6b7.json | 15 - ...2529d57faf5e77f6792d5bda608ff9658d7c9.json | 24 - ...4efe29311aabfba6e09efa10bab6a551d658b.json | 16 - ...1717ffa5e01250020cfb24e4bad276397dee2.json | 106 ---- ...aabefe718829fb6eae2f681c4c8328acc94b2.json | 46 -- ...cb3c037309f09e84acbb7945a0466d6e9f576.json | 12 + ...bd41c7b823186ac056a0a676da85dc5d9a027.json | 24 - ...cf0b385bff14faab495e049f2029790f76d25.json | 12 + ...80e111a159a749728ce5363100cf883bdf02a.json | 12 + ...09b246b6f84e49c659bc8e2c7b66cfec6d976.json | 38 ++ ...34b976cbe0280e7215862aaf5ef445663793d.json | 12 + ...f3741b9782d8e2d4b6ff6c104fdcac5f58323.json | 12 + ...b6a09259fedca329d790c34e58703bf26f34c.json | 64 --- ...2c86a69b7b7378333322a57856f8e43c6cd77.json | 12 + ...50205131517_v2_skipped_is_success.down.sql | 1 + ...0250205131517_v2_skipped_is_success.up.sql | 42 ++ backend/windmill-api/src/db.rs | 75 +++ backend/windmill-api/src/schedule.rs | 71 +-- backend/windmill-queue/src/jobs.rs | 31 +- backend/windmill-queue/src/schedule.rs | 18 +- backend/windmill-worker/src/common.rs | 3 +- backend/windmill-worker/src/worker_flow.rs | 19 +- .../apps/editor/SubGridEditor.svelte | 2 +- .../(root)/(logged)/schedules/+page.svelte | 495 +++++++++--------- 46 files changed, 757 insertions(+), 1549 deletions(-) delete mode 100644 backend/.sqlx/query-01e92a4ba3074f1dce6ec98bc6c3fad4878f48db8c17c6d58590bd5df2e3350a.json delete mode 100644 backend/.sqlx/query-099894523449a70eb301ecd1d744210d39f405016ffec374e4b15a2528baccb5.json delete mode 100644 backend/.sqlx/query-199a76c04e3f0891ad09af27b9534bbabdd8703bfdf4d43df2c65e50d4ca2c85.json create mode 100644 backend/.sqlx/query-3a47d8ec0f4ba1644951f0c88504c9f769ffe5004871a049e4232e0092532062.json delete mode 100644 backend/.sqlx/query-3d0f036a3176dcc787bef3f10a336c93f43dec5df570f869580056702b7d1e09.json create mode 100644 backend/.sqlx/query-42177e249794a4b7b945b93efd853afc1f1ad354599de11ebc6e256b58543265.json create mode 100644 backend/.sqlx/query-430ea56dea72c7d326735952bf85708dcc4811857b7e5631f0decf5d75ef3aa3.json delete mode 100644 backend/.sqlx/query-4331bb1a3559f56c1ee91916b7f15251f0b32afa2445401170d931e0fe1febb8.json create mode 100644 backend/.sqlx/query-4d3bbcc029ec0926bf97de4b5ef97dfd5eeda5977a8746be77c8aa65a7ec299e.json delete mode 100644 backend/.sqlx/query-59368ac2d4e0918c7ee4275a0b1e3935e9d57be68a1811ffdee904a5f56e7023.json create mode 100644 backend/.sqlx/query-608393951c85d9e721b506d2f6a7a47667b6f9f3dc0d51987cce159433459ab0.json create mode 100644 backend/.sqlx/query-6513c1433dbfe03f7c778963a05d964fda13a1091a8206ee174ed3a161248126.json create mode 100644 backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json create mode 100644 backend/.sqlx/query-74754b03304a69391d61560848e89569fe5666e36ca2650dabd9b494dc30f435.json delete mode 100644 backend/.sqlx/query-7f6649b177f4ec948e396e179ea044812f8103498080a24246063e06b0ebfccf.json delete mode 100644 backend/.sqlx/query-830297547ea33969f96a5c4c2b82a540f1d147948e1b1a7523b21151ffa22305.json delete mode 100644 backend/.sqlx/query-833a4ecec12dfe67f28016a135ffe682b023d1868a182b7cac16ce799433c257.json create mode 100644 backend/.sqlx/query-85181656012b18cd26998128c30b1bf1f70e17486a9d315db130852d5e325200.json delete mode 100644 backend/.sqlx/query-86cc1e3c18e936a700d8842a51a6f8377ec190669e2e22f8d511871d6fbe07b8.json create mode 100644 backend/.sqlx/query-910b9b8afb3df5e437e43ff4adc97d0a03f6c26f0b14fc92900f7600e70a7a8b.json delete mode 100644 backend/.sqlx/query-91878f06c6e27d864bd50d8cd4adde4395ab6ef1181237a886fa398dcfa0b589.json create mode 100644 backend/.sqlx/query-93586f1ffc7b8dbe62b21a21acfa6854a34a99d2bf107feaafc499588f7330a0.json delete mode 100644 backend/.sqlx/query-95e420b60fba20b36b2c6675998587d8cad3b67d4dfa9de52777d4ea9490b6b7.json delete mode 100644 backend/.sqlx/query-9e7e6fe1dfba032e586f64531e12529d57faf5e77f6792d5bda608ff9658d7c9.json delete mode 100644 backend/.sqlx/query-a6c168c60bc8c42f70b18565e824efe29311aabfba6e09efa10bab6a551d658b.json delete mode 100644 backend/.sqlx/query-a79b1d0884c02f92fd40b23c6181717ffa5e01250020cfb24e4bad276397dee2.json delete mode 100644 backend/.sqlx/query-ca5f42cb0e368d0817461600152aabefe718829fb6eae2f681c4c8328acc94b2.json create mode 100644 backend/.sqlx/query-cb5a8545ea140ed69c7b70d8c08cb3c037309f09e84acbb7945a0466d6e9f576.json delete mode 100644 backend/.sqlx/query-d6c8f4e49cf7b6db5c979c88e02bd41c7b823186ac056a0a676da85dc5d9a027.json create mode 100644 backend/.sqlx/query-d949e8b91fbdf4c50c1c2cbc608cf0b385bff14faab495e049f2029790f76d25.json create mode 100644 backend/.sqlx/query-e00144305b880cca3994b53c4a080e111a159a749728ce5363100cf883bdf02a.json create mode 100644 backend/.sqlx/query-e6a8ddfd74ebab55ede5989fd7d09b246b6f84e49c659bc8e2c7b66cfec6d976.json create mode 100644 backend/.sqlx/query-e9038a6fcfd8bdf4855c5919ce634b976cbe0280e7215862aaf5ef445663793d.json create mode 100644 backend/.sqlx/query-ebfd39f168722701fb63cd37aaef3741b9782d8e2d4b6ff6c104fdcac5f58323.json delete mode 100644 backend/.sqlx/query-f96dd1dd944506c07ad58d178e9b6a09259fedca329d790c34e58703bf26f34c.json create mode 100644 backend/.sqlx/query-fa94a9ee5514f6808d3813394e62c86a69b7b7378333322a57856f8e43c6cd77.json create mode 100644 backend/migrations/20250205131517_v2_skipped_is_success.down.sql create mode 100644 backend/migrations/20250205131517_v2_skipped_is_success.up.sql diff --git a/backend/.sqlx/query-01e92a4ba3074f1dce6ec98bc6c3fad4878f48db8c17c6d58590bd5df2e3350a.json b/backend/.sqlx/query-01e92a4ba3074f1dce6ec98bc6c3fad4878f48db8c17c6d58590bd5df2e3350a.json deleted file mode 100644 index a6f202a16f..0000000000 --- a/backend/.sqlx/query-01e92a4ba3074f1dce6ec98bc6c3fad4878f48db8c17c6d58590bd5df2e3350a.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE postgres_trigger \n SET \n server_id = $1, \n last_server_ping = now(),\n error = 'Connecting...'\n WHERE \n enabled IS TRUE \n AND workspace_id = $2 \n AND path = $3 \n AND (last_server_ping IS NULL \n OR last_server_ping < now() - INTERVAL '15 seconds'\n ) \n RETURNING true\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Varchar", - "Text", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "01e92a4ba3074f1dce6ec98bc6c3fad4878f48db8c17c6d58590bd5df2e3350a" -} diff --git a/backend/.sqlx/query-099894523449a70eb301ecd1d744210d39f405016ffec374e4b15a2528baccb5.json b/backend/.sqlx/query-099894523449a70eb301ecd1d744210d39f405016ffec374e4b15a2528baccb5.json deleted file mode 100644 index 8a4a9b9c20..0000000000 --- a/backend/.sqlx/query-099894523449a70eb301ecd1d744210d39f405016ffec374e4b15a2528baccb5.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT schedule.*, t.jobs FROM schedule, LATERAL ( SELECT ARRAY (SELECT json_build_object('id', id, 'success', success, 'duration_ms', duration_ms) FROM v2_as_completed_job WHERE\n v2_as_completed_job.schedule_path = schedule.path AND v2_as_completed_job.workspace_id = $1 AND parent_job IS NULL AND is_skipped = False ORDER BY started_at DESC LIMIT 20) AS jobs ) t\n WHERE schedule.workspace_id = $1 ORDER BY schedule.edited_at desc LIMIT $2 OFFSET $3", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 4, - "name": "schedule", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "enabled", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "args", - "type_info": "Jsonb" - }, - { - "ordinal": 8, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 9, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 10, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 11, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 12, - "name": "timezone", - "type_info": "Varchar" - }, - { - "ordinal": 13, - "name": "on_failure", - "type_info": "Varchar" - }, - { - "ordinal": 14, - "name": "on_recovery", - "type_info": "Varchar" - }, - { - "ordinal": 15, - "name": "on_failure_times", - "type_info": "Int4" - }, - { - "ordinal": 16, - "name": "on_failure_exact", - "type_info": "Bool" - }, - { - "ordinal": 17, - "name": "on_failure_extra_args", - "type_info": "Json" - }, - { - "ordinal": 18, - "name": "on_recovery_times", - "type_info": "Int4" - }, - { - "ordinal": 19, - "name": "on_recovery_extra_args", - "type_info": "Json" - }, - { - "ordinal": 20, - "name": "ws_error_handler_muted", - "type_info": "Bool" - }, - { - "ordinal": 21, - "name": "retry", - "type_info": "Jsonb" - }, - { - "ordinal": 22, - "name": "summary", - "type_info": "Varchar" - }, - { - "ordinal": 23, - "name": "no_flow_overlap", - "type_info": "Bool" - }, - { - "ordinal": 24, - "name": "tag", - "type_info": "Varchar" - }, - { - "ordinal": 25, - "name": "paused_until", - "type_info": "Timestamptz" - }, - { - "ordinal": 26, - "name": "on_success", - "type_info": "Varchar" - }, - { - "ordinal": 27, - "name": "on_success_extra_args", - "type_info": "Json" - }, - { - "ordinal": 28, - "name": "cron_version", - "type_info": "Text" - }, - { - "ordinal": 29, - "name": "jobs", - "type_info": "JsonArray" - } - ], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - true, - false, - true, - true, - true, - true, - true, - true, - true, - false, - true, - true, - false, - true, - true, - true, - true, - true, - null - ] - }, - "hash": "099894523449a70eb301ecd1d744210d39f405016ffec374e4b15a2528baccb5" -} diff --git a/backend/.sqlx/query-199a76c04e3f0891ad09af27b9534bbabdd8703bfdf4d43df2c65e50d4ca2c85.json b/backend/.sqlx/query-199a76c04e3f0891ad09af27b9534bbabdd8703bfdf4d43df2c65e50d4ca2c85.json deleted file mode 100644 index 7dfa56ad40..0000000000 --- a/backend/.sqlx/query-199a76c04e3f0891ad09af27b9534bbabdd8703bfdf4d43df2c65e50d4ca2c85.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n schemaname AS schema_name,\n tablename AS table_name,\n attnames AS columns,\n rowfilter AS where_clause\n FROM\n pg_publication_tables\n WHERE\n pubname = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "schema_name", - "type_info": "Name" - }, - { - "ordinal": 1, - "name": "table_name", - "type_info": "Name" - }, - { - "ordinal": 2, - "name": "columns", - "type_info": "NameArray" - }, - { - "ordinal": 3, - "name": "where_clause", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Name" - ] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "199a76c04e3f0891ad09af27b9534bbabdd8703bfdf4d43df2c65e50d4ca2c85" -} diff --git a/backend/.sqlx/query-3a47d8ec0f4ba1644951f0c88504c9f769ffe5004871a049e4232e0092532062.json b/backend/.sqlx/query-3a47d8ec0f4ba1644951f0c88504c9f769ffe5004871a049e4232e0092532062.json new file mode 100644 index 0000000000..a07fcd57db --- /dev/null +++ b/backend/.sqlx/query-3a47d8ec0f4ba1644951f0c88504c9f769ffe5004871a049e4232e0092532062.json @@ -0,0 +1,25 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT EXISTS (\n SELECT 1 FROM v2_job j JOIN v2_job_queue USING (id)\n WHERE j.workspace_id = $1 AND trigger_kind = 'schedule' AND trigger = $2 AND runnable_path = $4\n AND parent_job IS NULL\n AND scheduled_for = $3\n )", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Timestamptz", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "3a47d8ec0f4ba1644951f0c88504c9f769ffe5004871a049e4232e0092532062" +} diff --git a/backend/.sqlx/query-3d0f036a3176dcc787bef3f10a336c93f43dec5df570f869580056702b7d1e09.json b/backend/.sqlx/query-3d0f036a3176dcc787bef3f10a336c93f43dec5df570f869580056702b7d1e09.json deleted file mode 100644 index 4356a016c0..0000000000 --- a/backend/.sqlx/query-3d0f036a3176dcc787bef3f10a336c93f43dec5df570f869580056702b7d1e09.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT workspace_id, path, url, script_path, is_flow, edited_by, email, edited_at, server_id, last_server_ping, extra_perms, error, enabled, filters as \"filters: _\", initial_messages as \"initial_messages: _\", url_runnable_args as \"url_runnable_args: _\", can_return_message FROM websocket_trigger\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "url", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 4, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 5, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 6, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 8, - "name": "server_id", - "type_info": "Varchar" - }, - { - "ordinal": 9, - "name": "last_server_ping", - "type_info": "Timestamptz" - }, - { - "ordinal": 10, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 11, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 12, - "name": "enabled", - "type_info": "Bool" - }, - { - "ordinal": 13, - "name": "filters: _", - "type_info": "JsonbArray" - }, - { - "ordinal": 14, - "name": "initial_messages: _", - "type_info": "JsonbArray" - }, - { - "ordinal": 15, - "name": "url_runnable_args: _", - "type_info": "Jsonb" - }, - { - "ordinal": 16, - "name": "can_return_message", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - false, - true, - false, - false, - true, - true, - false - ] - }, - "hash": "3d0f036a3176dcc787bef3f10a336c93f43dec5df570f869580056702b7d1e09" -} diff --git a/backend/.sqlx/query-42177e249794a4b7b945b93efd853afc1f1ad354599de11ebc6e256b58543265.json b/backend/.sqlx/query-42177e249794a4b7b945b93efd853afc1f1ad354599de11ebc6e256b58543265.json new file mode 100644 index 0000000000..71171ad831 --- /dev/null +++ b/backend/.sqlx/query-42177e249794a4b7b945b93efd853afc1f1ad354599de11ebc6e256b58543265.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_6", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "42177e249794a4b7b945b93efd853afc1f1ad354599de11ebc6e256b58543265" +} diff --git a/backend/.sqlx/query-430ea56dea72c7d326735952bf85708dcc4811857b7e5631f0decf5d75ef3aa3.json b/backend/.sqlx/query-430ea56dea72c7d326735952bf85708dcc4811857b7e5631f0decf5d75ef3aa3.json new file mode 100644 index 0000000000..660b5cb402 --- /dev/null +++ b/backend/.sqlx/query-430ea56dea72c7d326735952bf85708dcc4811857b7e5631f0decf5d75ef3aa3.json @@ -0,0 +1,30 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT\n schedule.path, t.jobs FROM schedule,\n LATERAL(SELECT ARRAY(\n SELECT json_build_object('id', id, 'success', status = 'success', 'duration_ms', duration_ms)\n FROM v2_job_completed c JOIN v2_job j USING (id)\n WHERE trigger_kind = 'schedule'\n AND trigger = schedule.path\n AND c.workspace_id = $1\n AND j.workspace_id = $1\n AND parent_job IS NULL AND runnable_path = schedule.script_path\n AND status <> 'skipped'\n ORDER BY created_at DESC\n LIMIT 20\n ) AS jobs) t\n WHERE workspace_id = $1\n ORDER BY edited_at DESC\n LIMIT $2 OFFSET $3", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "path", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "jobs", + "type_info": "JsonArray" + } + ], + "parameters": { + "Left": [ + "Text", + "Int8", + "Int8" + ] + }, + "nullable": [ + false, + null + ] + }, + "hash": "430ea56dea72c7d326735952bf85708dcc4811857b7e5631f0decf5d75ef3aa3" +} diff --git a/backend/.sqlx/query-4331bb1a3559f56c1ee91916b7f15251f0b32afa2445401170d931e0fe1febb8.json b/backend/.sqlx/query-4331bb1a3559f56c1ee91916b7f15251f0b32afa2445401170d931e0fe1febb8.json deleted file mode 100644 index d2648d4230..0000000000 --- a/backend/.sqlx/query-4331bb1a3559f56c1ee91916b7f15251f0b32afa2445401170d931e0fe1febb8.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT workspace_id, path, route_path, route_path_key, script_path, is_flow, edited_by, edited_at, email, extra_perms, is_async, requires_auth, http_method as \"http_method: _\", static_asset_config as \"static_asset_config: _\", is_static_website FROM http_trigger\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "route_path", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "route_path_key", - "type_info": "Varchar" - }, - { - "ordinal": 4, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 8, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 9, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 10, - "name": "is_async", - "type_info": "Bool" - }, - { - "ordinal": 11, - "name": "requires_auth", - "type_info": "Bool" - }, - { - "ordinal": 12, - "name": "http_method: _", - "type_info": { - "Custom": { - "name": "http_method", - "kind": { - "Enum": [ - "get", - "post", - "put", - "delete", - "patch" - ] - } - } - } - }, - { - "ordinal": 13, - "name": "static_asset_config: _", - "type_info": "Jsonb" - }, - { - "ordinal": 14, - "name": "is_static_website", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false - ] - }, - "hash": "4331bb1a3559f56c1ee91916b7f15251f0b32afa2445401170d931e0fe1febb8" -} diff --git a/backend/.sqlx/query-4d3bbcc029ec0926bf97de4b5ef97dfd5eeda5977a8746be77c8aa65a7ec299e.json b/backend/.sqlx/query-4d3bbcc029ec0926bf97de4b5ef97dfd5eeda5977a8746be77c8aa65a7ec299e.json new file mode 100644 index 0000000000..4c983c95a3 --- /dev/null +++ b/backend/.sqlx/query-4d3bbcc029ec0926bf97de4b5ef97dfd5eeda5977a8746be77c8aa65a7ec299e.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS concurrency_limit_stats_completed_job", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "4d3bbcc029ec0926bf97de4b5ef97dfd5eeda5977a8746be77c8aa65a7ec299e" +} diff --git a/backend/.sqlx/query-59368ac2d4e0918c7ee4275a0b1e3935e9d57be68a1811ffdee904a5f56e7023.json b/backend/.sqlx/query-59368ac2d4e0918c7ee4275a0b1e3935e9d57be68a1811ffdee904a5f56e7023.json deleted file mode 100644 index d1e0d20596..0000000000 --- a/backend/.sqlx/query-59368ac2d4e0918c7ee4275a0b1e3935e9d57be68a1811ffdee904a5f56e7023.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT * FROM nats_trigger\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "nats_resource_path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "subjects", - "type_info": "VarcharArray" - }, - { - "ordinal": 3, - "name": "stream_name", - "type_info": "Varchar" - }, - { - "ordinal": 4, - "name": "consumer_name", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "use_jetstream", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 8, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 9, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 10, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 11, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 12, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 13, - "name": "server_id", - "type_info": "Varchar" - }, - { - "ordinal": 14, - "name": "last_server_ping", - "type_info": "Timestamptz" - }, - { - "ordinal": 15, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 16, - "name": "enabled", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false - ] - }, - "hash": "59368ac2d4e0918c7ee4275a0b1e3935e9d57be68a1811ffdee904a5f56e7023" -} diff --git a/backend/.sqlx/query-608393951c85d9e721b506d2f6a7a47667b6f9f3dc0d51987cce159433459ab0.json b/backend/.sqlx/query-608393951c85d9e721b506d2f6a7a47667b6f9f3dc0d51987cce159433459ab0.json new file mode 100644 index 0000000000..2808d96d51 --- /dev/null +++ b/backend/.sqlx/query-608393951c85d9e721b506d2f6a7a47667b6f9f3dc0d51987cce159433459ab0.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_started_at_new", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "608393951c85d9e721b506d2f6a7a47667b6f9f3dc0d51987cce159433459ab0" +} diff --git a/backend/.sqlx/query-6513c1433dbfe03f7c778963a05d964fda13a1091a8206ee174ed3a161248126.json b/backend/.sqlx/query-6513c1433dbfe03f7c778963a05d964fda13a1091a8206ee174ed3a161248126.json new file mode 100644 index 0000000000..e50d2f1154 --- /dev/null +++ b/backend/.sqlx/query-6513c1433dbfe03f7c778963a05d964fda13a1091a8206ee174ed3a161248126.json @@ -0,0 +1,25 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id\n FROM v2_job j JOIN v2_job_queue USING (id)\n WHERE j.workspace_id = $2 AND trigger_kind = 'schedule' AND trigger = $1 AND runnable_path = $4\n AND parent_job IS NULL\n AND j.id != $3\n AND running = true", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Uuid" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Uuid", + "Text" + ] + }, + "nullable": [ + false + ] + }, + "hash": "6513c1433dbfe03f7c778963a05d964fda13a1091a8206ee174ed3a161248126" +} diff --git a/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json b/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json new file mode 100644 index 0000000000..fce1c4942a --- /dev/null +++ b/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728" +} diff --git a/backend/.sqlx/query-74754b03304a69391d61560848e89569fe5666e36ca2650dabd9b494dc30f435.json b/backend/.sqlx/query-74754b03304a69391d61560848e89569fe5666e36ca2650dabd9b494dc30f435.json new file mode 100644 index 0000000000..50372c7cc6 --- /dev/null +++ b/backend/.sqlx/query-74754b03304a69391d61560848e89569fe5666e36ca2650dabd9b494dc30f435.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_2", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "74754b03304a69391d61560848e89569fe5666e36ca2650dabd9b494dc30f435" +} diff --git a/backend/.sqlx/query-7f6649b177f4ec948e396e179ea044812f8103498080a24246063e06b0ebfccf.json b/backend/.sqlx/query-7f6649b177f4ec948e396e179ea044812f8103498080a24246063e06b0ebfccf.json deleted file mode 100644 index 6c4a2a910f..0000000000 --- a/backend/.sqlx/query-7f6649b177f4ec948e396e179ea044812f8103498080a24246063e06b0ebfccf.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT * FROM postgres_trigger\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 3, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 4, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 6, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 7, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 8, - "name": "postgres_resource_path", - "type_info": "Varchar" - }, - { - "ordinal": 9, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 10, - "name": "server_id", - "type_info": "Varchar" - }, - { - "ordinal": 11, - "name": "last_server_ping", - "type_info": "Timestamptz" - }, - { - "ordinal": 12, - "name": "replication_slot_name", - "type_info": "Varchar" - }, - { - "ordinal": 13, - "name": "publication_name", - "type_info": "Varchar" - }, - { - "ordinal": 14, - "name": "enabled", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - true, - false, - true, - true, - true, - false, - false, - false - ] - }, - "hash": "7f6649b177f4ec948e396e179ea044812f8103498080a24246063e06b0ebfccf" -} diff --git a/backend/.sqlx/query-830297547ea33969f96a5c4c2b82a540f1d147948e1b1a7523b21151ffa22305.json b/backend/.sqlx/query-830297547ea33969f96a5c4c2b82a540f1d147948e1b1a7523b21151ffa22305.json deleted file mode 100644 index 2e67b21966..0000000000 --- a/backend/.sqlx/query-830297547ea33969f96a5c4c2b82a540f1d147948e1b1a7523b21151ffa22305.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n success AS \"success!\",\n result AS \"result: Json>\",\n started_at AS \"started_at!\"FROM v2_as_completed_job WHERE workspace_id = $1 AND schedule_path = $2 AND script_path = $3 AND id != $4\n ORDER BY created_at DESC\n LIMIT $5", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "result: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "started_at!", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Uuid", - "Int8" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "830297547ea33969f96a5c4c2b82a540f1d147948e1b1a7523b21151ffa22305" -} diff --git a/backend/.sqlx/query-833a4ecec12dfe67f28016a135ffe682b023d1868a182b7cac16ce799433c257.json b/backend/.sqlx/query-833a4ecec12dfe67f28016a135ffe682b023d1868a182b7cac16ce799433c257.json deleted file mode 100644 index 44653c2265..0000000000 --- a/backend/.sqlx/query-833a4ecec12dfe67f28016a135ffe682b023d1868a182b7cac16ce799433c257.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE \n postgres_trigger\n SET \n last_server_ping = now(),\n error = $1\n WHERE\n workspace_id = $2\n AND path = $3\n AND server_id = $4 \n AND enabled IS TRUE\n RETURNING 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "?column?", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Text" - ] - }, - "nullable": [ - null - ] - }, - "hash": "833a4ecec12dfe67f28016a135ffe682b023d1868a182b7cac16ce799433c257" -} diff --git a/backend/.sqlx/query-85181656012b18cd26998128c30b1bf1f70e17486a9d315db130852d5e325200.json b/backend/.sqlx/query-85181656012b18cd26998128c30b1bf1f70e17486a9d315db130852d5e325200.json new file mode 100644 index 0000000000..98238638c1 --- /dev/null +++ b/backend/.sqlx/query-85181656012b18cd26998128c30b1bf1f70e17486a9d315db130852d5e325200.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_3", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "85181656012b18cd26998128c30b1bf1f70e17486a9d315db130852d5e325200" +} diff --git a/backend/.sqlx/query-86cc1e3c18e936a700d8842a51a6f8377ec190669e2e22f8d511871d6fbe07b8.json b/backend/.sqlx/query-86cc1e3c18e936a700d8842a51a6f8377ec190669e2e22f8d511871d6fbe07b8.json deleted file mode 100644 index 47b30f2895..0000000000 --- a/backend/.sqlx/query-86cc1e3c18e936a700d8842a51a6f8377ec190669e2e22f8d511871d6fbe07b8.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n success AS \"success!\",\n result AS \"result: Json>\",\n started_at AS \"started_at!\"\n FROM v2_as_completed_job\n WHERE workspace_id = $1 AND schedule_path = $2 AND script_path = $3 AND id != $4\n ORDER BY created_at DESC\n LIMIT $5", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "success!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "result: Json>", - "type_info": "Jsonb" - }, - { - "ordinal": 2, - "name": "started_at!", - "type_info": "Timestamptz" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Uuid", - "Int8" - ] - }, - "nullable": [ - true, - true, - true - ] - }, - "hash": "86cc1e3c18e936a700d8842a51a6f8377ec190669e2e22f8d511871d6fbe07b8" -} diff --git a/backend/.sqlx/query-910b9b8afb3df5e437e43ff4adc97d0a03f6c26f0b14fc92900f7600e70a7a8b.json b/backend/.sqlx/query-910b9b8afb3df5e437e43ff4adc97d0a03f6c26f0b14fc92900f7600e70a7a8b.json new file mode 100644 index 0000000000..569a5122ba --- /dev/null +++ b/backend/.sqlx/query-910b9b8afb3df5e437e43ff4adc97d0a03f6c26f0b14fc92900f7600e70a7a8b.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT status = 'success' AS \"success!\"\n FROM v2_job j JOIN v2_job_completed USING (id)\n WHERE j.workspace_id = $1 AND trigger_kind = 'schedule' AND trigger = $2\n AND parent_job IS NULL\n AND runnable_path = $3\n AND j.id != $4\n ORDER BY created_at DESC\n LIMIT $5", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "success!", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Uuid", + "Int8" + ] + }, + "nullable": [ + null + ] + }, + "hash": "910b9b8afb3df5e437e43ff4adc97d0a03f6c26f0b14fc92900f7600e70a7a8b" +} diff --git a/backend/.sqlx/query-91878f06c6e27d864bd50d8cd4adde4395ab6ef1181237a886fa398dcfa0b589.json b/backend/.sqlx/query-91878f06c6e27d864bd50d8cd4adde4395ab6ef1181237a886fa398dcfa0b589.json deleted file mode 100644 index 91492c037b..0000000000 --- a/backend/.sqlx/query-91878f06c6e27d864bd50d8cd4adde4395ab6ef1181237a886fa398dcfa0b589.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n -- slack_team_id, \n -- slack_name, \n -- slack_command_script, \n -- CASE WHEN slack_email = 'missing@email.xyz' THEN NULL ELSE slack_email END AS slack_email,\n auto_invite_domain IS NOT NULL AS \"auto_invite_enabled!\",\n CASE WHEN auto_invite_operator IS TRUE THEN 'operator' ELSE 'developer' END AS \"auto_invite_as!\", \n CASE WHEN auto_add IS TRUE THEN 'add' ELSE 'invite' END AS \"auto_invite_mode!\", \n webhook, \n deploy_to, \n error_handler, \n ai_resource, \n ai_models,\n code_completion_model,\n error_handler_extra_args, \n error_handler_muted_on_cancel, \n large_file_storage, \n git_sync,\n default_app,\n default_scripts,\n workspace.name,\n mute_critical_alerts,\n color,\n operator_settings\n FROM workspace_settings\n LEFT JOIN workspace ON workspace.id = workspace_settings.workspace_id\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "auto_invite_enabled!", - "type_info": "Bool" - }, - { - "ordinal": 1, - "name": "auto_invite_as!", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "auto_invite_mode!", - "type_info": "Text" - }, - { - "ordinal": 3, - "name": "webhook", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "deploy_to", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "error_handler", - "type_info": "Varchar" - }, - { - "ordinal": 6, - "name": "ai_resource", - "type_info": "Jsonb" - }, - { - "ordinal": 7, - "name": "ai_models", - "type_info": "VarcharArray" - }, - { - "ordinal": 8, - "name": "code_completion_model", - "type_info": "Varchar" - }, - { - "ordinal": 9, - "name": "error_handler_extra_args", - "type_info": "Json" - }, - { - "ordinal": 10, - "name": "error_handler_muted_on_cancel", - "type_info": "Bool" - }, - { - "ordinal": 11, - "name": "large_file_storage", - "type_info": "Jsonb" - }, - { - "ordinal": 12, - "name": "git_sync", - "type_info": "Jsonb" - }, - { - "ordinal": 13, - "name": "default_app", - "type_info": "Varchar" - }, - { - "ordinal": 14, - "name": "default_scripts", - "type_info": "Jsonb" - }, - { - "ordinal": 15, - "name": "name", - "type_info": "Varchar" - }, - { - "ordinal": 16, - "name": "mute_critical_alerts", - "type_info": "Bool" - }, - { - "ordinal": 17, - "name": "color", - "type_info": "Varchar" - }, - { - "ordinal": 18, - "name": "operator_settings", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - null, - null, - null, - true, - true, - true, - true, - false, - true, - true, - false, - true, - true, - true, - true, - false, - true, - true, - true - ] - }, - "hash": "91878f06c6e27d864bd50d8cd4adde4395ab6ef1181237a886fa398dcfa0b589" -} diff --git a/backend/.sqlx/query-93586f1ffc7b8dbe62b21a21acfa6854a34a99d2bf107feaafc499588f7330a0.json b/backend/.sqlx/query-93586f1ffc7b8dbe62b21a21acfa6854a34a99d2bf107feaafc499588f7330a0.json new file mode 100644 index 0000000000..b4e244e16d --- /dev/null +++ b/backend/.sqlx/query-93586f1ffc7b8dbe62b21a21acfa6854a34a99d2bf107feaafc499588f7330a0.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS scheduled_root_job", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "93586f1ffc7b8dbe62b21a21acfa6854a34a99d2bf107feaafc499588f7330a0" +} diff --git a/backend/.sqlx/query-95e420b60fba20b36b2c6675998587d8cad3b67d4dfa9de52777d4ea9490b6b7.json b/backend/.sqlx/query-95e420b60fba20b36b2c6675998587d8cad3b67d4dfa9de52777d4ea9490b6b7.json deleted file mode 100644 index 74f7f38890..0000000000 --- a/backend/.sqlx/query-95e420b60fba20b36b2c6675998587d8cad3b67d4dfa9de52777d4ea9490b6b7.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE \n postgres_trigger \n SET\n last_server_ping = NULL \n WHERE \n workspace_id = $1 \n AND path = $2 \n AND server_id IS NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "95e420b60fba20b36b2c6675998587d8cad3b67d4dfa9de52777d4ea9490b6b7" -} diff --git a/backend/.sqlx/query-9e7e6fe1dfba032e586f64531e12529d57faf5e77f6792d5bda608ff9658d7c9.json b/backend/.sqlx/query-9e7e6fe1dfba032e586f64531e12529d57faf5e77f6792d5bda608ff9658d7c9.json deleted file mode 100644 index 2ee7a1acef..0000000000 --- a/backend/.sqlx/query-9e7e6fe1dfba032e586f64531e12529d57faf5e77f6792d5bda608ff9658d7c9.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT EXISTS (SELECT 1 FROM v2_as_queue WHERE workspace_id = $1 AND schedule_path = $2 AND scheduled_for = $3)", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "exists", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Timestamptz" - ] - }, - "nullable": [ - null - ] - }, - "hash": "9e7e6fe1dfba032e586f64531e12529d57faf5e77f6792d5bda608ff9658d7c9" -} diff --git a/backend/.sqlx/query-a6c168c60bc8c42f70b18565e824efe29311aabfba6e09efa10bab6a551d658b.json b/backend/.sqlx/query-a6c168c60bc8c42f70b18565e824efe29311aabfba6e09efa10bab6a551d658b.json deleted file mode 100644 index ce9457cc6a..0000000000 --- a/backend/.sqlx/query-a6c168c60bc8c42f70b18565e824efe29311aabfba6e09efa10bab6a551d658b.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE postgres_trigger SET enabled = FALSE, error = $1, server_id = NULL, last_server_ping = NULL WHERE workspace_id = $2 AND path = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "a6c168c60bc8c42f70b18565e824efe29311aabfba6e09efa10bab6a551d658b" -} diff --git a/backend/.sqlx/query-a79b1d0884c02f92fd40b23c6181717ffa5e01250020cfb24e4bad276397dee2.json b/backend/.sqlx/query-a79b1d0884c02f92fd40b23c6181717ffa5e01250020cfb24e4bad276397dee2.json deleted file mode 100644 index 659dedc8cf..0000000000 --- a/backend/.sqlx/query-a79b1d0884c02f92fd40b23c6181717ffa5e01250020cfb24e4bad276397dee2.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT * FROM kafka_trigger\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "path", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "kafka_resource_path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "topics", - "type_info": "VarcharArray" - }, - { - "ordinal": 3, - "name": "group_id", - "type_info": "Varchar" - }, - { - "ordinal": 4, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 5, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 7, - "name": "edited_by", - "type_info": "Varchar" - }, - { - "ordinal": 8, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 9, - "name": "edited_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 10, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 11, - "name": "server_id", - "type_info": "Varchar" - }, - { - "ordinal": 12, - "name": "last_server_ping", - "type_info": "Timestamptz" - }, - { - "ordinal": 13, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 14, - "name": "enabled", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false - ] - }, - "hash": "a79b1d0884c02f92fd40b23c6181717ffa5e01250020cfb24e4bad276397dee2" -} diff --git a/backend/.sqlx/query-ca5f42cb0e368d0817461600152aabefe718829fb6eae2f681c4c8328acc94b2.json b/backend/.sqlx/query-ca5f42cb0e368d0817461600152aabefe718829fb6eae2f681c4c8328acc94b2.json deleted file mode 100644 index eb5c3a8bf0..0000000000 --- a/backend/.sqlx/query-ca5f42cb0e368d0817461600152aabefe718829fb6eae2f681c4c8328acc94b2.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT g_.workspace_id, name, summary, extra_perms, array_agg(u2g.usr) filter (where u2g.usr is not null) as members \n FROM usr u\n JOIN usr_to_group u2g ON u2g.usr = u.username AND u2g.workspace_id = u.workspace_id\n RIGHT JOIN group_ g_ ON g_.workspace_id = u.workspace_id AND g_.name = u2g.group_\n WHERE g_.workspace_id = $1 AND g_.name != 'all'\n GROUP BY g_.workspace_id, name, summary, extra_perms", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "name", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "summary", - "type_info": "Text" - }, - { - "ordinal": 3, - "name": "extra_perms", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "members", - "type_info": "VarcharArray" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - true, - false, - null - ] - }, - "hash": "ca5f42cb0e368d0817461600152aabefe718829fb6eae2f681c4c8328acc94b2" -} diff --git a/backend/.sqlx/query-cb5a8545ea140ed69c7b70d8c08cb3c037309f09e84acbb7945a0466d6e9f576.json b/backend/.sqlx/query-cb5a8545ea140ed69c7b70d8c08cb3c037309f09e84acbb7945a0466d6e9f576.json new file mode 100644 index 0000000000..27330c2def --- /dev/null +++ b/backend/.sqlx/query-cb5a8545ea140ed69c7b70d8c08cb3c037309f09e84acbb7945a0466d6e9f576.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "create index concurrently if not exists ix_v2_job_root_by_path\n on v2_job (workspace_id, runnable_path, created_at DESC)\n where parent_job is null", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "cb5a8545ea140ed69c7b70d8c08cb3c037309f09e84acbb7945a0466d6e9f576" +} diff --git a/backend/.sqlx/query-d6c8f4e49cf7b6db5c979c88e02bd41c7b823186ac056a0a676da85dc5d9a027.json b/backend/.sqlx/query-d6c8f4e49cf7b6db5c979c88e02bd41c7b823186ac056a0a676da85dc5d9a027.json deleted file mode 100644 index d090c25a37..0000000000 --- a/backend/.sqlx/query-d6c8f4e49cf7b6db5c979c88e02bd41c7b823186ac056a0a676da85dc5d9a027.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT id AS \"id!\" FROM v2_as_queue WHERE schedule_path = $1 AND workspace_id = $2 AND id != $3 AND running = true", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id!", - "type_info": "Uuid" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Uuid" - ] - }, - "nullable": [ - true - ] - }, - "hash": "d6c8f4e49cf7b6db5c979c88e02bd41c7b823186ac056a0a676da85dc5d9a027" -} diff --git a/backend/.sqlx/query-d949e8b91fbdf4c50c1c2cbc608cf0b385bff14faab495e049f2029790f76d25.json b/backend/.sqlx/query-d949e8b91fbdf4c50c1c2cbc608cf0b385bff14faab495e049f2029790f76d25.json new file mode 100644 index 0000000000..e792f43ad4 --- /dev/null +++ b/backend/.sqlx/query-d949e8b91fbdf4c50c1c2cbc608cf0b385bff14faab495e049f2029790f76d25.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_9", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "d949e8b91fbdf4c50c1c2cbc608cf0b385bff14faab495e049f2029790f76d25" +} diff --git a/backend/.sqlx/query-e00144305b880cca3994b53c4a080e111a159a749728ce5363100cf883bdf02a.json b/backend/.sqlx/query-e00144305b880cca3994b53c4a080e111a159a749728ce5363100cf883bdf02a.json new file mode 100644 index 0000000000..d9fbfef7e2 --- /dev/null +++ b/backend/.sqlx/query-e00144305b880cca3994b53c4a080e111a159a749728ce5363100cf883bdf02a.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_8", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "e00144305b880cca3994b53c4a080e111a159a749728ce5363100cf883bdf02a" +} diff --git a/backend/.sqlx/query-e6a8ddfd74ebab55ede5989fd7d09b246b6f84e49c659bc8e2c7b66cfec6d976.json b/backend/.sqlx/query-e6a8ddfd74ebab55ede5989fd7d09b246b6f84e49c659bc8e2c7b66cfec6d976.json new file mode 100644 index 0000000000..a1b52e81fd --- /dev/null +++ b/backend/.sqlx/query-e6a8ddfd74ebab55ede5989fd7d09b246b6f84e49c659bc8e2c7b66cfec6d976.json @@ -0,0 +1,38 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT status = 'success' AS \"success!\",\n result AS \"result: Json>\",\n started_at AS \"started_at!\"FROM v2_job j JOIN v2_job_completed USING (id)\n WHERE j.workspace_id = $1 AND trigger_kind = 'schedule' AND trigger = $2\n AND parent_job IS NULL\n AND runnable_path = $3\n AND j.id != $4\n ORDER BY created_at DESC\n LIMIT $5", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "success!", + "type_info": "Bool" + }, + { + "ordinal": 1, + "name": "result: Json>", + "type_info": "Jsonb" + }, + { + "ordinal": 2, + "name": "started_at!", + "type_info": "Timestamptz" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Uuid", + "Int8" + ] + }, + "nullable": [ + null, + true, + true + ] + }, + "hash": "e6a8ddfd74ebab55ede5989fd7d09b246b6f84e49c659bc8e2c7b66cfec6d976" +} diff --git a/backend/.sqlx/query-e9038a6fcfd8bdf4855c5919ce634b976cbe0280e7215862aaf5ef445663793d.json b/backend/.sqlx/query-e9038a6fcfd8bdf4855c5919ce634b976cbe0280e7215862aaf5ef445663793d.json new file mode 100644 index 0000000000..13e6880b54 --- /dev/null +++ b/backend/.sqlx/query-e9038a6fcfd8bdf4855c5919ce634b976cbe0280e7215862aaf5ef445663793d.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_7", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "e9038a6fcfd8bdf4855c5919ce634b976cbe0280e7215862aaf5ef445663793d" +} diff --git a/backend/.sqlx/query-ebfd39f168722701fb63cd37aaef3741b9782d8e2d4b6ff6c104fdcac5f58323.json b/backend/.sqlx/query-ebfd39f168722701fb63cd37aaef3741b9782d8e2d4b6ff6c104fdcac5f58323.json new file mode 100644 index 0000000000..b82bb5a31c --- /dev/null +++ b/backend/.sqlx/query-ebfd39f168722701fb63cd37aaef3741b9782d8e2d4b6ff6c104fdcac5f58323.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_created_at", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "ebfd39f168722701fb63cd37aaef3741b9782d8e2d4b6ff6c104fdcac5f58323" +} diff --git a/backend/.sqlx/query-f96dd1dd944506c07ad58d178e9b6a09259fedca329d790c34e58703bf26f34c.json b/backend/.sqlx/query-f96dd1dd944506c07ad58d178e9b6a09259fedca329d790c34e58703bf26f34c.json deleted file mode 100644 index 81c15c15cf..0000000000 --- a/backend/.sqlx/query-f96dd1dd944506c07ad58d178e9b6a09259fedca329d790c34e58703bf26f34c.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT * FROM usr\n WHERE workspace_id = $1", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "workspace_id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "username", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "email", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "is_admin", - "type_info": "Bool" - }, - { - "ordinal": 4, - "name": "created_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 5, - "name": "operator", - "type_info": "Bool" - }, - { - "ordinal": 6, - "name": "disabled", - "type_info": "Bool" - }, - { - "ordinal": 7, - "name": "role", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - true - ] - }, - "hash": "f96dd1dd944506c07ad58d178e9b6a09259fedca329d790c34e58703bf26f34c" -} diff --git a/backend/.sqlx/query-fa94a9ee5514f6808d3813394e62c86a69b7b7378333322a57856f8e43c6cd77.json b/backend/.sqlx/query-fa94a9ee5514f6808d3813394e62c86a69b7b7378333322a57856f8e43c6cd77.json new file mode 100644 index 0000000000..6baa09af23 --- /dev/null +++ b/backend/.sqlx/query-fa94a9ee5514f6808d3813394e62c86a69b7b7378333322a57856f8e43c6cd77.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_5", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "fa94a9ee5514f6808d3813394e62c86a69b7b7378333322a57856f8e43c6cd77" +} diff --git a/backend/migrations/20250205131517_v2_skipped_is_success.down.sql b/backend/migrations/20250205131517_v2_skipped_is_success.down.sql new file mode 100644 index 0000000000..d2f607c5b8 --- /dev/null +++ b/backend/migrations/20250205131517_v2_skipped_is_success.down.sql @@ -0,0 +1 @@ +-- Add down migration script here diff --git a/backend/migrations/20250205131517_v2_skipped_is_success.up.sql b/backend/migrations/20250205131517_v2_skipped_is_success.up.sql new file mode 100644 index 0000000000..86506fe255 --- /dev/null +++ b/backend/migrations/20250205131517_v2_skipped_is_success.up.sql @@ -0,0 +1,42 @@ +-- Add up migration script here +CREATE OR REPLACE VIEW v2_as_completed_job AS +SELECT + j.id, + j.workspace_id, + j.parent_job, + j.created_by, + j.created_at, + c.duration_ms, + c.status = 'success' OR c.status = 'skipped' AS success, + j.runnable_id AS script_hash, + j.runnable_path AS script_path, + j.args, + c.result, + FALSE AS deleted, + j.raw_code, + c.status = 'canceled' AS canceled, + c.canceled_by, + c.canceled_reason, + j.kind AS job_kind, + CASE WHEN j.trigger_kind = 'schedule'::job_trigger_kind THEN j.trigger END + AS schedule_path, + j.permissioned_as, + COALESCE(c.flow_status, c.workflow_as_code_status) AS flow_status, + j.raw_flow, + j.flow_step_id IS NOT NULL AS is_flow_step, + j.script_lang AS language, + c.started_at, + c.status = 'skipped' AS is_skipped, + j.raw_lock, + j.permissioned_as_email AS email, + j.visible_to_owner, + c.memory_peak AS mem_peak, + j.tag, + j.priority, + NULL::TEXT AS logs, + c.result_columns, + j.script_entrypoint_override, + j.preprocessed +FROM v2_job_completed c + JOIN v2_job j USING (id) +; diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index a2a641b802..c4ba1d5c5d 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -504,6 +504,81 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .await?; }); + run_windmill_migration!("add_ix_v2_II", &db, { + sqlx::query!( + "create index concurrently if not exists ix_v2_job_root_by_path + on v2_job (workspace_id, runnable_path, created_at DESC) + where parent_job is null" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_3" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_5" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_6" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_7" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_8" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_9" + ) + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_created_at") + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_created_at_new_2" + ) + .execute(db) + .await?; + + sqlx::query!( + "DROP INDEX CONCURRENTLY IF EXISTS ix_completed_job_workspace_id_started_at_new" + ) + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2") + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS scheduled_root_job") + .execute(db) + .await?; + + sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS concurrency_limit_stats_completed_job") + .execute(db) + .await?; + tracing::info!("Finished adding ix_v2_II migration"); + }); + run_windmill_migration!("fix_labeled_jobs_index", &db, { tracing::info!("Special migration to add index concurrently on job labels 2"); sqlx::query!("DROP INDEX CONCURRENTLY IF EXISTS labeled_jobs_on_jobs") diff --git a/backend/windmill-api/src/schedule.rs b/backend/windmill-api/src/schedule.rs index 109957da04..a6b6abf7dc 100644 --- a/backend/windmill-api/src/schedule.rs +++ b/backend/windmill-api/src/schedule.rs @@ -329,16 +329,29 @@ pub struct ListScheduleQuery { pub path_start: Option, } +#[derive(sqlx::FromRow, Serialize, Deserialize, Debug, Clone)] +pub struct ScheduleLight { + pub workspace_id: String, + pub path: String, + pub edited_by: String, + pub edited_at: DateTime, + pub schedule: String, + pub timezone: String, + pub enabled: bool, + pub script_path: String, + pub is_flow: bool, + pub summary: Option, +} async fn list_schedule( authed: ApiAuthed, Extension(user_db): Extension, Path(w_id): Path, Query(lsq): Query, -) -> JsonResult> { +) -> JsonResult> { let mut tx = user_db.begin(&authed).await?; let (per_page, offset) = paginate(Pagination { per_page: lsq.per_page, page: lsq.page }); let mut sqlb = SqlBuilder::select_from("schedule") - .field("*") + .field("workspace_id, path, edited_by, edited_at, schedule, timezone, enabled, script_path, is_flow, summary") .order_by("edited_at", true) .and_where("workspace_id = ?".bind(&w_id)) .offset(offset) @@ -357,7 +370,7 @@ async fn list_schedule( sqlb.and_where_like_left("path", path_start); } let sql = sqlb.sql().map_err(|e| Error::internal_err(e.to_string()))?; - let rows = sqlx::query_as::<_, Schedule>(&sql) + let rows = sqlx::query_as::<_, ScheduleLight>(&sql) .fetch_all(&mut *tx) .await?; tx.commit().await?; @@ -366,36 +379,8 @@ async fn list_schedule( #[derive(Serialize, Deserialize, Debug)] pub struct ScheduleWJobs { - pub workspace_id: String, pub path: String, - pub edited_by: String, - pub edited_at: DateTime, - pub schedule: String, - pub timezone: String, - pub enabled: bool, - pub script_path: String, - pub is_flow: bool, - pub args: Option, - pub extra_perms: serde_json::Value, - pub email: String, - pub error: Option, - pub on_failure: Option, - pub on_failure_times: Option, - pub on_failure_exact: Option, - pub on_failure_extra_args: Option, - pub on_recovery: Option, - pub on_recovery_times: Option, - pub on_recovery_extra_args: Option, - pub on_success: Option, - pub on_success_extra_args: Option, - pub ws_error_handler_muted: bool, - pub retry: Option, pub jobs: Option>, - pub summary: Option, - pub no_flow_overlap: bool, - pub tag: Option, - pub paused_until: Option>, - pub cron_version: Option, } async fn list_schedule_with_jobs( @@ -407,9 +392,27 @@ async fn list_schedule_with_jobs( let mut tx = user_db.begin(&authed).await?; let (per_page, offset) = paginate(pagination); let rows = sqlx::query_as!(ScheduleWJobs, - "SELECT schedule.*, t.jobs FROM schedule, LATERAL ( SELECT ARRAY (SELECT json_build_object('id', id, 'success', success, 'duration_ms', duration_ms) FROM v2_as_completed_job WHERE - v2_as_completed_job.schedule_path = schedule.path AND v2_as_completed_job.workspace_id = $1 AND parent_job IS NULL AND is_skipped = False ORDER BY started_at DESC LIMIT 20) AS jobs ) t - WHERE schedule.workspace_id = $1 ORDER BY schedule.edited_at desc LIMIT $2 OFFSET $3", + // Query plan: + // - use of the `ix_completed_job_workspace_id_started_at_new_2` index first, then; + // - use of the `ix_v2_job_root_by_path` index; hence the `parent_job IS NULL` clause. + // - both `workspace_id = $1` checks are required to hit both indexes. + "SELECT + schedule.path, t.jobs FROM schedule, + LATERAL(SELECT ARRAY( + SELECT json_build_object('id', id, 'success', status = 'success', 'duration_ms', duration_ms) + FROM v2_job_completed c JOIN v2_job j USING (id) + WHERE trigger_kind = 'schedule' + AND trigger = schedule.path + AND c.workspace_id = $1 + AND j.workspace_id = $1 + AND parent_job IS NULL AND runnable_path = schedule.script_path + AND status <> 'skipped' + ORDER BY created_at DESC + LIMIT 20 + ) AS jobs) t + WHERE workspace_id = $1 + ORDER BY edited_at DESC + LIMIT $2 OFFSET $3", w_id, per_page as i64, offset as i64 diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index f561549af8..2d2025da92 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -1377,12 +1377,17 @@ async fn apply_schedule_handlers<'a, 'c, T: Serialize + Send + Sync>( let exact = schedule.on_failure_exact.unwrap_or(false); if times > 1 || exact { let past_jobs = sqlx::query!( - "SELECT - success AS \"success!\", - result AS \"result: Json>\", - started_at AS \"started_at!\" - FROM v2_as_completed_job - WHERE workspace_id = $1 AND schedule_path = $2 AND script_path = $3 AND id != $4 + // Query plan: + // - use of the `ix_v2_job_root_by_path` index; + // hence the `parent_job IS NULL` clause. + // - select from `v2_job` first, then join with `v2_job_completed` to avoid a full + // table scan. + "SELECT status = 'success' AS \"success!\" + FROM v2_job j JOIN v2_job_completed USING (id) + WHERE j.workspace_id = $1 AND trigger_kind = 'schedule' AND trigger = $2 + AND parent_job IS NULL + AND runnable_path = $3 + AND j.id != $4 ORDER BY created_at DESC LIMIT $5", &schedule.workspace_id, @@ -1448,11 +1453,19 @@ async fn apply_schedule_handlers<'a, 'c, T: Serialize + Send + Sync>( let tx = db.begin().await?; let times = schedule.on_recovery_times.unwrap_or(1).max(1); let past_jobs = sqlx::query!( - "SELECT - success AS \"success!\", + // Query plan: + // - use of the `ix_v2_job_root_by_path` index; + // hence the `parent_job IS NULL` clause. + // - select from `v2_job` first, then join with `v2_job_completed` to avoid a full + // table scan. + "SELECT status = 'success' AS \"success!\", result AS \"result: Json>\", started_at AS \"started_at!\"\ - FROM v2_as_completed_job WHERE workspace_id = $1 AND schedule_path = $2 AND script_path = $3 AND id != $4 + FROM v2_job j JOIN v2_job_completed USING (id) + WHERE j.workspace_id = $1 AND trigger_kind = 'schedule' AND trigger = $2 + AND parent_job IS NULL + AND runnable_path = $3 + AND j.id != $4 ORDER BY created_at DESC LIMIT $5", &schedule.workspace_id, diff --git a/backend/windmill-queue/src/schedule.rs b/backend/windmill-queue/src/schedule.rs index fd4bcab4b4..f36722dbe9 100644 --- a/backend/windmill-queue/src/schedule.rs +++ b/backend/windmill-queue/src/schedule.rs @@ -9,7 +9,7 @@ use crate::push; use crate::PushIsolationLevel; use anyhow::Context; -use sqlx::{query_scalar, PgExecutor, Postgres, Transaction}; +use sqlx::{PgExecutor, Postgres, Transaction}; use std::collections::HashMap; use std::str::FromStr; use windmill_common::db::Authed; @@ -70,11 +70,21 @@ pub async fn push_scheduled_job<'c>( // Scheduled events must be stored in the database in UTC let next = next.with_timezone(&chrono::Utc); - let already_exists: bool = query_scalar!( - "SELECT EXISTS (SELECT 1 FROM v2_as_queue WHERE workspace_id = $1 AND schedule_path = $2 AND scheduled_for = $3)", + let already_exists: bool = sqlx::query_scalar!( + // Query plan: + // - use of the `ix_v2_job_root_by_path` index; hence the `parent_job IS NULL` clause. + // - select from `v2_job` first, then join with `v2_job_queue` to avoid a full table scan + // on `scheduled_for = $3`. + "SELECT EXISTS ( + SELECT 1 FROM v2_job j JOIN v2_job_queue USING (id) + WHERE j.workspace_id = $1 AND trigger_kind = 'schedule' AND trigger = $2 AND runnable_path = $4 + AND parent_job IS NULL + AND scheduled_for = $3 + )", &schedule.workspace_id, &schedule.path, - next + next, + &schedule.script_path ) .fetch_one(&mut *tx) .await? diff --git a/backend/windmill-worker/src/common.rs b/backend/windmill-worker/src/common.rs index a64a32c869..995638ecb2 100644 --- a/backend/windmill-worker/src/common.rs +++ b/backend/windmill-worker/src/common.rs @@ -333,7 +333,8 @@ pub fn unsafe_raw(json: String) -> Box { fn check_result_too_big(size: usize) -> error::Result<()> { if *CLOUD_HOSTED && size > MAX_RESULT_SIZE { return Err(error::Error::ExecutionErr("Result is too large for the cloud app (limit 2MB). - If using this script as part of the flow, use the shared folder to pass heavy data between steps.".to_owned())); +We highly recommend using object to store and pass heavy data (https://www.windmill.dev/docs/core_concepts/object_storage_in_windmill#read-a-file-from-s3-within-a-script) +Alternatively, if using this script as part of a flow, activate shared folder and use the shared folder to pass heavy data between steps.".to_owned())); }; Ok(()) } diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 42dd66c217..5e4224681f 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -1711,11 +1711,24 @@ async fn push_next_flow_job( .await?; if no_flow_overlap { let overlapping = sqlx::query_scalar!( - "SELECT id AS \"id!\" FROM v2_as_queue WHERE schedule_path = $1 AND workspace_id = $2 AND id != $3 AND running = true", + // Query plan: + // - use of the `ix_v2_job_root_by_path` index; hence the `parent_job IS NULL` + // clause. + // - select from `v2_job` first, then join with `v2_job_queue` to avoid a full + // table scan on `running = true`. + "SELECT id + FROM v2_job j JOIN v2_job_queue USING (id) + WHERE j.workspace_id = $2 AND trigger_kind = 'schedule' AND trigger = $1 AND runnable_path = $4 + AND parent_job IS NULL + AND j.id != $3 + AND running = true", flow_job.schedule_path.as_ref().unwrap(), flow_job.workspace_id.as_str(), - flow_job.id - ).fetch_all(db).await?; + flow_job.id, + flow_job.script_path.as_ref().unwrap() + ) + .fetch_all(db) + .await?; if overlapping.len() > 0 { let overlapping_str = overlapping .iter() diff --git a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte index 093fb41032..4e9cebe228 100644 --- a/frontend/src/lib/components/apps/editor/SubGridEditor.svelte +++ b/frontend/src/lib/components/apps/editor/SubGridEditor.svelte @@ -331,6 +331,6 @@ {:else if $app.lazyInitRequire == undefined} {#each $app?.subgrids?.[subGridId] ?? [] as item} - + {/each} {/if} diff --git a/frontend/src/routes/(root)/(logged)/schedules/+page.svelte b/frontend/src/routes/(root)/(logged)/schedules/+page.svelte index cad5a7ee4f..cce869583c 100644 --- a/frontend/src/routes/(root)/(logged)/schedules/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/schedules/+page.svelte @@ -232,12 +232,9 @@ } onMount(() => { - console.log(`on mount: `, $userStore?.operator, $workspaceStore, $userWorkspaces) loadQueryFilters() }) - $: $userWorkspaces && $userStore && $workspaceStore && console.log(`user workspaces: `, $userWorkspaces) - $: updateQueryFilters(selectedFilterKind, filterUserFolders, filterEnabledDisabled) @@ -250,265 +247,267 @@ f={(x) => (x.summary ?? '') + ' ' + x.path + ' (' + x.script_path + ')'} /> -{#if $userStore?.operator && $workspaceStore && !$userWorkspaces.find(_ => _.id === $workspaceStore)?.operator_settings?.schedules} - +{#if $userStore?.operator && $workspaceStore && !$userWorkspaces.find((_) => _.id === $workspaceStore)?.operator_settings?.schedules} + {:else} - - - - -
-
- -
-
Filter by path of
- - - - -
- + + + + +
+
+ +
+
Filter by path of
+ + + + +
+ -
- - - - - - {#if $userStore?.is_super_admin && $userStore.username.includes('@')} - - {:else if $userStore?.is_admin || $userStore?.is_super_admin} - - {/if} +
+ + + + + + {#if $userStore?.is_super_admin && $userStore.username.includes('@')} + + {:else if $userStore?.is_admin || $userStore?.is_super_admin} + + {/if} +
-
- {#if loading} - {#each new Array(6) as _} - - {/each} - {:else if !schedules?.length} -
No schedules
- {:else if items?.length} -
- {#each items.slice(0, nbDisplayed) as { path, error, summary, edited_by, edited_at, schedule, timezone, enabled, script_path, is_flow, extra_perms, canWrite, args, marked, jobs, paused_until } (path)} - {@const href = `${is_flow ? '/flows/get' : '/scripts/get'}/${script_path}`} - {@const avg_s = jobs - ? jobs.reduce((acc, x) => acc + x.duration_ms, 0) / jobs.length - : undefined} + {#if loading} + {#each new Array(6) as _} + + {/each} + {:else if !schedules?.length} +
No schedules
+ {:else if items?.length} +
+ {#each items.slice(0, nbDisplayed) as { path, error, summary, edited_by, edited_at, schedule, timezone, enabled, script_path, is_flow, extra_perms, canWrite, args, marked, jobs, paused_until } (path)} + {@const href = `${is_flow ? '/flows/get' : '/scripts/get'}/${script_path}`} + {@const avg_s = jobs + ? jobs.reduce((acc, x) => acc + x.duration_ms, 0) / jobs.length + : undefined} -
-
- + > +
+ - scheduleEditor?.openEdit(path, is_flow)} - class="min-w-0 grow hover:underline decoration-gray-400" - > -
- {#if marked} - - {@html marked} - - {:else} - {summary || script_path} - {/if} -
-
- schedule: {path} -
-
- - {#if paused_until && new Date(paused_until) > new Date()} -
- Paused until {new Date(paused_until).toLocaleString()} -
- {/if} - - - - - -
- {#if error} - - - - - -
- The schedule disabled itself because there was an error scheduling the next - job: {error} -
-
- {/if} -
- - { - if (canWrite) { - setScheduleEnabled(path, e.detail) - } else { - sendUserToast('not enough permission', true) - } - }} - /> -
- - - { - goto(href) - } - }, - { - displayName: 'Delete', - type: 'delete', - icon: Trash, - disabled: !canWrite, - action: async () => { - await ScheduleService.deleteSchedule({ - workspace: $workspaceStore ?? '', - path - }) - loadSchedules() - } - }, - { - displayName: canWrite ? 'Edit' : 'View', - icon: canWrite ? Pen : Eye, - action: () => { - scheduleEditor?.openEdit(path, is_flow) - } - }, - { - displayName: 'View runs', - icon: List, - href: - base + - '/runs/?schedule_path=' + - path + - '&show_schedules=true&show_future_jobs=true' - }, - { - displayName: 'Audit logs', - icon: Eye, - href: `${base}/audit_logs?resource=${path}` - }, - { - displayName: 'Run now', - icon: Play, - action: () => { - runScheduleNow(script_path, args, is_flow) - } - }, - { - displayName: canWrite ? 'Share' : 'See Permissions', - icon: Share, - action: () => { - shareModal.openDrawer(path, 'schedule') - } - } - ]} - /> -
-
-
- {#if loadingSchedulesWithJobStats} -
- - Job stats loading... +
+ {#if marked} + + {@html marked} + + {:else} + {summary || script_path} + {/if} +
+
+ schedule: {path} +
+ + + {#if paused_until && new Date(paused_until) > new Date()} +
+ Paused until {new Date(paused_until).toLocaleString()} +
+ {/if} + + - {:else} -
- {#if avg_s} -
Avg: {(avg_s / 1000).toFixed(2)}s
+ + + +
+ {#if error} + + + + + +
+ The schedule disabled itself because there was an error scheduling the next + job: {error} +
+
{/if} - {#each jobs ?? [] as job} - {@const h = (avg_s ? job.duration_ms / avg_s : 1) * 7 + 3} - - -
-
- -
- -
- {/each} -
- {/if} -
edited by {edited_by}
the {displayDate(edited_at)}
+ + + {/each} +
+ {/if} +
edited by {edited_by}
the {displayDate(edited_at)}
-
- {/each} -
- {:else} - + > +
+ {/each} +
+ {:else} + + {/if} +
+ {#if items && items?.length > 15 && nbDisplayed < items.length} + {nbDisplayed} items out of {items.length} + {/if} -
- {#if items && items?.length > 15 && nbDisplayed < items.length} - {nbDisplayed} items out of {items.length} - - {/if} - + {/if} Date: Wed, 12 Feb 2025 20:07:27 +0100 Subject: [PATCH 043/667] fix encrypted values passed from apps in flows --- backend/windmill-worker/src/common.rs | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/backend/windmill-worker/src/common.rs b/backend/windmill-worker/src/common.rs index 995638ecb2..9fb270f269 100644 --- a/backend/windmill-worker/src/common.rs +++ b/backend/windmill-worker/src/common.rs @@ -213,6 +213,25 @@ pub fn parse_npm_config(s: &str) -> (String, Option) { return (url, token_opt); } +#[async_recursion] +pub async fn get_root_job_id(job: &Uuid, db: &Pool) -> anyhow::Result { + let njob = sqlx::query_scalar!( + "SELECT flow_innermost_root_job FROM v2_job WHERE id = $1", + job + ) + .fetch_optional(db) + .await? + .flatten(); + if let Some(root_job) = njob { + if root_job == *job { + return Ok(job.to_owned()); + } + get_root_job_id(&root_job, db).await + } else { + Ok(job.to_owned()) + } +} + #[async_recursion] pub async fn transform_json_value( name: &str, @@ -252,8 +271,10 @@ pub async fn transform_json_value( } Value::String(y) if y.starts_with("$encrypted:") => { let encrypted = y.strip_prefix("$encrypted:").unwrap(); - let mc = - build_crypt_with_key_suffix(&db, &job.workspace_id, &job.id.to_string()).await?; + + let root_job_id = get_root_job_id(&job.root_job.unwrap_or_else(|| job.id), db).await?; + let mc = build_crypt_with_key_suffix(&db, &job.workspace_id, &root_job_id.to_string()) + .await?; decrypt(&mc, encrypted.to_string()).and_then(|x| { serde_json::from_str(&x).map_err(|e| Error::internal_err(e.to_string())) }) From 2015e79ff09293cafb799f4049de35f786059831 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 12 Feb 2025 22:10:53 +0100 Subject: [PATCH 044/667] fix: better handling of null pre-processor return values --- ...cd9aef958c15df1c0a7b02318a756cd3589e9.json | 15 +++++++++++ ...b312404e637212de1897e97999755a2e492fd.json | 15 ----------- backend/windmill-api/src/jobs.rs | 7 +++++- backend/windmill-worker/src/worker.rs | 2 +- backend/windmill-worker/src/worker_flow.rs | 25 ++++++++++++++++--- 5 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 backend/.sqlx/query-303c7e92ce23dc367d97d813415cd9aef958c15df1c0a7b02318a756cd3589e9.json delete mode 100644 backend/.sqlx/query-8a1c9119f6f4763f64597684dc7b312404e637212de1897e97999755a2e492fd.json diff --git a/backend/.sqlx/query-303c7e92ce23dc367d97d813415cd9aef958c15df1c0a7b02318a756cd3589e9.json b/backend/.sqlx/query-303c7e92ce23dc367d97d813415cd9aef958c15df1c0a7b02318a756cd3589e9.json new file mode 100644 index 0000000000..58cfc98b09 --- /dev/null +++ b/backend/.sqlx/query-303c7e92ce23dc367d97d813415cd9aef958c15df1c0a7b02318a756cd3589e9.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH job_result AS (\n SELECT result \n FROM v2_job_completed \n WHERE id = $1\n )\n UPDATE v2_job \n SET args = COALESCE(\n CASE \n WHEN job_result.result IS NULL THEN NULL\n WHEN jsonb_typeof(job_result.result) = 'object' \n THEN job_result.result\n WHEN jsonb_typeof(job_result.result) = 'null'\n THEN NULL\n ELSE jsonb_build_object('value', job_result.result)\n END, \n '{}'::jsonb\n ),\n preprocessed = TRUE\n FROM job_result\n WHERE v2_job.id = $2;\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Uuid", + "Uuid" + ] + }, + "nullable": [] + }, + "hash": "303c7e92ce23dc367d97d813415cd9aef958c15df1c0a7b02318a756cd3589e9" +} diff --git a/backend/.sqlx/query-8a1c9119f6f4763f64597684dc7b312404e637212de1897e97999755a2e492fd.json b/backend/.sqlx/query-8a1c9119f6f4763f64597684dc7b312404e637212de1897e97999755a2e492fd.json deleted file mode 100644 index 8a92be2af8..0000000000 --- a/backend/.sqlx/query-8a1c9119f6f4763f64597684dc7b312404e637212de1897e97999755a2e492fd.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job SET\n args = (SELECT result FROM v2_job_completed WHERE id = $1),\n preprocessed = TRUE\n WHERE id = $2", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Uuid", - "Uuid" - ] - }, - "nullable": [] - }, - "hash": "8a1c9119f6f4763f64597684dc7b312404e637212de1897e97999755a2e492fd" -} diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 90caf92518..3248c2fe20 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -717,7 +717,12 @@ macro_rules! get_job_query { const_format::formatcp!( "SELECT \ id, {table}.workspace_id, parent_job, created_by, {table}.created_at, started_at, script_hash, script_path, \ - CASE WHEN args is null or pg_column_size(args) < 90000 THEN args ELSE '{{\"reason\": \"WINDMILL_TOO_BIG\"}}'::jsonb END as args, \ + CASE WHEN args is null THEN NULL + WHEN pg_column_size(args) < 90000 THEN + CASE WHEN jsonb_typeof(args) = 'object' THEN args + ELSE jsonb_build_object('value', args) + END + ELSE '{{\"reason\": \"WINDMILL_TOO_BIG\"}}'::jsonb END as args, \ {logs} as logs, {code} as raw_code, canceled, canceled_by, canceled_reason, job_kind, \ schedule_path, permissioned_as, flow_status, {flow} as raw_flow, is_flow_step, language, \ {lock} as raw_lock, email, visible_to_owner, mem_peak, tag, priority, preprocessed, {additional_fields} \ diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 90b0444901..f523ce0723 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -2147,7 +2147,7 @@ async fn handle_queued_job( #[cfg(not(feature = "enterprise"))] if job.concurrent_limit.is_some() { logs.push_str("---\n"); - logs.push_str("WARNING: This job has concurrency limits enabled. Concurrency limits are going to become an Enterprise Edition feature in the near future.\n"); + logs.push_str("WARNING: This job has concurrency limits enabled. Concurrency limits are an EE feature and the setting is ignored.\n"); logs.push_str("---\n"); } diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 5e4224681f..f265adaf93 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -408,10 +408,27 @@ pub async fn update_flow_status_after_job_completion_internal( if matches!(module_step, Step::PreprocessorStep) { sqlx::query!( - "UPDATE v2_job SET - args = (SELECT result FROM v2_job_completed WHERE id = $1), - preprocessed = TRUE - WHERE id = $2", + "WITH job_result AS ( + SELECT result + FROM v2_job_completed + WHERE id = $1 + ) + UPDATE v2_job + SET args = COALESCE( + CASE + WHEN job_result.result IS NULL THEN NULL + WHEN jsonb_typeof(job_result.result) = 'object' + THEN job_result.result + WHEN jsonb_typeof(job_result.result) = 'null' + THEN NULL + ELSE jsonb_build_object('value', job_result.result) + END, + '{}'::jsonb + ), + preprocessed = TRUE + FROM job_result + WHERE v2_job.id = $2; + ", job_id_for_status, flow ) From 055c3367b7afd06a9c789d17fb29bf1d195055bc Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 12 Feb 2025 23:38:58 +0100 Subject: [PATCH 045/667] fix: remove variable pickers in app forms --- .../lib/components/apps/components/buttons/AppSchemaForm.svelte | 1 + .../components/apps/components/helpers/RunnableComponent.svelte | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte b/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte index 6c3f1b3688..ee1b5a622d 100644 --- a/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte +++ b/frontend/src/lib/components/apps/components/buttons/AppSchemaForm.svelte @@ -151,6 +151,7 @@ !$connectingInput.opened && selectId(e, id, selectedComponent, $app)} > 0}
Date: Thu, 13 Feb 2025 01:25:11 +0100 Subject: [PATCH 046/667] feat(cli): wmill dev works with flows --- cli/dev.ts | 80 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/cli/dev.ts b/cli/dev.ts index 2da25ec4ac..2a3dfb4a7d 100644 --- a/cli/dev.ts +++ b/cli/dev.ts @@ -8,8 +8,9 @@ import { log, open, WebSocket, + yamlParseFile, } from "./deps.ts"; -import { GlobalOptions } from "./types.ts"; +import { getTypeStrFromPath, GlobalOptions } from "./types.ts"; import { ignoreF } from "./sync.ts"; import { requireLogin, resolveWorkspace } from "./context.ts"; import { @@ -19,6 +20,8 @@ import { } from "./conf.ts"; import { exts } from "./script.ts"; import { inferContentTypeFromFilePath } from "./script_common.ts"; +import { OpenFlow } from "./gen/types.gen.ts"; +import { FlowFile, replaceInlineScripts } from "./flow.ts"; const PORT = 3001; async function dev(opts: GlobalOptions & SyncOptions) { @@ -27,54 +30,87 @@ async function dev(opts: GlobalOptions & SyncOptions) { log.info("Started dev mode"); const conf = await readConfigFile(); - let currentLastEdit: LastEdit | undefined = undefined; + let currentLastEdit: LastEditScript | LastEditFlow | undefined = undefined; const watcher = Deno.watchFs("."); const base = await Deno.realPath("."); opts = await mergeConfigWithConfigFile(opts); const ignore = await ignoreF(opts); + const changesTimeouts: Record = {}; async function watchChanges() { for await (const event of watcher) { - log.debug(">>>> event", event); - // Example event: { kind: "create", paths: [ "/home/alice/deno/foo.txt" ] } - await loadPaths(event.paths); + // console.log(">>>> event", event); + const key = event.paths.join(","); + if (changesTimeouts[key]) { + clearTimeout(changesTimeouts[key]); + } + changesTimeouts[key] = setTimeout(async () => { + delete changesTimeouts[key]; + await loadPaths(event.paths); + }, 100); } } + const DOT_FLOW_SEP = ".flow" + SEP; async function loadPaths(pathsToLoad: string[]) { - const paths = pathsToLoad.filter((path) => - exts.some((ext) => path.endsWith(ext)) + const paths = pathsToLoad.filter( + (path) => + exts.some((ext) => path.endsWith(ext)) || path.includes(DOT_FLOW_SEP) ); if (paths.length == 0) { return; } const cpath = (await Deno.realPath(paths[0])).replace(base + SEP, ""); - console.log("Detected change in " + cpath); if (!ignore(cpath, false)) { - const content = await Deno.readTextFile(cpath); - const splitted = cpath.split("."); - const wmPath = splitted[0]; - const lang = inferContentTypeFromFilePath(cpath, conf.defaultTs); - currentLastEdit = { - content, - path: wmPath, - language: lang, - }; - broadcastChanges(currentLastEdit); - log.info("Updated " + wmPath); + const typ = getTypeStrFromPath(cpath); + log.info("Detected change in " + cpath + " (" + typ + ")"); + if (typ == "flow") { + const localPath = cpath.split(DOT_FLOW_SEP)[0] + DOT_FLOW_SEP; + const localFlow = (await yamlParseFile( + localPath + "flow.yaml" + )) as FlowFile; + replaceInlineScripts(localFlow.value.modules, localPath, undefined); + currentLastEdit = { + type: "flow", + flow: localFlow, + uriPath: localPath, + }; + log.info("Updated " + localPath); + broadcastChanges(currentLastEdit); + } else if (typ == "script") { + const content = await Deno.readTextFile(cpath); + const splitted = cpath.split("."); + const wmPath = splitted[0]; + const lang = inferContentTypeFromFilePath(cpath, conf.defaultTs); + currentLastEdit = { + type: "script", + content, + path: wmPath, + language: lang, + }; + log.info("Updated " + wmPath); + broadcastChanges(currentLastEdit); + } } } - type LastEdit = { + type LastEditScript = { + type: "script"; content: string; path: string; language: string; }; + type LastEditFlow = { + type: "flow"; + flow: OpenFlow; + uriPath: string; + }; + const connectedClients: Set = new Set(); // Function to send a message to all connected clients - function broadcastChanges(lastEdit: LastEdit) { + function broadcastChanges(lastEdit: LastEditScript | LastEditFlow) { for (const client of connectedClients.values()) { client.send(JSON.stringify(lastEdit)); } @@ -119,7 +155,7 @@ async function dev(opts: GlobalOptions & SyncOptions) { // Start the server const port = await getPort.default({ port: 3001 }); const url = - `${workspace.remote}scripts/dev?workspace=${workspace.workspaceId}&local=true` + + `${workspace.remote}dev?workspace=${workspace.workspaceId}&local=true&wm_token=${workspace.token}` + (port === PORT ? "" : `&port=${port}`); console.log(`Go to ${url}`); From 8895f05375ff365408551e38428043e0f38d76b7 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Feb 2025 01:34:37 +0100 Subject: [PATCH 047/667] add button work for flows --- frontend/src/lib/components/Dev.svelte | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/Dev.svelte b/frontend/src/lib/components/Dev.svelte index e53d49eb72..30c2fb45cc 100644 --- a/frontend/src/lib/components/Dev.svelte +++ b/frontend/src/lib/components/Dev.svelte @@ -207,7 +207,6 @@ runTest() event.preventDefault() } else if (event.data.type == 'replaceScript') { - mode = 'script' replaceScript(event.data) } else if (event.data.type == 'testBundle') { if (event.data.id == lastCommandId) { @@ -235,7 +234,6 @@ true ) } else if (event.data.type == 'replaceFlow') { - mode = 'flow' lockChanges = true replaceFlow(event.data) timeout && clearTimeout(timeout) @@ -333,6 +331,13 @@ }) function connectWs() { + try { + if (socket) { + socket.close() + } + } catch (e) { + console.error('Failed to close websocket', e) + } const port = searchParams?.get('port') || '3001' try { socket = new WebSocket(`ws://localhost:${port}/ws`) @@ -350,7 +355,13 @@ console.log('Received invalid JSON: ' + msg) return } - replaceScript(data) + if (data.type == 'script') { + replaceScript(data) + } else if (data.type == 'flow') { + replaceFlow(data) + } else { + sendUserToast(`Received invalid message type ${data.type}`, true) + } } } catch (e) { sendUserToast('Failed to connect to local server', true) @@ -419,6 +430,7 @@ let relativePaths: any[] = [] let lastPath: string | undefined = undefined async function replaceScript(lastEdit: LastEditScript) { + mode = 'script' currentScript = lastEdit if (lastPath !== lastEdit.path) { schema = emptySchema() @@ -455,6 +467,7 @@ } let lastUriPath: string | undefined = undefined async function replaceFlow(lastEdit: LastEditFlow) { + mode = 'flow' lastUriPath = lastEdit.uriPath // sendUserToast(JSON.stringify(lastEdit.flow), true) // return @@ -715,6 +728,7 @@ {#if $flowStore?.value?.modules} +
Date: Thu, 13 Feb 2025 01:41:05 +0100 Subject: [PATCH 048/667] chore(main): release 1.461.0 (#5276) * chore(main): release 1.461.0 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 14 +++++ backend/Cargo.lock | 54 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 58 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc17ef924d..107e0b36d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.461.0](https://github.com/windmill-labs/windmill/compare/v1.460.1...v1.461.0) (2025-02-13) + + +### Features + +* **cli:** wmill dev works with flows ([956a5ac](https://github.com/windmill-labs/windmill/commit/956a5ac68236df1c1f9ea4facd7ad237457427cf)) + + +### Bug Fixes + +* **backend:** improve schedule queries plan to leverage indices better for performance ([#5273](https://github.com/windmill-labs/windmill/issues/5273)) ([bf20651](https://github.com/windmill-labs/windmill/commit/bf206515e8653bbe431e106277b72082e0c9e388)) +* better handling of null pre-processor return values ([2015e79](https://github.com/windmill-labs/windmill/commit/2015e79ff09293cafb799f4049de35f786059831)) +* remove variable pickers in app forms ([055c336](https://github.com/windmill-labs/windmill/commit/055c3367b7afd06a9c789d17fb29bf1d195055bc)) + ## [1.460.1](https://github.com/windmill-labs/windmill/compare/v1.460.0...v1.460.1) (2025-02-12) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index a6473bff94..032562d14b 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -2050,9 +2050,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" dependencies = [ "memchr", ] @@ -10859,7 +10859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "axum", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.460.1" +version = "1.461.0" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.460.1" +version = "1.461.0" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.460.1" +version = "1.461.0" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.460.1" +version = "1.461.0" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.460.1" +version = "1.461.0" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.460.1" +version = "1.461.0" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.460.1" +version = "1.461.0" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 21060519be..d45747f6ce 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.460.1" +version = "1.461.0" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.460.1" +version = "1.461.0" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index a34706a011..feee318709 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.460.1 + version: 1.461.0 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 7e4f36a358..cd7cb8d8bf 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.460.1"; +export const VERSION = "v1.461.0"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index bd377e5168..a5d8720248 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.460.1"; +export const VERSION = "1.461.0"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6edef5b202..8f5ae1fc02 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.460.1", + "version": "1.461.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.460.1", + "version": "1.461.0", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 167351899e..3593b01ab8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.460.1", + "version": "1.461.0", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index b02c64fb49..6fa478cbda 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.460.1" -wmill_pg = ">=1.460.1" +wmill = ">=1.461.0" +wmill_pg = ">=1.461.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 876fc85dcc..915ead7c51 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.460.1 + version: 1.461.0 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 4098939492..3986c5aa8b 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.460.1' + ModuleVersion = '1.461.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 96c744abf6..8784f9cad5 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.460.1" +version = "1.461.0" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index a2274c752b..a8a02745dd 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.460.1" +version = "1.461.0" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 705982e0f9..302b718bad 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.460.1", + "version": "1.461.0", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 2ab30279c3..f7c90a5a34 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.460.1", + "version": "1.461.0", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 3194fbf29a..4c56a7e0f3 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.460.1 +1.461.0 From 6fb8f7b45dd85fdf5edc5ca3948f767eb0a39629 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Feb 2025 01:51:54 +0100 Subject: [PATCH 049/667] fix(cli): fix nits preventing release --- cli/dev.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/dev.ts b/cli/dev.ts index 2a3dfb4a7d..f69e88eb59 100644 --- a/cli/dev.ts +++ b/cli/dev.ts @@ -45,6 +45,7 @@ async function dev(opts: GlobalOptions & SyncOptions) { if (changesTimeouts[key]) { clearTimeout(changesTimeouts[key]); } + // @ts-ignore changesTimeouts[key] = setTimeout(async () => { delete changesTimeouts[key]; await loadPaths(event.paths); From 768c11310fd85b7fc5b3a64e72975800b7718c23 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Feb 2025 01:54:48 +0100 Subject: [PATCH 050/667] chore(main): release 1.461.1 (#5278) * chore(main): release 1.461.1 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 +++ backend/Cargo.lock | 50 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 49 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 107e0b36d2..febe433ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.461.1](https://github.com/windmill-labs/windmill/compare/v1.461.0...v1.461.1) (2025-02-13) + + +### Bug Fixes + +* **cli:** fix nits preventing release ([6fb8f7b](https://github.com/windmill-labs/windmill/commit/6fb8f7b45dd85fdf5edc5ca3948f767eb0a39629)) + ## [1.461.0](https://github.com/windmill-labs/windmill/compare/v1.460.1...v1.461.0) (2025-02-13) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 032562d14b..c3deb74625 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -10859,7 +10859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "axum", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.461.0" +version = "1.461.1" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.461.0" +version = "1.461.1" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.461.0" +version = "1.461.1" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.461.0" +version = "1.461.1" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.461.0" +version = "1.461.1" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.461.0" +version = "1.461.1" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.461.0" +version = "1.461.1" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index d45747f6ce..cb55ca5b33 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.461.0" +version = "1.461.1" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.461.0" +version = "1.461.1" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index feee318709..1bcc37256e 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.461.0 + version: 1.461.1 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index cd7cb8d8bf..054efa90c5 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.461.0"; +export const VERSION = "v1.461.1"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index a5d8720248..f7dcdbab14 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.461.0"; +export const VERSION = "1.461.1"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 8f5ae1fc02..98cddab626 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.461.0", + "version": "1.461.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.461.0", + "version": "1.461.1", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 3593b01ab8..fc75071c72 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.461.0", + "version": "1.461.1", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 6fa478cbda..e281bb6b27 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.461.0" -wmill_pg = ">=1.461.0" +wmill = ">=1.461.1" +wmill_pg = ">=1.461.1" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 915ead7c51..5d8ac5f208 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.461.0 + version: 1.461.1 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 3986c5aa8b..6ecefe7ae1 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.461.0' + ModuleVersion = '1.461.1' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 8784f9cad5..9645ecb5a1 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.461.0" +version = "1.461.1" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index a8a02745dd..265349e6ea 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.461.0" +version = "1.461.1" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 302b718bad..2dc385b271 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.461.0", + "version": "1.461.1", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index f7c90a5a34..59c9627ae5 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.461.0", + "version": "1.461.1", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 4c56a7e0f3..9189143a83 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.461.0 +1.461.1 From fe922114a74b1757c37f7f7b76adb3aed1ffccc4 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Feb 2025 10:27:43 +0100 Subject: [PATCH 051/667] fix(bun): remove unecessary buntar in a bun bundle world --- backend/src/main.rs | 12 +- backend/windmill-worker/src/bun_executor.rs | 131 +++----------------- backend/windmill-worker/src/worker.rs | 1 - 3 files changed, 21 insertions(+), 123 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index d9ae5c6e58..432095580d 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -66,12 +66,11 @@ use windmill_common::METRICS_ADDR; use windmill_common::global_settings::OBJECT_STORE_CACHE_CONFIG_SETTING; use windmill_worker::{ - get_hub_script_content_and_requirements, BUN_BUNDLE_CACHE_DIR, BUN_CACHE_DIR, - BUN_DEPSTAR_CACHE_DIR, CSHARP_CACHE_DIR, DENO_CACHE_DIR, DENO_CACHE_DIR_DEPS, - DENO_CACHE_DIR_NPM, GO_BIN_CACHE_DIR, GO_CACHE_DIR, LOCK_CACHE_DIR, PIP_CACHE_DIR, - POWERSHELL_CACHE_DIR, PY310_CACHE_DIR, PY311_CACHE_DIR, PY312_CACHE_DIR, PY313_CACHE_DIR, - RUST_CACHE_DIR, TAR_PIP_CACHE_DIR, TAR_PY310_CACHE_DIR, TAR_PY311_CACHE_DIR, - TAR_PY312_CACHE_DIR, TAR_PY313_CACHE_DIR, UV_CACHE_DIR, + get_hub_script_content_and_requirements, BUN_BUNDLE_CACHE_DIR, BUN_CACHE_DIR, CSHARP_CACHE_DIR, + DENO_CACHE_DIR, DENO_CACHE_DIR_DEPS, DENO_CACHE_DIR_NPM, GO_BIN_CACHE_DIR, GO_CACHE_DIR, + LOCK_CACHE_DIR, PIP_CACHE_DIR, POWERSHELL_CACHE_DIR, PY310_CACHE_DIR, PY311_CACHE_DIR, + PY312_CACHE_DIR, PY313_CACHE_DIR, RUST_CACHE_DIR, TAR_PIP_CACHE_DIR, TAR_PY310_CACHE_DIR, + TAR_PY311_CACHE_DIR, TAR_PY312_CACHE_DIR, TAR_PY313_CACHE_DIR, UV_CACHE_DIR, }; use crate::monitor::{ @@ -1042,7 +1041,6 @@ pub async fn run_workers( TAR_PY312_CACHE_DIR, TAR_PY313_CACHE_DIR, PIP_CACHE_DIR, - BUN_DEPSTAR_CACHE_DIR, BUN_BUNDLE_CACHE_DIR, GO_CACHE_DIR, GO_BIN_CACHE_DIR, diff --git a/backend/windmill-worker/src/bun_executor.rs b/backend/windmill-worker/src/bun_executor.rs index 4fc471df91..134511472f 100644 --- a/backend/windmill-worker/src/bun_executor.rs +++ b/backend/windmill-worker/src/bun_executor.rs @@ -1,14 +1,12 @@ #[cfg(feature = "deno_core")] use std::time::Instant; -use std::{collections::HashMap, fs, path::Path, process::Stdio}; +use std::{collections::HashMap, fs, process::Stdio}; -use anyhow::Context; use base64::Engine; use itertools::Itertools; use serde_json::value::RawValue; -use sha2::Digest; use uuid::Uuid; use windmill_parser_ts::remove_pinned_imports; use windmill_queue::{append_logs, CanceledBy}; @@ -23,8 +21,8 @@ use crate::{ }, handle_child::handle_child, AuthedClientBackgroundTask, BUNFIG_INSTALL_SCOPES, BUN_BUNDLE_CACHE_DIR, BUN_CACHE_DIR, - BUN_DEPSTAR_CACHE_DIR, BUN_PATH, DISABLE_NSJAIL, DISABLE_NUSER, HOME_ENV, NODE_BIN_PATH, - NODE_PATH, NPM_CONFIG_REGISTRY, NPM_PATH, NSJAIL_PATH, PATH_ENV, PROXY_ENVS, TZ_ENV, + BUN_PATH, DISABLE_NSJAIL, DISABLE_NUSER, HOME_ENV, NODE_BIN_PATH, NODE_PATH, + NPM_CONFIG_REGISTRY, NPM_PATH, NSJAIL_PATH, PATH_ENV, PROXY_ENVS, TZ_ENV, }; #[cfg(windows)] @@ -637,51 +635,6 @@ pub async fn pull_codebase(_w_id: &str, _id: &str, _job_dir: &str) -> Result<()> )); } -#[cfg(unix)] -pub fn copy_recursively( - source: impl AsRef, - destination: impl AsRef, - skip: Option<&Vec>, -) -> Result<()> { - let mut stack = Vec::new(); - stack.push(( - source.as_ref().to_path_buf(), - destination.as_ref().to_path_buf(), - 0, - )); - while let Some((current_source, current_destination, level)) = stack.pop() { - for entry in fs::read_dir(¤t_source) - .context(format!("reading directory {current_source:?}"))? - { - let entry = entry?; - let filetype = entry.file_type()?; - let destination = current_destination.join(entry.file_name()); - if level == 0 { - if let Some(skip) = skip { - if skip.contains(&entry.file_name().to_string_lossy().to_string()) { - continue; - } - } - } - - let original = entry.path(); - - if filetype.is_dir() { - fs::create_dir_all(&destination)?; - stack.push((entry.path(), destination, level + 1)); - } else { - fs::hard_link(&original, &destination).map_err(|e| { - error::Error::internal_err(format!( - "hard linking from {original:?} to {destination:?}: {e:#}" - )) - })?; - } - } - } - - Ok(()) -} - pub async fn prebundle_bun_script( inner_content: &str, lockfile: Option<&String>, @@ -889,7 +842,6 @@ pub async fn handle_bun_job( )); } - let mut gbuntar_name: Option = None; if has_bundle_cache { let target; let symlink; @@ -924,67 +876,23 @@ pub async fn handle_bun_job( let _ = write_file(job_dir, "package.json", pkg)?; let lock = if annotation.npm { "" } else { lock.unwrap() }; if !empty { - let mut skip_install = false; - let mut create_buntar = false; - let mut buntar_path = "".to_string(); - if !annotation.npm { let _ = write_lock(lock, job_dir, is_binary).await?; - - let mut sha_path = sha2::Sha256::new(); - sha_path.update(lock.as_bytes()); - - let buntar_name = - base64::engine::general_purpose::URL_SAFE.encode(sha_path.finalize()); - buntar_path = format!("{BUN_DEPSTAR_CACHE_DIR}/{buntar_name}"); - - #[cfg(unix)] - if tokio::fs::metadata(&buntar_path).await.is_ok() { - if let Err(e) = copy_recursively(&buntar_path, job_dir, None) { - tracing::error!("Could not extract buntar: {e:#}"); - } else { - gbuntar_name = Some(buntar_name.clone()); - skip_install = true; - } - } else { - create_buntar = true; - } } - if !skip_install { - install_bun_lockfile( - mem_peak, - canceled_by, - &job.id, - &job.workspace_id, - Some(db), - job_dir, - worker_name, - common_bun_proc_envs.clone(), - annotation.npm, - &mut Some(occupancy_metrics), - ) - .await?; - - #[cfg(unix)] - if create_buntar { - fs::create_dir_all(&buntar_path)?; - if let Err(e) = copy_recursively( - job_dir, - &buntar_path, - Some(&vec![ - "main.ts".to_string(), - "package.json".to_string(), - if is_binary { "bun.lockb" } else { "bun.lock" }.to_string(), - "shared".to_string(), - "bunfig.toml".to_string(), - ]), - ) { - fs::remove_dir_all(&buntar_path).context("deleting buntar directory")?; - tracing::error!("Could not create buntar: {e}"); - } - } - } + install_bun_lockfile( + mem_peak, + canceled_by, + &job.id, + &job.workspace_id, + Some(db), + job_dir, + worker_name, + common_bun_proc_envs.clone(), + annotation.npm, + &mut Some(occupancy_metrics), + ) + .await?; } } else { // if !*DISABLE_NSJAIL || !empty_trusted_deps || has_custom_config_registry { @@ -1031,13 +939,6 @@ pub async fn handle_bun_job( "\n\n--- BUN CODE EXECUTION ---\n".to_string() }; - if let Some(gbuntar_name) = gbuntar_name { - init_logs = format!( - "\nskipping install, using cached buntar based on lockfile hash: {gbuntar_name}{}", - init_logs - ); - } - if has_bundle_cache { init_logs = format!("\n{}{}", cache_logs, init_logs); } diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index f523ce0723..5592e0d722 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -291,7 +291,6 @@ pub const RUST_CACHE_DIR: &str = concatcp!(ROOT_CACHE_DIR, "rust"); pub const CSHARP_CACHE_DIR: &str = concatcp!(ROOT_CACHE_DIR, "csharp"); pub const BUN_CACHE_DIR: &str = concatcp!(ROOT_CACHE_NOMOUNT_DIR, "bun"); pub const BUN_BUNDLE_CACHE_DIR: &str = concatcp!(ROOT_CACHE_DIR, "bun"); -pub const BUN_DEPSTAR_CACHE_DIR: &str = concatcp!(ROOT_CACHE_NOMOUNT_DIR, "buntar"); pub const GO_BIN_CACHE_DIR: &str = concatcp!(ROOT_CACHE_DIR, "gobin"); pub const POWERSHELL_CACHE_DIR: &str = concatcp!(ROOT_CACHE_DIR, "powershell"); From 69ed5a9bbf3c0bc863ce50bc058552f7e294e8d0 Mon Sep 17 00:00:00 2001 From: Henri Courdent <122811744+hcourdent@users.noreply.github.com> Date: Thu, 13 Feb 2025 12:18:39 +0100 Subject: [PATCH 052/667] List of telemetry collected (#5282) --- .../src/lib/components/InstanceSettings.svelte | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte index ef91c8400a..476e7182f5 100644 --- a/frontend/src/lib/components/InstanceSettings.svelte +++ b/frontend/src/lib/components/InstanceSettings.svelte @@ -278,13 +278,16 @@ Anonymous usage data is collected to help improve Windmill.
The following information is collected:
    -
  • version of your instance
  • -
  • number and total duration of jobs
  • -
  • accounts usage
  • -
  • login type usage
  • -
  • workers usage
  • -
  • vCPUs usage
  • +
  • version of your instances
  • +
  • instance base URL
  • +
  • job usage (language, total duration, count)
  • +
  • login type usage (login type, count)
  • +
  • worker usage (worker, worker instance, vCPUs, memory)
  • +
  • user usage (author count, operator count)
  • +
  • superadmin email addresses
  • +
  • vCPU usage
  • memory usage
  • +
  • development instance status
{#if $enterpriseLicense} From dd695b40f41decdf9f2f3d6918d860249661fb36 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Feb 2025 13:02:30 +0100 Subject: [PATCH 053/667] fix(cli): support lock in wmill dev --- cli/dev.ts | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/cli/dev.ts b/cli/dev.ts index f69e88eb59..7cc92c45ff 100644 --- a/cli/dev.ts +++ b/cli/dev.ts @@ -18,10 +18,11 @@ import { mergeConfigWithConfigFile, readConfigFile, } from "./conf.ts"; -import { exts } from "./script.ts"; +import { exts, findGlobalDeps, removeExtensionToPath } from "./script.ts"; import { inferContentTypeFromFilePath } from "./script_common.ts"; import { OpenFlow } from "./gen/types.gen.ts"; import { FlowFile, replaceInlineScripts } from "./flow.ts"; +import { parseMetadataFile } from "./metadata.ts"; const PORT = 3001; async function dev(opts: GlobalOptions & SyncOptions) { @@ -55,9 +56,10 @@ async function dev(opts: GlobalOptions & SyncOptions) { const DOT_FLOW_SEP = ".flow" + SEP; async function loadPaths(pathsToLoad: string[]) { - const paths = pathsToLoad.filter( - (path) => - exts.some((ext) => path.endsWith(ext)) || path.includes(DOT_FLOW_SEP) + const paths = pathsToLoad.filter((path) => + exts.some( + (ext) => path.endsWith(ext) || path.endsWith(DOT_FLOW_SEP + "flow.yaml") + ) ); if (paths.length == 0) { return; @@ -84,11 +86,24 @@ async function dev(opts: GlobalOptions & SyncOptions) { const splitted = cpath.split("."); const wmPath = splitted[0]; const lang = inferContentTypeFromFilePath(cpath, conf.defaultTs); + const globalDeps = await findGlobalDeps(); + const typed = + (await parseMetadataFile( + removeExtensionToPath(cpath), + undefined, + globalDeps, + [] + ) + )?.payload + + currentLastEdit = { type: "script", content, path: wmPath, language: lang, + tag: typed?.tag, + lock: typed?.lock, }; log.info("Updated " + wmPath); broadcastChanges(currentLastEdit); @@ -100,6 +115,9 @@ async function dev(opts: GlobalOptions & SyncOptions) { content: string; path: string; language: string; + tag?: string; + lock?: string; + }; type LastEditFlow = { From 1be335f042727bbb33b5f515433b65c54bf841fe Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Feb 2025 13:40:40 +0100 Subject: [PATCH 054/667] fix(bun): remove unecessary buntar in a bun bundle world --- .../lib/components/InputTransformForm.svelte | 24 +++++++++++++++---- .../flows/propPicker/PropPickerWrapper.svelte | 1 + .../propertyPicker/PropPicker.svelte | 1 - 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/InputTransformForm.svelte b/frontend/src/lib/components/InputTransformForm.svelte index aa0c31057b..50ad1e8922 100644 --- a/frontend/src/lib/components/InputTransformForm.svelte +++ b/frontend/src/lib/components/InputTransformForm.svelte @@ -196,10 +196,26 @@ } function connectProperty(rawValue: string) { - arg.expr = getDefaultExpr(undefined, previousModuleId, rawValue) - arg.type = 'javascript' - propertyType = 'javascript' - monaco?.setCode(arg.expr) + // Extract path from variable('x') or resource('x') format + const varMatch = rawValue.match(/^variable\('([^']+)'\)$/) + const resourceMatch = rawValue.match(/^resource\('([^']+)'\)$/) + + if (varMatch) { + arg.type = 'static' + propertyType = 'static' + arg.value = '$var:' + varMatch[1] + monacoTemplate?.setCode(arg.value) + } else if (resourceMatch) { + arg.type = 'static' + propertyType = 'static' + arg.value = '$res:' + resourceMatch[1] + monacoTemplate?.setCode(arg.value) + } else { + arg.expr = getDefaultExpr(undefined, previousModuleId, rawValue) + arg.type = 'javascript' + propertyType = 'javascript' + monaco?.setCode(arg.expr) + } } function onFocus() { diff --git a/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte b/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte index 41f05c1fb5..57df089a62 100644 --- a/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte +++ b/frontend/src/lib/components/flows/propPicker/PropPickerWrapper.svelte @@ -146,6 +146,7 @@ {pickableProperties} allowCopy={!notSelectable && !$propPickerConfig} on:select={({ detail }) => { + // console.log('selecting', detail) dispatch('select', detail) if ($propPickerConfig?.onSelect(detail)) { $propPickerConfig?.clearFocus() diff --git a/frontend/src/lib/components/propertyPicker/PropPicker.svelte b/frontend/src/lib/components/propertyPicker/PropPicker.svelte index 7e62990eb6..982b95f892 100644 --- a/frontend/src/lib/components/propertyPicker/PropPicker.svelte +++ b/frontend/src/lib/components/propertyPicker/PropPicker.svelte @@ -343,7 +343,6 @@ wrapperClasses="inline-flex whitespace-nowrap w-fit" btnClasses="font-mono h-4 text-2xs font-thin px-1 rounded-[0.275rem]">- - Date: Thu, 13 Feb 2025 10:53:57 -0500 Subject: [PATCH 055/667] feat: teams workspace scripts (#5238) * backend and clients * adding teams_team_name to workspace_settings * openapi.yaml adding teams workspace settings endpoints * teams workspace settings frontend * workspaces router * build ce * ee gate * ee oauth * update client * workspace error handler * remove log * ce * point to new hub scripts * updating hubPaths * updating hubPaths * cleanup * merge * schedule teams error * polish, reactivity * sqlx compilewarning * sqlx migrate * make it build * router * fix * remove sqlx workaround * Update ee-repo-ref.txt * simplify some logic * sqlx * latest ee ref * latest ee ref --------- Co-authored-by: Ruben Fiszel --- ...8234ca7d1efeee9661f3901f298da375e73f7.json | 196 +++++++++++++++ ...c61296a3ff7489ae12f52a19f9543173ac597.json | 18 ++ ...d9474b17887711128dbb2ef15d247d50686b0.json | 22 ++ ...de63612a7506cc0671b0eb83e528c1c839db4.json | 14 ++ ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ++ ...3cd1a1d6eca4083286c6f29c9acba522d2fe3.json | 22 ++ ...b1bd45853bf5b72e0ab991e0e61fedcfb42fc.json | 16 ++ ...dcc40f463cbc52d94ed9315cf9a547d4c89f2.json | 18 ++ ...f55354ad0397356c67a6162249a3cc553f125.json | 53 ++++ ...315ff25dad08e4cb714718505b77a75d44b95.json | 15 ++ ...950295e0d0fbdabb38434534fb3430eeddc25.json | 53 ---- backend/ee-repo-ref.txt | 2 +- ...51_teams_workspace_command_script.down.sql | 3 + ...1251_teams_workspace_command_script.up.sql | 3 + backend/windmill-api/openapi.yaml | 195 ++++++++++++++ backend/windmill-api/src/lib.rs | 1 - backend/windmill-api/src/teams_ee.rs | 34 +++ backend/windmill-api/src/workspaces.rs | 36 ++- .../src/lib/components/AuthSettings.svelte | 2 +- .../lib/components/ConnectionSection.svelte | 184 ++++++++++++++ .../components/ErrorOrRecoveryHandler.svelte | 235 +++++++++++++++-- .../src/lib/components/OAuthSetting.svelte | 23 +- .../lib/components/ScheduleEditorInner.svelte | 59 +++-- frontend/src/lib/hub.ts | 3 + frontend/src/lib/hubPaths.json | 3 + .../(logged)/workspace_settings/+page.svelte | 237 +++++++++--------- python-client/wmill/wmill/client.py | 11 + typescript-client/client.ts | 2 + 28 files changed, 1266 insertions(+), 220 deletions(-) create mode 100644 backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json create mode 100644 backend/.sqlx/query-1ace9bdcde90fd2261fd64344a2d9474b17887711128dbb2ef15d247d50686b0.json create mode 100644 backend/.sqlx/query-23c37d36e16251763fabf194e41de63612a7506cc0671b0eb83e528c1c839db4.json create mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json create mode 100644 backend/.sqlx/query-3b02f3ec6b92706c26065b2fa703cd1a1d6eca4083286c6f29c9acba522d2fe3.json create mode 100644 backend/.sqlx/query-551c78392919e18019bb0a4344fb1bd45853bf5b72e0ab991e0e61fedcfb42fc.json create mode 100644 backend/.sqlx/query-72f98539ff9874479f6fc0e9f45f55354ad0397356c67a6162249a3cc553f125.json create mode 100644 backend/.sqlx/query-ebbe03cad470d0c6ae98964f630315ff25dad08e4cb714718505b77a75d44b95.json delete mode 100644 backend/.sqlx/query-eed16e356f3f36183c3db13fcc1950295e0d0fbdabb38434534fb3430eeddc25.json create mode 100644 backend/migrations/20250128201251_teams_workspace_command_script.down.sql create mode 100644 backend/migrations/20250128201251_teams_workspace_command_script.up.sql create mode 100644 frontend/src/lib/components/ConnectionSection.svelte diff --git a/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json b/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json new file mode 100644 index 0000000000..4bcf3c6ce3 --- /dev/null +++ b/backend/.sqlx/query-08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7.json @@ -0,0 +1,196 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT * FROM workspace_settings WHERE teams_team_id = $1 AND teams_command_script IS NOT NULL", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "workspace_id", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "slack_team_id", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "slack_name", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "slack_command_script", + "type_info": "Varchar" + }, + { + "ordinal": 4, + "name": "slack_email", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "auto_invite_domain", + "type_info": "Varchar" + }, + { + "ordinal": 6, + "name": "auto_invite_operator", + "type_info": "Bool" + }, + { + "ordinal": 7, + "name": "customer_id", + "type_info": "Varchar" + }, + { + "ordinal": 8, + "name": "plan", + "type_info": "Varchar" + }, + { + "ordinal": 9, + "name": "webhook", + "type_info": "Text" + }, + { + "ordinal": 10, + "name": "deploy_to", + "type_info": "Varchar" + }, + { + "ordinal": 11, + "name": "error_handler", + "type_info": "Varchar" + }, + { + "ordinal": 12, + "name": "ai_resource", + "type_info": "Jsonb" + }, + { + "ordinal": 13, + "name": "error_handler_extra_args", + "type_info": "Json" + }, + { + "ordinal": 14, + "name": "error_handler_muted_on_cancel", + "type_info": "Bool" + }, + { + "ordinal": 15, + "name": "large_file_storage", + "type_info": "Jsonb" + }, + { + "ordinal": 16, + "name": "git_sync", + "type_info": "Jsonb" + }, + { + "ordinal": 17, + "name": "default_app", + "type_info": "Varchar" + }, + { + "ordinal": 18, + "name": "auto_add", + "type_info": "Bool" + }, + { + "ordinal": 19, + "name": "automatic_billing", + "type_info": "Bool" + }, + { + "ordinal": 20, + "name": "default_scripts", + "type_info": "Jsonb" + }, + { + "ordinal": 21, + "name": "deploy_ui", + "type_info": "Jsonb" + }, + { + "ordinal": 22, + "name": "mute_critical_alerts", + "type_info": "Bool" + }, + { + "ordinal": 23, + "name": "color", + "type_info": "Varchar" + }, + { + "ordinal": 24, + "name": "operator_settings", + "type_info": "Jsonb" + }, + { + "ordinal": 25, + "name": "ai_models", + "type_info": "VarcharArray" + }, + { + "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": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + true, + true, + true, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + false, + true, + true, + true, + true + ] + }, + "hash": "08f288d2781d823e109a9e5b8848234ca7d1efeee9661f3901f298da375e73f7" +} diff --git a/backend/.sqlx/query-1730f39fd1793d45fbb41b21389c61296a3ff7489ae12f52a19f9543173ac597.json b/backend/.sqlx/query-1730f39fd1793d45fbb41b21389c61296a3ff7489ae12f52a19f9543173ac597.json index 03da2cee85..6df517592a 100644 --- a/backend/.sqlx/query-1730f39fd1793d45fbb41b21389c61296a3ff7489ae12f52a19f9543173ac597.json +++ b/backend/.sqlx/query-1730f39fd1793d45fbb41b21389c61296a3ff7489ae12f52a19f9543173ac597.json @@ -137,6 +137,21 @@ "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": { @@ -171,6 +186,9 @@ true, true, false, + true, + true, + true, true ] }, diff --git a/backend/.sqlx/query-1ace9bdcde90fd2261fd64344a2d9474b17887711128dbb2ef15d247d50686b0.json b/backend/.sqlx/query-1ace9bdcde90fd2261fd64344a2d9474b17887711128dbb2ef15d247d50686b0.json new file mode 100644 index 0000000000..9a8ef973a4 --- /dev/null +++ b/backend/.sqlx/query-1ace9bdcde90fd2261fd64344a2d9474b17887711128dbb2ef15d247d50686b0.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT teams_team_id FROM workspace_settings WHERE workspace_id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "teams_team_id", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + true + ] + }, + "hash": "1ace9bdcde90fd2261fd64344a2d9474b17887711128dbb2ef15d247d50686b0" +} diff --git a/backend/.sqlx/query-23c37d36e16251763fabf194e41de63612a7506cc0671b0eb83e528c1c839db4.json b/backend/.sqlx/query-23c37d36e16251763fabf194e41de63612a7506cc0671b0eb83e528c1c839db4.json new file mode 100644 index 0000000000..917540aec4 --- /dev/null +++ b/backend/.sqlx/query-23c37d36e16251763fabf194e41de63612a7506cc0671b0eb83e528c1c839db4.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE workspace_settings\n SET teams_team_id = null, teams_team_name = null WHERE workspace_id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [] + }, + "hash": "23c37d36e16251763fabf194e41de63612a7506cc0671b0eb83e528c1c839db4" +} diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json new file mode 100644 index 0000000000..704778d04a --- /dev/null +++ b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json @@ -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" +} diff --git a/backend/.sqlx/query-3b02f3ec6b92706c26065b2fa703cd1a1d6eca4083286c6f29c9acba522d2fe3.json b/backend/.sqlx/query-3b02f3ec6b92706c26065b2fa703cd1a1d6eca4083286c6f29c9acba522d2fe3.json new file mode 100644 index 0000000000..7c35515d12 --- /dev/null +++ b/backend/.sqlx/query-3b02f3ec6b92706c26065b2fa703cd1a1d6eca4083286c6f29c9acba522d2fe3.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT EXISTS (SELECT 1\n FROM workspace_settings\n WHERE workspace_id <> $1\n AND teams_command_script IS NOT NULL\n AND teams_team_id IS NOT NULL\n AND teams_team_id = (SELECT teams_team_id FROM workspace_settings WHERE workspace_id = $1))\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "3b02f3ec6b92706c26065b2fa703cd1a1d6eca4083286c6f29c9acba522d2fe3" +} diff --git a/backend/.sqlx/query-551c78392919e18019bb0a4344fb1bd45853bf5b72e0ab991e0e61fedcfb42fc.json b/backend/.sqlx/query-551c78392919e18019bb0a4344fb1bd45853bf5b72e0ab991e0e61fedcfb42fc.json new file mode 100644 index 0000000000..4a9bcd8cf3 --- /dev/null +++ b/backend/.sqlx/query-551c78392919e18019bb0a4344fb1bd45853bf5b72e0ab991e0e61fedcfb42fc.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE workspace_settings\n SET teams_team_id = $1, teams_team_name = $2\n WHERE workspace_id = $3\n AND NOT EXISTS (\n SELECT 1 FROM workspace_settings\n WHERE teams_team_id = $1 AND workspace_id <> $2\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "551c78392919e18019bb0a4344fb1bd45853bf5b72e0ab991e0e61fedcfb42fc" +} diff --git a/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json b/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json index 920176991b..14685a8bfa 100644 --- a/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json +++ b/backend/.sqlx/query-55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2.json @@ -137,6 +137,21 @@ "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": { @@ -171,6 +186,9 @@ true, true, false, + true, + true, + true, true ] }, diff --git a/backend/.sqlx/query-72f98539ff9874479f6fc0e9f45f55354ad0397356c67a6162249a3cc553f125.json b/backend/.sqlx/query-72f98539ff9874479f6fc0e9f45f55354ad0397356c67a6162249a3cc553f125.json new file mode 100644 index 0000000000..1f10da84cf --- /dev/null +++ b/backend/.sqlx/query-72f98539ff9874479f6fc0e9f45f55354ad0397356c67a6162249a3cc553f125.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT\n workspace.id AS \"id!\",\n workspace.name AS \"name!\",\n workspace.owner AS \"owner!\",\n workspace.deleted AS \"deleted!\",\n workspace.premium AS \"premium!\",\n workspace_settings.color AS \"color!\"\n FROM workspace\n LEFT JOIN workspace_settings ON workspace.id = workspace_settings.workspace_id\n LIMIT $1 OFFSET $2", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id!", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "name!", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "owner!", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "deleted!", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "premium!", + "type_info": "Bool" + }, + { + "ordinal": 5, + "name": "color!", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true, + true, + true, + true, + true, + true + ] + }, + "hash": "72f98539ff9874479f6fc0e9f45f55354ad0397356c67a6162249a3cc553f125" +} diff --git a/backend/.sqlx/query-ebbe03cad470d0c6ae98964f630315ff25dad08e4cb714718505b77a75d44b95.json b/backend/.sqlx/query-ebbe03cad470d0c6ae98964f630315ff25dad08e4cb714718505b77a75d44b95.json new file mode 100644 index 0000000000..e087310961 --- /dev/null +++ b/backend/.sqlx/query-ebbe03cad470d0c6ae98964f630315ff25dad08e4cb714718505b77a75d44b95.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE workspace_settings SET teams_command_script = $1 WHERE workspace_id = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "ebbe03cad470d0c6ae98964f630315ff25dad08e4cb714718505b77a75d44b95" +} diff --git a/backend/.sqlx/query-eed16e356f3f36183c3db13fcc1950295e0d0fbdabb38434534fb3430eeddc25.json b/backend/.sqlx/query-eed16e356f3f36183c3db13fcc1950295e0d0fbdabb38434534fb3430eeddc25.json deleted file mode 100644 index 5e0817ae84..0000000000 --- a/backend/.sqlx/query-eed16e356f3f36183c3db13fcc1950295e0d0fbdabb38434534fb3430eeddc25.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT workspace.id, workspace.name, workspace.owner, workspace.deleted, workspace.premium, workspace_settings.color\n FROM workspace\n LEFT JOIN workspace_settings ON workspace.id = workspace_settings.workspace_id\n LIMIT $1 OFFSET $2", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Varchar" - }, - { - "ordinal": 1, - "name": "name", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "owner", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "deleted", - "type_info": "Bool" - }, - { - "ordinal": 4, - "name": "premium", - "type_info": "Bool" - }, - { - "ordinal": 5, - "name": "color", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - true - ] - }, - "hash": "eed16e356f3f36183c3db13fcc1950295e0d0fbdabb38434534fb3430eeddc25" -} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index b3154d15ef..fa0585b17f 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -8dab3198496461e40610145e4c818fce2345e20a \ No newline at end of file +841642097f07cc1f765ef74059d66aae2eba2c1d \ No newline at end of file diff --git a/backend/migrations/20250128201251_teams_workspace_command_script.down.sql b/backend/migrations/20250128201251_teams_workspace_command_script.down.sql new file mode 100644 index 0000000000..5b8b721e87 --- /dev/null +++ b/backend/migrations/20250128201251_teams_workspace_command_script.down.sql @@ -0,0 +1,3 @@ +ALTER TABLE workspace_settings DROP COLUMN teams_command_script; +ALTER TABLE workspace_settings DROP COLUMN teams_team_id; +ALTER TABLE workspace_settings DROP COLUMN teams_team_name; \ No newline at end of file diff --git a/backend/migrations/20250128201251_teams_workspace_command_script.up.sql b/backend/migrations/20250128201251_teams_workspace_command_script.up.sql new file mode 100644 index 0000000000..5373b6c57b --- /dev/null +++ b/backend/migrations/20250128201251_teams_workspace_command_script.up.sql @@ -0,0 +1,3 @@ +ALTER TABLE workspace_settings ADD COLUMN teams_command_script TEXT DEFAULT NULL; +ALTER TABLE workspace_settings ADD COLUMN teams_team_id TEXT DEFAULT NULL; +ALTER TABLE workspace_settings ADD COLUMN teams_team_name TEXT DEFAULT NULL; diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 1bcc37256e..d873da73fc 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1728,6 +1728,12 @@ paths: type: string slack_command_script: type: string + teams_team_id: + type: string + teams_command_script: + type: string + teams_team_name: + type: string auto_invite_domain: type: string auto_invite_operator: @@ -1954,6 +1960,110 @@ paths: schema: type: string + /w/{workspace}/workspaces/edit_teams_command: + post: + summary: edit teams command + operationId: editTeamsCommand + tags: + - workspace + parameters: + - $ref: "#/components/parameters/WorkspaceId" + requestBody: + description: WorkspaceInvite + required: true + content: + application/json: + schema: + type: object + properties: + slack_command_script: + type: string + responses: + "200": + description: status + content: + text/plain: + schema: + type: string + + /w/{workspace}/workspaces/available_teams_ids: + get: + summary: list available teams ids + operationId: listAvailableTeamsIds + tags: + - workspace + parameters: + - $ref: "#/components/parameters/WorkspaceId" + responses: + "200": + description: status + content: + application/json: + schema: + type: array + items: + type: object + properties: + team_name: + type: string + team_id: + type: string + + /w/{workspace}/workspaces/available_teams_channels: + get: + summary: list available teams channels + operationId: listAvailableTeamsChannels + tags: + - workspace + parameters: + - $ref: "#/components/parameters/WorkspaceId" + responses: + "200": + description: status + content: + application/json: + schema: + type: array + items: + type: object + properties: + channel_name: + type: string + channel_id: + type: string + service_url: + type: string + tenant_id: + type: string + + /w/{workspace}/workspaces/connect_teams: + post: + summary: connect teams + operationId: connectTeams + tags: + - workspace + parameters: + - $ref: "#/components/parameters/WorkspaceId" + requestBody: + description: connect teams + required: true + content: + application/json: + schema: + type: object + properties: + team_id: + type: string + team_name: + type: string + responses: + "200": + description: status + content: + text/plain: + schema: + type: string + /w/{workspace}/workspaces/run_slack_message_test_job: post: summary: run a job that sends a message to Slack @@ -1987,6 +2097,40 @@ paths: properties: job_uuid: type: string + + /w/{workspace}/workspaces/run_teams_message_test_job: + post: + summary: run a job that sends a message to Teams + operationId: runTeamsMessageTestJob + tags: + - workspace + parameters: + - $ref: "#/components/parameters/WorkspaceId" + requestBody: + description: path to hub script to run and its corresponding args + required: true + content: + application/json: + schema: + type: object + properties: + hub_script_path: + type: string + channel: + type: string + test_msg: + type: string + + responses: + "200": + description: status + content: + text/json: + schema: + type: object + properties: + job_uuid: + type: string /w/{workspace}/workspaces/edit_deploy_to: post: @@ -3199,6 +3343,22 @@ paths: schema: type: string + /w/{workspace}/oauth/disconnect_teams: + post: + summary: disconnect teams + operationId: disconnectTeams + tags: + - oauth + parameters: + - $ref: "#/components/parameters/WorkspaceId" + responses: + "200": + description: disconnected teams + content: + text/plain: + schema: + type: string + /oauth/list_logins: get: summary: list oauth logins @@ -3289,6 +3449,41 @@ paths: items: $ref: '#/components/schemas/TeamInfo' + /teams/activities: + post: + summary: send update to Microsoft Teams activity + description: Respond to a Microsoft Teams activity after a workspace command is run + operationId: sendMessageToConversation + tags: + - teams + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - conversation_id + - text + properties: + conversation_id: + type: string + description: The ID of the Teams conversation/activity + success: + type: boolean + description: Used for styling the card conditionally + default: true + text: + type: string + description: The message text to be sent in the Teams card + card_block: + type: object + description: The card block to be sent in the Teams card + + responses: + '200': + description: Activity processed successfully + /w/{workspace}/resources/create: post: summary: create resource diff --git a/backend/windmill-api/src/lib.rs b/backend/windmill-api/src/lib.rs index 7ab057292f..b4c262b9eb 100644 --- a/backend/windmill-api/src/lib.rs +++ b/backend/windmill-api/src/lib.rs @@ -106,7 +106,6 @@ mod slack_approvals; mod smtp_server_ee; mod static_assets; mod stripe_ee; -#[cfg(feature = "enterprise")] mod teams_ee; mod tracing_init; mod triggers; diff --git a/backend/windmill-api/src/teams_ee.rs b/backend/windmill-api/src/teams_ee.rs index 2933d4214c..46cbe72059 100644 --- a/backend/windmill-api/src/teams_ee.rs +++ b/backend/windmill-api/src/teams_ee.rs @@ -1,5 +1,39 @@ +use http::status::StatusCode; +#[cfg(feature = "enterprise")] use axum::Router; +use windmill_common::error::Error; +pub async fn edit_teams_command() -> Result { + return Err(Error::BadRequest( + "Teams only available on enterprise".to_string(), + )); +} + +pub async fn workspaces_list_available_teams_ids() -> Result { + return Err(Error::BadRequest( + "Teams only available on enterprise".to_string(), + )); +} + +pub async fn connect_teams() -> Result { + return Err(Error::BadRequest( + "Teams only available on enterprise".to_string(), + )); +} + +pub async fn run_teams_message_test_job() -> Result { + return Err(Error::BadRequest( + "Teams only available on enterprise".to_string(), + )); +} + +pub async fn workspaces_list_available_teams_channels() -> Result { + return Err(Error::BadRequest( + "Teams only available on enterprise".to_string(), + )); +} + +#[cfg(feature = "enterprise")] pub fn teams_service() -> Router { Router::new() } \ No newline at end of file diff --git a/backend/windmill-api/src/workspaces.rs b/backend/windmill-api/src/workspaces.rs index f832b85f14..b2dbb9d2f7 100644 --- a/backend/windmill-api/src/workspaces.rs +++ b/backend/windmill-api/src/workspaces.rs @@ -58,6 +58,11 @@ use sqlx::{FromRow, Postgres, Transaction}; use windmill_common::oauth2::InstanceEvent; use windmill_common::utils::not_found_if_none; +use crate::teams_ee::{ + connect_teams, edit_teams_command, run_teams_message_test_job, + workspaces_list_available_teams_channels, workspaces_list_available_teams_ids, +}; + lazy_static::lazy_static! { static ref WORKSPACE_KEY_REGEXP: Regex = Regex::new("^[a-zA-Z0-9]{64}$").unwrap(); } @@ -73,10 +78,24 @@ pub fn workspaced_service() -> Router { .route("/get_settings", get(get_settings)) .route("/get_deploy_to", get(get_deploy_to)) .route("/edit_slack_command", post(edit_slack_command)) + .route("/edit_teams_command", post(edit_teams_command)) + .route( + "/available_teams_ids", + get(workspaces_list_available_teams_ids), + ) + .route( + "/available_teams_channels", + get(workspaces_list_available_teams_channels), + ) + .route("/connect_teams", post(connect_teams)) .route( "/run_slack_message_test_job", post(run_slack_message_test_job), ) + .route( + "/run_teams_message_test_job", + post(run_teams_message_test_job), + ) .route("/edit_webhook", post(edit_webhook)) .route("/edit_auto_invite", post(edit_auto_invite)) .route("/edit_deploy_to", post(edit_deploy_to)) @@ -168,9 +187,14 @@ pub struct WorkspaceSettings { #[serde(skip_serializing_if = "Option::is_none")] pub slack_team_id: Option, #[serde(skip_serializing_if = "Option::is_none")] + pub teams_team_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub teams_team_name: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub slack_name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub slack_command_script: Option, + pub teams_command_script: Option, pub slack_email: String, #[serde(skip_serializing_if = "Option::is_none")] pub auto_invite_domain: Option, @@ -1380,9 +1404,15 @@ async fn list_workspaces_as_super_admin( let mut tx = user_db.begin(&authed).await?; let workspaces = sqlx::query_as!( Workspace, - "SELECT workspace.id, workspace.name, workspace.owner, workspace.deleted, workspace.premium, workspace_settings.color - FROM workspace - LEFT JOIN workspace_settings ON workspace.id = workspace_settings.workspace_id + "SELECT + workspace.id AS \"id!\", + workspace.name AS \"name!\", + workspace.owner AS \"owner!\", + workspace.deleted AS \"deleted!\", + workspace.premium AS \"premium!\", + workspace_settings.color AS \"color!\" + FROM workspace + LEFT JOIN workspace_settings ON workspace.id = workspace_settings.workspace_id LIMIT $1 OFFSET $2", per_page as i32, offset as i32 diff --git a/frontend/src/lib/components/AuthSettings.svelte b/frontend/src/lib/components/AuthSettings.svelte index f6db65526a..b9ea98aeb9 100644 --- a/frontend/src/lib/components/AuthSettings.svelte +++ b/frontend/src/lib/components/AuthSettings.svelte @@ -172,7 +172,7 @@
- +
{#each Object.keys(oauths) as k} diff --git a/frontend/src/lib/components/ConnectionSection.svelte b/frontend/src/lib/components/ConnectionSection.svelte new file mode 100644 index 0000000000..104d6527b5 --- /dev/null +++ b/frontend/src/lib/components/ConnectionSection.svelte @@ -0,0 +1,184 @@ + + +
+
Connect Workspace to {platform.charAt(0).toUpperCase() + platform.slice(1)}
+ + Connect your Windmill workspace to your {platform} workspace to trigger a script or a flow with a + '/windmill' command. + +
+ +{#if teamName} +
+
+ + {#if display_name} + Connected to Team '{display_name}' + {/if} +
+ {#if $enterpriseLicense || platform === 'slack'} + + + {/if} +
+{:else} +
+ {#if platform === 'teams'} + + {#if $enterpriseLicense} +
+ +
+
+ +
+ {/if} + {:else} + + {/if} + Not connected +
+{/if} + +
+
Script or flow to run on /windmill command
+
+ {#if !teamName || (!$enterpriseLicense && platform === 'teams')} +
+ {/if} + +
+ +
+ Pick a script or flow meant to be triggered when the `/windmill` command is invoked. Upon + connection, templates for a script + and flow are available. + +

+ + The script or flow chosen is passed the parameters `response_url: string` and `text: string` + respectively the url to reply directly to the trigger and the text of the command. + +

+ + It can take additionally the following args: channel_id, user_name, user_id, command, + trigger_id, api_app_id + +

+ + + The script or flow is permissioned as group "{platform}" that will be automatically created + after connection to {platform.charAt(0).toUpperCase() + platform.slice(1)}. + + +

+ + See more on + documentation. +
+
diff --git a/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte b/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte index 57674aedef..6c3b4790ba 100644 --- a/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte +++ b/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte @@ -1,10 +1,13 @@ diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index 5f9faa8ed9..cbd1f9bfbd 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -88,7 +88,7 @@ flowJobIds?.flowJobs?.map((x, id) => `iter #${id + 1} not loaded by frontend yet`) ?? [] let retry_selected = '' - let timeout: NodeJS.Timeout + let timeout: NodeJS.Timeout | undefined = undefined let localModuleStates: Writable> = writable({}) let localDurationStatuses: Writable> = writable({}) @@ -403,7 +403,7 @@ } } - $: isForloopSelected && globalModuleStates && loadJobInProgress() + $: isForloopSelected && globalModuleStates && debounceLoadJobInProgress() async function getNewJob(jobId: string, initialJob: Job | undefined) { if ( @@ -421,10 +421,33 @@ } } + 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() { - dispatch('start') + if (!started) { + started = true + dispatch('start') + } if (jobId != '00000000-0000-0000-0000-000000000000') { try { const newJob = await getNewJob(jobId, initialJob) @@ -447,7 +470,7 @@ } } if (job?.type !== 'CompletedJob' && errorCount < 4 && !destroyed) { - timeout = setTimeout(() => loadJobInProgress(), reducedPolling ? 5000 : 1000) + debounceLoadJobInProgress() } else { dispatch('done', job) } diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 7d9d8da47c..4cc1f4c826 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -388,19 +388,20 @@ {/if} - - job?.['result'] != undefined && (viewTab = 'result')} - bind:this={testJobLoader} - bind:getLogs - bind:isLoading={testIsLoading} - bind:job - bind:jobUpdateLastFetch - workspaceOverride={$workspaceStore} - bind:notfound -/> +{#if job?.job_kind != 'flow' && job?.job_kind != 'flownode' && job?.job_kind != 'flowpreview'} + job?.['result'] != undefined && (viewTab = 'result')} + bind:this={testJobLoader} + bind:getLogs + bind:isLoading={testIsLoading} + bind:job + bind:jobUpdateLastFetch + workspaceOverride={$workspaceStore} + bind:notfound + /> +{/if} From e0f3e0b1f8a3ff55629ed22a543b752ecc108d3d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 16:51:49 +0100 Subject: [PATCH 080/667] nit --- frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 4cc1f4c826..3c125343b7 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -342,6 +342,7 @@ path: job.script_path! }) } + job = undefined await goto('/run/' + id + '?workspace=' + $workspaceStore) } else { From cfe5232f56ad03713f858d8a7567dfaa9b07cc2e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 17:15:59 +0100 Subject: [PATCH 081/667] nits --- .../src/lib/components/FlowJobResult.svelte | 2 +- .../lib/components/FlowStatusViewerInner.svelte | 3 +-- .../(root)/(logged)/run/[...run]/+page.svelte | 17 ++++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/lib/components/FlowJobResult.svelte b/frontend/src/lib/components/FlowJobResult.svelte index 6160ebe45b..d603d72a92 100644 --- a/frontend/src/lib/components/FlowJobResult.svelte +++ b/frontend/src/lib/components/FlowJobResult.svelte @@ -77,7 +77,7 @@ class:border={!noBorder} class="grid {!col ? 'grid-cols-2' - : 'grid-rows-2'} shadow border border-tertiary-inverse grow overflow-hidden" + : 'grid-rows-2 max-h-screen'} shadow border border-tertiary-inverse grow overflow-hidden" >
Result diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index cbd1f9bfbd..d356196aa3 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -1309,7 +1309,7 @@ durationStatuses={localDurationStatuses} /> {:else if rightColumnSelect == 'node_status'} -
+
{#if selectedNode} {@const node = $localModuleStates[selectedNode]} @@ -1388,7 +1388,6 @@ />
{/if} - Date: Fri, 14 Feb 2025 18:49:26 +0100 Subject: [PATCH 082/667] nits --- frontend/src/lib/components/FlowJobResult.svelte | 1 - frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/FlowJobResult.svelte b/frontend/src/lib/components/FlowJobResult.svelte index d603d72a92..ca071370a4 100644 --- a/frontend/src/lib/components/FlowJobResult.svelte +++ b/frontend/src/lib/components/FlowJobResult.svelte @@ -43,7 +43,6 @@ } async function getLogs() { - console.log('getLogs', iteration, jobId) iteration += 1 if (jobId) { const getUpdate = await JobService.getJobUpdates({ diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 7105094747..1b817d15d6 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -927,6 +927,9 @@ on:jobsLoaded={({ detail }) => { job = detail }} + on:done={(e) => { + job = e.detail + }} initialJob={job} workspaceId={$workspaceStore} bind:selectedJobStep From 41eecc1437301bea557fb467cc48b502162de419 Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Fri, 14 Feb 2025 19:03:40 +0100 Subject: [PATCH 083/667] fix: static website serving (#5298) --- backend/windmill-api/src/http_triggers.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/backend/windmill-api/src/http_triggers.rs b/backend/windmill-api/src/http_triggers.rs index 0d6be258e1..722a639842 100644 --- a/backend/windmill-api/src/http_triggers.rs +++ b/backend/windmill-api/src/http_triggers.rs @@ -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,19 +547,22 @@ async fn get_http_route_trigger( ); }); } - router.insert(route_path.as_str(), idx).unwrap_or_else(|e| { - tracing::warn!( - "Failed to consider http trigger route {}: {:?}", - route_path, - e, - ); - }); + router + .insert(format!("/{}", route_path), idx) + .unwrap_or_else(|e| { + tracing::warn!( + "Failed to consider http trigger route {}: {:?}", + route_path, + e, + ); + }); } - let trigger_idx = router.at(route_path.0.as_str()).ok(); + let requested_path = format!("/{}", route_path.0); + let trigger_idx = router.at(requested_path.as_str()).ok(); let matchit::Match { value: trigger_idx, params } = - not_found_if_none(trigger_idx, "Trigger", route_path.0.as_str())?; + not_found_if_none(trigger_idx, "Trigger", requested_path.as_str())?; let trigger = triggers.remove(trigger_idx.to_owned()); From dad829adf4bff97e998f7d18e0bbafb8497d4198 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 14 Feb 2025 14:48:33 -0500 Subject: [PATCH 084/667] feat: adding docker log rotation by default in docker compose (#5295) * feat: adding docker log rotation by default in docker compose * add newline * add compression --- .env | 4 ++++ docker-compose.yml | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.env b/.env index d4a48661cd..da41f78d5c 100644 --- a/.env +++ b/.env @@ -7,3 +7,7 @@ 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 diff --git a/docker-compose.yml b/docker-compose.yml index df2a99b38d..a8ac7ba565 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,12 @@ 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: @@ -22,6 +29,7 @@ services: interval: 10s timeout: 5s retries: 5 + logging: *default-logging windmill_server: image: ${WM_IMAGE} @@ -40,6 +48,7 @@ services: condition: service_healthy volumes: - worker_logs:/tmp/windmill/logs + logging: *default-logging windmill_worker: image: ${WM_IMAGE} @@ -65,6 +74,7 @@ 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: @@ -90,6 +100,7 @@ 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} @@ -135,6 +146,7 @@ services: volumes: - windmill_index:/tmp/windmill/search - worker_logs:/tmp/windmill/logs + logging: *default-logging lsp: image: ghcr.io/windmill-labs/windmill-lsp:latest @@ -144,6 +156,7 @@ services: - 3001 volumes: - lsp_cache:/pyls/.cache + logging: *default-logging multiplayer: image: ghcr.io/windmill-labs/windmill-multiplayer:latest @@ -152,6 +165,7 @@ services: restart: unless-stopped expose: - 3002 + logging: *default-logging caddy: image: ghcr.io/windmill-labs/caddy-l4:latest @@ -170,6 +184,7 @@ 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 From 8adf02ba3c8aaf98b63f92fe61046f6cdffbba71 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 14 Feb 2025 17:07:17 -0500 Subject: [PATCH 085/667] reactivity fix on teams workspace dropdown (#5300) --- frontend/src/lib/components/ConnectionSection.svelte | 2 +- frontend/src/lib/components/ScheduleEditorInner.svelte | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/lib/components/ConnectionSection.svelte b/frontend/src/lib/components/ConnectionSection.svelte index 104d6527b5..c0ad6eea20 100644 --- a/frontend/src/lib/components/ConnectionSection.svelte +++ b/frontend/src/lib/components/ConnectionSection.svelte @@ -35,7 +35,7 @@ isFetching = false } - $: workspaceStore && platform && $enterpriseLicense === 'teams' && loadTeams() + $: workspaceStore && platform && $enterpriseLicense && loadTeams() async function connectTeams() { const selectedTeam = teams.find((team) => team.team_id === selected_teams_team) diff --git a/frontend/src/lib/components/ScheduleEditorInner.svelte b/frontend/src/lib/components/ScheduleEditorInner.svelte index 4d19aa1991..722354c8df 100644 --- a/frontend/src/lib/components/ScheduleEditorInner.svelte +++ b/frontend/src/lib/components/ScheduleEditorInner.svelte @@ -344,7 +344,6 @@ 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 From f1d9922688bf9caabddf8d690aedaf56efc43ad8 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 14 Feb 2025 23:07:39 +0100 Subject: [PATCH 086/667] chore(main): release 1.463.0 (#5293) * chore(main): release 1.463.0 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 17 ++++++ backend/Cargo.lock | 58 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 63 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a535cc09f7..f1063c11aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [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) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 9c02a43c36..edb01c756a 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -6608,9 +6608,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" +checksum = "f58e5423e24c18cc840e1c98370b3993c6649cd1678b4d24318bcf0a083cbe88" dependencies = [ "cc", ] @@ -6737,9 +6737,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.462.3" +version = "1.463.0" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.462.3" +version = "1.463.0" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.462.3" +version = "1.463.0" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.462.3" +version = "1.463.0" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.462.3" +version = "1.463.0" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.462.3" +version = "1.463.0" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.462.3" +version = "1.463.0" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 3e60f4d878..3952f0b5c1 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.462.3" +version = "1.463.0" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.462.3" +version = "1.463.0" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 2b9bfe7c0f..87af4c763d 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.462.3 + version: 1.463.0 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index d55c726139..12d38c1797 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.462.3"; +export const VERSION = "v1.463.0"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 1ae97653b6..847d32c1d3 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.462.3"; +export const VERSION = "1.463.0"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 87f3664686..bf535a2d6e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.462.3", + "version": "1.463.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.462.3", + "version": "1.463.0", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 14762e9b43..1bb507930e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.462.3", + "version": "1.463.0", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 15339d6e59..0628a6f79a 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.462.3" -wmill_pg = ">=1.462.3" +wmill = ">=1.463.0" +wmill_pg = ">=1.463.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 18bc00e847..e48c92ac39 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.462.3 + version: 1.463.0 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 13f17174b8..7c4e2f0fef 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.462.3' + ModuleVersion = '1.463.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 7b7cdcbd0b..402ecfad42 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.462.3" +version = "1.463.0" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 10fcb541c6..e0de24be3b 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.462.3" +version = "1.463.0" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 71c58a044d..2a86dfa9f7 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.462.3", + "version": "1.463.0", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index ed36b757b9..aaf238c292 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.462.3", + "version": "1.463.0", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 7cce9443de..2b5a684cd4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.462.3 +1.463.0 From 53f47bcfc84ed747b55d3a7d84ccf13ff1c43c97 Mon Sep 17 00:00:00 2001 From: pyranota <92104930+pyranota@users.noreply.github.com> Date: Sat, 15 Feb 2025 22:39:37 +0300 Subject: [PATCH 087/667] fix: not able to filter runs by schedule (#5302) --- backend/windmill-api/src/jobs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 092d6b69b1..ccb408c020 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -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)); From cad14c25f6a06c6592fb034722c4d2ae187d8694 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 15 Feb 2025 20:44:26 +0100 Subject: [PATCH 088/667] chore(main): release 1.463.1 (#5303) * chore(main): release 1.463.1 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 ++ backend/Cargo.lock | 80 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 64 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1063c11aa..d1b0d4de92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index edb01c756a..1a6859b98e 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -3209,9 +3209,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -5776,9 +5776,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.70" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", "cfg-if", @@ -5817,9 +5817,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.105" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -6796,7 +6796,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.0", - "zerocopy 0.8.17", + "zerocopy 0.8.18", ] [[package]] @@ -6854,7 +6854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" dependencies = [ "getrandom 0.3.1", - "zerocopy 0.8.17", + "zerocopy 0.8.18", ] [[package]] @@ -8150,9 +8150,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" dependencies = [ "serde", ] @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.0" +version = "1.463.1" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.0" +version = "1.463.1" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.0" +version = "1.463.1" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.0" +version = "1.463.1" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.0" +version = "1.463.1" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.0" +version = "1.463.1" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.0" +version = "1.463.1" dependencies = [ "anyhow", "async-recursion", @@ -11783,11 +11783,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.17" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713" +checksum = "79386d31a42a4996e3336b0919ddb90f81112af416270cff95b5f5af22b839c2" dependencies = [ - "zerocopy-derive 0.8.17", + "zerocopy-derive 0.8.18", ] [[package]] @@ -11803,9 +11803,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.17" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626" +checksum = "76331675d372f91bf8d17e13afbd5fe639200b73d01f0fc748bb059f9cca2db7" dependencies = [ "proc-macro2", "quote", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 3952f0b5c1..f9067b4361 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.0" +version = "1.463.1" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.0" +version = "1.463.1" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 87af4c763d..bc4043804f 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.0 + version: 1.463.1 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 12d38c1797..68139f65e5 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.0"; +export const VERSION = "v1.463.1"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 847d32c1d3..75029f10f2 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.0"; +export const VERSION = "1.463.1"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index bf535a2d6e..af7e3d1e84 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.0", + "version": "1.463.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.0", + "version": "1.463.1", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 1bb507930e..d482f1176b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.0", + "version": "1.463.1", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 0628a6f79a..b95612444b 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.0" -wmill_pg = ">=1.463.0" +wmill = ">=1.463.1" +wmill_pg = ">=1.463.1" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index e48c92ac39..1d4d669e32 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.0 + version: 1.463.1 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 7c4e2f0fef..55789555ab 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.0' + ModuleVersion = '1.463.1' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 402ecfad42..aa50fe4e23 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.0" +version = "1.463.1" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index e0de24be3b..1574c459c4 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.0" +version = "1.463.1" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 2a86dfa9f7..d95c2d2258 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.0", + "version": "1.463.1", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index aaf238c292..792708174f 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.0", + "version": "1.463.1", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 2b5a684cd4..2d18b487c4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.0 +1.463.1 From 062e6bc161b56215cb081209d37ad8e0cbd1dd99 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Sat, 15 Feb 2025 20:03:25 -0500 Subject: [PATCH 089/667] fix: show skipped flows as success (#5304) --- backend/windmill-api/src/jobs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index ccb408c020..405a12cd1a 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -2681,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' as success", + "v2_job_completed.status = 'success' OR v2_job_completed.status = 'skipped' as success", "false as deleted", "v2_job_completed.status = 'canceled' as canceled", "v2_job_completed.canceled_by", @@ -5472,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' as success", + "v2_job_completed.status = 'success' OR v2_job_completed.status = 'skipped' as success", "v2_job.runnable_id as script_hash", "v2_job.runnable_path as script_path", "false as deleted", From 449cbcf0c30d0c6046d48d388b8ed4fcdf5f02a3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 16 Feb 2025 02:07:01 +0100 Subject: [PATCH 090/667] chore(main): release 1.463.2 (#5305) * chore(main): release 1.463.2 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 +++ backend/Cargo.lock | 50 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 49 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1b0d4de92..897d3205a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 1a6859b98e..f9b0598ab1 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.1" +version = "1.463.2" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.1" +version = "1.463.2" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.1" +version = "1.463.2" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.1" +version = "1.463.2" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.1" +version = "1.463.2" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.1" +version = "1.463.2" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.1" +version = "1.463.2" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index f9067b4361..69ae45d5ca 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.1" +version = "1.463.2" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.1" +version = "1.463.2" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index bc4043804f..7be948a7a0 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.1 + version: 1.463.2 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 68139f65e5..29292e5b21 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.1"; +export const VERSION = "v1.463.2"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 75029f10f2..28a6436cc6 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.1"; +export const VERSION = "1.463.2"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index af7e3d1e84..39e870f751 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.1", + "version": "1.463.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.1", + "version": "1.463.2", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index d482f1176b..b9d79dccd1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.1", + "version": "1.463.2", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index b95612444b..c519e3a81c 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.1" -wmill_pg = ">=1.463.1" +wmill = ">=1.463.2" +wmill_pg = ">=1.463.2" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 1d4d669e32..a2e58e4261 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.1 + version: 1.463.2 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 55789555ab..f73febb17e 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.1' + ModuleVersion = '1.463.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index aa50fe4e23..fee5c46ce8 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.1" +version = "1.463.2" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 1574c459c4..7df9b85b77 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.1" +version = "1.463.2" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index d95c2d2258..908d2f3417 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.1", + "version": "1.463.2", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 792708174f..37b158cd14 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.1", + "version": "1.463.2", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 2d18b487c4..fbc30c990c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.1 +1.463.2 From 3535016608b48fade48d87dd77656e528ab1190d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 11:49:06 +0100 Subject: [PATCH 091/667] improve version detection from source --- backend/windmill-common/src/utils.rs | 7 +++++-- backend/windmill-common/src/worker.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/windmill-common/src/utils.rs b/backend/windmill-common/src/utils.rs index 735c3d4a27..0a6117999a 100644 --- a/backend/windmill-common/src/utils.rs +++ b/backend/windmill-common/src/utils.rs @@ -47,8 +47,11 @@ lazy_static::lazy_static! { .connect_timeout(std::time::Duration::from_secs(10)) .build().unwrap(); pub static ref GIT_SEM_VERSION: Version = Version::parse( - // skip first `v` character. - GIT_VERSION.split_at(1).1 + if GIT_VERSION.starts_with('v') { + &GIT_VERSION[1..] + } else { + GIT_VERSION + } ).unwrap_or(Version::new(0, 1, 0)); } diff --git a/backend/windmill-common/src/worker.rs b/backend/windmill-common/src/worker.rs index 487a217d7f..eb5bd1d6f1 100644 --- a/backend/windmill-common/src/worker.rs +++ b/backend/windmill-common/src/worker.rs @@ -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(x.split_at(1).1).ok()) + .filter_map(|x| semver::Version::parse(if x.starts_with('v') { &x[1..] } else { x }).ok()) .min() .unwrap_or_else(|| cur_version.clone()); From 3493185e2f6c66324f2de16b63cafd135c9aab4a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 14:34:22 +0100 Subject: [PATCH 092/667] nits --- backend/windmill-api/src/jobs.rs | 2 +- .../(logged)/workspace_settings/+page.svelte | 24 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 405a12cd1a..6b0efa485d 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1161,7 +1161,7 @@ pub struct ListableCompletedJob { pub parent_job: Option, pub created_by: String, pub created_at: chrono::DateTime, - pub started_at: chrono::DateTime, + pub started_at: Option>, pub duration_ms: i64, pub success: bool, #[serde(skip_serializing_if = "Option::is_none")] diff --git a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte index 55726138c0..1a060debfb 100644 --- a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte @@ -447,11 +447,14 @@ 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 @@ -812,8 +815,8 @@ {#if !$enterpriseLicense}
- 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.
{/if} @@ -867,12 +870,7 @@
- {#if $superadmin} -

- When deleting the workspace, it will be archived for a short period of time and then - permanently deleted. -

- {:else} + {#if !$superadmin}

Only instance superadmins can delete a workspace.

{/if} {#if $workspaceStore === 'admins' || $workspaceStore === 'starter'} From 0208f53541473aa51bed0e15d938def3d4530e3f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 15:20:39 +0100 Subject: [PATCH 093/667] fix: windmill_admin has implicit bypass rls on v2_job even if role not set --- ...0205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql | 1 + ...250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql create mode 100644 backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql diff --git a/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql new file mode 100644 index 0000000000..d2f607c5b8 --- /dev/null +++ b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.down.sql @@ -0,0 +1 @@ +-- Add down migration script here diff --git a/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql new file mode 100644 index 0000000000..f83ee7f348 --- /dev/null +++ b/backend/migrations/20250205131519_windmill_admin_skip_bypassrls_on_v2_job.up.sql @@ -0,0 +1,3 @@ +-- 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); From fe337293dace8c36e8b577ff3302619996fc9f1f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 15:41:06 +0100 Subject: [PATCH 094/667] chore(main): release 1.463.3 (#5308) * chore(main): release 1.463.3 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 7 ++ backend/Cargo.lock | 66 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 57 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 897d3205a1..9c14a34e5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [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) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index f9b0598ab1..7d86e09e30 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -6795,7 +6795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.0", + "rand_core 0.9.1", "zerocopy 0.8.18", ] @@ -6826,7 +6826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.0", + "rand_core 0.9.1", ] [[package]] @@ -6849,9 +6849,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +checksum = "a88e0da7a2c97baa202165137c158d0a2e824ac465d13d81046727b34cb247d3" dependencies = [ "getrandom 0.3.1", "zerocopy 0.8.18", @@ -7575,9 +7575,9 @@ checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "ryu-js" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" +checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15" [[package]] name = "safetensors" @@ -9297,9 +9297,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "a40f762a77d2afa88c2d919489e390a12bdd261ed568e60cfa7e48d4e20f0d33" dependencies = [ "cfg-if", "fastrand 2.3.0", @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.2" +version = "1.463.3" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.2" +version = "1.463.3" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.2" +version = "1.463.3" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.2" +version = "1.463.3" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.2" +version = "1.463.3" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.2" +version = "1.463.3" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.2" +version = "1.463.3" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 69ae45d5ca..72c133e293 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.2" +version = "1.463.3" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.2" +version = "1.463.3" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 7be948a7a0..d22a3886d3 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.2 + version: 1.463.3 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 29292e5b21..32b434eb2f 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.2"; +export const VERSION = "v1.463.3"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 28a6436cc6..165ce2e8c8 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.2"; +export const VERSION = "1.463.3"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 39e870f751..b4fa6c0b8a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.2", + "version": "1.463.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.2", + "version": "1.463.3", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index b9d79dccd1..a22bfb038b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.2", + "version": "1.463.3", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index c519e3a81c..5e8f57d701 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.2" -wmill_pg = ">=1.463.2" +wmill = ">=1.463.3" +wmill_pg = ">=1.463.3" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index a2e58e4261..bc0eed2d61 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.2 + version: 1.463.3 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index f73febb17e..b1e9637ce1 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.2' + ModuleVersion = '1.463.3' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index fee5c46ce8..1942a92887 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.2" +version = "1.463.3" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 7df9b85b77..1cf8de80e6 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.2" +version = "1.463.3" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 908d2f3417..d513475883 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.2", + "version": "1.463.3", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 37b158cd14..3c2ff4eee0 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.2", + "version": "1.463.3", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index fbc30c990c..a970451822 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.2 +1.463.3 From 5e22690bd9257d6c515c07b9357f955c2fcbb298 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 17:48:02 +0100 Subject: [PATCH 095/667] fix: improve que job indices for faster performances --- ...5b252449bd569df374e40ce8820fc3d75a0f0.json | 12 +++++++++ ...4ff1d599049ebefdaf97a017c9cef8d52ce20.json | 12 +++++++++ ...cfecf48305f5f4b644b3c35355074e1ccce28.json | 12 +++++++++ ...d9347206d2deaa99f9a4541101e610f84a50a.json | 12 +++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- backend/windmill-api/src/db.rs | 17 ++++++++++++ backend/windmill-common/src/lib.rs | 26 +++++++++---------- 7 files changed, 79 insertions(+), 14 deletions(-) create mode 100644 backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json create mode 100644 backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json create mode 100644 backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json create mode 100644 backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json diff --git a/backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json b/backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json new file mode 100644 index 0000000000..2f17b5e8db --- /dev/null +++ b/backend/.sqlx/query-0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS queue_sort", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "0efb16cbf130ec6e9922ecc82a95b252449bd569df374e40ce8820fc3d75a0f0" +} diff --git a/backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json b/backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json new file mode 100644 index 0000000000..d804949078 --- /dev/null +++ b/backend/.sqlx/query-3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS queue_sort_2", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "3738096c29ab9d964be8a74bfd14ff1d599049ebefdaf97a017c9cef8d52ce20" +} diff --git a/backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json b/backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json new file mode 100644 index 0000000000..815f1fed70 --- /dev/null +++ b/backend/.sqlx/query-3bbde0fa35d935ec2dd8bd1fb14cfecf48305f5f4b644b3c35355074e1ccce28.json @@ -0,0 +1,12 @@ +{ + "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" +} diff --git a/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json b/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json new file mode 100644 index 0000000000..aa744f6f08 --- /dev/null +++ b/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for) WHERE running = false", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index 5bfff47576..c2dfed73a2 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - true + null ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index a034569fda..106b29a810 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -655,6 +655,23 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .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(()) } diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 802af6196b..396eafdf7f 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -281,7 +281,7 @@ pub async fn connect_db( pub async fn connect( database_url: &str, max_connections: u32, - worker_mode: bool, + _worker_mode: bool, ) -> Result, error::Error> { use std::time::Duration; @@ -289,18 +289,18 @@ pub async fn connect( .min_connections((max_connections / 5).clamp(3, max_connections)) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins - .after_connect(move |conn, _| { - if worker_mode { - Box::pin(async move { - sqlx::query("SET enable_seqscan = OFF;") - .execute(conn) - .await?; - Ok(()) - }) - } else { - Box::pin(async move { Ok(()) }) - } - }) + // .after_connect(move |conn, _| { + // if worker_mode { + // Box::pin(async move { + // sqlx::query("SET enable_seqscan = OFF;") + // .execute(conn) + // .await?; + // Ok(()) + // }) + // } else { + // Box::pin(async move { Ok(()) }) + // } + // }) .connect_with( sqlx::postgres::PgConnectOptions::from_str(database_url)?.statement_cache_capacity(400), ) From 85c56e9450773c03a44a4c99821717de5aef287f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 19:17:30 +0100 Subject: [PATCH 096/667] fix: improve que job indices for faster performances --- ...d9347206d2deaa99f9a4541101e610f84a50a.json | 12 ---- backend/windmill-api/src/db.rs | 6 +- backend/windmill-api/src/jobs.rs | 7 +- benchmarks/benchmark_oneoff.ts | 64 ++++++++++++++----- benchmarks/benchmark_suite.ts | 2 +- 5 files changed, 58 insertions(+), 33 deletions(-) delete mode 100644 backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json diff --git a/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json b/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json deleted file mode 100644 index aa744f6f08..0000000000 --- a/backend/.sqlx/query-8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "CREATE INDEX CONCURRENTLY queue_sort_2_v2 ON v2_job_queue (priority DESC NULLS LAST, scheduled_for) WHERE running = false", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "8263fe28097e094cbdbdcd16668d9347206d2deaa99f9a4541101e610f84a50a" -} diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index 106b29a810..a1e260b7d2 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -660,9 +660,9 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .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!("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) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 6b0efa485d..c678af5465 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1800,13 +1800,13 @@ async fn list_jobs( } sqlc.unwrap().limit(per_page).offset(offset).query()? }; - let mut tx = user_db.begin(&authed).await?; + let mut tx: Transaction<'_, Postgres> = user_db.begin(&authed).await?; #[cfg(feature = "prometheus")] let start = Instant::now(); #[cfg(feature = "prometheus")] - if _api_list_jobs_query_duration.is_some() { + if _api_list_jobs_query_duration.is_some() || true { tracing::info!("list_jobs query: {}", sql); } @@ -4695,6 +4695,7 @@ struct BatchInfo { flow_value: Option, path: Option, rawscript: Option, + tag: Option, } #[tracing::instrument(level = "trace", skip_all)] @@ -4863,6 +4864,8 @@ async fn add_batch_jobs( } else { format!("{}", language.as_str()) } + } else if let Some(tag) = batch_info.tag { + tag } else { format!("{}", language.as_str()) }; diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 41321b3ec6..ccfbfc09d9 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -152,7 +152,6 @@ export async function main({ await createBenchScript(kind, workspace); } - pastJobs = await getCompletedJobsCount(); const jobsSent = jobs; console.log(`Bulk creating ${jobsSent} jobs`); @@ -208,11 +207,43 @@ export async function main({ throw new Error("Unknown script pattern " + kind); } - const response = await fetch( - config.server + + let testOtherTag = false; + const otherTagTodo = 500000; + if (testOtherTag) { + 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/${jobsSent}`, + `/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(); + + const response = await fetch( + config.server + + "/api/w/" + + config.workspace_id + + `/jobs/add_batch_jobs/${jobsSent}`, { method: "POST", headers: { @@ -222,20 +253,24 @@ 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(); @@ -249,7 +284,7 @@ export async function main({ const loopStart = Date.now(); if (!didStart) { const actual_queue = await getQueueCount(); - if (actual_queue < jobsSent) { + if (actual_queue < jobsSent + otherTagTodo) { start = Date.now(); didStart = true; } @@ -263,9 +298,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; @@ -275,8 +310,7 @@ 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` ) ); diff --git a/benchmarks/benchmark_suite.ts b/benchmarks/benchmark_suite.ts index e03148ce99..7828c62d9b 100644 --- a/benchmarks/benchmark_suite.ts +++ b/benchmarks/benchmark_suite.ts @@ -27,7 +27,7 @@ async function warmUp( token, workspace, kind: "noop", - jobs: 50000, + jobs: 100000, }); } From e0d7a54a2debfad9684d7581ef9c83075a188cc5 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 19:26:34 +0100 Subject: [PATCH 097/667] nit on bench scripts --- benchmarks/benchmark_oneoff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index ccfbfc09d9..285d471df8 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -284,7 +284,7 @@ export async function main({ const loopStart = Date.now(); if (!didStart) { const actual_queue = await getQueueCount(); - if (actual_queue < jobsSent + otherTagTodo) { + if (actual_queue < jobsSent + (testOtherTag ? otherTagTodo : 0)) { start = Date.now(); didStart = true; } From 953082681e2c4fd71d5ac1acf372265ccc72297b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 21:26:46 +0100 Subject: [PATCH 098/667] fix: improve que job indices for faster performances --- ...f073a79e300f3dd48f14122d1782eee663cd.json} | 7 +++--- ...cb4bdd64075939a4aa2c117e18372511ea7e0.json | 12 ---------- ...8008a9479bf4b3d7231371ebf26382ecde365.json | 12 ++++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- backend/windmill-api/src/jobs.rs | 7 +++++- backend/windmill-common/src/lib.rs | 6 ++--- backend/windmill-queue/src/jobs.rs | 3 +++ backend/windmill-worker/src/worker.rs | 2 +- benchmarks/benchmark_oneoff.ts | 22 ++++++++++--------- benchmarks/benchmark_suite.ts | 2 +- 10 files changed, 43 insertions(+), 32 deletions(-) rename backend/.sqlx/{query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json => query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json} (72%) delete mode 100644 backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json create mode 100644 backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json diff --git a/backend/.sqlx/query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json b/backend/.sqlx/query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json similarity index 72% rename from backend/.sqlx/query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json rename to backend/.sqlx/query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json index 0c379a7bdb..0a9e91b206 100644 --- a/backend/.sqlx/query-19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395.json +++ b/backend/.sqlx/query-0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd.json @@ -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()", + "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))", "describe": { "columns": [ { @@ -17,7 +17,8 @@ "parameters": { "Left": [ "Text", - "Bool" + "Bool", + "TextArray" ] }, "nullable": [ @@ -25,5 +26,5 @@ null ] }, - "hash": "19cc8499f682ec34d54bc4f694cb281a9bd7f5431c646c6268513751fff95395" + "hash": "0cb0e912bc942af2b1ef784455f3f073a79e300f3dd48f14122d1782eee663cd" } diff --git a/backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json b/backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json deleted file mode 100644 index 6ccaeece1c..0000000000 --- a/backend/.sqlx/query-47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "VACUUM (skip_locked) v2_job_queue, v2_job_runtime, v2_job_status", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "47455b0ebaf999ab58b2cba3d74cb4bdd64075939a4aa2c117e18372511ea7e0" -} diff --git a/backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json b/backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json new file mode 100644 index 0000000000..641c94c555 --- /dev/null +++ b/backend/.sqlx/query-b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "VACUUM v2_job_queue, v2_job_runtime, v2_job_status", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "b9b38d63af3670d1f11d5cbb82a8008a9479bf4b3d7231371ebf26382ecde365" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index c2dfed73a2..5bfff47576 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - null + true ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index c678af5465..b5e1bc5a08 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -1647,6 +1647,7 @@ struct QueueStats { #[derive(Deserialize)] pub struct CountQueueJobsQuery { all_workspaces: Option, + tags: Option, } async fn count_queue_jobs( @@ -1654,12 +1655,16 @@ async fn count_queue_jobs( Path(w_id): Path, Query(cq): Query, ) -> error::JsonResult { + let tags = cq + .tags + .map(|t| t.split(',').map(|s| s.to_string()).collect::>()); 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()", + "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))", w_id, w_id == "admins" && cq.all_workspaces.unwrap_or(false), + tags.as_ref().map(|v| v.as_slice()) ) .fetch_one(&db) .await?, diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 396eafdf7f..c8996b3595 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -292,9 +292,9 @@ pub async fn connect( // .after_connect(move |conn, _| { // if worker_mode { // Box::pin(async move { - // sqlx::query("SET enable_seqscan = OFF;") - // .execute(conn) - // .await?; + // // sqlx::query("SET enable_seqscan = OFF;") + // // .execute(conn) + // // .await?; // Ok(()) // }) // } else { diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index 2d2025da92..5d360d3acb 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -2108,12 +2108,15 @@ 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; } diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 5592e0d722..590b57227c 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -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 (skip_locked) v2_job_queue, v2_job_runtime, v2_job_status") + if let Err(e) = sqlx::query!("VACUUM v2_job_queue, v2_job_runtime, v2_job_status") .execute(&db2) .await { diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 285d471df8..62a3e3d5f7 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -37,6 +37,7 @@ 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, @@ -96,11 +97,11 @@ export async function main({ windmill.setClient(final_token, host); const enc = (s: string) => new TextEncoder().encode(s); - async function getQueueCount() { + async function getQueueCount(tags?: string[]) { return ( await ( await fetch( - config.server + "/api/w/" + config.workspace_id + "/jobs/queue/count", + config.server + "/api/w/" + config.workspace_id + "/jobs/queue/count" + (tags && tags.length > 0 ? "?tags=" + tags.join(",") : ""), { headers: { ["Authorization"]: "Bearer " + config.token } } ) ).json() @@ -132,11 +133,11 @@ export async function main({ } let pastJobs = 0; - async function getCompletedJobsCount(): Promise { + async function getCompletedJobsCount(tags?: string[]): Promise { const completedJobs = ( await ( await fetch( - host + "/api/w/" + config.workspace_id + "/jobs/completed/count", + host + "/api/w/" + config.workspace_id + "/jobs/completed/count" + (tags && tags.length > 0 ? "?tags=" + tags.join(",") : ""), { headers: { ["Authorization"]: "Bearer " + config.token } } ) ).json() @@ -208,8 +209,9 @@ export async function main({ } let testOtherTag = false; - const otherTagTodo = 500000; if (testOtherTag) { + const otherTagTodo = 2000000; + let parsed = JSON.parse(body); parsed.tag = "test"; let nbody = JSON.stringify(parsed); @@ -237,7 +239,7 @@ export async function main({ } } - pastJobs = await getCompletedJobsCount(); + pastJobs = await getCompletedJobsCount(NON_TEST_TAGS); const response = await fetch( config.server + @@ -283,14 +285,14 @@ export async function main({ while (completedJobs < jobsSent) { const loopStart = Date.now(); if (!didStart) { - const actual_queue = await getQueueCount(); - if (actual_queue < jobsSent + (testOtherTag ? otherTagTodo : 0)) { + const actual_queue = await getQueueCount(NON_TEST_TAGS); + if (actual_queue < jobsSent) { start = Date.now(); didStart = true; } } else { const elapsed = start ? Date.now() - start : 0; - completedJobs = await getCompletedJobsCount(); + completedJobs = await getCompletedJobsCount(NON_TEST_TAGS); if (nStepsFlow > 0) { completedJobs = Math.floor(completedJobs / (nStepsFlow + 1)); } @@ -328,7 +330,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()); + console.log("queue length:", await getQueueCount(NON_TEST_TAGS)); if ( !noVerify && diff --git a/benchmarks/benchmark_suite.ts b/benchmarks/benchmark_suite.ts index 7828c62d9b..e03148ce99 100644 --- a/benchmarks/benchmark_suite.ts +++ b/benchmarks/benchmark_suite.ts @@ -27,7 +27,7 @@ async function warmUp( token, workspace, kind: "noop", - jobs: 100000, + jobs: 50000, }); } From 0dd0a795a6b5d0d58be2d32b76778ad1e455748d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 21:54:00 +0100 Subject: [PATCH 099/667] nit benchmarks improvement --- benchmarks/benchmark_oneoff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 62a3e3d5f7..2800eadebb 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -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`); + console.log(`Job ${uuid} did not output the correct value: ${JSON.stringify(job.result)}`); incorrectResults++; } } catch (_) { From c6b2e6653a6d4a8994e078d3a82fad64639714fe Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 22:20:33 +0100 Subject: [PATCH 100/667] output incorrect jobs in benchmarks --- benchmarks/benchmark_oneoff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 2800eadebb..9ec48df3a4 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -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.result)}`); + console.log(`Job ${uuid} did not output the correct value: ${JSON.stringify(job)}`); incorrectResults++; } } catch (_) { From 935b5b799636c0f02597315837268d4a76f6709a Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Mon, 17 Feb 2025 16:44:26 -0500 Subject: [PATCH 101/667] fix: improve teams settings in workspace settings (#5316) --- ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ------------------- ...4caecda6335eda5b2e97e5a7370361653ff48.json | 26 +++++++++++++++++++ ...849e72bdc197c17c0fc51777c1dc9267e2daf.json | 12 +++++++++ ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- ...a6bdb16a1be66e993a5cfadf6de2e3c8a5021.json | 12 +++++++++ ...2bcae9640cee7b936820cb46c011222a77ff0.json | 14 ++++++++++ backend/ee-repo-ref.txt | 2 +- 7 files changed, 66 insertions(+), 28 deletions(-) delete mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json create mode 100644 backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json create mode 100644 backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json create mode 100644 backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json create mode 100644 backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json deleted file mode 100644 index 704778d04a..0000000000 --- a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json +++ /dev/null @@ -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(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" -} diff --git a/backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json b/backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json new file mode 100644 index 0000000000..f3dc153254 --- /dev/null +++ b/backend/.sqlx/query-50c17c7848760aaf0f869acfc444caecda6335eda5b2e97e5a7370361653ff48.json @@ -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(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" +} diff --git a/backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json b/backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json new file mode 100644 index 0000000000..d52d46f1dd --- /dev/null +++ b/backend/.sqlx/query-65c339164e7669360d231d70105849e72bdc197c17c0fc51777c1dc9267e2daf.json @@ -0,0 +1,12 @@ +{ + "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" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index 5bfff47576..c2dfed73a2 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - true + null ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json b/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json new file mode 100644 index 0000000000..18f29062a6 --- /dev/null +++ b/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE global_settings\n SET value = (\n SELECT jsonb_agg(elem)\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": "df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021" +} diff --git a/backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json b/backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json new file mode 100644 index 0000000000..4c2cd96ca9 --- /dev/null +++ b/backend/.sqlx/query-e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE global_settings SET value = $1 WHERE name = 'teams'", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "e565f3b2e51059f563d18a8a9442bcae9640cee7b936820cb46c011222a77ff0" +} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index c94a57b20f..83ad30b351 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -703a03ac430b6f603a5a189e5b4ff9a42bb2bd7f \ No newline at end of file +e507af5589efb1a8a72ae4e231130f749bde738d \ No newline at end of file From 9234701f05316b5d14a4964df1b94e212837fb4a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 17 Feb 2025 23:43:16 +0100 Subject: [PATCH 102/667] ensure index creation of root_job_by_path --- backend/windmill-api/src/db.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index a1e260b7d2..b8d15160c7 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -545,8 +545,8 @@ async fn fix_job_completed_index(db: &DB) -> Result<(), Error> { .await?; }); - run_windmill_migration!("fix_job_index_1", &db, |tx| { - let migration_job_name = "fix_job_completed_index_4"; + run_windmill_migration!("fix_job_index_1_II", &db, |tx| { + let migration_job_name = "fix_job_index_1_II"; 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)") @@ -579,13 +579,20 @@ 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 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 ix_job_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?; From 3d7882577fc01ef3cce008848e3de211e9416b41 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 00:00:51 +0100 Subject: [PATCH 103/667] chore(main): release 1.463.4 (#5309) * chore(main): release 1.463.4 * Update CHANGELOG.md * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 8 +++ ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ++++++++ ...8c6395e2440ea27553b7ccb18d7149b106728.json | 12 ++++ ...f9a71af5996bc76f328b3ba1cf68a71880462.json | 12 ++++ backend/Cargo.lock | 62 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 19 files changed, 106 insertions(+), 48 deletions(-) create mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json create mode 100644 backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json create mode 100644 backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c14a34e5b..8d8093eecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [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) diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json new file mode 100644 index 0000000000..704778d04a --- /dev/null +++ b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json @@ -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" +} diff --git a/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json b/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json new file mode 100644 index 0000000000..fce1c4942a --- /dev/null +++ b/backend/.sqlx/query-6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DROP INDEX CONCURRENTLY IF EXISTS root_job_index_by_path_2", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "6536214f31e9d600e868b01385d8c6395e2440ea27553b7ccb18d7149b106728" +} diff --git a/backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json b/backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json new file mode 100644 index 0000000000..b3d20cccea --- /dev/null +++ b/backend/.sqlx/query-c481e5d63ebf1aa537cc4ce4e84f9a71af5996bc76f328b3ba1cf68a71880462.json @@ -0,0 +1,12 @@ +{ + "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" +} diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 7d86e09e30..f82041c837 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1668,9 +1668,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.29" +version = "4.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" +checksum = "92b7b18d71fad5313a1e320fa9897994228ce274b60faa4d694fe0ea89cd9e6d" dependencies = [ "clap_builder", "clap_derive", @@ -1678,9 +1678,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.29" +version = "4.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" +checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c" dependencies = [ "anstream", "anstyle", @@ -9297,9 +9297,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.17.0" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40f762a77d2afa88c2d919489e390a12bdd261ed568e60cfa7e48d4e20f0d33" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand 2.3.0", @@ -10858,7 +10858,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "axum", @@ -10901,7 +10901,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "argon2", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.3" +version = "1.463.4" dependencies = [ "base64 0.22.1", "chrono", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.3" +version = "1.463.4" dependencies = [ "chrono", "serde", @@ -11026,7 +11026,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "serde", @@ -11040,7 +11040,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-stream", @@ -11099,7 +11099,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.3" +version = "1.463.4" dependencies = [ "regex", "serde", @@ -11113,7 +11113,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "bytes", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.3" +version = "1.463.4" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11148,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.3" +version = "1.463.4" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11157,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11169,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "serde_json", @@ -11181,7 +11181,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "gosyn", @@ -11193,7 +11193,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11205,7 +11205,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11216,7 +11216,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11227,7 +11227,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-recursion", @@ -11247,7 +11247,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11264,7 +11264,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11276,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11294,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11316,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "serde_json", @@ -11326,7 +11326,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-recursion", @@ -11359,7 +11359,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.3" +version = "1.463.4" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.3" +version = "1.463.4" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 72c133e293..0b8c02d1fa 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.3" +version = "1.463.4" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.3" +version = "1.463.4" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index d22a3886d3..0e9b0328d4 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.3 + version: 1.463.4 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 32b434eb2f..fc4f611794 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.3"; +export const VERSION = "v1.463.4"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 165ce2e8c8..51c8bd0809 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.3"; +export const VERSION = "1.463.4"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b4fa6c0b8a..9a8bce2889 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.3", + "version": "1.463.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.3", + "version": "1.463.4", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index a22bfb038b..1ece7bb764 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.3", + "version": "1.463.4", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 5e8f57d701..18b12dfc57 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.3" -wmill_pg = ">=1.463.3" +wmill = ">=1.463.4" +wmill_pg = ">=1.463.4" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index bc0eed2d61..043c7c77fb 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.3 + version: 1.463.4 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index b1e9637ce1..7ab35ebe95 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.3' + ModuleVersion = '1.463.4' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 1942a92887..29a80185e2 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.3" +version = "1.463.4" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 1cf8de80e6..ee2dac54aa 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.3" +version = "1.463.4" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index d513475883..c4e0f34c3d 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.3", + "version": "1.463.4", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 3c2ff4eee0..ba67288973 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.3", + "version": "1.463.4", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index a970451822..c6fd9a4d69 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.3 +1.463.4 From 3b6585afdf004929be135b7c3f7cf1aa678f4d0c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 01:35:49 +0100 Subject: [PATCH 104/667] nit benchmarks --- ...8ed593004c22bb5d11170b3196e290dd1d966.json | 26 ------------------- ...c3030216b5a4ed669f77962509d1c2c6cb780.json | 12 --------- benchmarks/benchmark_oneoff.ts | 2 +- benchmarks/lib.ts | 4 +-- 4 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json delete mode 100644 backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json diff --git a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json b/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json deleted file mode 100644 index 704778d04a..0000000000 --- a/backend/.sqlx/query-2fa27b0a71740e4e168879cf9a58ed593004c22bb5d11170b3196e290dd1d966.json +++ /dev/null @@ -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(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" -} diff --git a/backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json b/backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json deleted file mode 100644 index 200a5bf47f..0000000000 --- a/backend/.sqlx/query-3bacf9cd9aa63f4bec5f983f4a0c3030216b5a4ed669f77962509d1c2c6cb780.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "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" -} diff --git a/benchmarks/benchmark_oneoff.ts b/benchmarks/benchmark_oneoff.ts index 9ec48df3a4..6685eae1c5 100644 --- a/benchmarks/benchmark_oneoff.ts +++ b/benchmarks/benchmark_oneoff.ts @@ -201,7 +201,7 @@ 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(25000) + "echo \"$WM_FLOW_JOB_ID\"\n", + content: "# let's bloat that bash script, 3.. 2.. 1.. BOOM\n".repeat(100) + "echo \"$WM_FLOW_JOB_ID\"\n", }, }); } else { diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index fc4f611794..d7543a3d55 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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(25000) + "echo \"$WM_FLOW_JOB_ID\"\n", + 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`, }, } ], From 588ff79364c632563f9977000cff8682bf94b4f3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 08:43:03 +0100 Subject: [PATCH 105/667] make benchmarks even more stable --- ...9c2e1e9ca0ed33077ade8d7560e7cc21fa06.json} | 5 ++-- ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- backend/pg_log_tail | 0 backend/windmill-common/src/lib.rs | 26 +++++++++---------- backend/windmill-queue/src/jobs.rs | 20 +++++++------- 5 files changed, 26 insertions(+), 27 deletions(-) rename backend/.sqlx/{query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json => query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json} (60%) create mode 100644 backend/pg_log_tail diff --git a/backend/.sqlx/query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json b/backend/.sqlx/query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json similarity index 60% rename from backend/.sqlx/query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json rename to backend/.sqlx/query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json index 2872c1655b..8a4b957c2a 100644 --- a/backend/.sqlx/query-d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745.json +++ b/backend/.sqlx/query-c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "DELETE FROM v2_job_queue WHERE workspace_id = $1 AND id = $2 RETURNING 1", + "query": "DELETE FROM v2_job_queue WHERE id = $1 RETURNING 1", "describe": { "columns": [ { @@ -11,7 +11,6 @@ ], "parameters": { "Left": [ - "Text", "Uuid" ] }, @@ -19,5 +18,5 @@ null ] }, - "hash": "d25c58d2722ad3dcd91101ce6f66e1d802dd5d82e1cd5f5ed3a15cbc75eb6745" + "hash": "c92cc71e6d10c41368f7aa75b0799c2e1e9ca0ed33077ade8d7560e7cc21fa06" } diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index c2dfed73a2..5bfff47576 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - null + true ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/pg_log_tail b/backend/pg_log_tail new file mode 100644 index 0000000000..e69de29bb2 diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index c8996b3595..802af6196b 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -281,7 +281,7 @@ pub async fn connect_db( pub async fn connect( database_url: &str, max_connections: u32, - _worker_mode: bool, + worker_mode: bool, ) -> Result, error::Error> { use std::time::Duration; @@ -289,18 +289,18 @@ pub async fn connect( .min_connections((max_connections / 5).clamp(3, max_connections)) .max_connections(max_connections) .max_lifetime(Duration::from_secs(30 * 60)) // 30 mins - // .after_connect(move |conn, _| { - // if worker_mode { - // Box::pin(async move { - // // sqlx::query("SET enable_seqscan = OFF;") - // // .execute(conn) - // // .await?; - // Ok(()) - // }) - // } else { - // Box::pin(async move { Ok(()) }) - // } - // }) + .after_connect(move |conn, _| { + if worker_mode { + Box::pin(async move { + sqlx::query("SET enable_seqscan = OFF;") + .execute(conn) + .await?; + Ok(()) + }) + } else { + Box::pin(async move { Ok(()) }) + } + }) .connect_with( sqlx::postgres::PgConnectOptions::from_str(database_url)?.statement_cache_capacity(400), ) diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index 5d360d3acb..e582fa39dc 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -566,6 +566,9 @@ pub async fn add_completed_job( 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; @@ -663,7 +666,7 @@ pub async fn add_completed_job( // tracing::error!("Added completed job {:#?}", queued_job); let mut _skip_downstream_error_handlers = false; - tx = delete_job(tx, &queued_job.workspace_id, job_id).await?; + tx = delete_job(tx, &job_id).await?; // tracing::error!("3 {:?}", start.elapsed()); if queued_job.is_flow_step { @@ -858,6 +861,7 @@ pub async fn add_completed_job( "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, i64, bool)> }) .retry( @@ -2597,21 +2601,17 @@ async fn extract_result_from_job_result( pub async fn delete_job<'c>( mut tx: Transaction<'c, Postgres>, - w_id: &str, - job_id: Uuid, + job_id: &Uuid, ) -> windmill_common::error::Result> { #[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 workspace_id = $1 AND id = $2 RETURNING 1", - w_id, - job_id - ) - .fetch_optional(&mut *tx) - .await; + let job_removed = + sqlx::query_scalar!("DELETE FROM v2_job_queue WHERE id = $1 RETURNING 1", job_id,) + .fetch_optional(&mut *tx) + .await; if let Err(job_removed) = job_removed { tracing::error!( From 0c391e92a22b89221f7754a1ed360c6ee6e80965 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 09:51:21 +0100 Subject: [PATCH 106/667] improve benchmarks --- .github/workflows/benchmark.yml | 2 ++ benchmarks/benchmark_suite.ts | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f95dee00da..b48ad1c990 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -162,6 +162,7 @@ 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: @@ -281,6 +282,7 @@ 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: diff --git a/benchmarks/benchmark_suite.ts b/benchmarks/benchmark_suite.ts index e03148ce99..f4840dda05 100644 --- a/benchmarks/benchmark_suite.ts +++ b/benchmarks/benchmark_suite.ts @@ -39,6 +39,7 @@ async function main({ workspace, configPath, workers, + factor }: { host: string; email?: string; @@ -47,6 +48,7 @@ async function main({ workspace: string; configPath: string; workers: number; + factor?: number; }) { async function getConfig(configPath: string): Promise { if (configPath.startsWith("http")) { @@ -77,7 +79,7 @@ async function main({ token, workspace, kind: benchmark.kind, - jobs: benchmark.jobs, + jobs: benchmark.jobs * (factor ?? 1), }); if (benchmark.noSave) { @@ -153,6 +155,9 @@ await new Command() "Number of workers that are used to run the benchmarks (only affect graph title)", { default: 1 } ) + .option("--factor ", "Factor to multiply the number of jobs by.", { + default: 1, + }) .action(main) .command( "upgrade", From 1b46e0f08426497d549cf5007c93981df9ab41e5 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:25:42 +0100 Subject: [PATCH 107/667] fix: fix teams cleanup preventing start --- ...05ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json | 12 ++++++++++++ ...d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- ...611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json | 12 ------------ backend/ee-repo-ref.txt | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json delete mode 100644 backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json diff --git a/backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json b/backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json new file mode 100644 index 0000000000..91718513bb --- /dev/null +++ b/backend/.sqlx/query-81b06122c7a12a314d8905ba5c7c14aa7614f2610e79a8c7302eaa63fb74984d.json @@ -0,0 +1,12 @@ +{ + "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" +} diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index 5bfff47576..c2dfed73a2 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - true + null ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json b/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json deleted file mode 100644 index 18f29062a6..0000000000 --- a/backend/.sqlx/query-df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE global_settings\n SET value = (\n SELECT jsonb_agg(elem)\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": "df3b60c1d0fb44c97bf2611a7cda6bdb16a1be66e993a5cfadf6de2e3c8a5021" -} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 83ad30b351..23791d63cd 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -e507af5589efb1a8a72ae4e231130f749bde738d \ No newline at end of file +d6aeb430a172cb8e969a4d29bd0e0727c2a25b9d \ No newline at end of file From 112361adbaa24780913f774a8f3cb3e5ffbfec91 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:32:38 +0100 Subject: [PATCH 108/667] chore(main): release 1.463.5 (#5318) * chore(main): release 1.463.4 * update * Update CHANGELOG.md --- CHANGELOG.md | 8 ++ backend/Cargo.lock | 109 +++++++----------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 69 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d8093eecf..458b3a19ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [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) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index f82041c837..53223e672c 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -263,7 +263,7 @@ dependencies = [ "arrow-data", "arrow-schema", "chrono", - "chrono-tz 0.9.0", + "chrono-tz", "half", "hashbrown 0.14.5", "num", @@ -1610,18 +1610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", - "chrono-tz-build 0.3.0", - "phf", -] - -[[package]] -name = "chrono-tz" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c6ac4f2c0bf0f44e9161aec9675e1050aa4a530663c4a9e37e108fa948bca9f" -dependencies = [ - "chrono", - "chrono-tz-build 0.4.0", + "chrono-tz-build", "phf", ] @@ -1636,16 +1625,6 @@ dependencies = [ "phf_codegen", ] -[[package]] -name = "chrono-tz-build" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" -dependencies = [ - "parse-zoneinfo", - "phf_codegen", -] - [[package]] name = "cipher" version = "0.3.0" @@ -10858,7 +10837,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "axum", @@ -10901,7 +10880,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "argon2", @@ -10913,14 +10892,14 @@ dependencies = [ "async_zip", "axum", "base32", - "base64 0.22.1", + "base64 0.13.1", "byteorder", "bytes", "candle-core", "candle-nn", "candle-transformers", "chrono", - "chrono-tz 0.10.1", + "chrono-tz", "const_format", "cookie 0.17.0", "cron", @@ -10932,7 +10911,7 @@ dependencies = [ "hmac", "http 1.2.0", "hyper 1.6.0", - "itertools 0.14.0", + "itertools 0.10.5", "jsonwebtoken", "lazy_static", "magic-crypt", @@ -10974,7 +10953,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "tower 0.5.2", + "tower 0.4.13", "tower-cookies", "tower-http", "tracing", @@ -10995,9 +10974,9 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.4" +version = "1.463.5" dependencies = [ - "base64 0.22.1", + "base64 0.13.1", "chrono", "openapiv3", "prettyplease 0.1.25", @@ -11013,7 +10992,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.4" +version = "1.463.5" dependencies = [ "chrono", "serde", @@ -11026,7 +11005,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "serde", @@ -11040,7 +11019,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-stream", @@ -11049,7 +11028,7 @@ dependencies = [ "axum", "bytes", "chrono", - "chrono-tz 0.10.1", + "chrono-tz", "const_format", "crc", "cron", @@ -11062,7 +11041,7 @@ dependencies = [ "hmac", "hyper 1.6.0", "indexmap 2.7.1", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "magic-crypt", "mail-send", @@ -11099,7 +11078,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.4" +version = "1.463.5" dependencies = [ "regex", "serde", @@ -11113,7 +11092,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "bytes", @@ -11136,9 +11115,9 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.4" +version = "1.463.5" dependencies = [ - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "proc-macro2", "quote", @@ -11148,7 +11127,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.4" +version = "1.463.5" dependencies = [ "convert_case 0.6.0", "serde", @@ -11157,7 +11136,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11169,7 +11148,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "serde_json", @@ -11181,11 +11160,11 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "gosyn", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "regex", "windmill-parser", @@ -11193,7 +11172,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11205,10 +11184,10 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.10.5", "php-parser-rs", "serde_json", "windmill-parser", @@ -11216,10 +11195,10 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.10.5", "rustpython-parser", "serde_json", "windmill-parser", @@ -11227,11 +11206,11 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-recursion", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "malachite", "malachite-bigint", @@ -11247,11 +11226,11 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "convert_case 0.6.0", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "pulldown-cmark", "quote", @@ -11264,7 +11243,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11276,7 +11255,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "lazy_static", @@ -11294,7 +11273,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11316,7 +11295,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "serde_json", @@ -11326,20 +11305,20 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-recursion", "axum", "backon", "chrono", - "chrono-tz 0.10.1", + "chrono-tz", "cron", "futures", "futures-core", "hex", "hmac", - "itertools 0.14.0", + "itertools 0.10.5", "lazy_static", "prometheus", "regex", @@ -11359,7 +11338,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.4" +version = "1.463.5" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11369,12 +11348,12 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.4" +version = "1.463.5" dependencies = [ "anyhow", "async-recursion", "backon", - "base64 0.22.1", + "base64 0.13.1", "bit-vec", "bollard", "bytes", @@ -11397,7 +11376,7 @@ dependencies = [ "gcp_auth", "git-version", "hex", - "itertools 0.14.0", + "itertools 0.10.5", "jsonwebtoken", "lazy_static", "mappable-rc", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 0b8c02d1fa..2cb3e25aeb 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.4" +version = "1.463.5" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.4" +version = "1.463.5" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 0e9b0328d4..c41a002fc8 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.4 + version: 1.463.5 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index d7543a3d55..311c804d6c 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.4"; +export const VERSION = "v1.463.5"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 51c8bd0809..34d7133577 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.4"; +export const VERSION = "1.463.5"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9a8bce2889..22ed0a5141 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.4", + "version": "1.463.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.4", + "version": "1.463.5", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 1ece7bb764..84c3029eaf 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.4", + "version": "1.463.5", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 18b12dfc57..bb8f223315 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.4" -wmill_pg = ">=1.463.4" +wmill = ">=1.463.5" +wmill_pg = ">=1.463.5" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 043c7c77fb..ebad73b1a5 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.4 + version: 1.463.5 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 7ab35ebe95..1f5f2a972f 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.4' + ModuleVersion = '1.463.5' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index 29a80185e2..e41d4d318d 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.4" +version = "1.463.5" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index ee2dac54aa..ba4af4d219 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.4" +version = "1.463.5" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index c4e0f34c3d..c5958e2f68 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.4", + "version": "1.463.5", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index ba67288973..6c750f8317 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.4", + "version": "1.463.5", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index c6fd9a4d69..5d003b1aa7 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.4 +1.463.5 From 24ff5a6261e82eda06f84f43c47749e7aa609bdb Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:40:17 +0100 Subject: [PATCH 109/667] fix: make teams cleanup non critical --- backend/ee-repo-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 23791d63cd..562c984114 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -d6aeb430a172cb8e969a4d29bd0e0727c2a25b9d \ No newline at end of file +5d25cf2cd15c1953794045fd7debea14a33c7519 \ No newline at end of file From b4088faae1998f4a9efbae903cbdb85d5c6099af Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 10:50:03 +0100 Subject: [PATCH 110/667] fix: pin chrono tz version to 0.10.1 --- backend/Cargo.lock | 128 ++++++++++++++++++++++++++------------------- backend/Cargo.toml | 2 +- 2 files changed, 76 insertions(+), 54 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 53223e672c..d0053f30fe 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -263,7 +263,7 @@ dependencies = [ "arrow-data", "arrow-schema", "chrono", - "chrono-tz", + "chrono-tz 0.9.0", "half", "hashbrown 0.14.5", "num", @@ -713,7 +713,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -1222,15 +1222,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" +checksum = "1230237285e3e10cde447185e8975408ae24deaa67205ce684805c25bc0c7937" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", + "memmap2", ] [[package]] @@ -1610,7 +1611,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", - "chrono-tz-build", + "chrono-tz-build 0.3.0", + "phf", +] + +[[package]] +name = "chrono-tz" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6ac4f2c0bf0f44e9161aec9675e1050aa4a530663c4a9e37e108fa948bca9f" +dependencies = [ + "chrono", + "chrono-tz-build 0.4.0", "phf", ] @@ -1625,6 +1637,16 @@ dependencies = [ "phf_codegen", ] +[[package]] +name = "chrono-tz-build" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" +dependencies = [ + "parse-zoneinfo", + "phf_codegen", +] + [[package]] name = "cipher" version = "0.3.0" @@ -2242,7 +2264,7 @@ dependencies = [ "tokio", "tokio-util", "url", - "uuid 1.13.1", + "uuid 1.13.2", "xz2", "zstd", ] @@ -2342,7 +2364,7 @@ dependencies = [ "regex", "sha2 0.10.8", "unicode-segmentation", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -2509,7 +2531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ "serde", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -2804,7 +2826,7 @@ dependencies = [ "serde", "thiserror 1.0.69", "tokio", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -5384,7 +5406,7 @@ dependencies = [ "sha2 0.10.8", "subprocess", "thiserror 1.0.69", - "uuid 1.13.1", + "uuid 1.13.2", "zstd", ] @@ -6345,7 +6367,7 @@ dependencies = [ "postgres-protocol 0.6.8", "serde", "serde_json", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -7201,7 +7223,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -7592,7 +7614,7 @@ dependencies = [ "serde", "thiserror 1.0.69", "url", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -7630,7 +7652,7 @@ dependencies = [ "schemars_derive", "serde", "serde_json", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -8365,7 +8387,7 @@ dependencies = [ "tokio-stream", "tracing", "url", - "uuid 1.13.1", + "uuid 1.13.2", "webpki-roots", ] @@ -8449,7 +8471,7 @@ dependencies = [ "stringprep", "thiserror 2.0.11", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "whoami", ] @@ -8490,7 +8512,7 @@ dependencies = [ "stringprep", "thiserror 2.0.11", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "whoami", ] @@ -8516,7 +8538,7 @@ dependencies = [ "sqlx-core", "tracing", "url", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -9163,7 +9185,7 @@ dependencies = [ "tempfile", "thiserror 1.0.69", "time", - "uuid 1.13.1", + "uuid 1.13.2", "winapi", ] @@ -9393,7 +9415,7 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-util", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -10100,9 +10122,9 @@ dependencies = [ [[package]] name = "tree-sitter-language" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eee4db33814de3d004de9d8d825627ed3320d0989cce0dea30efaf5be4736c" +checksum = "c4013970217383f67b18aef68f6fb2e8d409bc5755227092d32efb0422ba24b8" [[package]] name = "triomphe" @@ -10174,9 +10196,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "typify" @@ -10229,7 +10251,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab82fc73182c29b02e2926a6df32f2241dbadb5cfc111fd595515b3598f46bb3" dependencies = [ "rand 0.9.0", - "uuid 1.13.1", + "uuid 1.13.2", "web-time", ] @@ -10511,9 +10533,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +checksum = "8c1f41ffb7cf259f1ecc2876861a17e7142e63ead296f671f81f6ae85903e0d6" dependencies = [ "getrandom 0.3.1", "serde", @@ -10866,7 +10888,7 @@ dependencies = [ "tokio", "tracing", "url", - "uuid 1.13.1", + "uuid 1.13.2", "v8", "windmill-api", "windmill-api-client", @@ -10892,14 +10914,14 @@ dependencies = [ "async_zip", "axum", "base32", - "base64 0.13.1", + "base64 0.22.1", "byteorder", "bytes", "candle-core", "candle-nn", "candle-transformers", "chrono", - "chrono-tz", + "chrono-tz 0.10.1", "const_format", "cookie 0.17.0", "cron", @@ -10911,7 +10933,7 @@ dependencies = [ "hmac", "http 1.2.0", "hyper 1.6.0", - "itertools 0.10.5", + "itertools 0.14.0", "jsonwebtoken", "lazy_static", "magic-crypt", @@ -10953,7 +10975,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "tower 0.4.13", + "tower 0.5.2", "tower-cookies", "tower-http", "tracing", @@ -10961,7 +10983,7 @@ dependencies = [ "ulid", "url", "urlencoding", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-audit", "windmill-common", "windmill-git-sync", @@ -10976,7 +10998,7 @@ dependencies = [ name = "windmill-api-client" version = "1.463.5" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "chrono", "openapiv3", "prettyplease 0.1.25", @@ -10987,7 +11009,7 @@ dependencies = [ "serde", "serde_json", "syn 1.0.109", - "uuid 1.13.1", + "uuid 1.13.2", ] [[package]] @@ -11012,7 +11034,7 @@ dependencies = [ "serde_json", "sqlx", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-common", "windmill-queue", ] @@ -11028,7 +11050,7 @@ dependencies = [ "axum", "bytes", "chrono", - "chrono-tz", + "chrono-tz 0.10.1", "const_format", "crc", "cron", @@ -11041,7 +11063,7 @@ dependencies = [ "hmac", "hyper 1.6.0", "indexmap 2.7.1", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "magic-crypt", "mail-send", @@ -11072,7 +11094,7 @@ dependencies = [ "tracing-loki", "tracing-opentelemetry", "tracing-subscriber", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-macros", ] @@ -11085,7 +11107,7 @@ dependencies = [ "serde_json", "sqlx", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-common", "windmill-queue", ] @@ -11109,7 +11131,7 @@ dependencies = [ "tokio", "tokio-tar", "tracing", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-common", ] @@ -11117,7 +11139,7 @@ dependencies = [ name = "windmill-macros" version = "1.463.5" dependencies = [ - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "proc-macro2", "quote", @@ -11164,7 +11186,7 @@ version = "1.463.5" dependencies = [ "anyhow", "gosyn", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "regex", "windmill-parser", @@ -11187,7 +11209,7 @@ name = "windmill-parser-php" version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.14.0", "php-parser-rs", "serde_json", "windmill-parser", @@ -11198,7 +11220,7 @@ name = "windmill-parser-py" version = "1.463.5" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.14.0", "rustpython-parser", "serde_json", "windmill-parser", @@ -11210,7 +11232,7 @@ version = "1.463.5" dependencies = [ "anyhow", "async-recursion", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "malachite", "malachite-bigint", @@ -11230,7 +11252,7 @@ version = "1.463.5" dependencies = [ "anyhow", "convert_case 0.6.0", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "pulldown-cmark", "quote", @@ -11312,13 +11334,13 @@ dependencies = [ "axum", "backon", "chrono", - "chrono-tz", + "chrono-tz 0.10.1", "cron", "futures", "futures-core", "hex", "hmac", - "itertools 0.10.5", + "itertools 0.14.0", "lazy_static", "prometheus", "regex", @@ -11331,7 +11353,7 @@ dependencies = [ "tokio", "tracing", "ulid", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-audit", "windmill-common", ] @@ -11353,7 +11375,7 @@ dependencies = [ "anyhow", "async-recursion", "backon", - "base64 0.13.1", + "base64 0.22.1", "bit-vec", "bollard", "bytes", @@ -11376,7 +11398,7 @@ dependencies = [ "gcp_auth", "git-version", "hex", - "itertools 0.10.5", + "itertools 0.14.0", "jsonwebtoken", "lazy_static", "mappable-rc", @@ -11405,7 +11427,7 @@ dependencies = [ "tokio-util", "tracing", "urlencoding", - "uuid 1.13.1", + "uuid 1.13.2", "windmill-audit", "windmill-common", "windmill-git-sync", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 2cb3e25aeb..f3b95d4c78 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -174,7 +174,7 @@ uuid = { version = "^1", features = ["serde", "v4"] } thiserror = "^2" anyhow = "^1" chrono = { version = "0.4.35", features = ["serde"] } -chrono-tz = "^0" +chrono-tz = "^0.10.1" tracing = "^0" tracing-subscriber = { version = "^0", features = ["env-filter", "json"] } tracing-appender = "^0" From 1069ad39992940e32e5d8566ef2283970525be1a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 13:17:10 +0100 Subject: [PATCH 111/667] fix: improve v2 migration finalizer to avoid deadlocks --- backend/src/main.rs | 13 +++- backend/windmill-api/src/db.rs | 104 ++++++++++++++++++++++++++------ backend/windmill-api/src/lib.rs | 8 ++- 3 files changed, 101 insertions(+), 24 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 432095580d..58d22b6eee 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -21,7 +21,7 @@ use std::{ net::{IpAddr, Ipv4Addr, SocketAddr}, time::Duration, }; -use tokio::{fs::File, io::AsyncReadExt}; +use tokio::{fs::File, io::AsyncReadExt, task::JoinHandle}; use uuid::Uuid; use windmill_api::HTTP_CLIENT; @@ -372,6 +372,7 @@ async fn windmill_main() -> anyhow::Result<()> { let is_agent = mode == Mode::Agent; + let mut migration_handle: Option> = None; #[cfg(feature = "parquet")] let disable_s3_store = std::env::var("DISABLE_S3_STORE") .ok() @@ -384,7 +385,7 @@ async fn windmill_main() -> anyhow::Result<()> { if !skip_migration { // migration code to avoid break - windmill_api::migrate_db(&db).await?; + migration_handle = windmill_api::migrate_db(&db).await?; } else { tracing::info!("SKIP_MIGRATION set, skipping db migration...") } @@ -682,6 +683,14 @@ 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; diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index b8d15160c7..9b694ad3bf 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -15,6 +15,7 @@ use sqlx::{ Executor, PgConnection, Pool, Postgres, }; +use tokio::task::JoinHandle; use windmill_audit::audit_ee::{AuditAuthor, AuditAuthorable}; use windmill_common::{ db::{Authable, Authed}, @@ -170,7 +171,7 @@ impl Migrate for CustomMigrator { } } -pub async fn migrate(db: &DB) -> Result<(), Error> { +pub async fn migrate(db: &DB) -> Result>, Error> { let migrator = db.acquire().await?; let mut custom_migrator = CustomMigrator { inner: migrator }; @@ -225,9 +226,10 @@ pub async fn migrate(db: &DB) -> Result<(), Error> { } }); - if !has_done_migration(db, "v2_finalize_disable_sync_III").await { + let mut jh = None; + if !has_done_migration(db, "v2_finalize_job_completed").await { let db2 = db.clone(); - let _ = tokio::task::spawn(async move { + let v2jh = 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..."); @@ -245,9 +247,10 @@ pub async fn migrate(db: &DB) -> Result<(), Error> { break; } }); + jh = Some(v2jh) } - Ok(()) + Ok(jh) } async fn fix_flow_versioning_migration( @@ -373,29 +376,91 @@ 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; - ALTER TABLE v2_job_completed DISABLE ROW LEVEL SECURITY; - - DROP FUNCTION IF EXISTS v2_job_after_update CASCADE; - DROP FUNCTION IF EXISTS v2_job_completed_before_insert CASCADE; - 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; - DROP FUNCTION IF EXISTS v2_job_runtime_before_insert CASCADE; - 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; - - DROP VIEW IF EXISTS completed_job, completed_job_view, job, queue, queue_view CASCADE; - "#, ) .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_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_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_status_before_insert CASCADE; + DROP FUNCTION IF EXISTS v2_job_status_before_update CASCADE; + "#, + ) + .await?; + }); + + 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, @@ -434,6 +499,7 @@ 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, diff --git a/backend/windmill-api/src/lib.rs b/backend/windmill-api/src/lib.rs index b4c262b9eb..4199494ed4 100644 --- a/backend/windmill-api/src/lib.rs +++ b/backend/windmill-api/src/lib.rs @@ -34,6 +34,7 @@ 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; @@ -641,7 +642,8 @@ async fn openapi_json() -> &'static str { include_str!("../openapi-deref.json") } -pub async fn migrate_db(db: &DB) -> anyhow::Result<()> { - db::migrate(db).await?; - Ok(()) +pub async fn migrate_db(db: &DB) -> anyhow::Result>> { + db::migrate(db) + .await + .map_err(|e| anyhow::anyhow!("Error migrating db: {e:#}")) } From 52e12d1021831adc2ce9b7b0946a93562038017e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 14:35:23 +0100 Subject: [PATCH 112/667] fix: fix reactivity issue on loading live flow on runs page --- frontend/src/lib/utils.ts | 8 ++++++ .../(root)/(logged)/run/[...run]/+page.svelte | 28 +++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index 71eecc14a3..d32b18d594 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -1099,6 +1099,14 @@ 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') diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 1b817d15d6..d7a8fdb365 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -20,6 +20,7 @@ emptyString, encodeState, isFlowPreview, + isNotFlow, isScriptPreview, truncateHash, truncateRev @@ -119,7 +120,7 @@ let showExplicitProgressTip: boolean = (localStorage.getItem('hideExplicitProgressTip') ?? 'false') == 'false' - $: job?.logs == undefined && job && viewTab == 'logs' && getLogs?.() + $: job?.logs == undefined && job && viewTab == 'logs' && isNotFlow(job?.job_kind) && getLogs?.() let lastJobId: string | undefined = undefined let concurrencyKey: string | undefined = undefined @@ -222,15 +223,19 @@ }) } - 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 + 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 + } } } @@ -241,6 +246,7 @@ function onRunsPageChange() { job = undefined + persistentScriptDefinition = undefined } $: $workspaceStore && $page.params.run && onRunsPageChange() $: $workspaceStore && $page.params.run && testJobLoader && onRunsPageChangeWithLoader() @@ -846,7 +852,7 @@

Scheduled to be executed later: {displayDate(job?.['scheduled_for'])}

{/if} - {#if job?.job_kind !== 'flow' && job?.job_kind !== 'singlescriptflow' && !isFlowPreview(job?.job_kind)} + {#if isNotFlow(job?.job_kind)} {#if ['python3', 'bun', 'deno'].includes(job?.language ?? '') && (job?.job_kind == 'script' || isScriptPreview(job?.job_kind))} {/if} From 07237a0eb1465f47284952bee0e84929bfa18528 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 14:43:46 +0100 Subject: [PATCH 113/667] chore(main): release 1.463.6 (#5320) * chore(main): release 1.463.6 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 8 +++ backend/Cargo.lock | 54 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 52 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 458b3a19ff..d87d723777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # 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) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index d0053f30fe..fa585a18a1 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1007,9 +1007,9 @@ dependencies = [ [[package]] name = "backon" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" +checksum = "49fef586913a57ff189f25c9b3d034356a5bf6b3fa9a7f067588fe1698ba1f5d" dependencies = [ "fastrand 2.3.0", "gloo-timers", @@ -10859,7 +10859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "axum", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "argon2", @@ -10996,7 +10996,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.5" +version = "1.463.6" dependencies = [ "base64 0.22.1", "chrono", @@ -11014,7 +11014,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.5" +version = "1.463.6" dependencies = [ "chrono", "serde", @@ -11027,7 +11027,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "serde", @@ -11041,7 +11041,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-stream", @@ -11100,7 +11100,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.5" +version = "1.463.6" dependencies = [ "regex", "serde", @@ -11114,7 +11114,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "bytes", @@ -11137,7 +11137,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.5" +version = "1.463.6" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11149,7 +11149,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.5" +version = "1.463.6" dependencies = [ "convert_case 0.6.0", "serde", @@ -11158,7 +11158,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11170,7 +11170,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "serde_json", @@ -11182,7 +11182,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "gosyn", @@ -11194,7 +11194,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11206,7 +11206,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11217,7 +11217,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11228,7 +11228,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-recursion", @@ -11248,7 +11248,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11265,7 +11265,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11277,7 +11277,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "lazy_static", @@ -11295,7 +11295,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11317,7 +11317,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "serde_json", @@ -11327,7 +11327,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-recursion", @@ -11360,7 +11360,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.5" +version = "1.463.6" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11370,7 +11370,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.5" +version = "1.463.6" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index f3b95d4c78..d4a4337aff 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.5" +version = "1.463.6" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.5" +version = "1.463.6" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index c41a002fc8..da8f9ffda5 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.5 + version: 1.463.6 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 311c804d6c..7e143464cb 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.5"; +export const VERSION = "v1.463.6"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index 34d7133577..f5959f40ed 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.5"; +export const VERSION = "1.463.6"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 22ed0a5141..54f84d32a8 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.5", + "version": "1.463.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.5", + "version": "1.463.6", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index 84c3029eaf..d99d4ad864 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.5", + "version": "1.463.6", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index bb8f223315..9a995b30c0 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.5" -wmill_pg = ">=1.463.5" +wmill = ">=1.463.6" +wmill_pg = ">=1.463.6" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index ebad73b1a5..28babee7c4 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.5 + version: 1.463.6 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 1f5f2a972f..6680bc5b84 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.5' + ModuleVersion = '1.463.6' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index e41d4d318d..a19e6e3280 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.5" +version = "1.463.6" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index ba4af4d219..78a5a89f9d 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.5" +version = "1.463.6" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index c5958e2f68..15c80ae533 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.5", + "version": "1.463.6", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 6c750f8317..23a2b2a3c0 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.5", + "version": "1.463.6", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 5d003b1aa7..225d2d44c3 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.5 +1.463.6 From 138cedf1da91290f97c19513daf0c1981488a94a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 15:13:28 +0100 Subject: [PATCH 114/667] fix(bash): improve bash last line as result reliability using bash process substitution (#5321) --- backend/windmill-worker/src/bash_executor.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/backend/windmill-worker/src/bash_executor.rs b/backend/windmill-worker/src/bash_executor.rs index 7b536afdae..ea3274f623 100644 --- a/backend/windmill-worker/src/bash_executor.rs +++ b/backend/windmill-worker/src/bash_executor.rs @@ -97,7 +97,7 @@ cleanup() {{ trap '' SIGTERM SIGINT # Kill the process group of the script (negative PID value) - pkill -P $$ + pkill -P $$ 2>/dev/null || true exit }} @@ -105,14 +105,9 @@ 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 bp & +{bash} ./main.sh "$@" 2>&1 | tee >(tail -1 >> ./result2.out) & pid=$! @@ -121,7 +116,6 @@ wait $pid exit_status=$? # Clean up the named pipe and background processes -rm -f bp pkill -P $$ || true # Exit with the captured status @@ -624,7 +618,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"", write_file( job_dir, "wrapper.sh", - &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()), + &format!("set -o pipefail\nset -e\n{} -F ./main.ps1 \"$@\" 2>&1 | tee >(tail -1 >> ./result2.out) &\nwait $!", POWERSHELL_PATH.as_str()), )?; #[cfg(windows)] From d4f61f13fd6a9c2e5707738fba960b7fd926230c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 16:46:42 +0100 Subject: [PATCH 115/667] fix(bash): allow process substitution on nsjail --- .../windmill-worker/nsjail/run.bash.config.proto | 14 ++++++++++++++ .../nsjail/run.powershell.config.proto | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/backend/windmill-worker/nsjail/run.bash.config.proto b/backend/windmill-worker/nsjail/run.bash.config.proto index 4f86c66a32..63018f7655 100644 --- a/backend/windmill-worker/nsjail/run.bash.config.proto +++ b/backend/windmill-worker/nsjail/run.bash.config.proto @@ -21,10 +21,24 @@ 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 { diff --git a/backend/windmill-worker/nsjail/run.powershell.config.proto b/backend/windmill-worker/nsjail/run.powershell.config.proto index 27a36548b4..93a48d4fec 100644 --- a/backend/windmill-worker/nsjail/run.powershell.config.proto +++ b/backend/windmill-worker/nsjail/run.powershell.config.proto @@ -21,6 +21,13 @@ mount { is_bind: true } +mount { + src: "/proc/self/fd" + dst: "/dev/fd" + is_symlink: true + mandatory: false +} + mount { src: "/opt/microsoft" dst: "/opt/microsoft" From 52ad48a910002c07ac38635445c14e302c26de83 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 20:08:25 +0100 Subject: [PATCH 116/667] back to pipe in bash for efficiency purposes --- backend/windmill-worker/src/bash_executor.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/backend/windmill-worker/src/bash_executor.rs b/backend/windmill-worker/src/bash_executor.rs index ea3274f623..da043052b7 100644 --- a/backend/windmill-worker/src/bash_executor.rs +++ b/backend/windmill-worker/src/bash_executor.rs @@ -96,6 +96,8 @@ cleanup() {{ # Ignore SIGTERM and SIGINT trap '' SIGTERM SIGINT + rm -f bp 2>/dev/null + # Kill the process group of the script (negative PID value) pkill -P $$ 2>/dev/null || true exit @@ -105,17 +107,26 @@ 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 & +tail_pid=$! # 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=$! # Wait for main.sh to finish and capture its exit status wait $pid exit_status=$? +# Ensure tail has finished before cleanup +wait $tail_pid 2>/dev/null || true + # Clean up the named pipe and background processes +rm -f bp pkill -P $$ || true # Exit with the captured status @@ -618,7 +629,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)] From 1ef482e8aee9433c518ce3cbc5bc38174e27c34f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 21:03:11 +0100 Subject: [PATCH 117/667] feat: add ready endpoints for workers to enterprise --- backend/src/main.rs | 25 +++++++++----- backend/windmill-common/src/lib.rs | 34 +++++++++++++------ backend/windmill-worker/src/worker_flow.rs | 1 + .../src/lib/components/InstanceSetting.svelte | 26 ++++++++++++++ .../lib/components/InstanceSettings.svelte | 28 --------------- 5 files changed, 66 insertions(+), 48 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 58d22b6eee..0dfda31bcf 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -59,9 +59,6 @@ use tikv_jemallocator::Jemalloc; #[global_allocator] static GLOBAL: Jemalloc = Jemalloc; -#[cfg(feature = "enterprise")] -use windmill_common::METRICS_ADDR; - #[cfg(feature = "parquet")] use windmill_common::global_settings::OBJECT_STORE_CACHE_CONFIG_SETTING; @@ -901,14 +898,24 @@ Windmill Community Edition {GIT_VERSION} }; let metrics_f = async { - if METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed) { - #[cfg(not(feature = "enterprise"))] + let enabled = METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed); + #[cfg(not(all(feature = "enterprise", feature = "prometheus")))] + if enabled { tracing::error!("Metrics are only available in the EE, ignoring..."); - - #[cfg(feature = "enterprise")] - windmill_common::serve_metrics(*METRICS_ADDR, _killpill_phase2_rx, num_workers > 0) - .await; } + + #[cfg(all(feature = "enterprise", feature = "prometheus"))] + if let Err(e) = windmill_common::serve_metrics( + *windmill_common::METRICS_ADDR, + _killpill_phase2_rx, + num_workers > 0, + enabled, + ) + .await + { + tracing::error!("Error serving metrics: {e:#}"); + } + Ok(()) as anyhow::Result<()> }; diff --git a/backend/windmill-common/src/lib.rs b/backend/windmill-common/src/lib.rs index 802af6196b..1bbc890728 100644 --- a/backend/windmill-common/src/lib.rs +++ b/backend/windmill-common/src/lib.rs @@ -155,8 +155,6 @@ pub async fn shutdown_signal( } use tokio::sync::RwLock; -#[cfg(feature = "prometheus")] -use tokio::task::JoinHandle; use utils::rd_string; #[cfg(feature = "prometheus")] @@ -164,23 +162,31 @@ pub async fn serve_metrics( addr: SocketAddr, mut rx: tokio::sync::broadcast::Receiver<()>, ready_worker_endpoint: bool, -) -> JoinHandle<()> { - use std::sync::atomic::Ordering; - + metrics_endpoint: bool, +) -> anyhow::Result<()> { + if !metrics_endpoint && !ready_worker_endpoint { + return Ok(()); + } use axum::{ routing::{get, post}, Router, }; use hyper::StatusCode; - let router = Router::new() - .route("/metrics", get(metrics)) - .route("/reset", post(reset)); + let router = Router::new(); + + let router = if metrics_endpoint { + router + .route("/metrics", get(metrics)) + .route("/reset", post(reset)) + } else { + router + }; let router = if ready_worker_endpoint { router.route( "/ready", get(|| async { - if IS_READY.load(Ordering::Relaxed) { + if IS_READY.load(std::sync::atomic::Ordering::Relaxed) { (StatusCode::OK, "ready") } else { (StatusCode::INTERNAL_SERVER_ERROR, "not ready") @@ -193,8 +199,12 @@ pub async fn serve_metrics( tokio::spawn(async move { tracing::info!("Serving metrics at: {addr}"); - let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); - if let Err(e) = axum::serve(listener, router.into_make_service()) + let listener = tokio::net::TcpListener::bind(addr).await; + if let Err(e) = listener { + tracing::error!("Error binding to metrics address: {}", e); + return; + } + if let Err(e) = axum::serve(listener.unwrap(), router.into_make_service()) .with_graceful_shutdown(async move { rx.recv().await.ok(); tracing::info!("Graceful shutdown of metrics"); @@ -204,6 +214,8 @@ pub async fn serve_metrics( tracing::error!("Error serving metrics: {}", e); } }) + .await?; + Ok(()) } #[cfg(feature = "prometheus")] diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 864f3002b1..50f6ee8607 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -615,6 +615,7 @@ pub async fn update_flow_status_after_job_completion_internal( "error while deleting parallel_monitor_lock: {e:#}" )) })?; + if r.is_some() { tracing::info!( "parallel flow has removed lock on its parent, last ping was {:?}", diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index 599ca28229..03ac00aa02 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -61,6 +61,8 @@ let renewing = false let opening = false + let to: string = '' + async function reloadKeyrenewalAttemptInfo() { latestKeyRenewalAttempt = await SettingService.getLatestKeyRenewalAttempt() } @@ -747,6 +749,30 @@ {:else if setting.fieldType == 'smtp_connect'}
{#if $values[setting.key]} +
+
- {#if category == 'SMTP'} - {@const smtp = $values['smtp_settings']} -
-
- {/if} {/each} From 8559c4e23e468c95e72dc4b94bf4463c8030ae84 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 21:57:34 +0100 Subject: [PATCH 118/667] chore(main): release 1.464.0 (#5322) * chore(main): release 1.464.0 * Apply automatic changes --------- Co-authored-by: rubenfiszel <275584+rubenfiszel@users.noreply.github.com> --- CHANGELOG.md | 13 ++++ backend/Cargo.lock | 60 +++++++++---------- backend/Cargo.toml | 4 +- backend/windmill-api/openapi.yaml | 2 +- benchmarks/lib.ts | 2 +- cli/main.ts | 2 +- frontend/package-lock.json | 4 +- frontend/package.json | 2 +- lsp/Pipfile | 4 +- openflow.openapi.yaml | 2 +- .../WindmillClient/WindmillClient.psd1 | 2 +- python-client/wmill/pyproject.toml | 2 +- python-client/wmill_pg/pyproject.toml | 2 +- typescript-client/jsr.json | 2 +- typescript-client/package.json | 2 +- version.txt | 2 +- 16 files changed, 60 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d87d723777..d60096f415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.464.0](https://github.com/windmill-labs/windmill/compare/v1.463.6...v1.464.0) (2025-02-18) + + +### Features + +* add ready endpoints for workers to enterprise ([1ef482e](https://github.com/windmill-labs/windmill/commit/1ef482e8aee9433c518ce3cbc5bc38174e27c34f)) + + +### Bug Fixes + +* **bash:** allow process substitution on nsjail ([d4f61f1](https://github.com/windmill-labs/windmill/commit/d4f61f13fd6a9c2e5707738fba960b7fd926230c)) +* **bash:** improve bash last line as result reliability using bash process substitution ([#5321](https://github.com/windmill-labs/windmill/issues/5321)) ([138cedf](https://github.com/windmill-labs/windmill/commit/138cedf1da91290f97c19513daf0c1981488a94a)) + ## [1.463.6](https://github.com/windmill-labs/windmill/compare/v1.463.5...v1.463.6) (2025-02-18) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index fa585a18a1..73f3686217 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -3886,9 +3886,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" dependencies = [ "atomic-waker", "bytes", @@ -4250,7 +4250,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.7", + "h2 0.4.8", "http 1.2.0", "http-body 1.0.1", "httparse", @@ -7113,7 +7113,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.7", + "h2 0.4.8", "http 1.2.0", "http-body 1.0.1", "http-body-util", @@ -9841,7 +9841,7 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.7", + "h2 0.4.8", "http 1.2.0", "http-body 1.0.1", "http-body-util", @@ -10859,7 +10859,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "axum", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "argon2", @@ -10996,7 +10996,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.463.6" +version = "1.464.0" dependencies = [ "base64 0.22.1", "chrono", @@ -11014,7 +11014,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.463.6" +version = "1.464.0" dependencies = [ "chrono", "serde", @@ -11027,7 +11027,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "serde", @@ -11041,7 +11041,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "async-stream", @@ -11100,7 +11100,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.463.6" +version = "1.464.0" dependencies = [ "regex", "serde", @@ -11114,7 +11114,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "bytes", @@ -11137,7 +11137,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.463.6" +version = "1.464.0" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -11149,7 +11149,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.463.6" +version = "1.464.0" dependencies = [ "convert_case 0.6.0", "serde", @@ -11158,7 +11158,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "lazy_static", @@ -11170,7 +11170,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "serde_json", @@ -11182,7 +11182,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "gosyn", @@ -11194,7 +11194,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "lazy_static", @@ -11206,7 +11206,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11217,7 +11217,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "itertools 0.14.0", @@ -11228,7 +11228,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "async-recursion", @@ -11248,7 +11248,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -11265,7 +11265,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "lazy_static", @@ -11277,7 +11277,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "lazy_static", @@ -11295,7 +11295,7 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "getrandom 0.2.15", @@ -11317,7 +11317,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "serde_json", @@ -11327,7 +11327,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "async-recursion", @@ -11360,7 +11360,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.463.6" +version = "1.464.0" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -11370,7 +11370,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.463.6" +version = "1.464.0" dependencies = [ "anyhow", "async-recursion", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index d4a4337aff..e3088ef581 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.463.6" +version = "1.464.0" authors.workspace = true edition.workspace = true @@ -30,7 +30,7 @@ members = [ ] [workspace.package] -version = "1.463.6" +version = "1.464.0" authors = ["Ruben Fiszel "] edition = "2021" diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index da8f9ffda5..dca954119e 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.6 + version: 1.464.0 title: Windmill API contact: diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index 7e143464cb..49f60cbee2 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -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.464.0"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/main.ts b/cli/main.ts index f5959f40ed..cf886c559d 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -62,7 +62,7 @@ export { // } // }); -export const VERSION = "1.463.6"; +export const VERSION = "1.464.0"; const command = new Command() .name("wmill") diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 54f84d32a8..78856c8a2a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "windmill-components", - "version": "1.463.6", + "version": "1.464.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "windmill-components", - "version": "1.463.6", + "version": "1.464.0", "license": "AGPL-3.0", "dependencies": { "@anthropic-ai/sdk": "^0.32.1", diff --git a/frontend/package.json b/frontend/package.json index d99d4ad864..bf4c400d96 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "windmill-components", - "version": "1.463.6", + "version": "1.464.0", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/lsp/Pipfile b/lsp/Pipfile index 9a995b30c0..f01053108c 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.463.6" -wmill_pg = ">=1.463.6" +wmill = ">=1.464.0" +wmill_pg = ">=1.464.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index 28babee7c4..db596ac1ba 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.463.6 + version: 1.464.0 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 6680bc5b84..c99716f13b 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.463.6' + ModuleVersion = '1.464.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index a19e6e3280..0867653837 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.463.6" +version = "1.464.0" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 78a5a89f9d..e8294bb351 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.463.6" +version = "1.464.0" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index 15c80ae533..8fcfe25330 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.463.6", + "version": "1.464.0", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 23a2b2a3c0..882f1430db 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.463.6", + "version": "1.464.0", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 225d2d44c3..b7db08e347 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.463.6 +1.464.0 From 0e72991476ba932a526e1b4cf42bad157be2cfdb Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 18 Feb 2025 23:34:17 +0100 Subject: [PATCH 119/667] fix: fix rendering of app components without component inputs --- .../components/apps/components/helpers/RunnableWrapper.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte b/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte index 9bd8204c01..e283539a19 100644 --- a/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte +++ b/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte @@ -245,7 +245,9 @@ {#if !noInitialize} {/if} - + {#if render} + + {/if} {:else if componentInput.type === 'runnable' && isRunnableDefined(componentInput)} Date: Tue, 18 Feb 2025 23:49:45 +0100 Subject: [PATCH 120/667] feat: SQS triggers (#5182) * feat: first commit * fix: npm check * fix: openapi file * feat: update openapi and migration * feat: basic implementation done * fix: fix: no used function when no feature * feat: capture done * Update capture.rs * nits: change sqs trigger * fix: make migration great again * feat: add message attributes * feat: nits: fix error messages, remove console.log and add try catch * update sqs icon and ee feature for sqs_trigger * update: change sqs name casing and added test connection button * nits: update Icon and add create from template button * fix: ci build and error compilation * update migration type sqs * update link on create from template button for sqs, add archive in workspace export and update sqlx * fix: ci * Update SqsTriggerEditorInner.svelte * add link to docs, use generic function for resource and fix import error * chore: update .github ci * nits: remove empty * update to match ee repo changement * Update backend/windmill-api/src/resources.rs Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * add sqs handling for the cli and refacoring sqsEditorInner * Update cli/sync.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: add break to switch statement for sqs case * fix: display aws_resource_path when retrieve or create a new trigger * rework sqs ui, fix postgres optional port * fix: ci * update ui for trigger * update repo ref and specific * feat: add ready endpoints for workers to enterprise * update ref * Update frontend/src/lib/script_helpers.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: HugoCasa Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Ruben Fiszel --- .github/workflows/build-publish-rh-image.yml | 4 +- .github/workflows/build_windows_worker_.yml | 2 +- .github/workflows/docker-image.yml | 2 +- .github/workflows/publish_windows_worker.yml | 2 +- ...254c783fc34b617c8a9a95a0eb0cda535dab5.json | 3 +- ...9418f85d4d3d599f4177403fad5ad99380715.json | 26 ++ ...d982b52b48c8c3da392b14963a1ec86811546.json | 50 +++ ...f8b0672797299545ee0754b6ad74ece92c77e.json | 26 ++ ...c776994ae2c990bb7bb307c52296b9543fbb8.json | 16 + ...27bcf833f56475bbc1aa3c8f6d79f146f41bf.json | 25 ++ ...082b00c44fd4a7e98a11b714133674a7b6da7.json | 106 +++++ ...93de351653ab9ac171fa0eea447c905440867.json | 107 +++++ ...287a9f42e252a1246a584249a224afdbbbf8a.json | 16 + ...41d95ba195f5543120e76e68f6e6715b65a71.json | 24 + ...64c5a91e3ed8d9260c72b783fc12542b88fbd.json | 6 +- ...daf5d4205d160d2aedf463c7dfe944e93257a.json | 3 +- ...cabb01481a19bef5a956dc36cac41acad0e53.json | 25 ++ ...451217ccb9f1bc35b1ad6e10d16bc19c41447.json | 3 +- ...ef9f4c8faa986843024a2cd58e212f706aae8.json | 17 + ...8e5fdaff0e601e2760cc5653d197c51b106bb.json | 52 +++ ...a8e119bffd2982b97fc900358506a0a14bbb8.json | 23 + ...f3490f88ced636c9ebdecba2205f964b1d0f1.json | 15 + ...23b4376a93342702856da2ac70f6bbfc7933e.json | 23 + ...677774aa237508d5610714efd2e9b8b93c7b8.json | 3 +- ...0da43239c9a5aaea41c9aed7ed33a6219a534.json | 3 +- ...05d394a7cbcf0038c72a78add5c7b02ef5927.json | 2 +- ...33ba30fa85efcc83fafe4dd7b4e535b96a8d8.json | 15 + ...fdda86bee33f31835317df512a20c805b35d7.json | 3 +- ...0e7bc1f0dbeca2e4f44ced05bae0ca5ca1039.json | 3 +- ...23c94caae2421f3cae7c06d6346bd6de1d94a.json | 104 +++++ ...2777e04e4965682e5b37afbe84194b756d5f5.json | 23 + backend/.vscode/settings.json | 2 +- backend/Cargo.lock | 24 + backend/Cargo.toml | 2 + backend/ee-repo-ref.txt | 2 +- .../20250130184358_sqs_trigger.down.sql | 2 + .../20250130184358_sqs_trigger.up.sql | 69 +++ ...s_type_value_to_trigger_kind_type.down.sql | 1 + ...sqs_type_value_to_trigger_kind_type.up.sql | 2 + backend/src/main.rs | 1 + backend/windmill-api/Cargo.toml | 5 +- backend/windmill-api/openapi.yaml | 386 ++++++++++++---- backend/windmill-api/src/capture.rs | 12 + backend/windmill-api/src/kafka_triggers_ee.rs | 2 +- backend/windmill-api/src/lib.rs | 82 ++-- backend/windmill-api/src/nats_triggers_ee.rs | 2 +- .../src/postgres_triggers/handler.rs | 9 +- .../windmill-api/src/postgres_triggers/mod.rs | 65 +-- .../src/postgres_triggers/trigger.rs | 14 +- backend/windmill-api/src/resources.rs | 45 +- backend/windmill-api/src/sqs_triggers_ee.rs | 31 ++ backend/windmill-api/src/variables.rs | 2 +- backend/windmill-api/src/workspaces.rs | 4 +- backend/windmill-api/src/workspaces_export.rs | 22 + backend/windmill-common/src/variables.rs | 1 + cli/gen/core/OpenAPI.ts | 2 +- cli/gen/services.gen.ts | 174 +++++++- cli/gen/types.gen.ts | 177 ++++++-- cli/sync.ts | 12 +- cli/trigger.ts | 11 +- cli/types.ts | 4 + frontend/src/lib/components/Path.svelte | 9 +- frontend/src/lib/components/ShareModal.svelte | 1 + .../details/DetailPageDetailPanel.svelte | 4 +- .../details/DetailPageLayout.svelte | 7 +- .../details/DetailPageTriggerPanel.svelte | 15 +- .../renderers/triggers/TriggersBadge.svelte | 9 +- .../src/lib/components/icons/AwsIcon.svelte | 31 +- .../components/sidebar/OperatorMenu.svelte | 5 + .../components/sidebar/SidebarContent.svelte | 8 + frontend/src/lib/components/triggers.ts | 3 + .../components/triggers/CaptureButton.svelte | 10 + .../components/triggers/CaptureWrapper.svelte | 26 +- .../triggers/TestTriggerConnection.svelte | 9 +- .../components/triggers/TriggersEditor.svelte | 26 +- .../triggers/TriggersEditorSection.svelte | 1 + .../triggers/TriggersWrapper.svelte | 10 + .../http/RouteEditorConfigSection.svelte | 38 +- .../triggers/http/RouteEditorInner.svelte | 20 +- .../kafka/KafkaTriggerEditorInner.svelte | 14 +- .../nats/NatsTriggerEditorInner.svelte | 15 +- .../PostgresEditorConfigSection.svelte | 2 +- .../PostgresTriggerEditorInner.svelte | 4 +- .../triggers/postgres/RelationPicker.svelte | 46 +- .../triggers/sqs/SqsTriggerEditor.svelte | 27 ++ .../sqs/SqsTriggerEditorConfigSection.svelte | 152 +++++++ .../triggers/sqs/SqsTriggerEditorInner.svelte | 241 ++++++++++ .../triggers/sqs/SqsTriggerPanel.svelte | 135 ++++++ .../WebsocketEditorConfigSection.svelte | 42 +- .../WebsocketTriggerEditorInner.svelte | 16 +- frontend/src/lib/script_helpers.ts | 209 +++++---- .../src/routes/(root)/(logged)/+layout.svelte | 13 +- .../(logged)/flows/get/[...path]/+page.svelte | 8 + .../scripts/get/[...hash]/+page.svelte | 16 +- .../(root)/(logged)/sqs_triggers/+page.js | 5 + .../(root)/(logged)/sqs_triggers/+page.svelte | 422 ++++++++++++++++++ 96 files changed, 3037 insertions(+), 461 deletions(-) create mode 100644 backend/.sqlx/query-1625a84fbcf8c5f77eb0519f60d9418f85d4d3d599f4177403fad5ad99380715.json create mode 100644 backend/.sqlx/query-1b33393fbbc7e681b4d355f6096d982b52b48c8c3da392b14963a1ec86811546.json create mode 100644 backend/.sqlx/query-1cad25c24d0f80d58a50d4da923f8b0672797299545ee0754b6ad74ece92c77e.json create mode 100644 backend/.sqlx/query-20e01ecb5d4aa4c532a8f906365c776994ae2c990bb7bb307c52296b9543fbb8.json create mode 100644 backend/.sqlx/query-22dcd953d900fb0ddbe2099ccee27bcf833f56475bbc1aa3c8f6d79f146f41bf.json create mode 100644 backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json create mode 100644 backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json create mode 100644 backend/.sqlx/query-3f67e7cf8d9f021a075f1c88703287a9f42e252a1246a584249a224afdbbbf8a.json create mode 100644 backend/.sqlx/query-5bd8ae8d694ac9f6afef762276141d95ba195f5543120e76e68f6e6715b65a71.json create mode 100644 backend/.sqlx/query-6b776693091191f36eaf9e35fb3cabb01481a19bef5a956dc36cac41acad0e53.json create mode 100644 backend/.sqlx/query-7e31c47e02492b74cbb5702dfc5ef9f4c8faa986843024a2cd58e212f706aae8.json create mode 100644 backend/.sqlx/query-93d0ee34c7b7c56ab9cae28071f8e5fdaff0e601e2760cc5653d197c51b106bb.json create mode 100644 backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json create mode 100644 backend/.sqlx/query-a5fbef9db2308920ea26f6154f0f3490f88ced636c9ebdecba2205f964b1d0f1.json create mode 100644 backend/.sqlx/query-b386d320f9fe1d569a16e6626b723b4376a93342702856da2ac70f6bbfc7933e.json create mode 100644 backend/.sqlx/query-dea056c89313f4facd62cbbc9fa33ba30fa85efcc83fafe4dd7b4e535b96a8d8.json create mode 100644 backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json create mode 100644 backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json create mode 100644 backend/migrations/20250130184358_sqs_trigger.down.sql create mode 100644 backend/migrations/20250130184358_sqs_trigger.up.sql create mode 100644 backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.down.sql create mode 100644 backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.up.sql create mode 100644 backend/windmill-api/src/sqs_triggers_ee.rs create mode 100644 frontend/src/lib/components/triggers/sqs/SqsTriggerEditor.svelte create mode 100644 frontend/src/lib/components/triggers/sqs/SqsTriggerEditorConfigSection.svelte create mode 100644 frontend/src/lib/components/triggers/sqs/SqsTriggerEditorInner.svelte create mode 100644 frontend/src/lib/components/triggers/sqs/SqsTriggerPanel.svelte create mode 100644 frontend/src/routes/(root)/(logged)/sqs_triggers/+page.js create mode 100644 frontend/src/routes/(root)/(logged)/sqs_triggers/+page.svelte diff --git a/.github/workflows/build-publish-rh-image.yml b/.github/workflows/build-publish-rh-image.yml index 060f572fe8..88154da3db 100644 --- a/.github/workflows/build-publish-rh-image.yml +++ b/.github/workflows/build-publish-rh-image.yml @@ -64,7 +64,7 @@ jobs: platforms: linux/amd64 push: true build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,deno_core,license,http_trigger,zip,oauth2,kafka,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,deno_core,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust secrets: | rh_username=${{ secrets.RH_USERNAME }} rh_password=${{ secrets.RH_PASSWORD }} @@ -81,7 +81,7 @@ jobs: platforms: linux/arm64 push: true build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,deno_core,license,http_trigger,zip,oauth2,kafka,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,deno_core,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust secrets: | rh_username=${{ secrets.RH_USERNAME }} rh_password=${{ secrets.RH_PASSWORD }} diff --git a/.github/workflows/build_windows_worker_.yml b/.github/workflows/build_windows_worker_.yml index 6082a47e9b..8657bfca6b 100644 --- a/.github/workflows/build_windows_worker_.yml +++ b/.github/workflows/build_windows_worker_.yml @@ -45,7 +45,7 @@ jobs: $env:OPENSSL_DIR="${Env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows-static" mkdir frontend/build && cd backend New-Item -Path . -Name "windmill-api/openapi-deref.yaml" -ItemType "File" -Force - cargo build --release --features=enterprise,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust + cargo build --release --features=enterprise,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,nats,sqs_trigger,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust - name: Rename binary with corresponding architecture run: | diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 18145886db..3d5add18c0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -158,7 +158,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,nats,otel,dind,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,otel,dind,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }} ${{ steps.meta-ee-public.outputs.tags }} diff --git a/.github/workflows/publish_windows_worker.yml b/.github/workflows/publish_windows_worker.yml index b97d3b5560..b4b03a99e2 100644 --- a/.github/workflows/publish_windows_worker.yml +++ b/.github/workflows/publish_windows_worker.yml @@ -47,7 +47,7 @@ jobs: $env:OPENSSL_DIR="${Env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows-static" mkdir frontend/build && cd backend New-Item -Path . -Name "windmill-api/openapi-deref.yaml" -ItemType "File" -Force - cargo build --release --features=enterprise,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust + cargo build --release --features=enterprise,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,php,mysql,mssql,bigquery,oracledb,postgres_trigger,websocket,python,smtp,csharp,static_frontend,rust - name: Rename binary with corresponding architecture run: | diff --git a/backend/.sqlx/query-07da723ce5c9ee2d7c236e8eabe254c783fc34b617c8a9a95a0eb0cda535dab5.json b/backend/.sqlx/query-07da723ce5c9ee2d7c236e8eabe254c783fc34b617c8a9a95a0eb0cda535dab5.json index f7685bf7eb..6eacfceb62 100644 --- a/backend/.sqlx/query-07da723ce5c9ee2d7c236e8eabe254c783fc34b617c8a9a95a0eb0cda535dab5.json +++ b/backend/.sqlx/query-07da723ce5c9ee2d7c236e8eabe254c783fc34b617c8a9a95a0eb0cda535dab5.json @@ -19,7 +19,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-1625a84fbcf8c5f77eb0519f60d9418f85d4d3d599f4177403fad5ad99380715.json b/backend/.sqlx/query-1625a84fbcf8c5f77eb0519f60d9418f85d4d3d599f4177403fad5ad99380715.json new file mode 100644 index 0000000000..f0ee89dbc9 --- /dev/null +++ b/backend/.sqlx/query-1625a84fbcf8c5f77eb0519f60d9418f85d4d3d599f4177403fad5ad99380715.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger \n SET \n enabled = $1, \n email = $2, \n edited_by = $3, \n edited_at = now(), \n server_id = NULL, \n error = NULL\n WHERE \n path = $4 AND \n workspace_id = $5 \n RETURNING 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "?column?", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Bool", + "Varchar", + "Varchar", + "Text", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "1625a84fbcf8c5f77eb0519f60d9418f85d4d3d599f4177403fad5ad99380715" +} diff --git a/backend/.sqlx/query-1b33393fbbc7e681b4d355f6096d982b52b48c8c3da392b14963a1ec86811546.json b/backend/.sqlx/query-1b33393fbbc7e681b4d355f6096d982b52b48c8c3da392b14963a1ec86811546.json new file mode 100644 index 0000000000..271c60b480 --- /dev/null +++ b/backend/.sqlx/query-1b33393fbbc7e681b4d355f6096d982b52b48c8c3da392b14963a1ec86811546.json @@ -0,0 +1,50 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n path,\n is_flow,\n workspace_id,\n owner,\n email,\n trigger_config as \"trigger_config!: _\"\n FROM\n capture_config\n WHERE\n trigger_kind = 'sqs' AND\n last_client_ping > NOW() - INTERVAL '10 seconds' AND\n trigger_config IS NOT NULL AND\n (last_server_ping IS NULL OR last_server_ping < now() - interval '15 seconds')\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "path", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "is_flow", + "type_info": "Bool" + }, + { + "ordinal": 2, + "name": "workspace_id", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "owner", + "type_info": "Varchar" + }, + { + "ordinal": 4, + "name": "email", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "trigger_config!: _", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false, + false, + false, + true + ] + }, + "hash": "1b33393fbbc7e681b4d355f6096d982b52b48c8c3da392b14963a1ec86811546" +} diff --git a/backend/.sqlx/query-1cad25c24d0f80d58a50d4da923f8b0672797299545ee0754b6ad74ece92c77e.json b/backend/.sqlx/query-1cad25c24d0f80d58a50d4da923f8b0672797299545ee0754b6ad74ece92c77e.json new file mode 100644 index 0000000000..0729adc8ba --- /dev/null +++ b/backend/.sqlx/query-1cad25c24d0f80d58a50d4da923f8b0672797299545ee0754b6ad74ece92c77e.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n capture_config \n SET \n last_server_ping = now(), \n error = $1 \n WHERE \n workspace_id = $2 AND \n path = $3 AND \n is_flow = $4 AND \n trigger_kind = 'sqs' AND \n server_id = $5 AND \n last_client_ping > NOW() - INTERVAL '10 seconds' \n RETURNING 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "?column?", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Bool", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "1cad25c24d0f80d58a50d4da923f8b0672797299545ee0754b6ad74ece92c77e" +} diff --git a/backend/.sqlx/query-20e01ecb5d4aa4c532a8f906365c776994ae2c990bb7bb307c52296b9543fbb8.json b/backend/.sqlx/query-20e01ecb5d4aa4c532a8f906365c776994ae2c990bb7bb307c52296b9543fbb8.json new file mode 100644 index 0000000000..c9f7733011 --- /dev/null +++ b/backend/.sqlx/query-20e01ecb5d4aa4c532a8f906365c776994ae2c990bb7bb307c52296b9543fbb8.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE \n capture_config \n SET \n last_server_ping = NULL \n WHERE \n workspace_id = $1 AND \n path = $2 AND \n is_flow = $3 AND \n trigger_kind = 'sqs' AND \n server_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Bool" + ] + }, + "nullable": [] + }, + "hash": "20e01ecb5d4aa4c532a8f906365c776994ae2c990bb7bb307c52296b9543fbb8" +} diff --git a/backend/.sqlx/query-22dcd953d900fb0ddbe2099ccee27bcf833f56475bbc1aa3c8f6d79f146f41bf.json b/backend/.sqlx/query-22dcd953d900fb0ddbe2099ccee27bcf833f56475bbc1aa3c8f6d79f146f41bf.json new file mode 100644 index 0000000000..f94ca24f0f --- /dev/null +++ b/backend/.sqlx/query-22dcd953d900fb0ddbe2099ccee27bcf833f56475bbc1aa3c8f6d79f146f41bf.json @@ -0,0 +1,25 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger\n SET \n last_server_ping = now(),\n error = $1\n WHERE\n workspace_id = $2\n AND path = $3\n AND server_id = $4 \n AND enabled IS TRUE\n RETURNING 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "?column?", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "22dcd953d900fb0ddbe2099ccee27bcf833f56475bbc1aa3c8f6d79f146f41bf" +} diff --git a/backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json b/backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json new file mode 100644 index 0000000000..be9f392048 --- /dev/null +++ b/backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json @@ -0,0 +1,106 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT * FROM sqs_trigger\n WHERE workspace_id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "path", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "queue_url", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "aws_resource_path", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "message_attributes", + "type_info": "TextArray" + }, + { + "ordinal": 4, + "name": "script_path", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "is_flow", + "type_info": "Bool" + }, + { + "ordinal": 6, + "name": "workspace_id", + "type_info": "Varchar" + }, + { + "ordinal": 7, + "name": "edited_by", + "type_info": "Varchar" + }, + { + "ordinal": 8, + "name": "email", + "type_info": "Varchar" + }, + { + "ordinal": 9, + "name": "edited_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 10, + "name": "extra_perms", + "type_info": "Jsonb" + }, + { + "ordinal": 11, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 12, + "name": "server_id", + "type_info": "Varchar" + }, + { + "ordinal": 13, + "name": "last_server_ping", + "type_info": "Timestamptz" + }, + { + "ordinal": 14, + "name": "enabled", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + false + ] + }, + "hash": "2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7" +} diff --git a/backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json b/backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json new file mode 100644 index 0000000000..5d1af3380d --- /dev/null +++ b/backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json @@ -0,0 +1,107 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n aws_resource_path,\n message_attributes,\n queue_url,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n sqs_trigger\n WHERE \n workspace_id = $1 AND \n path = $2\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "aws_resource_path", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "message_attributes", + "type_info": "TextArray" + }, + { + "ordinal": 2, + "name": "queue_url", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "workspace_id", + "type_info": "Varchar" + }, + { + "ordinal": 4, + "name": "path", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "script_path", + "type_info": "Varchar" + }, + { + "ordinal": 6, + "name": "is_flow", + "type_info": "Bool" + }, + { + "ordinal": 7, + "name": "edited_by", + "type_info": "Varchar" + }, + { + "ordinal": 8, + "name": "email", + "type_info": "Varchar" + }, + { + "ordinal": 9, + "name": "edited_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 10, + "name": "server_id", + "type_info": "Varchar" + }, + { + "ordinal": 11, + "name": "last_server_ping", + "type_info": "Timestamptz" + }, + { + "ordinal": 12, + "name": "extra_perms", + "type_info": "Jsonb" + }, + { + "ordinal": 13, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 14, + "name": "enabled", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text", + "Text" + ] + }, + "nullable": [ + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + false + ] + }, + "hash": "2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867" +} diff --git a/backend/.sqlx/query-3f67e7cf8d9f021a075f1c88703287a9f42e252a1246a584249a224afdbbbf8a.json b/backend/.sqlx/query-3f67e7cf8d9f021a075f1c88703287a9f42e252a1246a584249a224afdbbbf8a.json new file mode 100644 index 0000000000..8dec90897c --- /dev/null +++ b/backend/.sqlx/query-3f67e7cf8d9f021a075f1c88703287a9f42e252a1246a584249a224afdbbbf8a.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger \n SET \n enabled = FALSE, \n error = $1, \n server_id = NULL, \n last_server_ping = NULL \n WHERE \n workspace_id = $2 AND \n path = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "3f67e7cf8d9f021a075f1c88703287a9f42e252a1246a584249a224afdbbbf8a" +} diff --git a/backend/.sqlx/query-5bd8ae8d694ac9f6afef762276141d95ba195f5543120e76e68f6e6715b65a71.json b/backend/.sqlx/query-5bd8ae8d694ac9f6afef762276141d95ba195f5543120e76e68f6e6715b65a71.json new file mode 100644 index 0000000000..31700319e2 --- /dev/null +++ b/backend/.sqlx/query-5bd8ae8d694ac9f6afef762276141d95ba195f5543120e76e68f6e6715b65a71.json @@ -0,0 +1,24 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger \n SET \n server_id = $1, \n last_server_ping = now(),\n error = 'Connecting...'\n WHERE \n enabled IS TRUE \n AND workspace_id = $2 \n AND path = $3 \n AND (last_server_ping IS NULL \n OR last_server_ping < now() - INTERVAL '15 seconds'\n ) \n RETURNING true\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "?column?", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Varchar", + "Text", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "5bd8ae8d694ac9f6afef762276141d95ba195f5543120e76e68f6e6715b65a71" +} diff --git a/backend/.sqlx/query-5c1de8473e0e96c1063a9a735a064c5a91e3ed8d9260c72b783fc12542b88fbd.json b/backend/.sqlx/query-5c1de8473e0e96c1063a9a735a064c5a91e3ed8d9260c72b783fc12542b88fbd.json index b6461d711f..0184cadf74 100644 --- a/backend/.sqlx/query-5c1de8473e0e96c1063a9a735a064c5a91e3ed8d9260c72b783fc12542b88fbd.json +++ b/backend/.sqlx/query-5c1de8473e0e96c1063a9a735a064c5a91e3ed8d9260c72b783fc12542b88fbd.json @@ -27,7 +27,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } @@ -60,7 +61,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-62475252dcf54f32433b97ae011daf5d4205d160d2aedf463c7dfe944e93257a.json b/backend/.sqlx/query-62475252dcf54f32433b97ae011daf5d4205d160d2aedf463c7dfe944e93257a.json index d99d288b08..9e86b3dbf4 100644 --- a/backend/.sqlx/query-62475252dcf54f32433b97ae011daf5d4205d160d2aedf463c7dfe944e93257a.json +++ b/backend/.sqlx/query-62475252dcf54f32433b97ae011daf5d4205d160d2aedf463c7dfe944e93257a.json @@ -19,7 +19,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-6b776693091191f36eaf9e35fb3cabb01481a19bef5a956dc36cac41acad0e53.json b/backend/.sqlx/query-6b776693091191f36eaf9e35fb3cabb01481a19bef5a956dc36cac41acad0e53.json new file mode 100644 index 0000000000..97079df64f --- /dev/null +++ b/backend/.sqlx/query-6b776693091191f36eaf9e35fb3cabb01481a19bef5a956dc36cac41acad0e53.json @@ -0,0 +1,25 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n capture_config \n SET \n server_id = $1,\n last_server_ping = now(), \n error = 'Connecting...' \n WHERE \n last_client_ping > NOW() - INTERVAL '10 seconds' AND \n workspace_id = $2 AND \n path = $3 AND \n is_flow = $4 AND \n trigger_kind = 'sqs' AND \n (last_server_ping IS NULL OR last_server_ping < now() - interval '15 seconds') \n RETURNING true\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "?column?", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Varchar", + "Text", + "Text", + "Bool" + ] + }, + "nullable": [ + null + ] + }, + "hash": "6b776693091191f36eaf9e35fb3cabb01481a19bef5a956dc36cac41acad0e53" +} diff --git a/backend/.sqlx/query-71d51bbc35da7b9930e3ea3a634451217ccb9f1bc35b1ad6e10d16bc19c41447.json b/backend/.sqlx/query-71d51bbc35da7b9930e3ea3a634451217ccb9f1bc35b1ad6e10d16bc19c41447.json index 1a61219096..4b5e3a41fd 100644 --- a/backend/.sqlx/query-71d51bbc35da7b9930e3ea3a634451217ccb9f1bc35b1ad6e10d16bc19c41447.json +++ b/backend/.sqlx/query-71d51bbc35da7b9930e3ea3a634451217ccb9f1bc35b1ad6e10d16bc19c41447.json @@ -30,7 +30,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-7e31c47e02492b74cbb5702dfc5ef9f4c8faa986843024a2cd58e212f706aae8.json b/backend/.sqlx/query-7e31c47e02492b74cbb5702dfc5ef9f4c8faa986843024a2cd58e212f706aae8.json new file mode 100644 index 0000000000..eea1cfa434 --- /dev/null +++ b/backend/.sqlx/query-7e31c47e02492b74cbb5702dfc5ef9f4c8faa986843024a2cd58e212f706aae8.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n capture_config \n SET \n error = $1, \n server_id = NULL, \n last_server_ping = NULL \n WHERE \n workspace_id = $2 AND \n path = $3 AND \n is_flow = $4 AND \n trigger_kind = 'sqs'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Bool" + ] + }, + "nullable": [] + }, + "hash": "7e31c47e02492b74cbb5702dfc5ef9f4c8faa986843024a2cd58e212f706aae8" +} diff --git a/backend/.sqlx/query-93d0ee34c7b7c56ab9cae28071f8e5fdaff0e601e2760cc5653d197c51b106bb.json b/backend/.sqlx/query-93d0ee34c7b7c56ab9cae28071f8e5fdaff0e601e2760cc5653d197c51b106bb.json new file mode 100644 index 0000000000..1945784892 --- /dev/null +++ b/backend/.sqlx/query-93d0ee34c7b7c56ab9cae28071f8e5fdaff0e601e2760cc5653d197c51b106bb.json @@ -0,0 +1,52 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT \n \n EXISTS(SELECT 1 FROM websocket_trigger WHERE workspace_id = $1) AS \"websocket_used!\", \n \n EXISTS(SELECT 1 FROM http_trigger WHERE workspace_id = $1) AS \"http_routes_used!\",\n EXISTS(SELECT 1 FROM kafka_trigger WHERE workspace_id = $1) as \"kafka_used!\",\n EXISTS(SELECT 1 FROM nats_trigger WHERE workspace_id = $1) as \"nats_used!\",\n EXISTS(SELECT 1 FROM postgres_trigger WHERE workspace_id = $1) AS \"postgres_used!\",\n EXISTS(SELECT 1 FROM sqs_trigger WHERE workspace_id = $1) AS \"sqs_used!\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "websocket_used!", + "type_info": "Bool" + }, + { + "ordinal": 1, + "name": "http_routes_used!", + "type_info": "Bool" + }, + { + "ordinal": 2, + "name": "kafka_used!", + "type_info": "Bool" + }, + { + "ordinal": 3, + "name": "nats_used!", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "postgres_used!", + "type_info": "Bool" + }, + { + "ordinal": 5, + "name": "sqs_used!", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + null, + null, + null, + null, + null, + null + ] + }, + "hash": "93d0ee34c7b7c56ab9cae28071f8e5fdaff0e601e2760cc5653d197c51b106bb" +} diff --git a/backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json b/backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json new file mode 100644 index 0000000000..de9b6ea295 --- /dev/null +++ b/backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO sqs_trigger (\n aws_resource_path,\n queue_url,\n message_attributes,\n workspace_id, \n path, \n script_path, \n is_flow, \n email, \n enabled, \n edited_by\n ) \n VALUES (\n $1, \n $2, \n $3, \n $4, \n $5, \n $6, \n $7,\n $8,\n $9,\n $10\n )", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Varchar", + "TextArray", + "Varchar", + "Varchar", + "Varchar", + "Bool", + "Varchar", + "Bool", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8" +} diff --git a/backend/.sqlx/query-a5fbef9db2308920ea26f6154f0f3490f88ced636c9ebdecba2205f964b1d0f1.json b/backend/.sqlx/query-a5fbef9db2308920ea26f6154f0f3490f88ced636c9ebdecba2205f964b1d0f1.json new file mode 100644 index 0000000000..219558ac68 --- /dev/null +++ b/backend/.sqlx/query-a5fbef9db2308920ea26f6154f0f3490f88ced636c9ebdecba2205f964b1d0f1.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger \n SET\n last_server_ping = NULL \n WHERE \n workspace_id = $1 \n AND path = $2 \n AND server_id IS NULL", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "a5fbef9db2308920ea26f6154f0f3490f88ced636c9ebdecba2205f964b1d0f1" +} diff --git a/backend/.sqlx/query-b386d320f9fe1d569a16e6626b723b4376a93342702856da2ac70f6bbfc7933e.json b/backend/.sqlx/query-b386d320f9fe1d569a16e6626b723b4376a93342702856da2ac70f6bbfc7933e.json new file mode 100644 index 0000000000..13ac3c15ea --- /dev/null +++ b/backend/.sqlx/query-b386d320f9fe1d569a16e6626b723b4376a93342702856da2ac70f6bbfc7933e.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT EXISTS(\n SELECT \n 1 \n FROM \n sqs_trigger \n WHERE \n path = $1 AND \n workspace_id = $2\n )", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "b386d320f9fe1d569a16e6626b723b4376a93342702856da2ac70f6bbfc7933e" +} diff --git a/backend/.sqlx/query-c223f8b7fa4ef1aa06e1ba2a56d677774aa237508d5610714efd2e9b8b93c7b8.json b/backend/.sqlx/query-c223f8b7fa4ef1aa06e1ba2a56d677774aa237508d5610714efd2e9b8b93c7b8.json index b5c5aa2cb7..a2d04fed03 100644 --- a/backend/.sqlx/query-c223f8b7fa4ef1aa06e1ba2a56d677774aa237508d5610714efd2e9b8b93c7b8.json +++ b/backend/.sqlx/query-c223f8b7fa4ef1aa06e1ba2a56d677774aa237508d5610714efd2e9b8b93c7b8.json @@ -22,7 +22,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-c5270ee815689e42b65df507b850da43239c9a5aaea41c9aed7ed33a6219a534.json b/backend/.sqlx/query-c5270ee815689e42b65df507b850da43239c9a5aaea41c9aed7ed33a6219a534.json index 6f08506fdf..e29d94f8f5 100644 --- a/backend/.sqlx/query-c5270ee815689e42b65df507b850da43239c9a5aaea41c9aed7ed33a6219a534.json +++ b/backend/.sqlx/query-c5270ee815689e42b65df507b850da43239c9a5aaea41c9aed7ed33a6219a534.json @@ -19,7 +19,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json index c2dfed73a2..5bfff47576 100644 --- a/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json +++ b/backend/.sqlx/query-ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927.json @@ -15,7 +15,7 @@ ] }, "nullable": [ - null + true ] }, "hash": "ddf2eccb78a310ed00c7d8b9c3f05d394a7cbcf0038c72a78add5c7b02ef5927" diff --git a/backend/.sqlx/query-dea056c89313f4facd62cbbc9fa33ba30fa85efcc83fafe4dd7b4e535b96a8d8.json b/backend/.sqlx/query-dea056c89313f4facd62cbbc9fa33ba30fa85efcc83fafe4dd7b4e535b96a8d8.json new file mode 100644 index 0000000000..12e4b6d81b --- /dev/null +++ b/backend/.sqlx/query-dea056c89313f4facd62cbbc9fa33ba30fa85efcc83fafe4dd7b4e535b96a8d8.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE \n FROM \n sqs_trigger \n WHERE \n workspace_id = $1 AND \n path = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "dea056c89313f4facd62cbbc9fa33ba30fa85efcc83fafe4dd7b4e535b96a8d8" +} diff --git a/backend/.sqlx/query-e17ec84003e2ec414622d100f5dfdda86bee33f31835317df512a20c805b35d7.json b/backend/.sqlx/query-e17ec84003e2ec414622d100f5dfdda86bee33f31835317df512a20c805b35d7.json index 7e7155a6b4..66578654a3 100644 --- a/backend/.sqlx/query-e17ec84003e2ec414622d100f5dfdda86bee33f31835317df512a20c805b35d7.json +++ b/backend/.sqlx/query-e17ec84003e2ec414622d100f5dfdda86bee33f31835317df512a20c805b35d7.json @@ -27,7 +27,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-e23e110e1f0438d21534fc4323e0e7bc1f0dbeca2e4f44ced05bae0ca5ca1039.json b/backend/.sqlx/query-e23e110e1f0438d21534fc4323e0e7bc1f0dbeca2e4f44ced05bae0ca5ca1039.json index 488355d34e..8d3bf8c927 100644 --- a/backend/.sqlx/query-e23e110e1f0438d21534fc4323e0e7bc1f0dbeca2e4f44ced05bae0ca5ca1039.json +++ b/backend/.sqlx/query-e23e110e1f0438d21534fc4323e0e7bc1f0dbeca2e4f44ced05bae0ca5ca1039.json @@ -35,7 +35,8 @@ "kafka", "email", "nats", - "postgres" + "postgres", + "sqs" ] } } diff --git a/backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json b/backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json new file mode 100644 index 0000000000..9715083ee6 --- /dev/null +++ b/backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json @@ -0,0 +1,104 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n queue_url,\n aws_resource_path,\n message_attributes,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM\n sqs_trigger\n WHERE\n enabled IS TRUE\n AND (last_server_ping IS NULL OR\n last_server_ping < now() - interval '15 seconds'\n )\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "queue_url", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "aws_resource_path", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "message_attributes", + "type_info": "TextArray" + }, + { + "ordinal": 3, + "name": "workspace_id", + "type_info": "Varchar" + }, + { + "ordinal": 4, + "name": "path", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "script_path", + "type_info": "Varchar" + }, + { + "ordinal": 6, + "name": "is_flow", + "type_info": "Bool" + }, + { + "ordinal": 7, + "name": "edited_by", + "type_info": "Varchar" + }, + { + "ordinal": 8, + "name": "email", + "type_info": "Varchar" + }, + { + "ordinal": 9, + "name": "edited_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 10, + "name": "server_id", + "type_info": "Varchar" + }, + { + "ordinal": 11, + "name": "last_server_ping", + "type_info": "Timestamptz" + }, + { + "ordinal": 12, + "name": "extra_perms", + "type_info": "Jsonb" + }, + { + "ordinal": 13, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 14, + "name": "enabled", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + false + ] + }, + "hash": "e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a" +} diff --git a/backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json b/backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json new file mode 100644 index 0000000000..aa29c1b4dd --- /dev/null +++ b/backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger \n SET \n aws_resource_path = $1,\n queue_url = $2,\n message_attributes = $3, \n is_flow = $4, \n edited_by = $5, \n email = $6,\n script_path = $7,\n path = $8,\n edited_at = now(), \n error = NULL,\n server_id = NULL\n WHERE \n workspace_id = $9 AND \n path = $10\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Varchar", + "TextArray", + "Bool", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5" +} diff --git a/backend/.vscode/settings.json b/backend/.vscode/settings.json index ab8340f5c8..6ebd36cf07 100644 --- a/backend/.vscode/settings.json +++ b/backend/.vscode/settings.json @@ -11,5 +11,5 @@ "remote.autoForwardPorts": true, "conventionalCommits.scopes": [ "restructring triggers, decoding trigger message on work" - ], + ] } diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 73f3686217..282b6f9aba 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -716,6 +716,28 @@ dependencies = [ "uuid 1.13.2", ] +[[package]] +name = "aws-sdk-sqs" +version = "1.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03247b11956444de4699fb0b84ed32989ed9530900020d7fb8983174b5b358f9" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http 0.2.12", + "once_cell", + "regex-lite", + "tracing", +] + [[package]] name = "aws-sdk-sso" version = "1.59.0" @@ -10912,6 +10934,8 @@ dependencies = [ "async-stream", "async-stripe", "async_zip", + "aws-config", + "aws-sdk-sqs", "axum", "base32", "base64 0.22.1", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index e3088ef581..cbaffe175c 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -74,6 +74,7 @@ mssql = ["windmill-worker/mssql"] bigquery = ["windmill-worker/bigquery"] websocket = ["windmill-api/websocket"] postgres_trigger = ["windmill-api/postgres_trigger"] +sqs_trigger = ["windmill-api/sqs_trigger"] python = ["windmill-worker/python"] smtp = ["windmill-api/smtp", "windmill-common/smtp"] csharp = ["windmill-worker/csharp"] @@ -306,6 +307,7 @@ datafusion = "39.0.0" object_store = { version = "0.10.0", features = ["aws", "azure"] } openidconnect = { version = "4.0.0-rc.1" } aws-config = "^1" +aws-sdk-sqs = "1.57.0" aws-sdk-sts = "^1" crc = "^3" diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 562c984114..efebd317f9 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -5d25cf2cd15c1953794045fd7debea14a33c7519 \ No newline at end of file +5e7e98536a8eb632961b3b597deac95aaca1cdbe \ No newline at end of file diff --git a/backend/migrations/20250130184358_sqs_trigger.down.sql b/backend/migrations/20250130184358_sqs_trigger.down.sql new file mode 100644 index 0000000000..5b91b856ad --- /dev/null +++ b/backend/migrations/20250130184358_sqs_trigger.down.sql @@ -0,0 +1,2 @@ +-- Add down migration script here +DROP TABLE IF EXISTS sqs_trigger; \ No newline at end of file diff --git a/backend/migrations/20250130184358_sqs_trigger.up.sql b/backend/migrations/20250130184358_sqs_trigger.up.sql new file mode 100644 index 0000000000..aaa219b1de --- /dev/null +++ b/backend/migrations/20250130184358_sqs_trigger.up.sql @@ -0,0 +1,69 @@ +-- Add up migration script here +CREATE TABLE sqs_trigger( + path VARCHAR(255) NOT NULL, + queue_url VARCHAR(255) NOT NULL, + aws_resource_path VARCHAR(255) NOT NULL, + message_attributes TEXT[], + script_path VARCHAR(255) NOT NULL, + is_flow BOOLEAN NOT NULL, + workspace_id VARCHAR(50) NOT NULL, + edited_by VARCHAR(50) NOT NULL, + email VARCHAR(255) NOT NULL, + edited_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + extra_perms JSONB NULL, + error TEXT NULL, + server_id VARCHAR(50) NULL, + last_server_ping TIMESTAMPTZ NULL, + enabled BOOLEAN NOT NULL, + CONSTRAINT PK_sqs_trigger PRIMARY KEY (path,workspace_id), + CONSTRAINT fk_sqs_trigger_workspace FOREIGN KEY (workspace_id) + REFERENCES workspace(id) ON DELETE CASCADE +); + +GRANT ALL ON sqs_trigger TO windmill_user; +GRANT ALL ON sqs_trigger TO windmill_admin; + +ALTER TABLE sqs_trigger ENABLE ROW LEVEL SECURITY; + +CREATE POLICY admin_policy ON sqs_trigger FOR ALL TO windmill_admin USING (true); + +CREATE POLICY see_folder_extra_perms_user_select ON sqs_trigger FOR SELECT TO windmill_user +USING (SPLIT_PART(sqs_trigger.path, '/', 1) = 'f' AND SPLIT_PART(sqs_trigger.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_read'), ',')::text[])); +CREATE POLICY see_folder_extra_perms_user_insert ON sqs_trigger FOR INSERT TO windmill_user +WITH CHECK (SPLIT_PART(sqs_trigger.path, '/', 1) = 'f' AND SPLIT_PART(sqs_trigger.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[])); +CREATE POLICY see_folder_extra_perms_user_update ON sqs_trigger FOR UPDATE TO windmill_user +USING (SPLIT_PART(sqs_trigger.path, '/', 1) = 'f' AND SPLIT_PART(sqs_trigger.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[])); +CREATE POLICY see_folder_extra_perms_user_delete ON sqs_trigger FOR DELETE TO windmill_user +USING (SPLIT_PART(sqs_trigger.path, '/', 1) = 'f' AND SPLIT_PART(sqs_trigger.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[])); + +CREATE POLICY see_own ON sqs_trigger FOR ALL TO windmill_user +USING (SPLIT_PART(sqs_trigger.path, '/', 1) = 'u' AND SPLIT_PART(sqs_trigger.path, '/', 2) = current_setting('session.user')); +CREATE POLICY see_member ON sqs_trigger FOR ALL TO windmill_user +USING (SPLIT_PART(sqs_trigger.path, '/', 1) = 'g' AND SPLIT_PART(sqs_trigger.path, '/', 2) = any(regexp_split_to_array(current_setting('session.groups'), ',')::text[])); + +CREATE POLICY see_extra_perms_user_select ON sqs_trigger FOR SELECT TO windmill_user +USING (extra_perms ? CONCAT('u/', current_setting('session.user'))); +CREATE POLICY see_extra_perms_user_insert ON sqs_trigger FOR INSERT TO windmill_user +WITH CHECK ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean); +CREATE POLICY see_extra_perms_user_update ON sqs_trigger FOR UPDATE TO windmill_user +USING ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean); +CREATE POLICY see_extra_perms_user_delete ON sqs_trigger FOR DELETE TO windmill_user +USING ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean); + +CREATE POLICY see_extra_perms_groups_select ON sqs_trigger FOR SELECT TO windmill_user +USING (extra_perms ?| regexp_split_to_array(current_setting('session.pgroups'), ',')::text[]); +CREATE POLICY see_extra_perms_groups_insert ON sqs_trigger FOR INSERT TO windmill_user +WITH CHECK (exists( + SELECT key, value FROM jsonb_each_text(extra_perms) + WHERE SPLIT_PART(key, '/', 1) = 'g' AND key = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[]) + AND value::boolean)); +CREATE POLICY see_extra_perms_groups_update ON sqs_trigger FOR UPDATE TO windmill_user +USING (exists( + SELECT key, value FROM jsonb_each_text(extra_perms) + WHERE SPLIT_PART(key, '/', 1) = 'g' AND key = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[]) + AND value::boolean)); +CREATE POLICY see_extra_perms_groups_delete ON sqs_trigger FOR DELETE TO windmill_user +USING (exists( + SELECT key, value FROM jsonb_each_text(extra_perms) + WHERE SPLIT_PART(key, '/', 1) = 'g' AND key = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[]) + AND value::boolean)); \ No newline at end of file diff --git a/backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.down.sql b/backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.down.sql new file mode 100644 index 0000000000..0197d4e7b1 --- /dev/null +++ b/backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.down.sql @@ -0,0 +1 @@ +-- Add down migration script here \ No newline at end of file diff --git a/backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.up.sql b/backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.up.sql new file mode 100644 index 0000000000..2281aeba2a --- /dev/null +++ b/backend/migrations/20250205003539_add_sqs_type_value_to_trigger_kind_type.up.sql @@ -0,0 +1,2 @@ +-- Add up migration script here +ALTER TYPE TRIGGER_KIND ADD VALUE IF NOT EXISTS 'sqs'; \ No newline at end of file diff --git a/backend/src/main.rs b/backend/src/main.rs index 0dfda31bcf..ab74895ca8 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -899,6 +899,7 @@ Windmill Community Edition {GIT_VERSION} let metrics_f = async { let enabled = METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed); + #[cfg(not(all(feature = "enterprise", feature = "prometheus")))] if enabled { tracing::error!("Metrics are only available in the EE, ignoring..."); diff --git a/backend/windmill-api/Cargo.toml b/backend/windmill-api/Cargo.toml index 675aeec0b1..d5f8f6f420 100644 --- a/backend/windmill-api/Cargo.toml +++ b/backend/windmill-api/Cargo.toml @@ -29,6 +29,7 @@ oauth2 = ["dep:async-oauth2"] http_trigger = ["dep:matchit"] static_frontend = ["dep:rust-embed"] postgres_trigger = ["dep:rust-postgres", "dep:pg_escape", "dep:byteorder", "dep:thiserror", "dep:rust_decimal", "dep:rust-postgres-native-tls"] +sqs_trigger = ["dep:aws-sdk-sqs", "dep:thiserror", "dep:aws-config"] [dependencies] windmill-queue.workspace = true @@ -118,4 +119,6 @@ pg_escape = { workspace = true, optional = true } byteorder = { workspace = true, optional = true } thiserror = { workspace = true, optional = true } rust_decimal = { workspace = true, optional = true } -rust-postgres-native-tls = { workspace = true, optional = true} \ No newline at end of file +rust-postgres-native-tls = { workspace = true, optional = true} +aws-sdk-sqs = { workspace = true, optional = true } +aws-config = { workspace = true, optional = true} \ No newline at end of file diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index dca954119e..41abe815a7 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -2611,12 +2611,15 @@ paths: type: boolean postgres_used: type: boolean + sqs_used: + type: boolean required: - http_routes_used - websocket_used - kafka_used - nats_used - postgres_used + - sqs_used /w/{workspace}/users/list: get: summary: list users @@ -8564,6 +8567,196 @@ paths: schema: type: string + /w/{workspace}/sqs_triggers/create: + post: + summary: create sqs trigger + operationId: createSqsTrigger + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + requestBody: + description: new sqs trigger + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/NewSqsTrigger" + responses: + "201": + description: sqs trigger created + content: + text/plain: + schema: + type: string + + /w/{workspace}/sqs_triggers/update/{path}: + post: + summary: update sqs trigger + operationId: updateSqsTrigger + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/Path" + requestBody: + description: updated trigger + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/EditSqsTrigger" + responses: + "200": + description: sqs trigger updated + content: + text/plain: + schema: + type: string + + /w/{workspace}/sqs_triggers/delete/{path}: + delete: + summary: delete sqs trigger + operationId: deleteSqsTrigger + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/Path" + responses: + "200": + description: sqs trigger deleted + content: + text/plain: + schema: + type: string + + /w/{workspace}/sqs_triggers/get/{path}: + get: + summary: get sqs trigger + operationId: getSqsTrigger + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/Path" + responses: + "200": + description: sqs trigger deleted + content: + application/json: + schema: + $ref: "#/components/schemas/SqsTrigger" + + /w/{workspace}/sqs_triggers/list: + get: + summary: list sqs triggers + operationId: listSqsTriggers + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + required: true + - $ref: "#/components/parameters/Page" + - $ref: "#/components/parameters/PerPage" + - name: path + description: filter by path + in: query + schema: + type: string + - name: is_flow + in: query + schema: + type: boolean + - name: path_start + in: query + schema: + type: string + responses: + "200": + description: sqs trigger list + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/SqsTrigger" + + /w/{workspace}/sqs_triggers/exists/{path}: + get: + summary: does sqs trigger exists + operationId: existsSqsTrigger + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/Path" + responses: + "200": + description: sqs trigger exists + content: + application/json: + schema: + type: boolean + + /w/{workspace}/sqs_triggers/setenabled/{path}: + post: + summary: set enabled sqs trigger + operationId: setSqsTriggerEnabled + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/Path" + requestBody: + description: updated sqs trigger enable + required: true + content: + application/json: + schema: + type: object + properties: + enabled: + type: boolean + required: + - enabled + responses: + "200": + description: sqs trigger enabled set + content: + text/plain: + schema: + type: string + + /w/{workspace}/sqs_triggers/test: + post: + summary: test sqs connection + operationId: testSqsConnection + tags: + - sqs_trigger + parameters: + - $ref: "#/components/parameters/WorkspaceId" + requestBody: + description: test sqs connection + required: true + content: + application/json: + schema: + type: object + properties: + connection: + type: object + required: + - connection + responses: + "200": + description: successfuly connected to sqs + content: + text/plain: + schema: + type: string + + /w/{workspace}/postgres_triggers/is_valid_postgres_configuration/{path}: get: summary: check if postgres configuration is set to logical @@ -9851,6 +10044,7 @@ paths: kafka_trigger, nats_trigger, postgres_trigger, + sqs_trigger ] responses: "200": @@ -9892,6 +10086,7 @@ paths: kafka_trigger, nats_trigger, postgres_trigger, + sqs_trigger ] requestBody: description: acl to add @@ -9944,6 +10139,7 @@ paths: kafka_trigger, nats_trigger, postgres_trigger, + sqs_trigger ] requestBody: description: acl to add @@ -13166,6 +13362,10 @@ components: TriggerExtraProperty: type: object properties: + path: + type: string + script_path: + type: string email: type: string extra_perms: @@ -13179,22 +13379,23 @@ components: edited_at: type: string format: date-time + is_flow: + type: boolean required: + - path + - script_path - email - extra_perms - workspace_id - edited_by - edited_at + - is_flow HttpTrigger: allOf: - $ref: "#/components/schemas/TriggerExtraProperty" type: object properties: - path: - type: string - script_path: - type: string route_path: type: string static_asset_config: @@ -13208,8 +13409,6 @@ components: type: string required: - s3 - is_flow: - type: boolean http_method: type: string enum: @@ -13226,15 +13425,7 @@ components: type: boolean required: - - path - - edited_by - - edited_at - - script_path - route_path - - extra_perms - - is_flow - - email - - workspace_id - is_async - requires_auth - http_method @@ -13357,20 +13548,16 @@ components: type: number nats_count: type: number + sqs_count: + type: number WebsocketTrigger: allOf: - $ref: "#/components/schemas/TriggerExtraProperty" type: object properties: - path: - type: string - script_path: - type: string url: type: string - is_flow: - type: boolean server_id: type: string last_server_ping: @@ -13401,15 +13588,7 @@ components: type: boolean required: - - path - - edited_by - - edited_at - - script_path - url - - extra_perms - - is_flow - - email - - workspace_id - enabled - filters - can_return_message @@ -13519,6 +13698,88 @@ components: required: - runnable_result + SqsTrigger: + allOf: + - $ref: "#/components/schemas/TriggerExtraProperty" + type: object + properties: + queue_url: + type: string + aws_resource_path: + type: string + message_attributes: + type: array + items: + type: string + server_id: + type: string + last_server_ping: + type: string + format: date-time + error: + type: string + enabled: + type: boolean + + required: + - queue_url + - aws_resource_path + - enabled + + NewSqsTrigger: + type: object + properties: + queue_url: + type: string + aws_resource_path: + type: string + message_attributes: + type: array + items: + type: string + path: + type: string + script_path: + type: string + is_flow: + type: boolean + enabled: + type: boolean + required: + - queue_url + - aws_resource_path + - path + - script_path + - is_flow + + EditSqsTrigger: + type: object + properties: + queue_url: + type: string + aws_resource_path: + type: string + message_attributes: + type: array + items: + type: string + path: + type: string + script_path: + type: string + is_flow: + type: boolean + enabled: + type: boolean + required: + - queue_url + - aws_resource_path + - path + - script_path + - is_flow + - enabled + + Slot: type: object properties: @@ -13600,12 +13861,6 @@ components: - $ref: "#/components/schemas/TriggerExtraProperty" type: object properties: - path: - type: string - script_path: - type: string - is_flow: - type: boolean enabled: type: boolean postgres_resource_path: @@ -13622,9 +13877,6 @@ components: type: string format: date-time required: - - path - - script_path - - is_flow - enabled - postgres_resource_path - replication_slot_name @@ -13685,17 +13937,10 @@ components: - replication_slot_name KafkaTrigger: + allOf: + - $ref: "#/components/schemas/TriggerExtraProperty" type: object properties: - path: - type: string - edited_by: - type: string - edited_at: - type: string - format: date-time - script_path: - type: string kafka_resource_path: type: string group_id: @@ -13704,16 +13949,6 @@ components: type: array items: type: string - is_flow: - type: boolean - extra_perms: - type: object - additionalProperties: - type: boolean - email: - type: string - workspace_id: - type: string server_id: type: string last_server_ping: @@ -13725,17 +13960,9 @@ components: type: boolean required: - - path - - edited_by - - edited_at - - script_path - kafka_resource_path - group_id - topics - - extra_perms - - is_flow - - email - - workspace_id - enabled NewKafkaTrigger: @@ -13793,17 +14020,10 @@ components: - is_flow NatsTrigger: + allOf: + - $ref: "#/components/schemas/TriggerExtraProperty" type: object properties: - path: - type: string - edited_by: - type: string - edited_at: - type: string - format: date-time - script_path: - type: string nats_resource_path: type: string use_jetstream: @@ -13816,16 +14036,6 @@ components: type: array items: type: string - is_flow: - type: boolean - extra_perms: - type: object - additionalProperties: - type: boolean - email: - type: string - workspace_id: - type: string server_id: type: string last_server_ping: @@ -13837,17 +14047,9 @@ components: type: boolean required: - - path - - edited_by - - edited_at - - script_path - nats_resource_path - use_jetstream - subjects - - extra_perms - - is_flow - - email - - workspace_id - enabled NewNatsTrigger: @@ -14867,7 +15069,7 @@ components: CaptureTriggerKind: type: string - enum: [webhook, http, websocket, kafka, email, nats, postgres] + enum: [webhook, http, websocket, kafka, email, nats, postgres, sqs] Capture: type: object diff --git a/backend/windmill-api/src/capture.rs b/backend/windmill-api/src/capture.rs index 664f874c0c..7606822d65 100644 --- a/backend/windmill-api/src/capture.rs +++ b/backend/windmill-api/src/capture.rs @@ -98,6 +98,7 @@ pub enum TriggerKind { Kafka, Email, Nats, + Sqs, Postgres, } @@ -110,6 +111,7 @@ impl fmt::Display for TriggerKind { TriggerKind::Kafka => "kafka", TriggerKind::Email => "email", TriggerKind::Nats => "nats", + TriggerKind::Sqs => "sqs", TriggerKind::Postgres => "postgres", }; write!(f, "{}", s) @@ -132,6 +134,14 @@ pub struct KafkaTriggerConfig { pub group_id: String, } +#[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] +#[derive(Debug, Serialize, Deserialize)] +pub struct SqsTriggerConfig { + pub queue_url: String, + pub aws_resource_path: String, + pub message_attributes: Option> +} + #[cfg(all(feature = "enterprise", feature = "nats"))] #[derive(Serialize, Deserialize)] pub struct NatsTriggerConfig { @@ -171,6 +181,8 @@ enum TriggerConfig { Postgres(PostgresTriggerConfig), #[cfg(feature = "websocket")] Websocket(WebsocketTriggerConfig), + #[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] + Sqs(SqsTriggerConfig), #[cfg(all(feature = "enterprise", feature = "kafka"))] Kafka(KafkaTriggerConfig), #[cfg(all(feature = "enterprise", feature = "nats"))] diff --git a/backend/windmill-api/src/kafka_triggers_ee.rs b/backend/windmill-api/src/kafka_triggers_ee.rs index de50eea53b..0a24151ae3 100644 --- a/backend/windmill-api/src/kafka_triggers_ee.rs +++ b/backend/windmill-api/src/kafka_triggers_ee.rs @@ -39,4 +39,4 @@ pub struct KafkaTrigger { #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, pub enabled: bool, -} +} \ No newline at end of file diff --git a/backend/windmill-api/src/lib.rs b/backend/windmill-api/src/lib.rs index 4199494ed4..57a49dc724 100644 --- a/backend/windmill-api/src/lib.rs +++ b/backend/windmill-api/src/lib.rs @@ -105,6 +105,8 @@ mod settings; mod slack_approvals; #[cfg(feature = "smtp")] mod smtp_server_ee; +#[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] +mod sqs_triggers_ee; mod static_assets; mod stripe_ee; mod teams_ee; @@ -319,6 +321,48 @@ pub async fn run_server( } }; + let sqs_triggers_service = { + #[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] + { + sqs_triggers_ee::workspaced_service() + } + + #[cfg(not(all(feature = "enterprise", feature = "sqs_trigger")))] + { + Router::new() + } + }; + + let websocket_triggers_service = { + #[cfg(feature = "websocket")] + { + websocket_triggers::workspaced_service() + } + + #[cfg(not(feature = "websocket"))] + Router::new() + }; + + let http_triggers_service = { + #[cfg(feature = "http_trigger")] + { + http_triggers::workspaced_service() + } + + #[cfg(not(feature = "http_trigger"))] + Router::new() + }; + + let postgres_triggers_service = { + #[cfg(feature = "postgres_trigger")] + { + postgres_triggers::workspaced_service() + } + + #[cfg(not(feature = "postgres_trigger"))] + Router::new() + }; + if !*CLOUD_HOSTED { #[cfg(feature = "websocket")] { @@ -337,11 +381,18 @@ pub async fn run_server( let nats_killpill_rx = rx.resubscribe(); nats_triggers_ee::start_nats_consumers(db.clone(), nats_killpill_rx); } + #[cfg(feature = "postgres_trigger")] { let db_killpill_rx = rx.resubscribe(); postgres_triggers::start_database(db.clone(), db_killpill_rx); } + + #[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] + { + let sqs_killpill_rx = rx.resubscribe(); + sqs_triggers_ee::start_sqs(db.clone(), sqs_killpill_rx); + } } // build our application with a route @@ -392,35 +443,12 @@ pub async fn run_server( .nest("/variables", variables::workspaced_service()) .nest("/workspaces", workspaces::workspaced_service()) .nest("/oidc", oidc_ee::workspaced_service()) - .nest("/http_triggers", { - #[cfg(feature = "http_trigger")] - { - http_triggers::workspaced_service() - } - - #[cfg(not(feature = "http_trigger"))] - Router::new() - }) - .nest("/websocket_triggers", { - #[cfg(feature = "websocket")] - { - websocket_triggers::workspaced_service() - } - - #[cfg(not(feature = "websocket"))] - Router::new() - }) + .nest("/http_triggers", http_triggers_service) + .nest("/websocket_triggers", websocket_triggers_service) .nest("/kafka_triggers", kafka_triggers_service) .nest("/nats_triggers", nats_triggers_service) - .nest("/postgres_triggers", { - #[cfg(feature = "postgres_trigger")] - { - postgres_triggers::workspaced_service() - } - - #[cfg(not(feature = "postgres_trigger"))] - Router::new() - }), + .nest("/sqs_triggers", sqs_triggers_service) + .nest("/postgres_triggers", postgres_triggers_service), ) .nest("/workspaces", workspaces::global_service()) .nest( diff --git a/backend/windmill-api/src/nats_triggers_ee.rs b/backend/windmill-api/src/nats_triggers_ee.rs index 92894a2a34..649d3a3837 100644 --- a/backend/windmill-api/src/nats_triggers_ee.rs +++ b/backend/windmill-api/src/nats_triggers_ee.rs @@ -40,4 +40,4 @@ pub struct NatsTrigger { #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, pub enabled: bool, -} +} \ No newline at end of file diff --git a/backend/windmill-api/src/postgres_triggers/handler.rs b/backend/windmill-api/src/postgres_triggers/handler.rs index 9c37e0968f..4c791eeb8b 100644 --- a/backend/windmill-api/src/postgres_triggers/handler.rs +++ b/backend/windmill-api/src/postgres_triggers/handler.rs @@ -36,11 +36,11 @@ use super::{ use lazy_static::lazy_static; #[derive(FromRow, Serialize, Deserialize, Debug)] -pub struct Database { +pub struct Postgres { pub user: String, pub password: String, pub host: String, - pub port: u16, + pub port: Option, pub dbname: String, #[serde(default)] pub sslmode: String, @@ -113,7 +113,6 @@ pub struct TestPostgres { pub postgres_resource_path: String, } - pub async fn test_postgres_connection( authed: ApiAuthed, Extension(db): Extension, @@ -706,7 +705,7 @@ pub async fn get_publication_info( let publication_data = get_publication_scope_and_transaction(&mut connection, &publication_name).await; - let (all_table, transaction_to_track) = match publication_data { + let (all_table, transaction_to_track) = match publication_data { Ok(pub_data) => pub_data, Err(Error::SqlErr { error: sqlx::Error::RowNotFound, .. }) => { return Err(Error::NotFound( @@ -1457,4 +1456,4 @@ pub async fn is_database_in_logical_level( }; Ok(Json(is_logical)) -} \ No newline at end of file +} diff --git a/backend/windmill-api/src/postgres_triggers/mod.rs b/backend/windmill-api/src/postgres_triggers/mod.rs index f45a8d5b37..d041f1f508 100644 --- a/backend/windmill-api/src/postgres_triggers/mod.rs +++ b/backend/windmill-api/src/postgres_triggers/mod.rs @@ -1,7 +1,7 @@ use crate::{ db::{ApiAuthed, DB}, jobs::{run_flow_by_path_inner, run_script_by_path_inner, RunJobQuery}, - resources::get_resource_value_interpolated_internal, + resources::try_get_resource_from_db_as, users::fetch_api_authed, }; use chrono::Utc; @@ -20,18 +20,17 @@ use axum::{ routing::{delete, get, post}, Router, }; +pub use handler::PostgresTrigger; use handler::{ alter_publication, create_postgres_trigger, create_publication, create_slot, create_template_script, delete_postgres_trigger, delete_publication, drop_slot_name, exists_postgres_trigger, get_postgres_trigger, get_publication_info, get_template_script, is_database_in_logical_level, list_database_publication, list_postgres_triggers, - list_slot_name, set_enabled, test_postgres_connection, update_postgres_trigger, Database, + list_slot_name, set_enabled, test_postgres_connection, update_postgres_trigger, Postgres, Relations, }; -pub use handler::PostgresTrigger; use windmill_common::{db::UserDB, error::Error, utils::StripPath}; use windmill_queue::PushArgsOwned; - mod bool; mod converter; mod handler; @@ -55,13 +54,15 @@ pub async fn get_database_connection( postgres_resource_path: &str, w_id: &str, ) -> std::result::Result { - let database = get_database_resource(authed, user_db, db, postgres_resource_path, w_id).await?; + let database = + try_get_resource_from_db_as::(authed, user_db, db, postgres_resource_path, w_id) + .await?; Ok(get_raw_postgres_connection(&database).await?) } pub async fn get_raw_postgres_connection( - db: &Database, + db: &Postgres, ) -> std::result::Result { let options = { let sslmode = if !db.sslmode.is_empty() { @@ -69,12 +70,19 @@ pub async fn get_raw_postgres_connection( } else { PgSslMode::Prefer }; - let options = PgConnectOptions::new() - .host(&db.host) - .database(&db.dbname) - .port(db.port) - .ssl_mode(sslmode) - .username(&db.user); + let options = { + let inner_options = PgConnectOptions::new() + .host(&db.host) + .database(&db.dbname) + .ssl_mode(sslmode) + .username(&db.user); + + if let Some(port) = db.port { + inner_options.port(port) + } else { + inner_options + } + }; let options = if !db.root_certificate_pem.is_empty() { options.ssl_root_cert_from_pem(db.root_certificate_pem.as_bytes().to_vec()) @@ -202,39 +210,6 @@ pub fn generate_random_string() -> String { format!("{}_{}", timestamp, random_part) } -pub async fn get_database_resource( - authed: ApiAuthed, - user_db: Option, - db: &DB, - database_resource_path: &str, - w_id: &str, -) -> Result { - let resource = get_resource_value_interpolated_internal( - &authed, - user_db, - &db, - &w_id, - &database_resource_path, - None, - "", - ) - .await - .map_err(|_| Error::NotFound("Database resource do not exist".to_string()))?; - - let resource = match resource { - Some(resource) => serde_json::from_value::(resource)?, - None => { - return { - Err(Error::NotFound( - "Database resource do not exist".to_string(), - )) - } - } - }; - - Ok(resource) -} - fn publication_service() -> Router { Router::new() .route("/get/:publication_name/*path", get(get_publication_info)) diff --git a/backend/windmill-api/src/postgres_triggers/trigger.rs b/backend/windmill-api/src/postgres_triggers/trigger.rs index 45be9f6935..5d84cbdba2 100644 --- a/backend/windmill-api/src/postgres_triggers/trigger.rs +++ b/backend/windmill-api/src/postgres_triggers/trigger.rs @@ -4,7 +4,6 @@ use crate::{ capture::{insert_capture_payload, PostgresTriggerConfig, TriggerKind}, db::{ApiAuthed, DB}, postgres_triggers::{ - get_database_resource, relation::RelationConverter, replication_message::{ LogicalReplicationMessage::{Begin, Commit, Delete, Insert, Relation, Type, Update}, @@ -12,7 +11,7 @@ use crate::{ }, run_job, }, - users::fetch_api_authed, + users::fetch_api_authed, resources::try_get_resource_from_db_as, }; use bytes::{BufMut, Bytes, BytesMut}; use chrono::TimeZone; @@ -33,7 +32,7 @@ use windmill_queue::PushArgsOwned; use super::{ drop_logical_replication_slot_query, drop_publication_query, get_database_connection, - handler::{Database, PostgresTrigger}, + handler::{Postgres, PostgresTrigger}, replication_message::PrimaryKeepAliveBody, ERROR_PUBLICATION_NAME_NOT_EXISTS, ERROR_REPLICATION_SLOT_NOT_EXISTS, }; @@ -80,7 +79,7 @@ enum Error { pub struct PostgresSimpleClient(Client); impl PostgresSimpleClient { - async fn new(database: &Database) -> Result { + async fn new(database: &Postgres) -> Result { let ssl_mode = match database.sslmode.as_ref() { "disable" => SslMode::Disable, "" | "prefer" | "allow" => SslMode::Prefer, @@ -98,11 +97,14 @@ impl PostgresSimpleClient { config .dbname(&database.dbname) .host(&database.host) - .port(database.port) .user(&database.user) .ssl_mode(ssl_mode) .replication_mode(rust_postgres::config::ReplicationMode::Logical); + if let Some(port) = database.port { + config.port(port); + }; + if !database.password.is_empty() { config.password(&database.password); } @@ -451,7 +453,7 @@ impl PostgresConfig { PostgresConfig::Capture(capture) => capture.fetch_authed(db).await?, }; - let database = get_database_resource( + let database = try_get_resource_from_db_as::( authed, Some(UserDB::new(db.clone())), &db, diff --git a/backend/windmill-api/src/resources.rs b/backend/windmill-api/src/resources.rs index f3f2285cd0..f41a2b8e5d 100644 --- a/backend/windmill-api/src/resources.rs +++ b/backend/windmill-api/src/resources.rs @@ -515,7 +515,9 @@ pub async fn transform_json_value<'c>( Value::String(y) if y.starts_with("$res:") => { let path = y.strip_prefix("$res:").unwrap(); if path.split("/").count() < 2 { - return Err(Error::internal_err(format!("Invalid resource path: {path}"))); + return Err(Error::internal_err(format!( + "Invalid resource path: {path}" + ))); } let mut tx: Transaction<'_, Postgres> = authed_transaction_or_default(authed, user_db.clone(), db).await?; @@ -1205,3 +1207,44 @@ async fn update_resource_type( Ok(format!("resource_type {} updated", name)) } + +#[cfg(any( + feature = "postgres_trigger", + all(feature = "sqs_trigger", feature = "enterprise") +))] +pub async fn try_get_resource_from_db_as( + authed: ApiAuthed, + user_db: Option, + db: &DB, + resource_path: &str, + w_id: &str, +) -> Result +where + T: serde::de::DeserializeOwned, +{ + let resource = get_resource_value_interpolated_internal( + &authed, + user_db, + &db, + &w_id, + &resource_path, + None, + "", + ) + .await?; + + let resource = match resource { + Some(resource) => serde_json::from_value::(resource) + .map_err(|e| Error::SerdeJson { error: e, location: "resources.rs".to_string() })?, + None => { + return { + Err(Error::NotFound(format!( + "resource at path :{} do not exist", + &resource_path + ))) + } + } + }; + + Ok(resource) +} diff --git a/backend/windmill-api/src/sqs_triggers_ee.rs b/backend/windmill-api/src/sqs_triggers_ee.rs new file mode 100644 index 0000000000..4f7eb6e254 --- /dev/null +++ b/backend/windmill-api/src/sqs_triggers_ee.rs @@ -0,0 +1,31 @@ +use crate::db::DB; +use axum::Router; +use serde::{Deserialize, Serialize}; + + +pub fn workspaced_service() -> Router { + Router::new() +} + +pub fn start_sqs(_db: DB, mut _killpill_rx: tokio::sync::broadcast::Receiver<()>) -> () { + // implementation is not open source +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct SqsTrigger { + pub queue_url: String, + pub aws_resource_path: String, + pub message_attributes: Option>, + pub path: String, + pub script_path: String, + pub is_flow: bool, + pub workspace_id: String, + pub edited_by: String, + pub email: String, + pub edited_at: chrono::DateTime, + pub extra_perms: Option, + pub error: Option, + pub server_id: Option, + pub last_server_ping: Option>, + pub enabled: bool, +} \ No newline at end of file diff --git a/backend/windmill-api/src/variables.rs b/backend/windmill-api/src/variables.rs index 37960e8583..475fe7db98 100644 --- a/backend/windmill-api/src/variables.rs +++ b/backend/windmill-api/src/variables.rs @@ -31,9 +31,9 @@ use windmill_common::{ }; use lazy_static::lazy_static; -use windmill_common::variables::{decrypt, encrypt}; use serde::Deserialize; use sqlx::{Postgres, Transaction}; +use windmill_common::variables::{decrypt, encrypt}; use windmill_git_sync::{handle_deployment_metadata, DeployedObject}; lazy_static! { diff --git a/backend/windmill-api/src/workspaces.rs b/backend/windmill-api/src/workspaces.rs index f5043052e9..ed42bd5b99 100644 --- a/backend/windmill-api/src/workspaces.rs +++ b/backend/windmill-api/src/workspaces.rs @@ -1362,6 +1362,7 @@ struct UsedTriggers { pub kafka_used: bool, pub nats_used: bool, pub postgres_used: bool, + pub sqs_used: bool } async fn get_used_triggers( @@ -1380,7 +1381,8 @@ async fn get_used_triggers( EXISTS(SELECT 1 FROM http_trigger WHERE workspace_id = $1) AS "http_routes_used!", EXISTS(SELECT 1 FROM kafka_trigger WHERE workspace_id = $1) as "kafka_used!", EXISTS(SELECT 1 FROM nats_trigger WHERE workspace_id = $1) as "nats_used!", - EXISTS(SELECT 1 FROM postgres_trigger WHERE workspace_id = $1) AS "postgres_used!" + EXISTS(SELECT 1 FROM postgres_trigger WHERE workspace_id = $1) AS "postgres_used!", + EXISTS(SELECT 1 FROM sqs_trigger WHERE workspace_id = $1) AS "sqs_used!" "#, w_id ) diff --git a/backend/windmill-api/src/workspaces_export.rs b/backend/windmill-api/src/workspaces_export.rs index c9f15306b3..8c6293bddb 100644 --- a/backend/windmill-api/src/workspaces_export.rs +++ b/backend/windmill-api/src/workspaces_export.rs @@ -594,6 +594,28 @@ pub(crate) async fn tarball_workspace( } } + #[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] + { + let sqs_triggers = sqlx::query_as!( + crate::sqs_triggers_ee::SqsTrigger, + "SELECT * FROM sqs_trigger + WHERE workspace_id = $1", + &w_id + ) + .fetch_all(&mut *tx) + .await?; + + for trigger in sqs_triggers { + let trigger_str = &to_string_without_metadata(&trigger, false, None).unwrap(); + archive + .write_to_archive( + &trigger_str, + &format!("{}.sqs_trigger.json", trigger.path), + ) + .await?; + } + } + #[cfg(all(feature = "enterprise", feature = "nats"))] { let nats_triggers = sqlx::query_as!( diff --git a/backend/windmill-common/src/variables.rs b/backend/windmill-common/src/variables.rs index 48746152ef..1817945705 100644 --- a/backend/windmill-common/src/variables.rs +++ b/backend/windmill-common/src/variables.rs @@ -352,3 +352,4 @@ pub async fn get_reserved_variables( is_custom: true, })).collect() } + diff --git a/cli/gen/core/OpenAPI.ts b/cli/gen/core/OpenAPI.ts index 4488a855bf..7dbf2fb3d4 100644 --- a/cli/gen/core/OpenAPI.ts +++ b/cli/gen/core/OpenAPI.ts @@ -54,7 +54,7 @@ export const OpenAPI: OpenAPIConfig = { PASSWORD: undefined, TOKEN: getEnv("WM_TOKEN"), USERNAME: undefined, - VERSION: '1.457.1', + VERSION: '1.460.1', WITH_CREDENTIALS: true, interceptors: { request: new Interceptors(), diff --git a/cli/gen/services.gen.ts b/cli/gen/services.gen.ts index 4992329350..5148049bc9 100644 --- a/cli/gen/services.gen.ts +++ b/cli/gen/services.gen.ts @@ -3,7 +3,7 @@ import type { CancelablePromise } from './core/CancelablePromise.ts'; import { OpenAPI } from './core/OpenAPI.ts'; import { request as __request } from './core/request.ts'; -import type { BackendVersionResponse, BackendUptodateResponse, GetLicenseIdResponse, GetOpenApiYamlResponse, GetAuditLogData, GetAuditLogResponse, ListAuditLogsData, ListAuditLogsResponse, LoginData, LoginResponse, LogoutResponse, GetUserData, GetUserResponse, UpdateUserData, UpdateUserResponse, IsOwnerOfPathData, IsOwnerOfPathResponse, SetPasswordData, SetPasswordResponse, SetPasswordForUserData, SetPasswordForUserResponse, SetLoginTypeForUserData, SetLoginTypeForUserResponse, CreateUserGloballyData, CreateUserGloballyResponse, GlobalUserUpdateData, GlobalUserUpdateResponse, GlobalUsernameInfoData, GlobalUsernameInfoResponse, GlobalUserRenameData, GlobalUserRenameResponse, GlobalUserDeleteData, GlobalUserDeleteResponse, GlobalUsersOverwriteData, GlobalUsersOverwriteResponse, GlobalUsersExportResponse, DeleteUserData, DeleteUserResponse, ListWorkspacesResponse, IsDomainAllowedResponse, ListUserWorkspacesResponse, ListWorkspacesAsSuperAdminData, ListWorkspacesAsSuperAdminResponse, CreateWorkspaceData, CreateWorkspaceResponse, ExistsWorkspaceData, ExistsWorkspaceResponse, ExistsUsernameData, ExistsUsernameResponse, GetGlobalData, GetGlobalResponse, SetGlobalData, SetGlobalResponse, GetLocalResponse, TestSmtpData, TestSmtpResponse, TestCriticalChannelsData, TestCriticalChannelsResponse, GetCriticalAlertsData, GetCriticalAlertsResponse, AcknowledgeCriticalAlertData, AcknowledgeCriticalAlertResponse, AcknowledgeAllCriticalAlertsResponse, TestLicenseKeyData, TestLicenseKeyResponse, TestObjectStorageConfigData, TestObjectStorageConfigResponse, SendStatsResponse, GetLatestKeyRenewalAttemptResponse, RenewLicenseKeyData, RenewLicenseKeyResponse, CreateCustomerPortalSessionData, CreateCustomerPortalSessionResponse, TestMetadataData, TestMetadataResponse, ListGlobalSettingsResponse, GetCurrentEmailResponse, RefreshUserTokenData, RefreshUserTokenResponse, GetTutorialProgressResponse, UpdateTutorialProgressData, UpdateTutorialProgressResponse, LeaveInstanceResponse, GetUsageResponse, GetRunnableResponse, GlobalWhoamiResponse, ListWorkspaceInvitesResponse, WhoamiData, WhoamiResponse, AcceptInviteData, AcceptInviteResponse, DeclineInviteData, DeclineInviteResponse, InviteUserData, InviteUserResponse, AddUserData, AddUserResponse, DeleteInviteData, DeleteInviteResponse, ArchiveWorkspaceData, ArchiveWorkspaceResponse, UnarchiveWorkspaceData, UnarchiveWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceResponse, LeaveWorkspaceData, LeaveWorkspaceResponse, GetWorkspaceNameData, GetWorkspaceNameResponse, ChangeWorkspaceNameData, ChangeWorkspaceNameResponse, ChangeWorkspaceIdData, ChangeWorkspaceIdResponse, ChangeWorkspaceColorData, ChangeWorkspaceColorResponse, WhoisData, WhoisResponse, UpdateOperatorSettingsData, UpdateOperatorSettingsResponse, ExistsEmailData, ExistsEmailResponse, ListUsersAsSuperAdminData, ListUsersAsSuperAdminResponse, ListPendingInvitesData, ListPendingInvitesResponse, GetSettingsData, GetSettingsResponse, GetDeployToData, GetDeployToResponse, GetIsPremiumData, GetIsPremiumResponse, GetPremiumInfoData, GetPremiumInfoResponse, SetAutomaticBillingData, SetAutomaticBillingResponse, GetThresholdAlertData, GetThresholdAlertResponse, SetThresholdAlertData, SetThresholdAlertResponse, EditSlackCommandData, EditSlackCommandResponse, RunSlackMessageTestJobData, RunSlackMessageTestJobResponse, EditDeployToData, EditDeployToResponse, EditAutoInviteData, EditAutoInviteResponse, EditWebhookData, EditWebhookResponse, EditCopilotConfigData, EditCopilotConfigResponse, GetCopilotInfoData, GetCopilotInfoResponse, EditErrorHandlerData, EditErrorHandlerResponse, EditLargeFileStorageConfigData, EditLargeFileStorageConfigResponse, EditWorkspaceGitSyncConfigData, EditWorkspaceGitSyncConfigResponse, EditWorkspaceDeployUiSettingsData, EditWorkspaceDeployUiSettingsResponse, EditWorkspaceDefaultAppData, EditWorkspaceDefaultAppResponse, EditDefaultScriptsData, EditDefaultScriptsResponse, GetDefaultScriptsData, GetDefaultScriptsResponse, SetEnvironmentVariableData, SetEnvironmentVariableResponse, GetWorkspaceEncryptionKeyData, GetWorkspaceEncryptionKeyResponse, SetWorkspaceEncryptionKeyData, SetWorkspaceEncryptionKeyResponse, GetWorkspaceDefaultAppData, GetWorkspaceDefaultAppResponse, GetLargeFileStorageConfigData, GetLargeFileStorageConfigResponse, GetWorkspaceUsageData, GetWorkspaceUsageResponse, GetUsedTriggersData, GetUsedTriggersResponse, ListUsersData, ListUsersResponse, ListUsersUsageData, ListUsersUsageResponse, ListUsernamesData, ListUsernamesResponse, UsernameToEmailData, UsernameToEmailResponse, CreateTokenData, CreateTokenResponse, CreateTokenImpersonateData, CreateTokenImpersonateResponse, DeleteTokenData, DeleteTokenResponse, ListTokensData, ListTokensResponse, GetOidcTokenData, GetOidcTokenResponse, CreateVariableData, CreateVariableResponse, EncryptValueData, EncryptValueResponse, DeleteVariableData, DeleteVariableResponse, UpdateVariableData, UpdateVariableResponse, GetVariableData, GetVariableResponse, GetVariableValueData, GetVariableValueResponse, ExistsVariableData, ExistsVariableResponse, ListVariableData, ListVariableResponse, ListContextualVariablesData, ListContextualVariablesResponse, WorkspaceGetCriticalAlertsData, WorkspaceGetCriticalAlertsResponse, WorkspaceAcknowledgeCriticalAlertData, WorkspaceAcknowledgeCriticalAlertResponse, WorkspaceAcknowledgeAllCriticalAlertsData, WorkspaceAcknowledgeAllCriticalAlertsResponse, WorkspaceMuteCriticalAlertsUiData, WorkspaceMuteCriticalAlertsUiResponse, LoginWithOauthData, LoginWithOauthResponse, ConnectSlackCallbackData, ConnectSlackCallbackResponse, ConnectSlackCallbackInstanceData, ConnectSlackCallbackInstanceResponse, ConnectCallbackData, ConnectCallbackResponse, CreateAccountData, CreateAccountResponse, RefreshTokenData, RefreshTokenResponse, DisconnectAccountData, DisconnectAccountResponse, DisconnectSlackData, DisconnectSlackResponse, ListOauthLoginsResponse, ListOauthConnectsResponse, GetOauthConnectData, GetOauthConnectResponse, SyncTeamsResponse, CreateResourceData, CreateResourceResponse, DeleteResourceData, DeleteResourceResponse, UpdateResourceData, UpdateResourceResponse, UpdateResourceValueData, UpdateResourceValueResponse, GetResourceData, GetResourceResponse, GetResourceValueInterpolatedData, GetResourceValueInterpolatedResponse, GetResourceValueData, GetResourceValueResponse, ExistsResourceData, ExistsResourceResponse, ListResourceData, ListResourceResponse, ListSearchResourceData, ListSearchResourceResponse, ListResourceNamesData, ListResourceNamesResponse, CreateResourceTypeData, CreateResourceTypeResponse, FileResourceTypeToFileExtMapData, FileResourceTypeToFileExtMapResponse, DeleteResourceTypeData, DeleteResourceTypeResponse, UpdateResourceTypeData, UpdateResourceTypeResponse, GetResourceTypeData, GetResourceTypeResponse, ExistsResourceTypeData, ExistsResourceTypeResponse, ListResourceTypeData, ListResourceTypeResponse, ListResourceTypeNamesData, ListResourceTypeNamesResponse, QueryResourceTypesData, QueryResourceTypesResponse, ListHubIntegrationsData, ListHubIntegrationsResponse, ListHubFlowsResponse, GetHubFlowByIdData, GetHubFlowByIdResponse, ListHubAppsResponse, GetHubAppByIdData, GetHubAppByIdResponse, GetPublicAppByCustomPathData, GetPublicAppByCustomPathResponse, GetHubScriptContentByPathData, GetHubScriptContentByPathResponse, GetHubScriptByPathData, GetHubScriptByPathResponse, GetTopHubScriptsData, GetTopHubScriptsResponse, QueryHubScriptsData, QueryHubScriptsResponse, ListSearchScriptData, ListSearchScriptResponse, ListScriptsData, ListScriptsResponse, ListScriptPathsData, ListScriptPathsResponse, CreateDraftData, CreateDraftResponse, DeleteDraftData, DeleteDraftResponse, CreateScriptData, CreateScriptResponse, ToggleWorkspaceErrorHandlerForScriptData, ToggleWorkspaceErrorHandlerForScriptResponse, GetCustomTagsData, GetCustomTagsResponse, GeDefaultTagsResponse, IsDefaultTagsPerWorkspaceResponse, ArchiveScriptByPathData, ArchiveScriptByPathResponse, ArchiveScriptByHashData, ArchiveScriptByHashResponse, DeleteScriptByHashData, DeleteScriptByHashResponse, DeleteScriptByPathData, DeleteScriptByPathResponse, GetScriptByPathData, GetScriptByPathResponse, GetTriggersCountOfScriptData, GetTriggersCountOfScriptResponse, ListTokensOfScriptData, ListTokensOfScriptResponse, GetScriptByPathWithDraftData, GetScriptByPathWithDraftResponse, GetScriptHistoryByPathData, GetScriptHistoryByPathResponse, GetScriptLatestVersionData, GetScriptLatestVersionResponse, UpdateScriptHistoryData, UpdateScriptHistoryResponse, RawScriptByPathData, RawScriptByPathResponse, RawScriptByPathTokenedData, RawScriptByPathTokenedResponse, ExistsScriptByPathData, ExistsScriptByPathResponse, GetScriptByHashData, GetScriptByHashResponse, RawScriptByHashData, RawScriptByHashResponse, GetScriptDeploymentStatusData, GetScriptDeploymentStatusResponse, RunScriptByPathData, RunScriptByPathResponse, OpenaiSyncScriptByPathData, OpenaiSyncScriptByPathResponse, RunWaitResultScriptByPathData, RunWaitResultScriptByPathResponse, RunWaitResultScriptByPathGetData, RunWaitResultScriptByPathGetResponse, OpenaiSyncFlowByPathData, OpenaiSyncFlowByPathResponse, RunWaitResultFlowByPathData, RunWaitResultFlowByPathResponse, ResultByIdData, ResultByIdResponse, ListFlowPathsData, ListFlowPathsResponse, ListSearchFlowData, ListSearchFlowResponse, ListFlowsData, ListFlowsResponse, GetFlowHistoryData, GetFlowHistoryResponse, GetFlowLatestVersionData, GetFlowLatestVersionResponse, GetFlowVersionData, GetFlowVersionResponse, UpdateFlowHistoryData, UpdateFlowHistoryResponse, GetFlowByPathData, GetFlowByPathResponse, GetTriggersCountOfFlowData, GetTriggersCountOfFlowResponse, ListTokensOfFlowData, ListTokensOfFlowResponse, ToggleWorkspaceErrorHandlerForFlowData, ToggleWorkspaceErrorHandlerForFlowResponse, GetFlowByPathWithDraftData, GetFlowByPathWithDraftResponse, ExistsFlowByPathData, ExistsFlowByPathResponse, CreateFlowData, CreateFlowResponse, UpdateFlowData, UpdateFlowResponse, ArchiveFlowByPathData, ArchiveFlowByPathResponse, DeleteFlowByPathData, DeleteFlowByPathResponse, ListRawAppsData, ListRawAppsResponse, ExistsRawAppData, ExistsRawAppResponse, GetRawAppDataData, GetRawAppDataResponse, ListSearchAppData, ListSearchAppResponse, ListAppsData, ListAppsResponse, CreateAppData, CreateAppResponse, ExistsAppData, ExistsAppResponse, GetAppByPathData, GetAppByPathResponse, GetAppLiteByPathData, GetAppLiteByPathResponse, GetAppByPathWithDraftData, GetAppByPathWithDraftResponse, GetAppHistoryByPathData, GetAppHistoryByPathResponse, GetAppLatestVersionData, GetAppLatestVersionResponse, UpdateAppHistoryData, UpdateAppHistoryResponse, GetPublicAppBySecretData, GetPublicAppBySecretResponse, GetPublicResourceData, GetPublicResourceResponse, GetPublicSecretOfAppData, GetPublicSecretOfAppResponse, GetAppByVersionData, GetAppByVersionResponse, CreateRawAppData, CreateRawAppResponse, UpdateRawAppData, UpdateRawAppResponse, DeleteRawAppData, DeleteRawAppResponse, DeleteAppData, DeleteAppResponse, UpdateAppData, UpdateAppResponse, CustomPathExistsData, CustomPathExistsResponse, ExecuteComponentData, ExecuteComponentResponse, RunFlowByPathData, RunFlowByPathResponse, RestartFlowAtStepData, RestartFlowAtStepResponse, RunScriptByHashData, RunScriptByHashResponse, RunScriptPreviewData, RunScriptPreviewResponse, RunCodeWorkflowTaskData, RunCodeWorkflowTaskResponse, RunRawScriptDependenciesData, RunRawScriptDependenciesResponse, RunFlowPreviewData, RunFlowPreviewResponse, ListQueueData, ListQueueResponse, GetQueueCountData, GetQueueCountResponse, GetCompletedCountData, GetCompletedCountResponse, CountCompletedJobsData, CountCompletedJobsResponse, ListFilteredUuidsData, ListFilteredUuidsResponse, CancelSelectionData, CancelSelectionResponse, ListCompletedJobsData, ListCompletedJobsResponse, ListJobsData, ListJobsResponse, GetDbClockResponse, CountJobsByTagData, CountJobsByTagResponse, GetJobData, GetJobResponse, GetRootJobIdData, GetRootJobIdResponse, GetJobLogsData, GetJobLogsResponse, GetJobArgsData, GetJobArgsResponse, GetJobUpdatesData, GetJobUpdatesResponse, GetLogFileFromStoreData, GetLogFileFromStoreResponse, GetFlowDebugInfoData, GetFlowDebugInfoResponse, GetCompletedJobData, GetCompletedJobResponse, GetCompletedJobResultData, GetCompletedJobResultResponse, GetCompletedJobResultMaybeData, GetCompletedJobResultMaybeResponse, DeleteCompletedJobData, DeleteCompletedJobResponse, CancelQueuedJobData, CancelQueuedJobResponse, CancelPersistentQueuedJobsData, CancelPersistentQueuedJobsResponse, ForceCancelQueuedJobData, ForceCancelQueuedJobResponse, CreateJobSignatureData, CreateJobSignatureResponse, GetResumeUrlsData, GetResumeUrlsResponse, GetSlackApprovalPayloadData, GetSlackApprovalPayloadResponse, ResumeSuspendedJobGetData, ResumeSuspendedJobGetResponse, ResumeSuspendedJobPostData, ResumeSuspendedJobPostResponse, SetFlowUserStateData, SetFlowUserStateResponse, GetFlowUserStateData, GetFlowUserStateResponse, ResumeSuspendedFlowAsOwnerData, ResumeSuspendedFlowAsOwnerResponse, CancelSuspendedJobGetData, CancelSuspendedJobGetResponse, CancelSuspendedJobPostData, CancelSuspendedJobPostResponse, GetSuspendedJobFlowData, GetSuspendedJobFlowResponse, PreviewScheduleData, PreviewScheduleResponse, CreateScheduleData, CreateScheduleResponse, UpdateScheduleData, UpdateScheduleResponse, SetScheduleEnabledData, SetScheduleEnabledResponse, DeleteScheduleData, DeleteScheduleResponse, GetScheduleData, GetScheduleResponse, ExistsScheduleData, ExistsScheduleResponse, ListSchedulesData, ListSchedulesResponse, ListSchedulesWithJobsData, ListSchedulesWithJobsResponse, SetDefaultErrorOrRecoveryHandlerData, SetDefaultErrorOrRecoveryHandlerResponse, CreateHttpTriggerData, CreateHttpTriggerResponse, UpdateHttpTriggerData, UpdateHttpTriggerResponse, DeleteHttpTriggerData, DeleteHttpTriggerResponse, GetHttpTriggerData, GetHttpTriggerResponse, ListHttpTriggersData, ListHttpTriggersResponse, ExistsHttpTriggerData, ExistsHttpTriggerResponse, ExistsRouteData, ExistsRouteResponse, CreateWebsocketTriggerData, CreateWebsocketTriggerResponse, UpdateWebsocketTriggerData, UpdateWebsocketTriggerResponse, DeleteWebsocketTriggerData, DeleteWebsocketTriggerResponse, GetWebsocketTriggerData, GetWebsocketTriggerResponse, ListWebsocketTriggersData, ListWebsocketTriggersResponse, ExistsWebsocketTriggerData, ExistsWebsocketTriggerResponse, SetWebsocketTriggerEnabledData, SetWebsocketTriggerEnabledResponse, TestWebsocketConnectionData, TestWebsocketConnectionResponse, CreateKafkaTriggerData, CreateKafkaTriggerResponse, UpdateKafkaTriggerData, UpdateKafkaTriggerResponse, DeleteKafkaTriggerData, DeleteKafkaTriggerResponse, GetKafkaTriggerData, GetKafkaTriggerResponse, ListKafkaTriggersData, ListKafkaTriggersResponse, ExistsKafkaTriggerData, ExistsKafkaTriggerResponse, SetKafkaTriggerEnabledData, SetKafkaTriggerEnabledResponse, TestKafkaConnectionData, TestKafkaConnectionResponse, CreateNatsTriggerData, CreateNatsTriggerResponse, UpdateNatsTriggerData, UpdateNatsTriggerResponse, DeleteNatsTriggerData, DeleteNatsTriggerResponse, GetNatsTriggerData, GetNatsTriggerResponse, ListNatsTriggersData, ListNatsTriggersResponse, ExistsNatsTriggerData, ExistsNatsTriggerResponse, SetNatsTriggerEnabledData, SetNatsTriggerEnabledResponse, TestNatsConnectionData, TestNatsConnectionResponse, IsValidPostgresConfigurationData, IsValidPostgresConfigurationResponse, CreateTemplateScriptData, CreateTemplateScriptResponse, GetTemplateScriptData, GetTemplateScriptResponse, ListPostgresReplicationSlotData, ListPostgresReplicationSlotResponse, CreatePostgresReplicationSlotData, CreatePostgresReplicationSlotResponse, DeletePostgresReplicationSlotData, DeletePostgresReplicationSlotResponse, ListPostgresPublicationData, ListPostgresPublicationResponse, GetPostgresPublicationData, GetPostgresPublicationResponse, CreatePostgresPublicationData, CreatePostgresPublicationResponse, UpdatePostgresPublicationData, UpdatePostgresPublicationResponse, DeletePostgresPublicationData, DeletePostgresPublicationResponse, CreatePostgresTriggerData, CreatePostgresTriggerResponse, UpdatePostgresTriggerData, UpdatePostgresTriggerResponse, DeletePostgresTriggerData, DeletePostgresTriggerResponse, GetPostgresTriggerData, GetPostgresTriggerResponse, ListPostgresTriggersData, ListPostgresTriggersResponse, ExistsPostgresTriggerData, ExistsPostgresTriggerResponse, SetPostgresTriggerEnabledData, SetPostgresTriggerEnabledResponse, ListInstanceGroupsResponse, GetInstanceGroupData, GetInstanceGroupResponse, CreateInstanceGroupData, CreateInstanceGroupResponse, UpdateInstanceGroupData, UpdateInstanceGroupResponse, DeleteInstanceGroupData, DeleteInstanceGroupResponse, AddUserToInstanceGroupData, AddUserToInstanceGroupResponse, RemoveUserFromInstanceGroupData, RemoveUserFromInstanceGroupResponse, ExportInstanceGroupsResponse, OverwriteInstanceGroupsData, OverwriteInstanceGroupsResponse, ListGroupsData, ListGroupsResponse, ListGroupNamesData, ListGroupNamesResponse, CreateGroupData, CreateGroupResponse, UpdateGroupData, UpdateGroupResponse, DeleteGroupData, DeleteGroupResponse, GetGroupData, GetGroupResponse, AddUserToGroupData, AddUserToGroupResponse, RemoveUserToGroupData, RemoveUserToGroupResponse, ListFoldersData, ListFoldersResponse, ListFolderNamesData, ListFolderNamesResponse, CreateFolderData, CreateFolderResponse, UpdateFolderData, UpdateFolderResponse, DeleteFolderData, DeleteFolderResponse, GetFolderData, GetFolderResponse, GetFolderUsageData, GetFolderUsageResponse, AddOwnerToFolderData, AddOwnerToFolderResponse, RemoveOwnerToFolderData, RemoveOwnerToFolderResponse, ListWorkersData, ListWorkersResponse, ExistsWorkerWithTagData, ExistsWorkerWithTagResponse, GetQueueMetricsResponse, GetCountsOfJobsWaitingPerTagResponse, ListWorkerGroupsResponse, GetConfigData, GetConfigResponse, UpdateConfigData, UpdateConfigResponse, DeleteConfigData, DeleteConfigResponse, ListConfigsResponse, ListAutoscalingEventsData, ListAutoscalingEventsResponse, GetGranularAclsData, GetGranularAclsResponse, AddGranularAclsData, AddGranularAclsResponse, RemoveGranularAclsData, RemoveGranularAclsResponse, SetCaptureConfigData, SetCaptureConfigResponse, PingCaptureConfigData, PingCaptureConfigResponse, GetCaptureConfigsData, GetCaptureConfigsResponse, ListCapturesData, ListCapturesResponse, GetCaptureData, GetCaptureResponse, DeleteCaptureData, DeleteCaptureResponse, StarData, StarResponse, UnstarData, UnstarResponse, GetInputHistoryData, GetInputHistoryResponse, GetArgsFromHistoryOrSavedInputData, GetArgsFromHistoryOrSavedInputResponse, ListInputsData, ListInputsResponse, CreateInputData, CreateInputResponse, UpdateInputData, UpdateInputResponse, DeleteInputData, DeleteInputResponse, DuckdbConnectionSettingsData, DuckdbConnectionSettingsResponse, DuckdbConnectionSettingsV2Data, DuckdbConnectionSettingsV2Response, PolarsConnectionSettingsData, PolarsConnectionSettingsResponse, PolarsConnectionSettingsV2Data, PolarsConnectionSettingsV2Response, S3ResourceInfoData, S3ResourceInfoResponse, DatasetStorageTestConnectionData, DatasetStorageTestConnectionResponse, ListStoredFilesData, ListStoredFilesResponse, LoadFileMetadataData, LoadFileMetadataResponse, LoadFilePreviewData, LoadFilePreviewResponse, LoadParquetPreviewData, LoadParquetPreviewResponse, LoadTableRowCountData, LoadTableRowCountResponse, LoadCsvPreviewData, LoadCsvPreviewResponse, DeleteS3FileData, DeleteS3FileResponse, MoveS3FileData, MoveS3FileResponse, FileUploadData, FileUploadResponse, FileDownloadData, FileDownloadResponse, FileDownloadParquetAsCsvData, FileDownloadParquetAsCsvResponse, GetJobMetricsData, GetJobMetricsResponse, SetJobProgressData, SetJobProgressResponse, GetJobProgressData, GetJobProgressResponse, ListLogFilesData, ListLogFilesResponse, GetLogFileData, GetLogFileResponse, ListConcurrencyGroupsResponse, DeleteConcurrencyGroupData, DeleteConcurrencyGroupResponse, GetConcurrencyKeyData, GetConcurrencyKeyResponse, ListExtendedJobsData, ListExtendedJobsResponse, SearchJobsIndexData, SearchJobsIndexResponse, SearchLogsIndexData, SearchLogsIndexResponse, CountSearchLogsIndexData, CountSearchLogsIndexResponse, ClearIndexData, ClearIndexResponse } from './types.gen.ts'; +import type { BackendVersionResponse, BackendUptodateResponse, GetLicenseIdResponse, GetOpenApiYamlResponse, GetAuditLogData, GetAuditLogResponse, ListAuditLogsData, ListAuditLogsResponse, LoginData, LoginResponse, LogoutResponse, GetUserData, GetUserResponse, UpdateUserData, UpdateUserResponse, IsOwnerOfPathData, IsOwnerOfPathResponse, SetPasswordData, SetPasswordResponse, SetPasswordForUserData, SetPasswordForUserResponse, SetLoginTypeForUserData, SetLoginTypeForUserResponse, CreateUserGloballyData, CreateUserGloballyResponse, GlobalUserUpdateData, GlobalUserUpdateResponse, GlobalUsernameInfoData, GlobalUsernameInfoResponse, GlobalUserRenameData, GlobalUserRenameResponse, GlobalUserDeleteData, GlobalUserDeleteResponse, GlobalUsersOverwriteData, GlobalUsersOverwriteResponse, GlobalUsersExportResponse, DeleteUserData, DeleteUserResponse, ListWorkspacesResponse, IsDomainAllowedResponse, ListUserWorkspacesResponse, ListWorkspacesAsSuperAdminData, ListWorkspacesAsSuperAdminResponse, CreateWorkspaceData, CreateWorkspaceResponse, ExistsWorkspaceData, ExistsWorkspaceResponse, ExistsUsernameData, ExistsUsernameResponse, GetGlobalData, GetGlobalResponse, SetGlobalData, SetGlobalResponse, GetLocalResponse, TestSmtpData, TestSmtpResponse, TestCriticalChannelsData, TestCriticalChannelsResponse, GetCriticalAlertsData, GetCriticalAlertsResponse, AcknowledgeCriticalAlertData, AcknowledgeCriticalAlertResponse, AcknowledgeAllCriticalAlertsResponse, TestLicenseKeyData, TestLicenseKeyResponse, TestObjectStorageConfigData, TestObjectStorageConfigResponse, SendStatsResponse, GetLatestKeyRenewalAttemptResponse, RenewLicenseKeyData, RenewLicenseKeyResponse, CreateCustomerPortalSessionData, CreateCustomerPortalSessionResponse, TestMetadataData, TestMetadataResponse, ListGlobalSettingsResponse, GetCurrentEmailResponse, RefreshUserTokenData, RefreshUserTokenResponse, GetTutorialProgressResponse, UpdateTutorialProgressData, UpdateTutorialProgressResponse, LeaveInstanceResponse, GetUsageResponse, GetRunnableResponse, GlobalWhoamiResponse, ListWorkspaceInvitesResponse, WhoamiData, WhoamiResponse, AcceptInviteData, AcceptInviteResponse, DeclineInviteData, DeclineInviteResponse, InviteUserData, InviteUserResponse, AddUserData, AddUserResponse, DeleteInviteData, DeleteInviteResponse, ArchiveWorkspaceData, ArchiveWorkspaceResponse, UnarchiveWorkspaceData, UnarchiveWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceResponse, LeaveWorkspaceData, LeaveWorkspaceResponse, GetWorkspaceNameData, GetWorkspaceNameResponse, ChangeWorkspaceNameData, ChangeWorkspaceNameResponse, ChangeWorkspaceIdData, ChangeWorkspaceIdResponse, ChangeWorkspaceColorData, ChangeWorkspaceColorResponse, WhoisData, WhoisResponse, UpdateOperatorSettingsData, UpdateOperatorSettingsResponse, ExistsEmailData, ExistsEmailResponse, ListUsersAsSuperAdminData, ListUsersAsSuperAdminResponse, ListPendingInvitesData, ListPendingInvitesResponse, GetSettingsData, GetSettingsResponse, GetDeployToData, GetDeployToResponse, GetIsPremiumData, GetIsPremiumResponse, GetPremiumInfoData, GetPremiumInfoResponse, SetAutomaticBillingData, SetAutomaticBillingResponse, GetThresholdAlertData, GetThresholdAlertResponse, SetThresholdAlertData, SetThresholdAlertResponse, EditSlackCommandData, EditSlackCommandResponse, RunSlackMessageTestJobData, RunSlackMessageTestJobResponse, EditDeployToData, EditDeployToResponse, EditAutoInviteData, EditAutoInviteResponse, EditWebhookData, EditWebhookResponse, EditCopilotConfigData, EditCopilotConfigResponse, GetCopilotInfoData, GetCopilotInfoResponse, EditErrorHandlerData, EditErrorHandlerResponse, EditLargeFileStorageConfigData, EditLargeFileStorageConfigResponse, EditWorkspaceGitSyncConfigData, EditWorkspaceGitSyncConfigResponse, EditWorkspaceDeployUiSettingsData, EditWorkspaceDeployUiSettingsResponse, EditWorkspaceDefaultAppData, EditWorkspaceDefaultAppResponse, EditDefaultScriptsData, EditDefaultScriptsResponse, GetDefaultScriptsData, GetDefaultScriptsResponse, SetEnvironmentVariableData, SetEnvironmentVariableResponse, GetWorkspaceEncryptionKeyData, GetWorkspaceEncryptionKeyResponse, SetWorkspaceEncryptionKeyData, SetWorkspaceEncryptionKeyResponse, GetWorkspaceDefaultAppData, GetWorkspaceDefaultAppResponse, GetLargeFileStorageConfigData, GetLargeFileStorageConfigResponse, GetWorkspaceUsageData, GetWorkspaceUsageResponse, GetUsedTriggersData, GetUsedTriggersResponse, ListUsersData, ListUsersResponse, ListUsersUsageData, ListUsersUsageResponse, ListUsernamesData, ListUsernamesResponse, UsernameToEmailData, UsernameToEmailResponse, CreateTokenData, CreateTokenResponse, CreateTokenImpersonateData, CreateTokenImpersonateResponse, DeleteTokenData, DeleteTokenResponse, ListTokensData, ListTokensResponse, GetOidcTokenData, GetOidcTokenResponse, CreateVariableData, CreateVariableResponse, EncryptValueData, EncryptValueResponse, DeleteVariableData, DeleteVariableResponse, UpdateVariableData, UpdateVariableResponse, GetVariableData, GetVariableResponse, GetVariableValueData, GetVariableValueResponse, ExistsVariableData, ExistsVariableResponse, ListVariableData, ListVariableResponse, ListContextualVariablesData, ListContextualVariablesResponse, WorkspaceGetCriticalAlertsData, WorkspaceGetCriticalAlertsResponse, WorkspaceAcknowledgeCriticalAlertData, WorkspaceAcknowledgeCriticalAlertResponse, WorkspaceAcknowledgeAllCriticalAlertsData, WorkspaceAcknowledgeAllCriticalAlertsResponse, WorkspaceMuteCriticalAlertsUiData, WorkspaceMuteCriticalAlertsUiResponse, LoginWithOauthData, LoginWithOauthResponse, ConnectSlackCallbackData, ConnectSlackCallbackResponse, ConnectSlackCallbackInstanceData, ConnectSlackCallbackInstanceResponse, ConnectCallbackData, ConnectCallbackResponse, CreateAccountData, CreateAccountResponse, RefreshTokenData, RefreshTokenResponse, DisconnectAccountData, DisconnectAccountResponse, DisconnectSlackData, DisconnectSlackResponse, ListOauthLoginsResponse, ListOauthConnectsResponse, GetOauthConnectData, GetOauthConnectResponse, SyncTeamsResponse, CreateResourceData, CreateResourceResponse, DeleteResourceData, DeleteResourceResponse, UpdateResourceData, UpdateResourceResponse, UpdateResourceValueData, UpdateResourceValueResponse, GetResourceData, GetResourceResponse, GetResourceValueInterpolatedData, GetResourceValueInterpolatedResponse, GetResourceValueData, GetResourceValueResponse, ExistsResourceData, ExistsResourceResponse, ListResourceData, ListResourceResponse, ListSearchResourceData, ListSearchResourceResponse, ListResourceNamesData, ListResourceNamesResponse, CreateResourceTypeData, CreateResourceTypeResponse, FileResourceTypeToFileExtMapData, FileResourceTypeToFileExtMapResponse, DeleteResourceTypeData, DeleteResourceTypeResponse, UpdateResourceTypeData, UpdateResourceTypeResponse, GetResourceTypeData, GetResourceTypeResponse, ExistsResourceTypeData, ExistsResourceTypeResponse, ListResourceTypeData, ListResourceTypeResponse, ListResourceTypeNamesData, ListResourceTypeNamesResponse, QueryResourceTypesData, QueryResourceTypesResponse, ListHubIntegrationsData, ListHubIntegrationsResponse, ListHubFlowsResponse, GetHubFlowByIdData, GetHubFlowByIdResponse, ListHubAppsResponse, GetHubAppByIdData, GetHubAppByIdResponse, GetPublicAppByCustomPathData, GetPublicAppByCustomPathResponse, GetHubScriptContentByPathData, GetHubScriptContentByPathResponse, GetHubScriptByPathData, GetHubScriptByPathResponse, GetTopHubScriptsData, GetTopHubScriptsResponse, QueryHubScriptsData, QueryHubScriptsResponse, ListSearchScriptData, ListSearchScriptResponse, ListScriptsData, ListScriptsResponse, ListScriptPathsData, ListScriptPathsResponse, CreateDraftData, CreateDraftResponse, DeleteDraftData, DeleteDraftResponse, CreateScriptData, CreateScriptResponse, ToggleWorkspaceErrorHandlerForScriptData, ToggleWorkspaceErrorHandlerForScriptResponse, GetCustomTagsData, GetCustomTagsResponse, GeDefaultTagsResponse, IsDefaultTagsPerWorkspaceResponse, ArchiveScriptByPathData, ArchiveScriptByPathResponse, ArchiveScriptByHashData, ArchiveScriptByHashResponse, DeleteScriptByHashData, DeleteScriptByHashResponse, DeleteScriptByPathData, DeleteScriptByPathResponse, GetScriptByPathData, GetScriptByPathResponse, GetTriggersCountOfScriptData, GetTriggersCountOfScriptResponse, ListTokensOfScriptData, ListTokensOfScriptResponse, GetScriptByPathWithDraftData, GetScriptByPathWithDraftResponse, GetScriptHistoryByPathData, GetScriptHistoryByPathResponse, GetScriptLatestVersionData, GetScriptLatestVersionResponse, UpdateScriptHistoryData, UpdateScriptHistoryResponse, RawScriptByPathData, RawScriptByPathResponse, RawScriptByPathTokenedData, RawScriptByPathTokenedResponse, ExistsScriptByPathData, ExistsScriptByPathResponse, GetScriptByHashData, GetScriptByHashResponse, RawScriptByHashData, RawScriptByHashResponse, GetScriptDeploymentStatusData, GetScriptDeploymentStatusResponse, RunScriptByPathData, RunScriptByPathResponse, OpenaiSyncScriptByPathData, OpenaiSyncScriptByPathResponse, RunWaitResultScriptByPathData, RunWaitResultScriptByPathResponse, RunWaitResultScriptByPathGetData, RunWaitResultScriptByPathGetResponse, OpenaiSyncFlowByPathData, OpenaiSyncFlowByPathResponse, RunWaitResultFlowByPathData, RunWaitResultFlowByPathResponse, ResultByIdData, ResultByIdResponse, ListFlowPathsData, ListFlowPathsResponse, ListSearchFlowData, ListSearchFlowResponse, ListFlowsData, ListFlowsResponse, GetFlowHistoryData, GetFlowHistoryResponse, GetFlowLatestVersionData, GetFlowLatestVersionResponse, GetFlowVersionData, GetFlowVersionResponse, UpdateFlowHistoryData, UpdateFlowHistoryResponse, GetFlowByPathData, GetFlowByPathResponse, GetTriggersCountOfFlowData, GetTriggersCountOfFlowResponse, ListTokensOfFlowData, ListTokensOfFlowResponse, ToggleWorkspaceErrorHandlerForFlowData, ToggleWorkspaceErrorHandlerForFlowResponse, GetFlowByPathWithDraftData, GetFlowByPathWithDraftResponse, ExistsFlowByPathData, ExistsFlowByPathResponse, CreateFlowData, CreateFlowResponse, UpdateFlowData, UpdateFlowResponse, ArchiveFlowByPathData, ArchiveFlowByPathResponse, DeleteFlowByPathData, DeleteFlowByPathResponse, ListRawAppsData, ListRawAppsResponse, ExistsRawAppData, ExistsRawAppResponse, GetRawAppDataData, GetRawAppDataResponse, ListSearchAppData, ListSearchAppResponse, ListAppsData, ListAppsResponse, CreateAppData, CreateAppResponse, ExistsAppData, ExistsAppResponse, GetAppByPathData, GetAppByPathResponse, GetAppLiteByPathData, GetAppLiteByPathResponse, GetAppByPathWithDraftData, GetAppByPathWithDraftResponse, GetAppHistoryByPathData, GetAppHistoryByPathResponse, GetAppLatestVersionData, GetAppLatestVersionResponse, UpdateAppHistoryData, UpdateAppHistoryResponse, GetPublicAppBySecretData, GetPublicAppBySecretResponse, GetPublicResourceData, GetPublicResourceResponse, GetPublicSecretOfAppData, GetPublicSecretOfAppResponse, GetAppByVersionData, GetAppByVersionResponse, CreateRawAppData, CreateRawAppResponse, UpdateRawAppData, UpdateRawAppResponse, DeleteRawAppData, DeleteRawAppResponse, DeleteAppData, DeleteAppResponse, UpdateAppData, UpdateAppResponse, CustomPathExistsData, CustomPathExistsResponse, ExecuteComponentData, ExecuteComponentResponse, RunFlowByPathData, RunFlowByPathResponse, RestartFlowAtStepData, RestartFlowAtStepResponse, RunScriptByHashData, RunScriptByHashResponse, RunScriptPreviewData, RunScriptPreviewResponse, RunCodeWorkflowTaskData, RunCodeWorkflowTaskResponse, RunRawScriptDependenciesData, RunRawScriptDependenciesResponse, RunFlowPreviewData, RunFlowPreviewResponse, ListQueueData, ListQueueResponse, GetQueueCountData, GetQueueCountResponse, GetCompletedCountData, GetCompletedCountResponse, CountCompletedJobsData, CountCompletedJobsResponse, ListFilteredUuidsData, ListFilteredUuidsResponse, CancelSelectionData, CancelSelectionResponse, ListCompletedJobsData, ListCompletedJobsResponse, ListJobsData, ListJobsResponse, GetDbClockResponse, CountJobsByTagData, CountJobsByTagResponse, GetJobData, GetJobResponse, GetRootJobIdData, GetRootJobIdResponse, GetJobLogsData, GetJobLogsResponse, GetJobArgsData, GetJobArgsResponse, GetJobUpdatesData, GetJobUpdatesResponse, GetLogFileFromStoreData, GetLogFileFromStoreResponse, GetFlowDebugInfoData, GetFlowDebugInfoResponse, GetCompletedJobData, GetCompletedJobResponse, GetCompletedJobResultData, GetCompletedJobResultResponse, GetCompletedJobResultMaybeData, GetCompletedJobResultMaybeResponse, DeleteCompletedJobData, DeleteCompletedJobResponse, CancelQueuedJobData, CancelQueuedJobResponse, CancelPersistentQueuedJobsData, CancelPersistentQueuedJobsResponse, ForceCancelQueuedJobData, ForceCancelQueuedJobResponse, CreateJobSignatureData, CreateJobSignatureResponse, GetResumeUrlsData, GetResumeUrlsResponse, GetSlackApprovalPayloadData, GetSlackApprovalPayloadResponse, ResumeSuspendedJobGetData, ResumeSuspendedJobGetResponse, ResumeSuspendedJobPostData, ResumeSuspendedJobPostResponse, SetFlowUserStateData, SetFlowUserStateResponse, GetFlowUserStateData, GetFlowUserStateResponse, ResumeSuspendedFlowAsOwnerData, ResumeSuspendedFlowAsOwnerResponse, CancelSuspendedJobGetData, CancelSuspendedJobGetResponse, CancelSuspendedJobPostData, CancelSuspendedJobPostResponse, GetSuspendedJobFlowData, GetSuspendedJobFlowResponse, PreviewScheduleData, PreviewScheduleResponse, CreateScheduleData, CreateScheduleResponse, UpdateScheduleData, UpdateScheduleResponse, SetScheduleEnabledData, SetScheduleEnabledResponse, DeleteScheduleData, DeleteScheduleResponse, GetScheduleData, GetScheduleResponse, ExistsScheduleData, ExistsScheduleResponse, ListSchedulesData, ListSchedulesResponse, ListSchedulesWithJobsData, ListSchedulesWithJobsResponse, SetDefaultErrorOrRecoveryHandlerData, SetDefaultErrorOrRecoveryHandlerResponse, CreateHttpTriggerData, CreateHttpTriggerResponse, UpdateHttpTriggerData, UpdateHttpTriggerResponse, DeleteHttpTriggerData, DeleteHttpTriggerResponse, GetHttpTriggerData, GetHttpTriggerResponse, ListHttpTriggersData, ListHttpTriggersResponse, ExistsHttpTriggerData, ExistsHttpTriggerResponse, ExistsRouteData, ExistsRouteResponse, CreateWebsocketTriggerData, CreateWebsocketTriggerResponse, UpdateWebsocketTriggerData, UpdateWebsocketTriggerResponse, DeleteWebsocketTriggerData, DeleteWebsocketTriggerResponse, GetWebsocketTriggerData, GetWebsocketTriggerResponse, ListWebsocketTriggersData, ListWebsocketTriggersResponse, ExistsWebsocketTriggerData, ExistsWebsocketTriggerResponse, SetWebsocketTriggerEnabledData, SetWebsocketTriggerEnabledResponse, TestWebsocketConnectionData, TestWebsocketConnectionResponse, CreateKafkaTriggerData, CreateKafkaTriggerResponse, UpdateKafkaTriggerData, UpdateKafkaTriggerResponse, DeleteKafkaTriggerData, DeleteKafkaTriggerResponse, GetKafkaTriggerData, GetKafkaTriggerResponse, ListKafkaTriggersData, ListKafkaTriggersResponse, ExistsKafkaTriggerData, ExistsKafkaTriggerResponse, SetKafkaTriggerEnabledData, SetKafkaTriggerEnabledResponse, TestKafkaConnectionData, TestKafkaConnectionResponse, CreateNatsTriggerData, CreateNatsTriggerResponse, UpdateNatsTriggerData, UpdateNatsTriggerResponse, DeleteNatsTriggerData, DeleteNatsTriggerResponse, GetNatsTriggerData, GetNatsTriggerResponse, ListNatsTriggersData, ListNatsTriggersResponse, ExistsNatsTriggerData, ExistsNatsTriggerResponse, SetNatsTriggerEnabledData, SetNatsTriggerEnabledResponse, TestNatsConnectionData, TestNatsConnectionResponse, CreateSqsTriggerData, CreateSqsTriggerResponse, UpdateSqsTriggerData, UpdateSqsTriggerResponse, DeleteSqsTriggerData, DeleteSqsTriggerResponse, GetSqsTriggerData, GetSqsTriggerResponse, ListSqsTriggersData, ListSqsTriggersResponse, ExistsSqsTriggerData, ExistsSqsTriggerResponse, SetSqsTriggerEnabledData, SetSqsTriggerEnabledResponse, TestSqsConnectionData, TestSqsConnectionResponse, IsValidPostgresConfigurationData, IsValidPostgresConfigurationResponse, CreateTemplateScriptData, CreateTemplateScriptResponse, GetTemplateScriptData, GetTemplateScriptResponse, ListPostgresReplicationSlotData, ListPostgresReplicationSlotResponse, CreatePostgresReplicationSlotData, CreatePostgresReplicationSlotResponse, DeletePostgresReplicationSlotData, DeletePostgresReplicationSlotResponse, ListPostgresPublicationData, ListPostgresPublicationResponse, GetPostgresPublicationData, GetPostgresPublicationResponse, CreatePostgresPublicationData, CreatePostgresPublicationResponse, UpdatePostgresPublicationData, UpdatePostgresPublicationResponse, DeletePostgresPublicationData, DeletePostgresPublicationResponse, CreatePostgresTriggerData, CreatePostgresTriggerResponse, UpdatePostgresTriggerData, UpdatePostgresTriggerResponse, DeletePostgresTriggerData, DeletePostgresTriggerResponse, GetPostgresTriggerData, GetPostgresTriggerResponse, ListPostgresTriggersData, ListPostgresTriggersResponse, ExistsPostgresTriggerData, ExistsPostgresTriggerResponse, SetPostgresTriggerEnabledData, SetPostgresTriggerEnabledResponse, TestPostgresConnectionData, TestPostgresConnectionResponse, ListInstanceGroupsResponse, GetInstanceGroupData, GetInstanceGroupResponse, CreateInstanceGroupData, CreateInstanceGroupResponse, UpdateInstanceGroupData, UpdateInstanceGroupResponse, DeleteInstanceGroupData, DeleteInstanceGroupResponse, AddUserToInstanceGroupData, AddUserToInstanceGroupResponse, RemoveUserFromInstanceGroupData, RemoveUserFromInstanceGroupResponse, ExportInstanceGroupsResponse, OverwriteInstanceGroupsData, OverwriteInstanceGroupsResponse, ListGroupsData, ListGroupsResponse, ListGroupNamesData, ListGroupNamesResponse, CreateGroupData, CreateGroupResponse, UpdateGroupData, UpdateGroupResponse, DeleteGroupData, DeleteGroupResponse, GetGroupData, GetGroupResponse, AddUserToGroupData, AddUserToGroupResponse, RemoveUserToGroupData, RemoveUserToGroupResponse, ListFoldersData, ListFoldersResponse, ListFolderNamesData, ListFolderNamesResponse, CreateFolderData, CreateFolderResponse, UpdateFolderData, UpdateFolderResponse, DeleteFolderData, DeleteFolderResponse, GetFolderData, GetFolderResponse, GetFolderUsageData, GetFolderUsageResponse, AddOwnerToFolderData, AddOwnerToFolderResponse, RemoveOwnerToFolderData, RemoveOwnerToFolderResponse, ListWorkersData, ListWorkersResponse, ExistsWorkerWithTagData, ExistsWorkerWithTagResponse, GetQueueMetricsResponse, GetCountsOfJobsWaitingPerTagResponse, ListWorkerGroupsResponse, GetConfigData, GetConfigResponse, UpdateConfigData, UpdateConfigResponse, DeleteConfigData, DeleteConfigResponse, ListConfigsResponse, ListAutoscalingEventsData, ListAutoscalingEventsResponse, GetGranularAclsData, GetGranularAclsResponse, AddGranularAclsData, AddGranularAclsResponse, RemoveGranularAclsData, RemoveGranularAclsResponse, SetCaptureConfigData, SetCaptureConfigResponse, PingCaptureConfigData, PingCaptureConfigResponse, GetCaptureConfigsData, GetCaptureConfigsResponse, ListCapturesData, ListCapturesResponse, GetCaptureData, GetCaptureResponse, DeleteCaptureData, DeleteCaptureResponse, StarData, StarResponse, UnstarData, UnstarResponse, GetInputHistoryData, GetInputHistoryResponse, GetArgsFromHistoryOrSavedInputData, GetArgsFromHistoryOrSavedInputResponse, ListInputsData, ListInputsResponse, CreateInputData, CreateInputResponse, UpdateInputData, UpdateInputResponse, DeleteInputData, DeleteInputResponse, DuckdbConnectionSettingsData, DuckdbConnectionSettingsResponse, DuckdbConnectionSettingsV2Data, DuckdbConnectionSettingsV2Response, PolarsConnectionSettingsData, PolarsConnectionSettingsResponse, PolarsConnectionSettingsV2Data, PolarsConnectionSettingsV2Response, S3ResourceInfoData, S3ResourceInfoResponse, DatasetStorageTestConnectionData, DatasetStorageTestConnectionResponse, ListStoredFilesData, ListStoredFilesResponse, LoadFileMetadataData, LoadFileMetadataResponse, LoadFilePreviewData, LoadFilePreviewResponse, LoadParquetPreviewData, LoadParquetPreviewResponse, LoadTableRowCountData, LoadTableRowCountResponse, LoadCsvPreviewData, LoadCsvPreviewResponse, DeleteS3FileData, DeleteS3FileResponse, MoveS3FileData, MoveS3FileResponse, FileUploadData, FileUploadResponse, FileDownloadData, FileDownloadResponse, FileDownloadParquetAsCsvData, FileDownloadParquetAsCsvResponse, GetJobMetricsData, GetJobMetricsResponse, SetJobProgressData, SetJobProgressResponse, GetJobProgressData, GetJobProgressResponse, ListLogFilesData, ListLogFilesResponse, GetLogFileData, GetLogFileResponse, ListConcurrencyGroupsResponse, DeleteConcurrencyGroupData, DeleteConcurrencyGroupResponse, GetConcurrencyKeyData, GetConcurrencyKeyResponse, ListExtendedJobsData, ListExtendedJobsResponse, SearchJobsIndexData, SearchJobsIndexResponse, SearchLogsIndexData, SearchLogsIndexResponse, CountSearchLogsIndexData, CountSearchLogsIndexResponse, ClearIndexData, ClearIndexResponse } from './types.gen.ts'; /** * get backend version @@ -6091,6 +6091,160 @@ export const testNatsConnection = (data: TestNatsConnectionData): CancelableProm mediaType: 'application/json' }); }; +/** + * create sqs trigger + * @param data The data for the request. + * @param data.workspace + * @param data.requestBody new sqs trigger + * @returns string sqs trigger created + * @throws ApiError + */ +export const createSqsTrigger = (data: CreateSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { + method: 'POST', + url: '/w/{workspace}/sqs_triggers/create', + path: { + workspace: data.workspace + }, + body: data.requestBody, + mediaType: 'application/json' +}); }; + +/** + * update sqs trigger + * @param data The data for the request. + * @param data.workspace + * @param data.path + * @param data.requestBody updated trigger + * @returns string sqs trigger updated + * @throws ApiError + */ +export const updateSqsTrigger = (data: UpdateSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { + method: 'POST', + url: '/w/{workspace}/sqs_triggers/update/{path}', + path: { + workspace: data.workspace, + path: data.path + }, + body: data.requestBody, + mediaType: 'application/json' +}); }; + +/** + * delete sqs trigger + * @param data The data for the request. + * @param data.workspace + * @param data.path + * @returns string sqs trigger deleted + * @throws ApiError + */ +export const deleteSqsTrigger = (data: DeleteSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { + method: 'DELETE', + url: '/w/{workspace}/sqs_triggers/delete/{path}', + path: { + workspace: data.workspace, + path: data.path + } +}); }; + +/** + * get sqs trigger + * @param data The data for the request. + * @param data.workspace + * @param data.path + * @returns SqsTrigger sqs trigger deleted + * @throws ApiError + */ +export const getSqsTrigger = (data: GetSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { + method: 'GET', + url: '/w/{workspace}/sqs_triggers/get/{path}', + path: { + workspace: data.workspace, + path: data.path + } +}); }; + +/** + * list sqs triggers + * @param data The data for the request. + * @param data.workspace + * @param data.page which page to return (start at 1, default 1) + * @param data.perPage number of items to return for a given page (default 30, max 100) + * @param data.path filter by path + * @param data.isFlow + * @param data.pathStart + * @returns SqsTrigger sqs trigger list + * @throws ApiError + */ +export const listSqsTriggers = (data: ListSqsTriggersData): CancelablePromise => { return __request(OpenAPI, { + method: 'GET', + url: '/w/{workspace}/sqs_triggers/list', + path: { + workspace: data.workspace + }, + query: { + page: data.page, + per_page: data.perPage, + path: data.path, + is_flow: data.isFlow, + path_start: data.pathStart + } +}); }; + +/** + * does sqs trigger exists + * @param data The data for the request. + * @param data.workspace + * @param data.path + * @returns boolean sqs trigger exists + * @throws ApiError + */ +export const existsSqsTrigger = (data: ExistsSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { + method: 'GET', + url: '/w/{workspace}/sqs_triggers/exists/{path}', + path: { + workspace: data.workspace, + path: data.path + } +}); }; + +/** + * set enabled sqs trigger + * @param data The data for the request. + * @param data.workspace + * @param data.path + * @param data.requestBody updated sqs trigger enable + * @returns string sqs trigger enabled set + * @throws ApiError + */ +export const setSqsTriggerEnabled = (data: SetSqsTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { + method: 'POST', + url: '/w/{workspace}/sqs_triggers/setenabled/{path}', + path: { + workspace: data.workspace, + path: data.path + }, + body: data.requestBody, + mediaType: 'application/json' +}); }; + +/** + * test sqs connection + * @param data The data for the request. + * @param data.workspace + * @param data.requestBody test sqs connection + * @returns string successfuly connected to sqs + * @throws ApiError + */ +export const testSqsConnection = (data: TestSqsConnectionData): CancelablePromise => { return __request(OpenAPI, { + method: 'POST', + url: '/w/{workspace}/sqs_triggers/test', + path: { + workspace: data.workspace + }, + body: data.requestBody, + mediaType: 'application/json' +}); }; + /** * check if postgres configuration is set to logical * @param data The data for the request. @@ -6435,6 +6589,24 @@ export const setPostgresTriggerEnabled = (data: SetPostgresTriggerEnabledData): mediaType: 'application/json' }); }; +/** + * test postgres connection + * @param data The data for the request. + * @param data.workspace + * @param data.requestBody test postgres connection + * @returns string successfuly connected to postgres + * @throws ApiError + */ +export const testPostgresConnection = (data: TestPostgresConnectionData): CancelablePromise => { return __request(OpenAPI, { + method: 'POST', + url: '/w/{workspace}/postgres_triggers/test', + path: { + workspace: data.workspace + }, + body: data.requestBody, + mediaType: 'application/json' +}); }; + /** * list instance groups * @returns InstanceGroup instance group list diff --git a/cli/gen/types.gen.ts b/cli/gen/types.gen.ts index 075aa848ee..8fdbed7a57 100644 --- a/cli/gen/types.gen.ts +++ b/cli/gen/types.gen.ts @@ -555,6 +555,8 @@ export type EditSchedule = { }; export type TriggerExtraProperty = { + path: string; + script_path: string; email: string; extra_perms: { [key: string]: (boolean); @@ -562,18 +564,16 @@ export type TriggerExtraProperty = { workspace_id: string; edited_by: string; edited_at: string; + is_flow: boolean; }; export type HttpTrigger = TriggerExtraProperty & { - path: string; - script_path: string; route_path: string; static_asset_config?: { s3: string; storage?: string; filename?: string; }; - is_flow: boolean; http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; is_async: boolean; requires_auth: boolean; @@ -626,13 +626,11 @@ export type TriggersCount = { postgres_count?: number; kafka_count?: number; nats_count?: number; + sqs_count?: number; }; export type WebsocketTrigger = TriggerExtraProperty & { - path: string; - script_path: string; url: string; - is_flow: boolean; server_id?: string; last_server_ping?: string; error?: string; @@ -685,6 +683,36 @@ export type WebsocketTriggerInitialMessage = { }; }; +export type SqsTrigger = TriggerExtraProperty & { + queue_url: string; + aws_resource_path: string; + message_attributes?: Array<(string)>; + server_id?: string; + last_server_ping?: string; + error?: string; + enabled: boolean; +}; + +export type NewSqsTrigger = { + queue_url: string; + aws_resource_path: string; + message_attributes?: Array<(string)>; + path: string; + script_path: string; + is_flow: boolean; + enabled?: boolean; +}; + +export type EditSqsTrigger = { + queue_url: string; + aws_resource_path: string; + message_attributes?: Array<(string)>; + path: string; + script_path: string; + is_flow: boolean; + enabled: boolean; +}; + export type Slot = { name?: string; }; @@ -719,9 +747,6 @@ export type TemplateScript = { }; export type PostgresTrigger = TriggerExtraProperty & { - path: string; - script_path: string; - is_flow: boolean; enabled: boolean; postgres_resource_path: string; publication_name: string; @@ -753,20 +778,10 @@ export type EditPostgresTrigger = { publication?: PublicationData; }; -export type KafkaTrigger = { - path: string; - edited_by: string; - edited_at: string; - script_path: string; +export type KafkaTrigger = TriggerExtraProperty & { kafka_resource_path: string; group_id: string; topics: Array<(string)>; - is_flow: boolean; - extra_perms: { - [key: string]: (boolean); - }; - email: string; - workspace_id: string; server_id?: string; last_server_ping?: string; error?: string; @@ -792,22 +807,12 @@ export type EditKafkaTrigger = { is_flow: boolean; }; -export type NatsTrigger = { - path: string; - edited_by: string; - edited_at: string; - script_path: string; +export type NatsTrigger = TriggerExtraProperty & { nats_resource_path: string; use_jetstream: boolean; stream_name?: string; consumer_name?: string; subjects: Array<(string)>; - is_flow: boolean; - extra_perms: { - [key: string]: (boolean); - }; - email: string; - workspace_id: string; server_id?: string; last_server_ping?: string; error?: string; @@ -1282,7 +1287,7 @@ export type CriticalAlert = { workspace_id?: (string) | null; }; -export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats'; +export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'postgres' | 'sqs'; export type Capture = { trigger_kind: CaptureTriggerKind; @@ -2751,6 +2756,7 @@ export type GetUsedTriggersResponse = ({ kafka_used: boolean; nats_used: boolean; postgres_used: boolean; + sqs_used: boolean; }); export type ListUsersData = { @@ -5850,6 +5856,95 @@ export type TestNatsConnectionData = { export type TestNatsConnectionResponse = (string); +export type CreateSqsTriggerData = { + /** + * new sqs trigger + */ + requestBody: NewSqsTrigger; + workspace: string; +}; + +export type CreateSqsTriggerResponse = (string); + +export type UpdateSqsTriggerData = { + path: string; + /** + * updated trigger + */ + requestBody: EditSqsTrigger; + workspace: string; +}; + +export type UpdateSqsTriggerResponse = (string); + +export type DeleteSqsTriggerData = { + path: string; + workspace: string; +}; + +export type DeleteSqsTriggerResponse = (string); + +export type GetSqsTriggerData = { + path: string; + workspace: string; +}; + +export type GetSqsTriggerResponse = (SqsTrigger); + +export type ListSqsTriggersData = { + isFlow?: boolean; + /** + * which page to return (start at 1, default 1) + */ + page?: number; + /** + * filter by path + */ + path?: string; + pathStart?: string; + /** + * number of items to return for a given page (default 30, max 100) + */ + perPage?: number; + workspace: string; +}; + +export type ListSqsTriggersResponse = (Array); + +export type ExistsSqsTriggerData = { + path: string; + workspace: string; +}; + +export type ExistsSqsTriggerResponse = (boolean); + +export type SetSqsTriggerEnabledData = { + path: string; + /** + * updated sqs trigger enable + */ + requestBody: { + enabled: boolean; + }; + workspace: string; +}; + +export type SetSqsTriggerEnabledResponse = (string); + +export type TestSqsConnectionData = { + /** + * test sqs connection + */ + requestBody: { + connection: { + [key: string]: unknown; + }; + }; + workspace: string; +}; + +export type TestSqsConnectionResponse = (string); + export type IsValidPostgresConfigurationData = { path: string; workspace: string; @@ -6025,6 +6120,18 @@ export type SetPostgresTriggerEnabledData = { export type SetPostgresTriggerEnabledResponse = (string); +export type TestPostgresConnectionData = { + /** + * test postgres connection + */ + requestBody: { + database: string; + }; + workspace: string; +}; + +export type TestPostgresConnectionResponse = (string); + export type ListInstanceGroupsResponse = (Array); export type GetInstanceGroupData = { @@ -6372,7 +6479,7 @@ export type ListAutoscalingEventsData = { export type ListAutoscalingEventsResponse = (Array); export type GetGranularAclsData = { - kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger'; + kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'sqs_trigger'; path: string; workspace: string; }; @@ -6382,7 +6489,7 @@ export type GetGranularAclsResponse = ({ }); export type AddGranularAclsData = { - kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger'; + kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'sqs_trigger'; path: string; /** * acl to add @@ -6397,7 +6504,7 @@ export type AddGranularAclsData = { export type AddGranularAclsResponse = (string); export type RemoveGranularAclsData = { - kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger'; + kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'sqs_trigger'; path: string; /** * acl to add diff --git a/cli/sync.ts b/cli/sync.ts index e350b94fef..151244709b 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -640,7 +640,8 @@ export async function elementsToMap( path.endsWith(".websocket_trigger" + ext) || path.endsWith(".kafka_trigger" + ext) || path.endsWith(".nats_trigger" + ext) || - path.endsWith(".postgres_trigger" + ext)) + path.endsWith(".postgres_trigger" + ext) || + path.endsWith(".sqs_trigger" + ext)) ) continue; if (!skips.includeUsers && path.endsWith(".user" + ext)) continue; @@ -885,7 +886,8 @@ function getOrderFromPath(p: string) { typ == "websocket_trigger" || typ == "kafka_trigger" || typ == "nats_trigger" || - typ == "postgres_trigger" + typ == "postgres_trigger" || + typ == "sqs_trigger" ) { return 8; } else if (typ == "variable") { @@ -1719,6 +1721,12 @@ export async function push(opts: GlobalOptions & SyncOptions) { path: removeSuffix(target, ".postgres_trigger.json"), }); break; + case "sqs_trigger": + await wmill.deleteSqsTrigger({ + workspace: workspaceId, + path: removeSuffix(target, ".sqs_trigger.json"), + }); + break; case "variable": await wmill.deleteVariable({ workspace: workspaceId, diff --git a/cli/trigger.ts b/cli/trigger.ts index 9f0b9d887b..39a95890b9 100644 --- a/cli/trigger.ts +++ b/cli/trigger.ts @@ -4,6 +4,7 @@ import { KafkaTrigger, NatsTrigger, PostgresTrigger, + SqsTrigger, WebsocketTrigger, } from "./gen/types.gen.ts"; import { colors, Command, log, SEP, Table } from "./deps.ts"; @@ -23,6 +24,7 @@ type Trigger = { kafka: KafkaTrigger; nats: NatsTrigger; postgres: PostgresTrigger; + sqs: SqsTrigger; }; type TriggerFile = Omit< @@ -54,6 +56,7 @@ async function getTrigger( kafka: wmill.getKafkaTrigger, nats: wmill.getNatsTrigger, postgres: wmill.getPostgresTrigger, + sqs: wmill.getSqsTrigger, }; const triggerFunction = triggerFunctions[triggerType]; @@ -79,6 +82,7 @@ async function updateTrigger( kafka: wmill.updateKafkaTrigger, nats: wmill.updateNatsTrigger, postgres: wmill.updatePostgresTrigger, + sqs: wmill.updateSqsTrigger, }; const triggerFunction = triggerFunctions[triggerType]; await triggerFunction({ workspace, path, requestBody: trigger }); @@ -102,6 +106,7 @@ async function createTrigger( kafka: wmill.createKafkaTrigger, nats: wmill.createNatsTrigger, postgres: wmill.createPostgresTrigger, + sqs: wmill.createSqsTrigger, }; const triggerFunction = triggerFunctions[triggerType]; await triggerFunction({ workspace, path, requestBody: trigger }); @@ -175,6 +180,9 @@ async function list(opts: GlobalOptions) { const postgresTriggers = await wmill.listPostgresTriggers({ workspace: workspace.workspaceId, }); + const sqsTriggers = await wmill.listSqsTriggers({ + workspace: workspace.workspaceId, + }); const triggers = [ ...httpTriggers.map((x) => ({ path: x.path, kind: "http" })), @@ -182,6 +190,7 @@ async function list(opts: GlobalOptions) { ...kafkaTriggers.map((x) => ({ path: x.path, kind: "kafka" })), ...natsTriggers.map((x) => ({ path: x.path, kind: "nats" })), ...postgresTriggers.map((x) => ({ path: x.path, kind: "postgres" })), + ...sqsTriggers.map((x) => ({ path: x.path, kind: "sqs" })), ]; new Table() @@ -195,7 +204,7 @@ async function list(opts: GlobalOptions) { function checkIfValidTrigger(kind: string | undefined): kind is TriggerType { if ( kind && - ["http", "websocket", "kafka", "nats", "postgres"].includes(kind) + ["http", "websocket", "kafka", "nats", "postgres", "sqs"].includes(kind) ) { return true; } else { diff --git a/cli/types.ts b/cli/types.ts index c075ca51d3..18479edbcb 100644 --- a/cli/types.ts +++ b/cli/types.ts @@ -150,6 +150,8 @@ export async function pushObj( await pushTrigger("nats", workspace, p, befObj, newObj); } else if (typeEnding === "postgres_trigger") { await pushTrigger("postgres", workspace, p, befObj, newObj); + } else if (typeEnding === "sqs_trigger") { + await pushTrigger("sqs", workspace, p, befObj, newObj); } else if (typeEnding === "user") { await pushWorkspaceUser(workspace, p, befObj, newObj); } else if (typeEnding === "group") { @@ -197,6 +199,7 @@ export function getTypeStrFromPath( | "kafka_trigger" | "nats_trigger" | "postgres_trigger" + | "sqs_trigger" | "user" | "group" | "settings" @@ -242,6 +245,7 @@ export function getTypeStrFromPath( typeEnding === "kafka_trigger" || typeEnding === "nats_trigger" || typeEnding === "postgres_trigger" || + typeEnding === "sqs_trigger" || typeEnding === "user" || typeEnding === "group" || typeEnding === "settings" || diff --git a/frontend/src/lib/components/Path.svelte b/frontend/src/lib/components/Path.svelte index c66f29c390..8a83a2f872 100644 --- a/frontend/src/lib/components/Path.svelte +++ b/frontend/src/lib/components/Path.svelte @@ -17,7 +17,8 @@ WebsocketTriggerService, KafkaTriggerService, PostgresTriggerService, - NatsTriggerService + NatsTriggerService, + SqsTriggerService } from '$lib/gen' import { superadmin, userStore, workspaceStore } from '$lib/stores' import { createEventDispatcher, getContext } from 'svelte' @@ -43,6 +44,7 @@ | 'kafka_trigger' | 'postgres_trigger' | 'nats_trigger' + | 'sqs_trigger' let meta: Meta | undefined = undefined export let fullNamePlaceholder: string | undefined = undefined export let namePlaceholder = '' @@ -246,6 +248,11 @@ workspace: $workspaceStore!, path: path }) + } else if (kind == 'sqs_trigger') { + return await SqsTriggerService.existsSqsTrigger({ + workspace: $workspaceStore!, + path: path + }) } else { return false } diff --git a/frontend/src/lib/components/ShareModal.svelte b/frontend/src/lib/components/ShareModal.svelte index fe6dcda387..611653f413 100644 --- a/frontend/src/lib/components/ShareModal.svelte +++ b/frontend/src/lib/components/ShareModal.svelte @@ -28,6 +28,7 @@ | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' + | 'sqs_trigger' | 'postgres_trigger' let kind: Kind diff --git a/frontend/src/lib/components/details/DetailPageDetailPanel.svelte b/frontend/src/lib/components/details/DetailPageDetailPanel.svelte index 6781e8888a..562b60e08a 100644 --- a/frontend/src/lib/components/details/DetailPageDetailPanel.svelte +++ b/frontend/src/lib/components/details/DetailPageDetailPanel.svelte @@ -15,6 +15,7 @@ | 'postgres' | 'scheduledPoll' | 'kafka' + | 'sqs' | 'nats' = 'webhooks' export let flow_json: any | undefined = undefined export let simplfiedPoll: boolean = false @@ -54,9 +55,10 @@ - + + diff --git a/frontend/src/lib/components/details/DetailPageLayout.svelte b/frontend/src/lib/components/details/DetailPageLayout.svelte index 27c2f46778..808632f83e 100644 --- a/frontend/src/lib/components/details/DetailPageLayout.svelte +++ b/frontend/src/lib/components/details/DetailPageLayout.svelte @@ -30,6 +30,7 @@ | 'scheduledPoll' | 'kafka' | 'nats' + | 'sqs' >('webhooks') const simplifiedPoll = writable(false) @@ -64,9 +65,10 @@ - + + @@ -111,9 +113,10 @@ - + + diff --git a/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte b/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte index 3bf60b99ab..563972556b 100644 --- a/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte +++ b/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte @@ -8,9 +8,7 @@ Webhook, Unplug, PlugZap, - Database - } from 'lucide-svelte' import HighlightTheme from '../HighlightTheme.svelte' @@ -18,6 +16,7 @@ import NatsIcon from '../icons/NatsIcon.svelte' import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte' import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte' + import { AwsIcon } from '../icons' export let triggerSelected: | 'webhooks' @@ -29,13 +28,14 @@ | 'kafka' | 'postgres' | 'nats' + | 'sqs' | 'scheduledPoll' = 'webhooks' export let simplfiedPoll: boolean = false - export let eventStreamType: 'kafka' | 'nats' = 'kafka' + export let eventStreamType: 'kafka' | 'nats' | 'sqs' = 'kafka' $: { - if (triggerSelected === 'kafka' || triggerSelected === 'nats') { + if (triggerSelected === 'kafka' || triggerSelected === 'nats' || triggerSelected === 'sqs') { eventStreamType = triggerSelected } } @@ -76,7 +76,7 @@ Postgres - + Event streams @@ -109,17 +109,20 @@ {:else if triggerSelected === 'postgres'} - {:else if triggerSelected === 'kafka' || triggerSelected === 'nats'} + {:else if triggerSelected === 'kafka' || triggerSelected === 'nats' || triggerSelected === 'sqs'}
+
{#if eventStreamType === 'kafka'} {:else if eventStreamType === 'nats'} + {:else if eventStreamType === 'sqs'} + {/if} {:else if triggerSelected === 'cli'} diff --git a/frontend/src/lib/components/graph/renderers/triggers/TriggersBadge.svelte b/frontend/src/lib/components/graph/renderers/triggers/TriggersBadge.svelte index b3994a707e..2982be5ab6 100644 --- a/frontend/src/lib/components/graph/renderers/triggers/TriggersBadge.svelte +++ b/frontend/src/lib/components/graph/renderers/triggers/TriggersBadge.svelte @@ -12,6 +12,7 @@ import { enterpriseLicense, workspaceStore } from '$lib/stores' import KafkaIcon from '$lib/components/icons/KafkaIcon.svelte' import NatsIcon from '$lib/components/icons/NatsIcon.svelte' + import AwsIcon from '$lib/components/icons/AwsIcon.svelte' const { selectedTrigger, triggersCount } = getContext('TriggerContext') @@ -30,6 +31,7 @@ | 'emails' | 'eventStreams' | 'postgres' + | 'sqs' )[] = showOnlyWithCount ? ['webhooks', 'schedules', 'routes', 'websockets', 'kafka', 'nats', 'emails'] : ['webhooks', 'schedules', 'routes', 'websockets', 'eventStreams', 'emails'] @@ -66,6 +68,7 @@ kafka: { icon: KafkaIcon, countKey: 'kafka_count' }, emails: { icon: Mail, countKey: 'email_count' }, nats: { icon: NatsIcon, countKey: 'nats_count' }, + sqs: { icon: AwsIcon, countKey: 'sqs_count' }, eventStreams: { icon: PlugZap } } @@ -77,7 +80,7 @@ {#each triggersToDisplay as type} {@const { icon, countKey } = triggerTypeConfig[type]} - {#if (!showOnlyWithCount || ((countKey && $triggersCount?.[countKey]) || 0) > 0) && !(type === 'kafka' && !$enterpriseLicense) && !(type === 'nats' && !$enterpriseLicense)} + {#if (!showOnlyWithCount || ((countKey && $triggersCount?.[countKey]) || 0) > 0) && !(type === 'sqs' && !$enterpriseLicense) && !(type === 'kafka' && !$enterpriseLicense) && !(type === 'nats' && !$enterpriseLicense)} {camelCaseToWords(type)} {#if countKey} diff --git a/frontend/src/lib/components/icons/AwsIcon.svelte b/frontend/src/lib/components/icons/AwsIcon.svelte index a3976b4ee3..709193fb9f 100644 --- a/frontend/src/lib/components/icons/AwsIcon.svelte +++ b/frontend/src/lib/components/icons/AwsIcon.svelte @@ -1,10 +1,29 @@ - - - - + + + + diff --git a/frontend/src/lib/components/sidebar/OperatorMenu.svelte b/frontend/src/lib/components/sidebar/OperatorMenu.svelte index ce7001e0c6..afd88041fc 100644 --- a/frontend/src/lib/components/sidebar/OperatorMenu.svelte +++ b/frontend/src/lib/components/sidebar/OperatorMenu.svelte @@ -83,6 +83,11 @@ id: 'triggers', href: `${base}/nats_triggers` }, + { + label: 'SQS triggers', + id: 'triggers', + href: `${base}/sqs_triggers` + }, { label: 'Audit logs', id: 'audit_logs', diff --git a/frontend/src/lib/components/sidebar/SidebarContent.svelte b/frontend/src/lib/components/sidebar/SidebarContent.svelte index 56d1f5f2b6..56e8febc77 100644 --- a/frontend/src/lib/components/sidebar/SidebarContent.svelte +++ b/frontend/src/lib/components/sidebar/SidebarContent.svelte @@ -53,6 +53,7 @@ import SideBarNotification from './SideBarNotification.svelte' import KafkaIcon from '../icons/KafkaIcon.svelte' import NatsIcon from '../icons/NatsIcon.svelte' + import AwsIcon from '../icons/AwsIcon.svelte' export let numUnacknowledgedCriticalAlerts = 0 @@ -121,6 +122,13 @@ icon: NatsIcon, disabled: $userStore?.operator || !$enterpriseLicense, kind: 'nats' + }, + { + label: 'SQS' + ($enterpriseLicense ? '' : ' (EE)'), + href: '/sqs_triggers', + icon: AwsIcon, + disabled: $userStore?.operator || !$enterpriseLicense, + kind: 'sqs' } ] diff --git a/frontend/src/lib/components/triggers.ts b/frontend/src/lib/components/triggers.ts index ac4a905da5..eec8edbd4a 100644 --- a/frontend/src/lib/components/triggers.ts +++ b/frontend/src/lib/components/triggers.ts @@ -51,6 +51,7 @@ export type TriggerKind = | 'kafka' | 'nats' | 'postgres' + | 'sqs' export function captureTriggerKindToTriggerKind(kind: CaptureTriggerKind): TriggerKind { switch (kind) { case 'webhook': @@ -65,6 +66,8 @@ export function captureTriggerKindToTriggerKind(kind: CaptureTriggerKind): Trigg return 'kafka' case 'nats': return 'nats' + case 'sqs': + return 'sqs' case 'postgres': return 'postgres' default: diff --git a/frontend/src/lib/components/triggers/CaptureButton.svelte b/frontend/src/lib/components/triggers/CaptureButton.svelte index b90070d2c1..4dd00caa25 100644 --- a/frontend/src/lib/components/triggers/CaptureButton.svelte +++ b/frontend/src/lib/components/triggers/CaptureButton.svelte @@ -9,6 +9,7 @@ import { captureTriggerKindToTriggerKind } from '../triggers' import CaptureIcon from './CaptureIcon.svelte' import NatsIcon from '../icons/NatsIcon.svelte' + import AwsIcon from '../icons/AwsIcon.svelte' export let small = false @@ -83,6 +84,15 @@
+
{/key} diff --git a/frontend/src/lib/components/triggers/TestTriggerConnection.svelte b/frontend/src/lib/components/triggers/TestTriggerConnection.svelte index e896b5903a..2fd6f4e4db 100644 --- a/frontend/src/lib/components/triggers/TestTriggerConnection.svelte +++ b/frontend/src/lib/components/triggers/TestTriggerConnection.svelte @@ -3,6 +3,7 @@ CancelablePromise, KafkaTriggerService, NatsTriggerService, + SqsTriggerService, PostgresTriggerService, WebsocketTriggerService } from '$lib/gen' @@ -10,7 +11,7 @@ import { sendUserToast } from '$lib/toast' import Button from '../common/button/Button.svelte' - export let kind: 'websocket' | 'nats' | 'kafka' | 'postgres' + export let kind: 'websocket' | 'nats' | 'kafka' | 'postgres' | 'sqs' export let args: Record export let noButton = false export let testLoading: boolean = false @@ -19,6 +20,7 @@ websocket: 'WebSocket', nats: 'NATS server(s)', kafka: 'Kafka broker(s)', + sqs: 'SQS', postgres: 'Postgres' } @@ -46,6 +48,11 @@ workspace: $workspaceStore!, requestBody: args as any }) + } else if (kind === 'sqs') { + promise = SqsTriggerService.testSqsConnection({ + workspace: $workspaceStore!, + requestBody: args as any + }) } else if (kind === 'postgres') { promise = PostgresTriggerService.testPostgresConnection({ workspace: $workspaceStore!, diff --git a/frontend/src/lib/components/triggers/TriggersEditor.svelte b/frontend/src/lib/components/triggers/TriggersEditor.svelte index 68bf72a88b..3a6035b1ec 100644 --- a/frontend/src/lib/components/triggers/TriggersEditor.svelte +++ b/frontend/src/lib/components/triggers/TriggersEditor.svelte @@ -15,9 +15,10 @@ import PostgresTriggersPanel from './postgres/PostgresTriggersPanel.svelte' import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte' import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte' - import { KafkaIcon, NatsIcon } from '../icons' + import { AwsIcon, KafkaIcon, NatsIcon } from '../icons' import KafkaTriggersPanel from './kafka/KafkaTriggersPanel.svelte' import NatsTriggersPanel from './nats/NatsTriggersPanel.svelte' + import SqsTriggerPanel from './sqs/SqsTriggerPanel.svelte' export let noEditor: boolean export let newItem = false @@ -29,10 +30,10 @@ export let canHavePreprocessor: boolean = false export let hasPreprocessor: boolean = false export let args: Record = {} - let eventStreamType: 'kafka' | 'nats' = 'kafka' + let eventStreamType: 'kafka' | 'nats' | 'sqs' = 'kafka' $: { - if ($selectedTrigger === 'kafka' || $selectedTrigger === 'nats') { + if ($selectedTrigger === 'kafka' || $selectedTrigger === 'nats' || $selectedTrigger === 'sqs') { eventStreamType = $selectedTrigger } } @@ -40,7 +41,6 @@ const { selectedTrigger, simplifiedPoll } = getContext('TriggerContext') const dispatch = createEventDispatcher() - onDestroy(() => { dispatch('exitTriggers') }) @@ -57,7 +57,7 @@ Postgres Event streams @@ -153,11 +153,12 @@ isEditor={true} />
- {:else if $selectedTrigger === 'kafka' || $selectedTrigger === 'nats'} + {:else if $selectedTrigger === 'kafka' || $selectedTrigger === 'nats' || $selectedTrigger === 'sqs'}
+ {#if eventStreamType === 'kafka'} + {:else if eventStreamType === 'sqs'} + {/if}
{:else if $selectedTrigger === 'schedules'} diff --git a/frontend/src/lib/components/triggers/TriggersEditorSection.svelte b/frontend/src/lib/components/triggers/TriggersEditorSection.svelte index 8c01f3468e..6ea557c9b4 100644 --- a/frontend/src/lib/components/triggers/TriggersEditorSection.svelte +++ b/frontend/src/lib/components/triggers/TriggersEditorSection.svelte @@ -32,6 +32,7 @@ kafka: '+ New Kafka trigger', email: 'Email trigger', nats: '+ New NATS trigger', + sqs: '+ New SQS trigger', postgres: '+ New Postgres trigger' } diff --git a/frontend/src/lib/components/triggers/TriggersWrapper.svelte b/frontend/src/lib/components/triggers/TriggersWrapper.svelte index 150414795a..b64ed9d959 100644 --- a/frontend/src/lib/components/triggers/TriggersWrapper.svelte +++ b/frontend/src/lib/components/triggers/TriggersWrapper.svelte @@ -8,6 +8,7 @@ import EmailTriggerConfigSection from '../details/EmailTriggerConfigSection.svelte' import KafkaTriggersConfigSection from './kafka/KafkaTriggersConfigSection.svelte' import NatsTriggersConfigSection from './nats/NatsTriggersConfigSection.svelte' + import SqsTriggerEditorConfigSection from './sqs/SqsTriggerEditorConfigSection.svelte' import PostgresEditorConfigSection from './postgres/PostgresEditorConfigSection.svelte' export let triggerType: CaptureTriggerKind = 'webhook' @@ -70,5 +71,14 @@ {:else if triggerType === 'nats'} + {:else if triggerType === 'sqs'} + {/if}
diff --git a/frontend/src/lib/components/triggers/http/RouteEditorConfigSection.svelte b/frontend/src/lib/components/triggers/http/RouteEditorConfigSection.svelte index 29000feff5..c065bac709 100644 --- a/frontend/src/lib/components/triggers/http/RouteEditorConfigSection.svelte +++ b/frontend/src/lib/components/triggers/http/RouteEditorConfigSection.svelte @@ -120,26 +120,28 @@ {/if}
+ + {/if}
diff --git a/frontend/src/lib/components/triggers/nats/NatsTriggerEditorInner.svelte b/frontend/src/lib/components/triggers/nats/NatsTriggerEditorInner.svelte index bd73edc0e0..c782258c77 100644 --- a/frontend/src/lib/components/triggers/nats/NatsTriggerEditorInner.svelte +++ b/frontend/src/lib/components/triggers/nats/NatsTriggerEditorInner.svelte @@ -222,14 +222,6 @@ /> - - -

Pick a script or flow to be triggered @@ -247,6 +239,13 @@ />

+ + {/if} diff --git a/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte b/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte index d6a6340584..2bef997ed2 100644 --- a/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte +++ b/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte @@ -141,7 +141,7 @@