Compare commits

...

254 Commits

Author SHA1 Message Date
Ruben Fiszel
c52d9d97e7 chore(main): release 1.311.0 (#3580)
* chore(main): release 1.311.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-21 12:44:39 +02:00
Ruben Fiszel
48ba709627 fix: improve re-scheduled for estimation in concurrency limits 2024-04-21 12:41:30 +02:00
Ruben Fiszel
5504114732 increase pg size limit for cloud 2024-04-21 10:20:50 +02:00
Ruben Fiszel
9d2c7544ed table quick nits 2024-04-20 11:37:05 +02:00
Faton Ramadani
587c777d57 feat(frontend): Improve tables (#3577)
* feat(frontend): wip

* feat(frontend): wip

* feat(frontend): aggrid theme

* feat(frontend): aggrid theme

* feat(frontend): aggrid theme

* feat(frontend): support old themes
2024-04-20 10:54:34 +02:00
Ruben Fiszel
a162de0b75 chore(main): release 1.310.0 (#3579)
* chore(main): release 1.310.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-19 19:13:03 +02:00
Faton Ramadani
62fcf086cc feat(frontend): Deeply nested Modals and Drawers (#3565)
* fix(frontend): Support deeply nested drawers and modals

* fix(frontend): Support deeply nested drawers and modals

* fix(frontend): Support deeply nested drawers and modals

* feat(frontend): fix name

* chore(main): release 1.308.2 (#3569)

* chore(main): release 1.308.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>

* feat(frontend): wip

* feat(frontend): wip

* fix(frontend): fix event propagation

* fix(frontend): fix drawers globally

* feat(frontend): Fix all drawers

* feat(frontend): split zIndexes in a new file

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-19 18:58:39 +02:00
Ruben Fiszel
f9b5da53e8 fix: fix password field 2024-04-19 18:15:27 +02:00
Ruben Fiszel
fa5a490283 nits 2024-04-19 17:47:18 +02:00
Ruben Fiszel
7e76d419f5 nits 2024-04-18 16:05:57 +02:00
lfanew
2459a5dfed Powershell client (#3551)
* init commit of partial functionality

* Simplified layout (matching TS client)

* reworked get & post

webrequest allows more interaction with response

* Added more functionality

* Added cancel and wait for jobs

* todo added

* Async script running and query util

* Added sync script & async flow

* Stop-WindmillExecution

Implementation of `cancel_running` from Python client.
Also changed $Body -> $Data to be more explicit (we don't expect JSON body as the method will convert it for us)

* Added get workspace and job

* added token creation

* Added job cancel cmdlet

* get id token

* Final draft

- Manual testing complete
- Rearranged methods & functions
- Added a bit more functionality

* fixed incomplete synopsis

* added parent job back

dont think it's related to this module. reported finding in discord

* feat: publish CI

---------

Co-authored-by: HugoCasa <hugo@casademont.ch>
2024-04-18 14:42:58 +02:00
Ruben Fiszel
0fdf72fc57 chore(main): release 1.309.2 (#3575)
* chore(main): release 1.309.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-18 12:23:56 +02:00
Ruben Fiszel
f3666ea140 fix: update go and typesript client 2024-04-18 11:07:11 +02:00
Ruben Fiszel
1b131f310e chore(main): release 1.309.1 (#3574)
* chore(main): release 1.309.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-18 10:24:25 +02:00
Ruben Fiszel
024ffdeb6e fix: improve log viewer loading from object store 2024-04-18 09:57:21 +02:00
Ruben Fiszel
f859cbb5d4 use echo -E for webhooks 2024-04-18 09:43:48 +02:00
Ruben Fiszel
2e52feb47a chore(main): release 1.309.0 (#3572)
* chore(main): release 1.309.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-18 01:22:44 +02:00
wendrul
ac841400ba Instrument logs (#3566)
* Add spans to show worker_name and job_id

Always show worker_name and job_id when relevant, by creating spans that
live as long as the worker and the job.

* Remove redundant worker names from fn run_worker

Remove the now redundant worker_name tracing, as the information now
lives at the span level

* Use span when spawning new thread

* Instrument more pertinent functions

Move spans to more pertinent functions. Remove more redundant info, and
change worker_name to just worker

* Change tracing subscriber to log path:line_no

Change from logging target (module name usually) to file path and line
number
2024-04-18 01:11:14 +02:00
Ruben Fiszel
f84a902445 fix: measure memory usage on postgres scripts 2024-04-18 01:05:16 +02:00
Ruben Fiszel
c3493f838d nits 2024-04-17 23:03:20 +02:00
Ruben Fiszel
da41e11c84 nits 2024-04-17 22:58:23 +02:00
Ruben Fiszel
ab19625688 nits 2024-04-17 22:44:21 +02:00
Ruben Fiszel
cdb01b0d01 fix: fix autosize when not rendered at initialization 2024-04-17 22:42:03 +02:00
Ruben Fiszel
ca3e2888a6 fix ee links 2024-04-17 22:38:03 +02:00
Ruben Fiszel
c4ccc781eb add pymysql 2024-04-17 22:31:07 +02:00
Ruben Fiszel
2eea00a2cd fix: improve cancel_all to never deadlock 2024-04-17 22:04:35 +02:00
Ruben Fiszel
071a0ae927 feat: show more for logs on s3 directly possible from browser log viewer 2024-04-17 21:42:46 +02:00
Ruben Fiszel
0b1acc3557 improve queue clearing for schedules 2024-04-17 14:05:22 +02:00
HugoCasa
fdaa49a7e9 fix(backend): prevent push fail of schedule error handling from reverting job completion (#3568)
* fix: prevent push fail of schedule error handling from reverting job completion

* fix: sqlx
2024-04-17 12:35:31 +02:00
Ruben Fiszel
615e95f335 improve disabled dropdown style 2024-04-16 20:53:58 +02:00
Ruben Fiszel
3f643baf1b improve disabled dropdown style 2024-04-16 20:51:19 +02:00
Ruben Fiszel
881915239f chore(main): release 1.308.1 (#3567)
* chore(main): release 1.308.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-16 19:59:36 +02:00
Ruben Fiszel
456b903766 fix: fix delete perms user folders 2024-04-16 19:53:30 +02:00
Ruben Fiszel
77ba312ecc chore(main): release 1.308.0 (#3560)
* chore(main): release 1.308.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-16 15:38:53 +02:00
HugoCasa
a8cf3ef424 feat: add visma oauth (#3564) 2024-04-16 12:32:48 +02:00
Ruben Fiszel
39f393d72d sqlx 2024-04-16 11:15:24 +02:00
Ruben Fiszel
5f8dd0e3d1 sqlx 2024-04-16 11:04:54 +02:00
Ruben Fiszel
158d26fe38 fix: tighten delete permissions 2024-04-16 10:41:14 +02:00
HugoCasa
c17bcd395e fix: db update cell issue when some col values are null (#3558)
* fix: db update cell issue when some col values are null

* fix: use sql cond instead + delete + format
2024-04-15 19:15:49 +02:00
Faton Ramadani
1658740ec6 fix(frontend): fix text alignement, email input before icon and fix m… (#3561)
* fix(frontend): fix text alignement, email input before icon and fix modal/drawer z-index

* fix(frontend): fix text alignement, email input before icon and fix modal/drawer z-index
2024-04-15 17:19:56 +02:00
Faton Ramadani
44c9fda49a feat(frontend): ImproveApp Editor UI (#3514)
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2024-04-15 16:27:44 +02:00
Ruben Fiszel
a5aca2a2f6 chore(main): release 1.307.0 (#3555)
* chore(main): release 1.307.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-15 16:18:12 +02:00
wendrul
b69ff31000 Add dev environment setup instructions (#3559)
Add instructions to set up the local instance on the README
2024-04-15 16:16:27 +02:00
Ruben Fiszel
8b4dc227d3 fix: tighten delete folder permissions 2024-04-15 15:44:37 +02:00
HugoCasa
7c85cd808d fix: add mysql decimal support (#3557) 2024-04-15 14:26:17 +02:00
Faton Ramadani
863550a91d feat(frontend): Add actions to Database Studio (#3556)
* feat(frontend): Add actions to Database Studio

* feat(frontend): Add actions to Database Studio
2024-04-15 14:07:35 +02:00
Faton Ramadani
0b487426c8 fix(frontend): fix the initial dimension of the markdown component (#3554) 2024-04-15 09:05:51 +02:00
Ruben Fiszel
49030760ed nits 2024-04-15 01:12:24 +02:00
Ruben Fiszel
9010c6a97e chore(main): release 1.306.4 (#3552)
* chore(main): release 1.306.4

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-14 23:24:36 +02:00
Ruben Fiszel
fb00e3b0af fix: improve unsaved confirmation modal on flow draft 2024-04-14 23:17:06 +02:00
Ruben Fiszel
81233ad490 add more exports 2024-04-14 19:51:59 +02:00
Ruben Fiszel
6b1daabd33 chore(main): release 1.306.3 (#3550)
* chore(main): release 1.306.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-12 19:55:06 +02:00
Ruben Fiszel
71635646e8 fix: fix actions buttons error 2024-04-12 19:52:13 +02:00
Ruben Fiszel
8783fe0c7d chore(main): release 1.306.2 (#3549)
* chore(main): release 1.306.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-12 19:39:41 +02:00
Ruben Fiszel
6ea5965819 fix: fix actions buttons error 2024-04-12 19:36:28 +02:00
Ruben Fiszel
09954bdbcc chore(main): release 1.306.1 (#3547)
* chore(main): release 1.306.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-12 16:25:39 +02:00
Faton Ramadani
60d686b2bf Fix aggrid 2 (#3548)
* fix(frontend): Correctly handle undefined actions

* fix(frontend): Correctly handle undefined actions

* fix(frontend): Correctly handle undefined actions

* fix(frontend): add missinng migration code
2024-04-12 16:25:30 +02:00
Faton Ramadani
a687d56d45 fix(frontend): Correctly handle undefined actions (#3546)
* fix(frontend): Correctly handle undefined actions

* fix(frontend): Correctly handle undefined actions

* fix(frontend): Correctly handle undefined actions
2024-04-12 16:20:49 +02:00
Ruben Fiszel
62efbe11e7 chore(main): release 1.306.0 (#3542)
* chore(main): release 1.306.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-12 16:03:18 +02:00
Faton Ramadani
7eca53f9e7 fix(frontend): Correctly handle undefined actions (#3545) 2024-04-12 15:58:12 +02:00
Faton Ramadani
e9e6614486 feat(frontend): add maplock + properly display marker title (#3544) 2024-04-12 13:50:26 +02:00
Faton Ramadani
06723629ca fix(frontend): Fix AgGrid action selection (#3543) 2024-04-12 13:05:24 +02:00
Faton Ramadani
48ad095633 feat(frontend): Ag grid actions (#3535)
* feat(frontend): wip

* feat(frontend): wip

* feat(frontend): implement cellRenderer

* feat(frontend): wip

* feat(frontend): wip

* feat(frontend): Fix actions width

* feat(frontend): Fix interactions

* feat(frontend): Fix styling

* feat(frontend): Correctly handleAgGrid EE

* feat(frontend): Fix select

* feat(frontend): Fix select

* feat(frontend): Fix how row is passed

* feat(frontend): Fix update

* feat(frontend): Correctly implement cache

* feat(frontend): Correctly implement cache

* feat(frontend): simplify how refreshActions work

* feat(frontend): improve comparaison

* feat(frontend): simplify refreshactins

* feat(frontend): clean up

* feat(frontend): clean up

* feat(frontend): add inputs output + fix row eval

* feat(frontend): add config to wrap actions

* feat(frontend): add config to wrap actions

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2024-04-12 11:45:24 +02:00
Faton Ramadani
0afd68d474 fix(frontend): Fix s3 uploader (#3539)
* fix(frontend): Correctly handle multiple files

* fix(frontend): Correctly handle multiple files

* fix(frontend): improve comparaison

* feat(frontend): fix drag and drop
2024-04-12 11:45:11 +02:00
Ruben Fiszel
3a730c73d9 chore(main): release 1.305.3 (#3540)
* chore(main): release 1.305.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-12 09:55:15 +02:00
Ruben Fiszel
ee56821a47 fix: improve app icon renderer and app html renderer 2024-04-12 09:51:54 +02:00
Ruben Fiszel
6b59d9fbc3 nits 2024-04-11 20:40:34 +02:00
Ruben Fiszel
1f6cf58fb4 chore(main): release 1.305.2 (#3537)
* chore(main): release 1.305.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-11 20:08:21 +02:00
Ruben Fiszel
d1650dbed9 fix: unsaved changes on deploy of flow 2024-04-11 20:03:29 +02:00
Ruben Fiszel
0d5ee64ff9 chore(main): release 1.305.1 (#3532)
* chore(main): release 1.305.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-11 18:46:54 +02:00
Ruben Fiszel
6c33f17829 fix: improve goto behavior 2024-04-11 17:58:22 +02:00
Ruben Fiszel
e4dbac314d fix intempestive settings reload on selectedComponent change 2024-04-11 17:52:22 +02:00
Ruben Fiszel
83710e9dd1 nit invert icon logo 2024-04-11 17:27:38 +02:00
Ruben Fiszel
aaa28ce99e change default openapi file 2024-04-11 16:03:54 +02:00
Ruben Fiszel
cd5b023033 fix: load lazily the app icons 2024-04-11 14:57:48 +02:00
Ruben Fiszel
1b0a4f1cd6 nit for whitelabelling 2024-04-11 10:14:36 +02:00
Ruben Fiszel
137f733663 nits 2024-04-11 09:48:34 +02:00
Ruben Fiszel
b1f72e533f nit update peerDeps 2024-04-11 09:37:17 +02:00
Ruben Fiszel
62e4ec2e14 fix: update monaco configurations 2024-04-11 09:29:25 +02:00
Ruben Fiszel
cd07020edb fix: remove requirement on full wasm parser for row insert of db studio 2024-04-11 01:12:47 +02:00
Ruben Fiszel
f17bed9741 fix: remove requirement on full wasm parser for row insert of db studio 2024-04-11 01:12:41 +02:00
Ruben Fiszel
ce91ab81d1 add webpackIgnore annotations 2024-04-10 22:01:30 +02:00
Ruben Fiszel
c31de80a38 update cli deps 2024-04-10 16:31:23 +02:00
Ruben Fiszel
c88e6a8635 fix: fix plug connection for apps with array items 2024-04-10 16:02:45 +02:00
Faton Ramadani
0c9a95c964 fix(frontend): fix text alignement (#3533) 2024-04-10 15:27:39 +02:00
Faton Ramadani
8525494a68 fix(frontend): add missing darkModeObserver in CronInput (#3531) 2024-04-10 14:54:33 +02:00
Ruben Fiszel
be748b3bb2 chore(main): release 1.305.0 (#3530)
* chore(main): release 1.305.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-09 22:55:43 +02:00
Ruben Fiszel
5272956153 fix: add ability to cancel flows directly from operator modal 2024-04-09 22:51:15 +02:00
Ruben Fiszel
a55aad3003 feat: flow concurrency limits support custom concurrency key 2024-04-09 22:03:39 +02:00
Ruben Fiszel
32cd206556 chore(main): release 1.304.4 (#3528)
* chore(main): release 1.304.4

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-09 20:01:52 +02:00
Ruben Fiszel
ea4a45ad83 nits 2024-04-09 19:50:55 +02:00
Ruben Fiszel
a4442d4d3d fix: improve performance of for-loops with parralelism 2024-04-09 19:47:50 +02:00
Ruben Fiszel
29422f156d fix: improve performance of for-loops with parralelism 2024-04-09 19:41:56 +02:00
Ruben Fiszel
8cddef62f2 prevent parallelism from timing out lock monitor 2024-04-09 18:50:19 +02:00
Ruben Fiszel
d4d8a8f756 add default state store to flow status viewer 2024-04-09 18:43:50 +02:00
Ruben Fiszel
7e4b6c3744 fix: improve handling of very large iterator on frontend 2024-04-09 18:26:09 +02:00
Ruben Fiszel
bb847d399b nits 2024-04-09 14:15:12 +02:00
Ruben Fiszel
8bd37bbcbb update sqlx 2024-04-09 12:46:00 +02:00
Ruben Fiszel
0c824de4cd fix: improve deadlocks for parallel branches with parallelism constraints 2024-04-09 11:52:40 +02:00
Ruben Fiszel
1ab1fb7e4d fix: improve order dragndrop for json editor in app 2024-04-09 10:53:04 +02:00
Ruben Fiszel
74631922f2 more error messages 2024-04-09 10:27:14 +02:00
Faton Ramadani
975055b90f fix(frontend): Improve theme editor (#3525)
* fix(frontend): Improve theme editor

* feat(frontend): improve theme editor
2024-04-09 10:21:26 +02:00
Ruben Fiszel
16c9535256 improve default script for frontend apps 2024-04-09 01:53:19 +02:00
Ruben Fiszel
8dd117528c fix: improve deadlocks for parallel branches with parallelism constraints 2024-04-09 01:38:55 +02:00
Ruben Fiszel
f117539a54 fix: allow for longer approver names in flows 2024-04-08 15:44:33 +02:00
Faton Ramadani
db5abd37cd fix(frontend): Fix bypass confirmation shortcut (#3527)
* fix(frontend): Fix bypass confirmation shortcut

* Update Item.svelte

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2024-04-08 14:43:31 +02:00
Ruben Fiszel
587824ccfa chore(main): release 1.304.3 (#3522)
* chore(main): release 1.304.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-08 12:42:28 +02:00
Ruben Fiszel
c7f0f3f359 fix: improve CLI with visible_to_runner_only and priority 2024-04-08 12:22:48 +02:00
Ruben Fiszel
fc0056f991 fix: add resource types to list of ignored path filters for git sync 2024-04-08 11:50:10 +02:00
Ruben Fiszel
acf80dc6a0 fix: add resource types to list of ignored path filters for git sync 2024-04-08 10:05:55 +02:00
Ruben Fiszel
abfdb84cdd add scalar at openapi2.html 2024-04-08 01:42:54 +02:00
Ruben Fiszel
fecb92e45e add scalar at openapi2.html 2024-04-08 01:42:43 +02:00
Ruben Fiszel
7e8807d27e add page and perPage to list apis 2024-04-07 18:47:06 +02:00
Ruben Fiszel
a57bec8648 chore(main): release 1.304.2 (#3521)
* chore(main): release 1.304.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-06 23:34:04 +02:00
Faton Ramadani
a52d6b30b2 fix(frontend): Fix selectFirstRowByDefault on AgGrids (#3450) 2024-04-06 23:25:46 +02:00
Ruben Fiszel
a4385231f8 add whileloop flow to id orders 2024-04-06 22:58:20 +02:00
Ruben Fiszel
3b2a39f0c2 chore(main): release 1.304.1 (#3519)
* chore(main): release 1.304.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-06 22:26:32 +02:00
Ruben Fiszel
8cdae1ac96 fix: remove reqwest_11 2024-04-06 22:13:35 +02:00
Ruben Fiszel
673fce45fb chore(main): release 1.304.0 (#3516)
* chore(main): release 1.304.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-06 21:40:32 +02:00
Henri Courdent
2c9af9903d Fixed links and components descriptions (#3515)
* Fixed links and components descriptions

* Forgot on doc
2024-04-06 21:39:56 +02:00
Ruben Fiszel
67c21f3837 reduce large file detected alert 2024-04-06 21:38:58 +02:00
Ruben Fiszel
192e47222f reduce large file detected alert 2024-04-06 21:37:56 +02:00
Faton Ramadani
139bc38ddc fix(frontend): Fix simple flow tutorial (#3518) 2024-04-06 18:55:28 +02:00
Ruben Fiszel
8ee4fda1d6 fix build 2024-04-06 16:15:00 +02:00
Ruben Fiszel
e062f5413f frontend fix 2024-04-06 16:13:44 +02:00
Ruben Fiszel
21a7ee4c33 feat: add overridable cache_ttl in api of job triggers 2024-04-06 16:05:32 +02:00
Ruben Fiszel
f9d8dde61c fix: add args filter to schedule list 2024-04-06 15:43:37 +02:00
Ruben Fiszel
d61d6f520b fix: improve list static input 2024-04-06 15:00:49 +02:00
Ruben Fiszel
458dea2930 improve flow preview logs 2024-04-06 13:52:49 +02:00
Ruben Fiszel
48e7dfc88a update sqlx 2024-04-06 13:37:14 +02:00
Ruben Fiszel
9131d5cc40 fix: parallel flow with parallelism constraint could deadlock 2024-04-06 13:25:34 +02:00
HugoCasa
08231c02d2 feat: git sync group changes by folder (#3517)
* feat: git sync group changes by folder

* chore: update ee ref
2024-04-05 23:07:27 +02:00
Ruben Fiszel
fba1ea7d54 fix: make autodatatable more resilient 2024-04-05 20:55:11 +02:00
Ruben Fiszel
632c9fb2aa fix: make autodatatable more resilient 2024-04-05 20:40:18 +02:00
Ruben Fiszel
205d02c703 improve renderer for large html 2024-04-05 20:23:18 +02:00
Ruben Fiszel
31754569ba fix: remove information in approval page of a flow 2024-04-05 20:06:27 +02:00
Ruben Fiszel
06c6d1023e improve validate signature 2024-04-05 17:54:27 +02:00
Ruben Fiszel
2ec1add494 fix: make date time input more resilient 2024-04-05 17:10:03 +02:00
Ruben Fiszel
78b8c3edc9 fix: fix lightweight arg input min size 2024-04-05 16:51:13 +02:00
Ruben Fiszel
7c4eece009 fix: show flow user states in flow state preview 2024-04-05 16:43:38 +02:00
Ruben Fiszel
7ed7cdf5a9 chore(main): release 1.303.4 (#3513)
* chore(main): release 1.303.4

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-05 09:57:37 +02:00
Ruben Fiszel
72f4247983 fix: prevent operators from loading secrets through toggle 2024-04-05 09:53:42 +02:00
Ruben Fiszel
9b88bf0758 prevent operators from loading secrets through toggle 2024-04-05 09:03:16 +02:00
Ruben Fiszel
5cee360bf7 chore(main): release 1.303.3 (#3512)
* chore(main): release 1.303.3

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-05 00:17:29 +02:00
Ruben Fiszel
18e7e9449e fix: improve multiselect for approval steps 2024-04-05 00:04:51 +02:00
Ruben Fiszel
d0a0dd0f7e nit global cache python improvements 2024-04-04 22:07:14 +02:00
Ruben Fiszel
428675d956 chore(main): release 1.303.2 (#3511)
* chore(main): release 1.303.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-04 21:45:02 +02:00
Ruben Fiszel
0b3e6b9f1c fix: improve global cache deps 2024-04-04 21:33:44 +02:00
Ruben Fiszel
a62d5e197e chore(main): release 1.303.1 (#3509)
* chore(main): release 1.303.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-04 17:27:18 +02:00
Henri Courdent
3e00f8070b Changelog frontend (#3510) 2024-04-04 17:26:41 +02:00
Ruben Fiszel
964a05177b add py312 image 2024-04-04 17:14:32 +02:00
Ruben Fiszel
96bc7c5c5c nit fix metadatagen 2024-04-04 15:09:21 +02:00
Ruben Fiszel
948bbcb92a update /static_frontend builder dir 2024-04-04 14:55:09 +02:00
Ruben Fiszel
2e3b6f66e3 fix: improve chars splitting for logs with utf-8 chars 2024-04-04 13:38:19 +02:00
Ruben Fiszel
48227f9594 verify ee for every image 2024-04-04 04:55:21 +02:00
Ruben Fiszel
89f757c592 chore(main): release 1.303.0 (#3507)
* chore(main): release 1.303.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-04 04:20:33 +02:00
HugoCasa
1d7bab075b feat: private hub (#3491)
* feat: private hub v0

* feat: add UI setting

* Update ee.rs

* Update ee.rs

* fix: remove ee symlink

* fix: add back CE ee.rs

* feat: disable s3 embedding loading when private hub

* feat: reload embeddings on hub url change

* fix: only reload embeddings db on server mode

* patch: set default hub url const

* fix: nit
2024-04-04 04:16:53 +02:00
Henri Courdent
92e8b07c17 While loop clarification (#3501) 2024-04-04 04:16:42 +02:00
Ruben Fiszel
74e0f21903 fix: update awscli & nodejs 2024-04-04 04:16:18 +02:00
Ruben Fiszel
04bda407d4 update awscli & nodejs 2024-04-04 03:58:23 +02:00
Ruben Fiszel
054cb709dc update awscli & nodejs 2024-04-04 03:55:29 +02:00
Ruben Fiszel
b65095f189 chore(main): release 1.302.0 (#3502)
* chore(main): release 1.302.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-04 03:42:30 +02:00
Ruben Fiszel
826757b33a fix: fix char excess size module for logs truncation 2024-04-04 03:25:11 +02:00
Ruben Fiszel
72f1d82b98 chore try docker scout 2024-04-04 03:01:56 +02:00
Ruben Fiszel
7d04940db0 chore try docker scout 2024-04-04 02:45:13 +02:00
Ruben Fiszel
faf8f5cbae chore verify image vulns 2024-04-04 02:30:05 +02:00
Ruben Fiszel
7561e77e34 chore verify image vulns 2024-04-04 02:16:53 +02:00
Ruben Fiszel
30ed34e2fc chore verify image vulns 2024-04-04 02:16:44 +02:00
Ruben Fiszel
60eab8e961 chore verify image vulns 2024-04-04 02:10:05 +02:00
Ruben Fiszel
373ea55512 chore verify image vulns 2024-04-04 02:08:11 +02:00
Ruben Fiszel
00dacb5b47 chore verify image vulns 2024-04-04 01:59:55 +02:00
Ruben Fiszel
4abafc668b chore verify image vulns 2024-04-04 01:55:20 +02:00
Ruben Fiszel
ea23548871 chore verify image vulns 2024-04-04 01:52:01 +02:00
Ruben Fiszel
66f0dff64a chore verify image vulns 2024-04-04 01:48:31 +02:00
Ruben Fiszel
00d7c4943e nit go caching in dockerfile 2024-04-04 01:15:10 +02:00
Ruben Fiszel
281cd7bc8b fix: improve locking 2024-04-04 01:10:38 +02:00
Ruben Fiszel
7e5493da5e snyk to sarif 2024-04-04 00:38:29 +02:00
Ruben Fiszel
4eca8d77ac snyk to sarif 2024-04-04 00:28:49 +02:00
Ruben Fiszel
088730fe5f snyk to sarif 2024-04-04 00:19:23 +02:00
Ruben Fiszel
653cc0f583 chore: split out nsjail from public images 2024-04-03 23:53:38 +02:00
Ruben Fiszel
182ec451f3 chore: split out nsjail from public images 2024-04-03 23:41:30 +02:00
Ruben Fiszel
ac6f8f31da chore: split out nsjail from public images 2024-04-03 23:32:06 +02:00
Ruben Fiszel
b31a2022ad move more deps to nsjail phase 2024-04-03 23:20:03 +02:00
Ruben Fiszel
0113dacf01 split out nsjail from public images 2024-04-03 23:16:25 +02:00
Ruben Fiszel
13424fd682 Revert "remove libprotobuf (#3505)" (#3506)
This reverts commit 6e1fb6e7f3.
2024-04-03 22:31:09 +02:00
Ruben Fiszel
6e1fb6e7f3 remove libprotobuf (#3505)
* remove pb

* remove pb

* dockerfile restart image

* dockerfile restart image
2024-04-03 21:24:26 +02:00
Ruben Fiszel
651e65d4cf dockerfile restart image 2024-04-03 19:25:07 +02:00
Ruben Fiszel
a55d6b0e25 update kubectl to 1.28.7 2024-04-03 19:22:55 +02:00
Ruben Fiszel
314dfcebec add snyk 2024-04-03 19:13:12 +02:00
HugoCasa
285aec4ffd fix: build (#3504) 2024-04-03 18:47:10 +02:00
HugoCasa
a8bf0750a4 feat: slack team connected to multiple workspaces (#3500)
* feat: slack team connected to multiple workspaces

* chore: update ee ref
2024-04-03 17:47:23 +02:00
Ruben Fiszel
9629d1e5a6 chore: try snyk 2024-04-03 17:39:44 +02:00
Ruben Fiszel
ea91c33d67 chore: add docker scout 2024-04-03 17:02:41 +02:00
Ruben Fiszel
c8ed76166c chore: add docker scout 2024-04-03 16:45:29 +02:00
Ruben Fiszel
cbb861fd78 chore: add docker scout 2024-04-03 16:40:19 +02:00
Ruben Fiszel
7120ef7564 add more debug logs around s3 log streaming 2024-04-03 14:26:07 +02:00
Ruben Fiszel
501c4d8ac4 allow_http by default for s3 2024-04-03 13:58:52 +02:00
Ruben Fiszel
72c61953f5 ux nits 2024-04-03 12:31:11 +02:00
Ruben Fiszel
0c0182edf3 chore(main): release 1.301.0 (#3499)
* chore(main): release 1.301.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-02 21:36:12 +02:00
HugoCasa
71d98b9025 fix: date-fns tooltip info again (#3498) 2024-04-02 21:32:51 +02:00
Ruben Fiszel
648accd268 fix: add access to the schedules page to operators 2024-04-02 21:27:40 +02:00
Ruben Fiszel
f4f56b8455 improve upload progress bar 2024-04-02 21:16:30 +02:00
Ruben Fiszel
5594afd0a2 add checksum log to s3 piptar pull 2024-04-02 20:55:31 +02:00
Ruben Fiszel
ff26c8e42d feat: while loop as new flow primitive 2024-04-02 17:38:11 +02:00
Ruben Fiszel
921f6a85ce chore(main): release 1.300.0 (#3494)
* chore(main): release 1.300.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-02 11:35:30 +02:00
Faton Ramadani
e4d8de80ef fix(frontend): Fix updateCellValue (#3497)
* fix(frontend): Fix updateCellValue

* fix(frontend): Fix updateCellValue
2024-04-02 11:23:07 +02:00
HugoCasa
e4bca00210 fix: date-fns tooltip format info (#3496)
* fix: date-fns tooltip

* fix: date-fns docs version
2024-04-02 10:41:09 +02:00
Ruben Fiszel
cc5d1b405e continue on error option for steps 2024-04-02 10:32:47 +02:00
Faton Ramadani
3afa975270 feat(frontend): Add an onRecompute callback to handle recompute side … (#3493)
* feat(frontend): Add an onRecompute callback to handle recompute side effects

* feat(frontend): use cb array

* feat(frontend): use cb array

* feat(frontend): clean up

* feat(frontend): clean up

* feat(frontend): code improvement
2024-04-02 09:44:53 +02:00
Ruben Fiszel
25379d0b62 update bun to 1.1.0 2024-04-01 21:02:03 +02:00
Ruben Fiszel
ba679c64b7 fix(typescript-client): improve setFlowUserState undefined value 2024-04-01 11:59:10 +02:00
Ruben Fiszel
fd0c87bd2e chore(main): release 1.299.1 (#3492)
* chore(main): release 1.299.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-03-31 14:56:50 +02:00
Ruben Fiszel
4ba1f6ccdf fix: fix audit issue with webhook triggered scripts 2024-03-31 14:52:06 +02:00
Ruben Fiszel
925aa13de6 chore(main): release 1.299.0 (#3478)
* chore(main): release 1.299.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-03-30 16:12:25 +01:00
Ruben Fiszel
a61b14cfd4 fix: tree view show more 2024-03-30 15:53:54 +01:00
Ruben Fiszel
951758ffb6 fix: make submit form order static 2024-03-30 15:00:52 +01:00
Ruben Fiszel
d8a9ee4945 increase max concurrent run demo workspace 2024-03-30 13:47:03 +01:00
Ruben Fiszel
bdf7b14c69 increase max concurrent run demo workspace 2024-03-30 13:45:41 +01:00
Ruben Fiszel
c0aaa920b9 improve runnable picker of app 2024-03-29 18:30:44 +01:00
Ruben Fiszel
f4daef389c display result nits 2024-03-29 17:08:13 +01:00
Ruben Fiszel
5b489d06e0 update bun to 1.36 and deno 1.43 2024-03-29 14:20:08 +01:00
Ruben Fiszel
44d812f95b exclude demo from per workspace restrictions 2024-03-29 13:38:36 +01:00
Ruben Fiszel
09844d630a fix recognize email in error handler 2024-03-29 12:50:12 +01:00
Faton Ramadani
d71356695f feat(frontend): add a refresh component control to the DB Studio (#3490)
* feat(frontend): add a refresh component control to the DB Studio

* feat(frontend): add a refresh component control to the DB Studio

* feat(frontend): clean up

* feat(frontend): improve recompute to handle sub runnable

* feat(frontend): clean up
2024-03-29 12:40:58 +01:00
HugoCasa
b4ffb500ba feat: add workspace free-tier usage (#3489)
* feat: separate workspace and user usage

* fix: sqlx build
2024-03-29 10:56:44 +01:00
Ruben Fiszel
0291f624e1 fix View Logs 2024-03-28 17:49:29 +01:00
HugoCasa
e3a636ab17 fix: show start to finish time for flows instead of cumulative (#3486)
* fix: show start to finish time for flows instead of cumulative

* fix: build
2024-03-28 15:50:18 +01:00
HugoCasa
3c384910c1 fix: show script path when schedule summary is empty (#3487) 2024-03-28 15:50:05 +01:00
Ruben Fiszel
d8f10b6b10 fix message when updating user 2024-03-28 12:24:49 +01:00
Ruben Fiszel
d6bf702984 nit markdown for scripts 2024-03-28 11:57:57 +01:00
Faton Ramadani
f9a5bcee4c feat(frontend): Add support for clearFiles in the file input component (#3483) 2024-03-28 11:44:10 +01:00
Faton Ramadani
7b3b96ea08 fix(frontend): Fix the pane delete button (#3482) 2024-03-28 11:43:45 +01:00
Ruben Fiszel
6f61d00e14 more ubicloud 2024-03-28 01:22:36 +01:00
HugoCasa
b3ed6782f6 fix: benchmark action single push (#3480)
* fix: benchmarks action only push once

* fix: benchmark artifacts

* fix: include past data

* fix: don't save dedicated warmup

* fix: fetch existing data directly from gh
2024-03-28 01:18:42 +01:00
HugoCasa
64896971bb fix: db studio multiple schemas support (#3479)
* fix: db studio multiple schemas support

* fix: frontend check (unused urlize flow)
2024-03-27 23:56:05 +01:00
Ruben Fiszel
8f9787fdc4 support gh markdown for script, flows, resource description 2024-03-27 23:04:19 +01:00
Ruben Fiszel
6cb2d20b42 feat: support gh markdown for script, flows, resource descriptions 2024-03-27 19:07:19 +01:00
Ruben Fiszel
dead13ba93 improve autosize + add markdown support for scripts and workflows 2024-03-27 18:19:37 +01:00
Ruben Fiszel
8e1bd8f957 chore(main): release 1.298.0 (#3475)
* chore(main): release 1.298.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-03-27 17:25:32 +01:00
Ruben Fiszel
1edf493e6d fix: fix clean cache deleting config 2024-03-27 17:15:29 +01:00
Ruben Fiszel
532cef999d update python to 3.11.8 2024-03-27 16:32:45 +01:00
HugoCasa
a83f286729 chore(benchmarks): merge workers graphs (#3477) 2024-03-27 14:54:34 +01:00
Ruben Fiszel
2dd68b7616 nits map 2024-03-27 14:53:47 +01:00
Henri Courdent
e2c681457f Template frontend script (#3476) 2024-03-27 14:25:52 +01:00
Ruben Fiszel
810136a4a4 feat: approval steps description 2024-03-27 14:04:14 +01:00
Ruben Fiszel
240ae93748 feat: add map support in renderer 2024-03-27 10:14:44 +01:00
Ruben Fiszel
57a0530434 fix: display approval step at top level regardless of depth 2024-03-27 09:46:09 +01:00
Ruben Fiszel
c265593099 fix powershell with nsjail 2024-03-26 23:11:26 +01:00
Henri Courdent
90726a5b53 Windmill AI handle multiple lines (#3469)
* Windmill AI handle multiple lines

* Fix npm_check

* Fix height

* Get rid of custom css

* fix: handle edge cases

* fix: edge edge case

* fix: adjust size on popup open

* fix: cancel request on leave

---------

Co-authored-by: HugoCasa <hugo@casademont.ch>
2024-03-26 23:04:42 +01:00
Ruben Fiszel
7c679dd7db chore(main): release 1.297.1 (#3474)
* chore(main): release 1.297.1

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-03-26 22:26:31 +01:00
Ruben Fiszel
3388ab41dd fix: fix approval steps handling of default args 2024-03-26 22:16:19 +01:00
Ruben Fiszel
641b706fb1 chore(main): release 1.297.0 (#3473)
* chore(main): release 1.297.0

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-03-26 19:15:03 +01:00
Ruben Fiszel
5d6238de11 fix python client set_user_state 2024-03-26 19:09:56 +01:00
HugoCasa
14a86bf59c feat: add visible to runner only default value (#3472) 2024-03-26 19:07:21 +01:00
407 changed files with 29280 additions and 17092 deletions

View File

@@ -16,6 +16,7 @@ sed -i '' -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/frontend/
sed -i '' -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml
sed -i '' -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml
sed -i '' -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml
sed -i '' -e "/^ModuleVersion =/s/= .*/= '$VERSION'/" ${root_dirpath}/powershell-client/WindmillClient/WindmillClient.psd1
# sed -i '' -e "/^wmill =/s/= .*/= \"\\^$VERSION\"/" python-client/wmill_pg/pyproject.toml
sed -i '' -e "/^wmill =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile
sed -i '' -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile

View File

@@ -16,6 +16,7 @@ sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/frontend/pac
sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml
sed -i -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml
sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml
sed -i -e "/^ModuleVersion =/s/= .*/= '$VERSION'/" ${root_dirpath}/powershell-client/WindmillClient/WindmillClient.psd1
# sed -i -e "/^wmill =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml
sed -i -e "/^wmill =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile
sed -i -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile

View File

@@ -34,27 +34,20 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v4
with:
ref: benchmarks
- name: benchmark
timeout-minutes: 20
run: deno run --unstable -A -r
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/benchmark_suite.ts
-c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json
- name: Push changes
run: |
pwd
git pull origin benchmarks
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Update benchmarks"
git push
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark_single
path: |
*.json
benchmark_dedicated:
needs: benchmark_single
runs-on: ubicloud-standard-8
services:
postgres:
@@ -82,24 +75,18 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v4
with:
ref: benchmarks
- name: benchmark
timeout-minutes: 20
run: deno run --unstable -A -r
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/benchmark_suite.ts
--no-warm-up -c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_dedicated.json
- name: Push changes
run: |
pwd
git pull origin benchmarks
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Update benchmarks"
git push
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark_dedicated
path: |
*.json
benchmark_4workers:
runs-on: ubicloud-standard-8
@@ -162,9 +149,6 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v4
with:
ref: benchmarks
- name: benchmark
timeout-minutes: 20
run: deno run --unstable -A -r
@@ -172,15 +156,12 @@ jobs:
-c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json
--workers 4
- name: Push changes
run: |
pwd
git pull origin benchmarks
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Update benchmarks"
git push
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark_4workers
path: |
*.json
benchmark_8workers:
runs-on: ubicloud-standard-8
@@ -286,9 +267,6 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v4
with:
ref: benchmarks
- name: benchmark
timeout-minutes: 20
run: deno run --unstable -A -r
@@ -296,10 +274,40 @@ jobs:
-c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/suite_config.json
--workers 8
- name: Save benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark_8workers
path: |
*.json
benchmark_graphs:
runs-on: ubicloud
needs:
- benchmark_single
- benchmark_dedicated
- benchmark_4workers
- benchmark_8workers
steps:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v4
with:
ref: benchmarks
- name: Download benchmark results
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: graphs
run: deno run --unstable -A -r
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/benchmark_graphs.ts
-c
https://raw.githubusercontent.com/windmill-labs/windmill/${GITHUB_REF##ref/head/}/benchmarks/graphs_config.json
- name: Push changes
run: |
ls -la
pwd
git pull origin benchmarks
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"

View File

@@ -7,15 +7,14 @@ name: Publish websocket multiplayer server
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
packages: write
jobs:
publish_multiplayer:
runs-on: ubuntu-latest
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v3
with:
@@ -56,7 +55,7 @@ jobs:
publish_privately:
needs: [publish_multiplayer]
runs-on: ubuntu-latest
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v3
with:
@@ -71,9 +70,8 @@ jobs:
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Push image to ECR
run: |
docker buildx imagetools create \
--tag ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

View File

@@ -8,15 +8,16 @@ on:
push:
branches: [main]
tags: ["*"]
pull_request:
types: [opened, synchronize, reopened]
paths:
- "Dockerfile"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
id-token: write
packages: write
permissions: write-all
jobs:
build:
@@ -136,7 +137,6 @@ jobs:
push: true
build-args: |
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect
nsjail=true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev
${{ steps.meta-ee-public.outputs.tags }}
@@ -144,52 +144,68 @@ jobs:
${{ steps.meta-ee-public.outputs.labels }}
org.opencontainers.image.licenses=Windmill-Enterprise-License
build_ee_reports_privately:
needs: [build_ee]
build_ee_312:
runs-on: ubicloud
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Read EE repo commit hash
run: |
echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV"
- uses: actions/checkout@v3
with:
repository: windmill-labs/windmill-ee-private
path: ./windmill-ee-private
ref: ${{ env.ee_repo_ref }}
token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }}
fetch-depth: 0
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- uses: depot/setup-action@v1
- name: Docker meta
id: meta-ee-public
id: meta-ee-public-py312
uses: docker/metadata-action@v4
with:
images: |
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee-reports
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee-py312
flavor: |
latest=false
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
- name: Login to ECR
if: github.event_name != 'pull_request'
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.ECR_REGISTRY }}
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push publicly ee reports
- name: Substitute EE code
run: |
./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private
- name: Build and push publicly ee
uses: depot/build-push-action@v1
with:
context: .
platforms: linux/amd64
push: true
file: "./docker/DockerfileReports"
build-args: |
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect
PYTHON_IMAGE=python:3.12.2-slim-bookworm
tags: |
${{ steps.meta-ee-public.outputs.tags }}
${{ steps.meta-ee-public-py312.outputs.tags }}
labels: |
${{ steps.meta-ee-public.outputs.labels }}
${{ steps.meta-ee-public-py312.outputs.labels }}
org.opencontainers.image.licenses=Windmill-Enterprise-License
# disabled until we make it 100% reliable and add more meaningful tests
# playwright:
# runs-on: [self-hosted, new]
@@ -311,54 +327,6 @@ jobs:
# ${{ steps.extract.outputs.destination }}/*
# ${{ steps.extract-ee.outputs.destination }}/*
publish_ecr_s3:
needs: [build_ee]
runs-on: ubicloud
if: github.event_name != 'pull_request'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to ECR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.ECR_REGISTRY }}
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Push image to ECR
if: github.event_name != 'pull_request'
id: push_ecr
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
docker buildx imagetools create \
--tag ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${git_hash:0:7} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev
echo "GIT_HASH=${git_hash:0:7}" >> "$GITHUB_OUTPUT"
- uses: shrink/actions-docker-extract@v3
if: github.event_name != 'pull_request'
id: extract
with:
image: |-
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ steps.push_ecr.outputs.GIT_HASH }}
path: "/static_frontend/."
- uses: reggionick/s3-deploy@v3
if: github.event_name != 'pull_request'
with:
folder: ${{ steps.extract.outputs.destination }}
bucket: windmill-frontend
bucket-region: us-east-1
run_integration_test:
runs-on: ubicloud
needs: [build_ee]
@@ -419,6 +387,190 @@ jobs:
docker buildx imagetools create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest
docker buildx imagetools create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:dev --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:main
verify_ee_image_vulnerabilities:
runs-on: ubicloud
needs: [tag_latest_ee]
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Analyze for critical and high CVEs
id: docker-scout-cves
if: ${{ github.event_name != 'pull_request_target' }}
uses: docker/scout-action@v1
with:
command: cves
only-severities: critical,high
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:main
sarif-file: sarif.output.json
summary: true
dockerhub-user: windmilllabs
dockerhub-password: ${{ secrets.DOCKER_PAT }}
- name: Upload SARIF result
id: upload-sarif
if: ${{ github.event_name != 'pull_request_target' }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: sarif.output.json
# docker_scout_ee:
# runs-on: ubicloud
# needs: [tag_latest_ee]
# steps:
# - name: Docker Scout
# id: docker-scout
# uses: docker/scout-action@v1
# with:
# dockerhub-
# command: cves,recommendations,compare
# to-latest: true
# ignore-base: true
# ignore-unchanged: true
# only-fixed: true
build_ee_nsjail:
needs: [build_ee]
runs-on: ubicloud
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- uses: depot/setup-action@v1
- name: Docker meta
id: meta-ee-public
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee-nsjail
flavor: |
latest=false
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push publicly ee
uses: depot/build-push-action@v1
with:
context: .
platforms: linux/amd64
push: true
file: "./docker/DockerfileNsjail"
tags: |
${{ steps.meta-ee-public.outputs.tags }}
labels: |
${{ steps.meta-ee-public.outputs.labels }}
org.opencontainers.image.licenses=Windmill-Enterprise-License
build_ee_reports_privately:
needs: [build_ee_nsjail]
runs-on: ubicloud
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- uses: depot/setup-action@v1
- name: Docker meta
id: meta-ee-public
uses: docker/metadata-action@v4
with:
images: |
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee-reports
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
- name: Login to ECR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.ECR_REGISTRY }}
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push publicly ee reports
uses: depot/build-push-action@v1
with:
context: .
platforms: linux/amd64
push: true
file: "./docker/DockerfileReports"
tags: |
${{ steps.meta-ee-public.outputs.tags }}
labels: |
${{ steps.meta-ee-public.outputs.labels }}
org.opencontainers.image.licenses=Windmill-Enterprise-License
publish_ecr_s3:
needs: [build_ee_nsjail]
runs-on: ubicloud
if: github.event_name != 'pull_request'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to ECR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.ECR_REGISTRY }}
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Push image to ECR
if: github.event_name != 'pull_request'
id: push_ecr
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
docker buildx imagetools create \
--tag ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${git_hash:0:7} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee-nsjail:main
echo "GIT_HASH=${git_hash:0:7}" >> "$GITHUB_OUTPUT"
- uses: shrink/actions-docker-extract@v3
if: github.event_name != 'pull_request'
id: extract
with:
image: |-
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ steps.push_ecr.outputs.GIT_HASH }}
path: "/static_frontend/."
- uses: reggionick/s3-deploy@v3
if: github.event_name != 'pull_request'
with:
folder: ${{ steps.extract.outputs.destination }}
bucket: windmill-frontend
bucket-region: us-east-1
build_ee_cuda:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: [build_ee]

View File

@@ -0,0 +1,16 @@
name: Publish powershell-client
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish_gallery:
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v4
- run: . ./powershell-client/publish.ps1
shell: pwsh
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

View File

@@ -6,7 +6,7 @@ name: release-please
jobs:
release-please:
name: "Release please"
runs-on: ubicloud-standard-8
runs-on: ubicloud
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
with:

View File

@@ -7,10 +7,13 @@ on:
jobs:
CLAssistant:
runs-on: ubuntu-latest
runs-on: ubicloud
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
if:
(github.event.comment.body == 'recheck' || github.event.comment.body
== 'I have read the CLA Document and I hereby sign the CLA') ||
github.event_name == 'pull_request_target'
# Beta Release
uses: cla-assistant/github-action@v2.3.1
env:

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +1,6 @@
ARG DEBIAN_IMAGE=debian:bookworm-slim
ARG RUST_IMAGE=rust:1.76-slim-bookworm
ARG PYTHON_IMAGE=python:3.11.4-slim-bookworm
FROM ${DEBIAN_IMAGE} as nsjail
WORKDIR /nsjail
ARG nsjail=""
RUN if [ "$nsjail" = "true" ]; then apt-get -y update \
&& apt-get install -y \
bison=2:3.8.* \
flex=2.6.* \
g++=4:12.2.* \
gcc=4:12.2.* \
git=1:2.39.* \
libprotobuf-dev=3.21.* \
libnl-route-3-dev=3.7.* \
make=4.3-4.1 \
pkg-config=1.8.* \
protobuf-compiler=3.21.*; fi
RUN if [ "$nsjail" = "true" ]; then git clone -b master --single-branch https://github.com/google/nsjail.git . \
&& git checkout dccf911fd2659e7b08ce9507c25b2b38ec2c5800; fi
RUN if [ "$nsjail" = "true" ]; then make; else touch nsjail; fi
ARG PYTHON_IMAGE=python:3.11.8-slim-bookworm
FROM ${RUST_IMAGE} AS rust_base
@@ -100,8 +76,8 @@ SHELL ["/bin/bash", "-c"]
RUN apt update -y
RUN apt install -y unzip curl
RUN [ "$TARGETPLATFORM" == "linux/amd64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.41.0/deno-x86_64-unknown-linux-gnu.zip -o deno.zip || true
RUN [ "$TARGETPLATFORM" == "linux/arm64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.41.0/deno-aarch64-unknown-linux-gnu.zip -o deno.zip || true
RUN [ "$TARGETPLATFORM" == "linux/amd64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.42.0/deno-x86_64-unknown-linux-gnu.zip -o deno.zip || true
RUN [ "$TARGETPLATFORM" == "linux/arm64" ] && curl -Lsf https://github.com/denoland/deno/releases/download/v1.42.0/deno-aarch64-unknown-linux-gnu.zip -o deno.zip || true
RUN unzip deno.zip && rm deno.zip
@@ -111,8 +87,8 @@ FROM ${PYTHON_IMAGE}
ARG TARGETPLATFORM
ARG POWERSHELL_VERSION=7.3.5
ARG POWERSHELL_DEB_VERSION=7.3.5-1
ARG KUBECTL_VERSION=1.27.2
ARG HELM_VERSION=3.12.0
ARG KUBECTL_VERSION=1.28.7
ARG HELM_VERSION=3.14.3
ARG APP=/usr/src/app
ARG WITH_POWERSHELL=true
ARG WITH_KUBECTL=true
@@ -120,9 +96,10 @@ ARG WITH_HELM=true
RUN apt-get update \
&& apt-get install -y ca-certificates wget curl git jq libprotobuf-dev libnl-route-3-dev unzip build-essential unixodbc xmlsec1 \
&& apt-get install -y ca-certificates wget curl git jq unzip build-essential unixodbc xmlsec1 software-properties-common \
&& rm -rf /var/lib/apt/lists/*
RUN if [ "$WITH_POWERSHELL" = "true" ]; then \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then apt-get update -y && apt install libicu-dev -y && wget -O 'pwsh.deb' "https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell_${POWERSHELL_DEB_VERSION}.deb_amd64.deb" && \
dpkg --install 'pwsh.deb' && \
@@ -150,22 +127,6 @@ RUN if [ "$WITH_KUBECTL" = "true" ]; then \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl; \
else echo 'Building the image without kubectl'; fi
RUN set -eux; \
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
case "$arch" in \
'amd64') \
zip='awscli-exe-linux-x86_64.zip'; \
;; \
'arm64') \
zip='awscli-exe-linux-aarch64.zip'; \
;; \
*) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \
esac; \
apt-get update && apt install unzip && curl "https://awscli.amazonaws.com/$zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && rm awscliv2.zip
RUN set -eux; \
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
@@ -186,14 +147,11 @@ RUN set -eux; \
ENV PATH="${PATH}:/usr/local/go/bin"
ENV GO_PATH=/usr/local/go/bin/go
ARG nsjail=""
RUN if [ "$nsjail" = "true" ]; then apt-get -y update \
&& apt-get install -y \
curl nodejs npm; fi
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get -y update && apt-get install -y curl nodejs awscli
# go build is slower the first time it is ran, so we prewarm it in the build
RUN mkdir -p /tmp/gobuildwarm && cd /tmp/gobuildwarm && go mod init gobuildwarm && printf "package foo\nimport (\"fmt\"\nwmill \"github.com/windmill-labs/windmill-go-client\")\nfunc main() { v := wmill.GetStatePath()\n fmt.Println(v) }" > warm.go && go mod tidy && go build -x && rm -rf /tmp/gobuildwarm
RUN mkdir -p /tmp/gobuildwarm && cd /tmp/gobuildwarm && go mod init gobuildwarm && printf "package foo\nimport (\"fmt\")\nfunc main() { fmt.Println(42) }" > warm.go && go mod tidy && go build -x && rm -rf /tmp/gobuildwarm
ENV TZ=Etc/UTC
@@ -205,9 +163,7 @@ COPY --from=builder /windmill/target/release/windmill ${APP}/windmill
COPY --from=downloader --chmod=755 /deno /usr/bin/deno
COPY --from=nsjail /nsjail/nsjail /bin/nsjail
COPY --from=oven/bun:1.0.29 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.1.0 /usr/local/bin/bun /usr/bin/bun
# add the docker client to call docker from a worker if enabled
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/

View File

@@ -13,7 +13,7 @@ any snippets of code that require a positive license check to be activated.
Those snippets and files are under a proprietary and commercial license. Private
and public forks MUST not include any of the above proprietary and commercial
code. Windmill Labs, Inc. provide tools to clean the codebase from those
snippets upon demand. The files under python-client/ deno-client/ go-client/ are
snippets upon demand. The files under python-client/ deno-client/ go-client/ powershell-client/ are
Apache 2.0 Licensed.
The openapi files, including the OpenFlow spec is Apache 2.0 Licensed.

View File

@@ -353,6 +353,43 @@ you to have it being synced automatically everyday.
| QUEUE_LIMIT_WAIT_RESULT | None | The number of max jobs in the queue before rejecting immediately the request in 'run_wait_result' endpoint. Takes precedence on the query arg. If none is specified, there are no limit. | Worker |
| DENO_AUTH_TOKENS | None | Custom DENO_AUTH_TOKENS to pass to worker to allow the use of private modules | Worker |
## Run a local dev setup
### only Frontend
This will use the backend of <https://app.windmill.dev> but your own frontend
with hot-code reloading.
1. Install [caddy](https://caddyserver.com)
2. Go to `frontend/`:
1. `npm install`, `npm run generate-backend-client` then `npm run dev`
2. In another shell `sudo caddy run --config CaddyfileRemote`
3. Et voilà, windmill should be available at `http://localhost/`
### Backend + Frontend
See the [./frontend/README_DEV.md](./frontend/README_DEV.md) file for all
running options.
1. Create a Postgres Database for Windmill and create an admin role inside your
Postgres setup.
The easiest way to get a working db is to run
```
cargo install sqlx-cli
env DATABASE_URL=<YOUR_DATABASE_URL> sqlx migrate run
```
This will also avoid compile time issue with sqlx's `query!` macro
2. Install [nsjail](https://github.com/google/nsjail) and have it accessible in
your PATH
3. Install deno and python3, have the bins at `/usr/bin/deno` and
`/usr/local/bin/python3`
4. Install [caddy](https://caddyserver.com)
5. Install the [lld linker](https://lld.llvm.org/)
6. Go to `frontend/`:
1. `npm install`, `npm run generate-backend-client` then `npm run dev`
2. You might need to set some extra heap space for the node runtime `export NODE_OPTIONS="--max-old-space-size=4096"`
3. In another shell `npm run build` otherwise the backend will not find the `frontend/build` folder and will not compile.
4. In another shell `sudo caddy run --config Caddyfile`
7. Go to `backend/`:
`env DATABASE_URL=<DATABASE_URL_TO_YOUR_WINDMILL_DB> RUST_LOG=info cargo run`
8. Et voilà, windmill should be available at `http://localhost/`
## Contributors
<a href="https://github.com/windmill-labs/windmill/graphs/contributors">

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO script (workspace_id, hash, path, parent_hashes, summary, description, content, created_by, schema, is_template, extra_perms, lock, language, kind, tag, draft_only, envs, concurrent_limit, concurrency_time_window_s, cache_ttl, dedicated_worker, ws_error_handler_muted, priority, restart_unless_cancelled, delete_after_use, timeout, concurrency_key) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9::text::json, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27)",
"query": "INSERT INTO script (workspace_id, hash, path, parent_hashes, summary, description, content, created_by, schema, is_template, extra_perms, lock, language, kind, tag, draft_only, envs, concurrent_limit, concurrency_time_window_s, cache_ttl, dedicated_worker, ws_error_handler_muted, priority, restart_unless_cancelled, delete_after_use, timeout, concurrency_key, visible_to_runner_only) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9::text::json, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28)",
"describe": {
"columns": [],
"parameters": {
@@ -65,10 +65,11 @@
"Bool",
"Bool",
"Int4",
"Varchar"
"Varchar",
"Bool"
]
},
"nullable": []
},
"hash": "260feb784bb0b223bd9276d6a82bd26be90efb17a4323b9673e93ff88513942a"
"hash": "020d33ed5d47350b456783fd548422ea8dcf2d786d0e9fa849754db82c9fa378"
}

View File

@@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE queue SET suspend = suspend - 1 WHERE id = $1 AND suspend > 0",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "0c349ac832cbf055fce755c8e2081eacf2b836b0396ec48a6cc2405fb7aa76de"
}

View File

@@ -27,11 +27,6 @@
"ordinal": 4,
"name": "premium",
"type_info": "Bool"
},
{
"ordinal": 5,
"name": "is_overquota",
"type_info": "Bool"
}
],
"parameters": {
@@ -45,7 +40,6 @@
false,
false,
false,
false,
false
]
},

View File

@@ -0,0 +1,22 @@
{
"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"
}

View File

@@ -1,15 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM folder WHERE name = $1 AND workspace_id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": []
},
"hash": "26e4ec75366d1e46a98710f29066b40e66a802f98eeabbb3ae5bebe3aeb6b3f8"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usage (id, is_workspace, month_, usage)\n VALUES ($1, FALSE, EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date), 1)\n ON CONFLICT (id, is_workspace, month_) DO UPDATE SET usage = usage.usage + 1 \n RETURNING usage.usage",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "usage",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Varchar"
]
},
"nullable": [
false
]
},
"hash": "2e9b3e718440f3c5269e9217a13076c565f3add98b6768b5476bd3afed11ea31"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO flow (workspace_id, path, summary, description, value, edited_by, edited_at, schema, dependency_job, draft_only, tag, dedicated_worker) VALUES ($1, $2, $3, $4, $5, $6, now(), $7::text::json, NULL, $8, $9, $10)",
"query": "INSERT INTO flow (workspace_id, path, summary, description, value, edited_by, edited_at, schema, dependency_job, draft_only, tag, dedicated_worker, visible_to_runner_only) VALUES ($1, $2, $3, $4, $5, $6, now(), $7::text::json, NULL, $8, $9, $10, $11)",
"describe": {
"columns": [],
"parameters": {
@@ -14,10 +14,11 @@
"Text",
"Bool",
"Varchar",
"Bool",
"Bool"
]
},
"nullable": []
},
"hash": "c3da506f47dfb42434debf6e005319147c7513193e853c38cfb7c071d61a3d2e"
"hash": "35e6af0b203e3e4fac9020b037a3c41af92537c0fd5683227767f6a1bd17339f"
}

View File

@@ -1,11 +1,16 @@
{
"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\n GROUP BY script_path), $3)",
"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\n GROUP BY script_path), $3) as min_started_at, now() AS now",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "coalesce",
"name": "min_started_at",
"type_info": "Timestamptz"
},
{
"ordinal": 1,
"name": "now",
"type_info": "Timestamptz"
}
],
@@ -17,8 +22,9 @@
]
},
"nullable": [
null,
null
]
},
"hash": "abc7c72dfe9b01cde6f5b206300ed33e3d15b16bce2510160166a66fb7598e61"
"hash": "3901cce744c9b246b661c817e068bdb3b1ab504ff8070fcccf6c909ad75f1f6d"
}

View File

@@ -0,0 +1,17 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO workspace_settings\n (workspace_id, slack_team_id, slack_name, slack_email)\n VALUES ($1, $2, $3, $4) ON CONFLICT (workspace_id) DO UPDATE SET slack_team_id = $2, slack_name = $3, slack_email = $4",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Varchar"
]
},
"nullable": []
},
"hash": "43b376a2eff086a32cd76e54361ce3631feee1565935d2a6ddbecc17950758d1"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT 1 FROM schedule WHERE path = $1 AND workspace_id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "?column?",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "4613382f7b031a2b667f86d9af995065a99a63c407fd58aa293fb269e032121d"
}

View File

@@ -0,0 +1,18 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO resource\n (workspace_id, path, value, description, resource_type)\n VALUES ($1, $2, $3, $4, $5) ON CONFLICT (workspace_id, path) DO UPDATE SET value = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Jsonb",
"Text",
"Varchar"
]
},
"nullable": []
},
"hash": "489a62b5943a7a21ce487aa7b72a63dfc6300dd93bc29f5ec4cb1bfc471ad0bf"
}

View File

@@ -1,20 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO variable\n (workspace_id, path, value, is_secret, description, account, is_oauth)\n VALUES ($1, $2, $3, $4, $5, $6, $7)\n ON CONFLICT (workspace_id, path) DO UPDATE SET value = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Bool",
"Varchar",
"Int4",
"Bool"
]
},
"nullable": []
},
"hash": "52c8b4350235bdaab4df79e517d5e42a61a4e1e209d120b2c8bb31ebb7ce1e56"
}

View File

@@ -0,0 +1,20 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO variable\n (workspace_id, path, value, is_secret, description, account, is_oauth)\n VALUES ($1, $2, $3, $4, $5, $6, $7)\n ON CONFLICT (workspace_id, path) DO UPDATE SET value = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Bool",
"Varchar",
"Int4",
"Bool"
]
},
"nullable": []
},
"hash": "55a2f170823f1d1abce76287d8817a6cf34de92b9b4079c00b75423a9ff835b9"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT * FROM workspace_settings WHERE slack_team_id = $1",
"query": "SELECT * FROM workspace_settings WHERE slack_team_id = $1 AND slack_command_script IS NOT NULL",
"describe": {
"columns": [
{
@@ -144,5 +144,5 @@
true
]
},
"hash": "5445083864b2b092b012e894bff7630a1d7b9deb8d33e9f909061f351f96844e"
"hash": "55cb03040bc2a8c53dd7fbb42bbdcc40f463cbc52d94ed9315cf9a547d4c89f2"
}

View File

@@ -1,15 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM schedule WHERE path = $1 AND workspace_id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": []
},
"hash": "61e9662fe42506131222412ab3de48cf6485dea10aa3a2f97c0fd6322a0cb17f"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usage (id, is_workspace, month_, usage) \n VALUES ($1, $2, EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date), 0) \n ON CONFLICT (id, is_workspace, month_) DO UPDATE SET usage = usage.usage + 1 \n RETURNING usage.usage",
"query": "INSERT INTO usage (id, is_workspace, month_, usage)\n VALUES ($1, TRUE, EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date), 1)\n ON CONFLICT (id, is_workspace, month_) DO UPDATE SET usage = usage.usage + 1 \n RETURNING usage.usage",
"describe": {
"columns": [
{
@@ -11,13 +11,12 @@
],
"parameters": {
"Left": [
"Varchar",
"Bool"
"Varchar"
]
},
"nullable": [
false
]
},
"hash": "bd086c56ad3a58163619122641b93b941ef75880eeeab0756d40f68f87760d5b"
"hash": "621e9a2a53187dac3ebed62f0d645b692815f1594bf302dbebd5f80d5d22b98e"
}

View File

@@ -1,28 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT premium, is_overquota FROM workspace WHERE id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "premium",
"type_info": "Bool"
},
{
"ordinal": 1,
"name": "is_overquota",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
false
]
},
"hash": "6e816fdba0d281d5147ddc5d4d438a3209b811324dba4ac661938e0523210682"
}

View File

@@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE workspace_settings\n SET slack_team_id = null, slack_name = null WHERE workspace_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text"
]
},
"nullable": []
},
"hash": "73ca6ea13b362b2569ea115d28e4e255cd5e9b990ffa89998ef24871d3a9717c"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM folder WHERE name = $1 AND workspace_id = $2 RETURNING 1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "?column?",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "748904c35cdbb6c7b8a8e0024b341278bf2bb727f2fe0427847565fb9c774abc"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT usage.usage FROM usage \n WHERE is_workspace = true \n AND month_ = EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date)\n AND id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "usage",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "82b16e771b6e21c4587b5ebf059e312f43b3e5a48f7599133831dbd65886f5d8"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM queue WHERE schedule_path = $1 AND running = false AND workspace_id = $2",
"query": "DELETE FROM queue WHERE schedule_path = $1 AND running = false AND workspace_id = $2 AND is_flow_step = false",
"describe": {
"columns": [],
"parameters": {
@@ -11,5 +11,5 @@
},
"nullable": []
},
"hash": "ade89de6e8527c543b182229f1febeb2513ad58b03ab526df148582264fb3a44"
"hash": "8d4235984f27d8b939ffd5c660d5b57dc38dd3b2643361ed3b7cdcd1534d2e21"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO workspace SELECT $1, $2, owner, deleted, premium, is_overquota FROM workspace WHERE id = $3",
"query": "INSERT INTO workspace SELECT $1, $2, owner, deleted, premium FROM workspace WHERE id = $3",
"describe": {
"columns": [],
"parameters": {
@@ -12,5 +12,5 @@
},
"nullable": []
},
"hash": "6d89ac43c4ae3a17167a44c802df72bc506803b79fe93ab3b203fb0690b1bef1"
"hash": "8f0031533f1bf407bd5d8af4d364eaf00d4c38ee7ba75141b40fc9fcd2ffc0b8"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT usage.usage + 1 FROM usage \n WHERE is_workspace IS FALSE 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": "94ff696b4d3904e3823ef637fa8f1f0d0bdac01040c81b31514326417eb58cee"
}

View File

@@ -1,18 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO folder\n (workspace_id, name, display_name, owners, extra_perms)\n VALUES ($1, $2, $3, $4, $5) ON CONFLICT DO NOTHING",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"VarcharArray",
"Jsonb"
]
},
"nullable": []
},
"hash": "95ebdfaf0510b9cad861568cd25d479759d4ea3c3ff4e136aad13a3521525372"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT concurrency_key FROM script WHERE hash = $1",
"query": "SELECT concurrency_key FROM script WHERE hash = $1 AND workspace_id = $2",
"describe": {
"columns": [
{
@@ -11,12 +11,13 @@
],
"parameters": {
"Left": [
"Int8"
"Int8",
"Text"
]
},
"nullable": [
true
]
},
"hash": "2719f910142b32476a16025bb9836b0cab019ba0a436b330ea3a53fba4725f73"
"hash": "a3ccf362b4f6df400b3c7a084795dbf541eb14c5c374656ffb96da7283a2a6f1"
}

View File

@@ -0,0 +1,22 @@
{
"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"
}

View File

@@ -1,14 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE queue SET suspend = suspend - 1 WHERE parent_job = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "a4ae245dcf7e4b930cd45701db0b7c45f2a5797e8b6724bade5b964d4334c098"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value->>'concurrency_key' FROM flow WHERE path = $1 AND workspace_id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "?column?",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "a875cb56485b812e9d4739afd0915067f7e5abe0ca0adf264b792fccf21e005b"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT raw_flow->'modules'->$2::int->'retry' FROM queue WHERE id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "?column?",
"type_info": "Jsonb"
}
],
"parameters": {
"Left": [
"Uuid",
"Int4"
]
},
"nullable": [
null
]
},
"hash": "ae2f005af8ab4b035a907e0c8fc9a9d035f3eb1d9d833041969fce967daa91a4"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT id FROM queue WHERE parent_job = $1 AND suspend > 0 ORDER by suspend",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false
]
},
"hash": "b8d97d300ffe6fae99f2396ae07cef03903752d17ce3fdadca47d86da75139aa"
}

View File

@@ -1,14 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE workspace_settings\n SET slack_team_id = null, slack_name = null WHERE workspace_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text"
]
},
"nullable": []
},
"hash": "bf1d8e043338867e1da1ed236ff6c85a566d5fd58d4b0d5c3a10454513811ba3"
}

View File

@@ -0,0 +1,15 @@
{
"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"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE queue SET canceled = true, canceled_by = $2, scheduled_for = now(), suspend = 0 WHERE scheduled_for < now() AND workspace_id = $1 AND schedule_path IS NULL RETURNING id, running, is_flow_step",
"query": "SELECT id, running, is_flow_step FROM queue WHERE scheduled_for < now() AND workspace_id = $1 AND schedule_path IS NULL",
"describe": {
"columns": [
{
@@ -21,8 +21,7 @@
],
"parameters": {
"Left": [
"Text",
"Varchar"
"Text"
]
},
"nullable": [
@@ -31,5 +30,5 @@
true
]
},
"hash": "18699cb0eca25b6bde05d81571dfdea8cafd0043634f61b0f652a93767c9c30a"
"hash": "caeb49629b8673c1f1c84a6e40c3e2d2c3bc3fdbde530a0a6b6fd68a22b867c3"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM schedule WHERE path = $1 AND workspace_id = $2 RETURNING 1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "?column?",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "d1ded8b38e50eb01fa5e5e122dae48ec21856a0041f4aeb244349ab7648d306f"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE queue SET canceled = true, canceled_by = $1, scheduled_for = now(), suspend = 0 WHERE id = $2 RETURNING 1 as one",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "one",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Varchar",
"Uuid"
]
},
"nullable": [
null
]
},
"hash": "d4fb94ee8198592c24e85d29078feb5220ab367e339510ee0e83bb7b5abfd184"
}

View File

@@ -1,6 +1,6 @@
{
"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($25, (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, $26, $27, $28, $29, $30)\n ON CONFLICT (id) DO UPDATE SET success = $7, result = $11 RETURNING duration_ms",
"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()), (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": [
{
@@ -79,7 +79,6 @@
}
}
},
"Numeric",
"Varchar",
"Bool",
"Int4",
@@ -91,5 +90,5 @@
false
]
},
"hash": "2ade671449393541fa565088b21268dad137314d250f7ded502defb9a6de0b2f"
"hash": "d5a8614286c170e0d175903cd1b53ff66b37ed8110a0b67aedb9f25e6a7383e1"
}

View File

@@ -1,22 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT usage.usage + 1 FROM usage \n WHERE is_workspace = false 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": "d918e1d3a1ccc36ca8b4b25aeeec1cb55aadaf1e6609a1aad09b0515c93a667a"
}

View File

@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usage (id, is_workspace, month_, usage) \n VALUES ($1, FALSE, 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": "e38240e6d50bfe60e1c2b649588eb41dcef121ed161db04b2568ac2d990aed7c"
}

View File

@@ -1,16 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usage (id, is_workspace, month_, usage) \n VALUES ($1, $2, EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date), 0) \n ON CONFLICT (id, is_workspace, month_) DO UPDATE SET usage = usage.usage + $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Bool",
"Int4"
]
},
"nullable": []
},
"hash": "e7418515b88d14d1fd79078342963e11422eed9a60e0472c68971f4e8f8735d9"
}

View File

@@ -0,0 +1,22 @@
{
"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"
}

View File

@@ -1,18 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO resource\n (workspace_id, path, value, description, resource_type)\n VALUES ($1, $2, $3, $4, $5) ON CONFLICT (workspace_id, path) DO UPDATE SET value = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Jsonb",
"Text",
"Varchar"
]
},
"nullable": []
},
"hash": "ea8ebb8d972fe99c960b5a69f794ee2b57bfb1914bf370c5b10313e45fa9b65f"
}

View File

@@ -1,17 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO workspace_settings\n (workspace_id, slack_team_id, slack_name, slack_email)\n VALUES ($1, $2, $3, $4) ON CONFLICT (workspace_id) DO UPDATE SET slack_team_id = $2, slack_name = $3, slack_email = $4",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Varchar"
]
},
"nullable": []
},
"hash": "eaa6e9dc4c0d3d6cc8152515019befa880bb3b69ff340d337edd14b65e74e2a3"
}

View File

@@ -0,0 +1,18 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO folder\n (workspace_id, name, display_name, owners, extra_perms)\n VALUES ($1, $2, $3, $4, $5) ON CONFLICT DO NOTHING",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"VarcharArray",
"Jsonb"
]
},
"nullable": []
},
"hash": "f2aee3ae39c90e40dd1835befc339e5381cc9104933cf8e90d840a9bf638ff52"
}

View File

@@ -1,22 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT SUM(duration_ms) as duration FROM completed_job WHERE id = ANY($1)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "duration",
"type_info": "Numeric"
}
],
"parameters": {
"Left": [
"UuidArray"
]
},
"nullable": [
null
]
},
"hash": "f516ca558816c2cbab3c8ae865ef8f764aa4686e7df9c53d30d49a3dbbf36af4"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT EXISTS (SELECT 1 \n FROM workspace_settings \n WHERE workspace_id <> $1 \n AND slack_command_script IS NOT NULL\n AND slack_team_id IS NOT NULL \n AND slack_team_id = (SELECT slack_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": "f632ca2e17a3952fc45bd40a055a9442c35453dff95140d2f252c4fe6a14c6a4"
}

View File

@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE flow SET path = $1, summary = $2, description = $3, value = $4, edited_by = $5, edited_at = now(), schema = $6::text::json, dependency_job = NULL, draft_only = NULL, tag = $9, dedicated_worker = $10\n WHERE path = $7 AND workspace_id = $8",
"query": "UPDATE flow SET path = $1, summary = $2, description = $3, value = $4, edited_by = $5, edited_at = now(), schema = $6::text::json, dependency_job = NULL, draft_only = NULL, tag = $9, dedicated_worker = $10, visible_to_runner_only = $11\n WHERE path = $7 AND workspace_id = $8",
"describe": {
"columns": [],
"parameters": {
@@ -14,10 +14,11 @@
"Text",
"Text",
"Varchar",
"Bool",
"Bool"
]
},
"nullable": []
},
"hash": "de06474de29c6c2cadb99787f5d627678a5285011d7b1a516d4e240a5810ddba"
"hash": "f6fd65fbe36502923ab4ccf1a22f748cb854e23049d0cf73a42229eccc88c4e6"
}

View File

@@ -27,11 +27,6 @@
"ordinal": 4,
"name": "premium",
"type_info": "Bool"
},
{
"ordinal": 5,
"name": "is_overquota",
"type_info": "Bool"
}
],
"parameters": {
@@ -44,7 +39,6 @@
false,
false,
false,
false,
false
]
},

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT EXISTS (SELECT 1 \n FROM workspace_settings \n WHERE workspace_id <> $1 \n AND slack_command_script IS NOT NULL\n AND slack_team_id = $2\n AND (SELECT slack_command_script IS NOT NULL FROM workspace_settings WHERE workspace_id = $1))\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "fa59674af1d1a4ceb696fc883005ef114772f7d2ee0f60cb1358cdb7f0b5cd0c"
}

898
backend/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package]
name = "windmill"
version = "1.296.1"
version = "1.311.0"
authors.workspace = true
edition.workspace = true
@@ -20,10 +20,11 @@ members = [
"./parsers/windmill-parser-bash",
"./parsers/windmill-parser-py",
"./parsers/windmill-parser-py-imports",
"./parsers/windmill-sql-datatype-parser-wasm",
]
[workspace.package]
version = "1.296.1"
version = "1.311.0"
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
edition = "2021"
@@ -143,7 +144,6 @@ urlencoding = "^2"
url = "^2"
async-oauth2 = "^0"
reqwest = { version = "^0.12", features = ["json", "stream"] }
reqwest_11 = { package = "reqwest", version = "0.11" }
time = "0.3.16"
serde_urlencoded = "^0"
tokio-tar = "^0"

View File

@@ -1 +1 @@
721b9298e35b831b390b7311b791a5b526dee923
66d9cbb158ab9a5869a45ba253bf57f2cbb5ecb6

View File

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

View File

@@ -0,0 +1,3 @@
-- Add up migration script here
ALTER TABLE script ADD COLUMN visible_to_runner_only BOOLEAN;
ALTER TABLE flow ADD COLUMN visible_to_runner_only BOOLEAN;

View File

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

View File

@@ -0,0 +1,2 @@
-- Add up migration script here
alter table workspace drop column is_overquota;

View File

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

View File

@@ -0,0 +1,4 @@
-- Add up migration script here
CREATE POLICY "webhook" ON audit FOR INSERT
TO windmill_user
WITH CHECK (((username)::text ~~ 'webhook-%'::text))

View File

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

View File

@@ -0,0 +1,2 @@
-- Add up migration script here
ALTER TABLE public.workspace_settings DROP CONSTRAINT workspace_settings_slack_team_id_key

View File

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

View File

@@ -0,0 +1,2 @@
-- Add up migration script here
ALTER TABLE resume_job ALTER COLUMN approver TYPE VARCHAR(1000);

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
ALTER TABLE flow DROP COLUMN concurrency_key;

View File

@@ -0,0 +1,2 @@
-- Add up migration script here
ALTER TABLE flow ADD COLUMN concurrency_key VARCHAR(255);

View File

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

View File

@@ -0,0 +1,228 @@
DO
$do$
DECLARE
i text;
arr text[] := array['resource', 'script', 'variable', 'schedule', 'flow', 'app', 'raw_app'];
BEGIN
FOREACH i IN ARRAY arr
LOOP
EXECUTE FORMAT(
$$
DROP POLICY IF EXISTS see_folder_extra_perms_user ON %1$I;
DROP POLICY IF EXISTS see_folder_extra_perms_user_delete ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_user ON %1$I;
DROP POLICY IF EXISTS see_member ON %1$I;
DROP POLICY IF EXISTS see_own ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_user_delete ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_groups ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_groups_delete ON %1$I;
-- New policies for select, insert, update
DROP POLICY IF EXISTS see_folder_extra_perms_user_select ON %1$I;
DROP POLICY IF EXISTS see_folder_extra_perms_user_insert ON %1$I;
DROP POLICY IF EXISTS see_folder_extra_perms_user_update ON %1$I;
DROP POLICY IF EXISTS see_own ON %1$I;
DROP POLICY IF EXISTS see_member ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_user_select ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_user_insert ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_user_update ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_groups_select ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_groups_insert ON %1$I;
DROP POLICY IF EXISTS see_extra_perms_groups_update ON %1$I;
-- Folder permissions split into select, insert, and update
CREATE POLICY see_folder_extra_perms_user_select ON %1$I FOR SELECT TO windmill_user
USING (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_read'), ',')::text[]));
CREATE POLICY see_folder_extra_perms_user_insert ON %1$I FOR INSERT TO windmill_user
WITH CHECK (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[]));
CREATE POLICY see_folder_extra_perms_user_update ON %1$I FOR UPDATE TO windmill_user
USING (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[]));
CREATE POLICY see_folder_extra_perms_user_delete ON %1$I FOR UPDATE TO windmill_user
USING (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[]));
CREATE POLICY see_own ON %1$I FOR ALL TO windmill_user
USING (SPLIT_PART(%1$I.path, '/', 1) = 'u' AND SPLIT_PART(%1$I.path, '/', 2) = current_setting('session.user'));
CREATE POLICY see_member ON %1$I FOR ALL TO windmill_user
USING (SPLIT_PART(%1$I.path, '/', 1) = 'g' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.groups'), ',')::text[]));
CREATE POLICY see_extra_perms_user_select ON %1$I FOR SELECT TO windmill_user
USING (extra_perms ? CONCAT('u/', current_setting('session.user')));
CREATE POLICY see_extra_perms_user_insert ON %1$I FOR INSERT TO windmill_user
WITH CHECK ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean);
CREATE POLICY see_extra_perms_user_update ON %1$I FOR UPDATE TO windmill_user
USING ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean);
CREATE POLICY see_extra_perms_user_delete ON %1$I FOR DELETE TO windmill_user
USING ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean);
CREATE POLICY see_extra_perms_groups_select ON %1$I 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 %1$I 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 %1$I 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 %1$I 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));
$$,
i
);
END LOOP;
END
$do$;
DROP POLICY IF EXISTS see_extra_perms_user ON folder;
DROP POLICY IF EXISTS see_extra_perms_user_select ON folder;
DROP POLICY IF EXISTS see_extra_perms_user_insert ON folder;
DROP POLICY IF EXISTS see_extra_perms_user_update ON folder;
DROP POLICY IF EXISTS see_extra_perms_user_delete ON folder;
DROP POLICY IF EXISTS see_extra_perms_groups ON folder;
DROP POLICY IF EXISTS see_extra_perms_groups_select ON folder;
DROP POLICY IF EXISTS see_extra_perms_groups_insert ON folder;
DROP POLICY IF EXISTS see_extra_perms_groups_update ON folder;
DROP POLICY IF EXISTS see_extra_perms_groups_delete ON folder;
-- Existing CREATE POLICY statements updated to reflect policy splitting for 'folder' table
CREATE POLICY see_extra_perms_user_select ON folder FOR SELECT TO windmill_user
USING (extra_perms ? CONCAT('u/', current_setting('session.user')) OR CONCAT('u/', current_setting('session.user')) = ANY(owners));
CREATE POLICY see_extra_perms_user_insert ON folder FOR INSERT TO windmill_user
WITH CHECK ((CONCAT('u/', current_setting('session.user')) = ANY(owners)));
CREATE POLICY see_extra_perms_user_update ON folder FOR UPDATE TO windmill_user
USING ((CONCAT('u/', current_setting('session.user')) = ANY(owners)));
CREATE POLICY see_extra_perms_user_delete ON folder FOR DELETE TO windmill_user
USING ((CONCAT('u/', current_setting('session.user')) = ANY(owners)));
CREATE POLICY see_extra_perms_groups_select ON folder FOR SELECT TO windmill_user
USING (extra_perms ?| regexp_split_to_array(current_setting('session.pgroups'), ',')::text[] OR EXISTS (
SELECT o FROM unnest(owners) AS o
WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])));
CREATE POLICY see_extra_perms_groups_insert ON folder FOR INSERT TO windmill_user
WITH CHECK (EXISTS (
SELECT o FROM unnest(owners) AS o
WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])));
CREATE POLICY see_extra_perms_groups_update ON folder FOR UPDATE TO windmill_user
USING (EXISTS (
SELECT o FROM unnest(owners) AS o
WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])));
CREATE POLICY see_extra_perms_groups_delete ON folder FOR DELETE TO windmill_user
USING (EXISTS (
SELECT o FROM unnest(owners) AS o
WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])));
-- DO
-- $do$
-- DECLARE
-- i text;
-- arr text[] := array['resource', 'script', 'variable', 'schedule', 'flow', 'app', 'raw_app'];
-- BEGIN
-- FOREACH i IN ARRAY arr
-- LOOP
-- EXECUTE FORMAT(
-- $$
-- CREATE POLICY see_folder_extra_perms_user ON %1$I FOR ALL TO windmill_user
-- USING (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_read'), ',')::text[]))
-- WITH CHECK (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[]));
-- CREATE POLICY see_folder_extra_perms_user_delete ON %1$I AS RESTRICTIVE FOR DELETE TO windmill_user
-- USING (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[]));
-- CREATE POLICY see_own ON %1$I FOR ALL TO windmill_user
-- USING (SPLIT_PART(%1$I.path, '/', 1) = 'u' AND SPLIT_PART(%1$I.path, '/', 2) = current_setting('session.user'));
-- CREATE POLICY see_member ON %1$I FOR ALL TO windmill_user
-- USING (SPLIT_PART(%1$I.path, '/', 1) = 'g' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.groups'), ',')::text[]));
-- CREATE POLICY see_extra_perms_user ON %1$I FOR ALL TO windmill_user
-- USING (extra_perms ? CONCAT('u/', current_setting('session.user')))
-- WITH CHECK ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean);
-- CREATE POLICY see_extra_perms_user_delete ON %1$I FOR DELETE TO windmill_user
-- USING ((extra_perms ->> CONCAT('u/', current_setting('session.user')))::boolean);
-- CREATE POLICY see_extra_perms_groups ON %1$I FOR ALL TO windmill_user
-- USING (extra_perms ?| regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])
-- 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_delete ON %1$I 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));
-- $$,
-- i
-- );
-- END LOOP;
-- END
-- $do$;
-- DROP POLICY see_extra_perms_user ON folder;
-- DROP POLICY see_extra_perms_groups ON folder;
-- CREATE POLICY see_extra_perms_user ON folder FOR ALL to windmill_user
-- USING (extra_perms ? CONCAT('u/', current_setting('session.user')) or (CONCAT('u/', current_setting('session.user')) = ANY(owners)))
-- WITH CHECK ((CONCAT('u/', current_setting('session.user')) = ANY(owners)));
-- DROP POLICY IF EXISTS see_extra_perms_user_delete ON folder;
-- CREATE POLICY see_extra_perms_user_delete ON folder AS RESTRICTIVE FOR DELETE to windmill_user
-- USING ((CONCAT('u/', current_setting('session.user')) = ANY(owners)));
-- CREATE POLICY see_extra_perms_groups ON folder FOR ALL to windmill_user
-- USING (extra_perms ?| regexp_split_to_array(current_setting('session.pgroups'), ',')::text[] or (exists(
-- SELECT o FROM unnest(owners) as o
-- WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[]))))
-- WITH CHECK (exists(
-- SELECT o FROM unnest(owners) as o
-- WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])));
-- DROP POLICY IF EXISTS see_extra_perms_groups_delete ON folder;
-- CREATE POLICY see_extra_perms_groups_delete ON folder AS RESTRICTIVE FOR DELETE to windmill_user
-- USING (exists(
-- SELECT o FROM unnest(owners) as o
-- WHERE o = ANY(regexp_split_to_array(current_setting('session.pgroups'), ',')::text[])));

View File

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

View File

@@ -0,0 +1,22 @@
DO
$do$
DECLARE
i text;
arr text[] := array['resource', 'script', 'variable', 'schedule', 'flow', 'app', 'raw_app'];
BEGIN
FOREACH i IN ARRAY arr
LOOP
EXECUTE FORMAT(
$$
DROP POLICY IF EXISTS see_folder_extra_perms_user_delete ON %1$I;
CREATE POLICY see_folder_extra_perms_user_delete ON %1$I FOR DELETE TO windmill_user
USING (SPLIT_PART(%1$I.path, '/', 1) = 'f' AND SPLIT_PART(%1$I.path, '/', 2) = any(regexp_split_to_array(current_setting('session.folders_write'), ',')::text[]));
$$,
i
);
END LOOP;
END
$do$;-- Add up migration script here

View File

@@ -141,5 +141,16 @@
"scopes": [
"com.intuit.quickbooks.accounting"
]
},
"visma": {
"auth_url": "https://connect.visma.com/connect/authorize",
"token_url": "https://connect.visma.com/connect/token",
"scopes": [
"offline_access",
"vismanet_erp_interactive_api:create",
"vismanet_erp_interactive_api:delete",
"vismanet_erp_interactive_api:read",
"vismanet_erp_interactive_api:update"
]
}
}

View File

@@ -50,6 +50,7 @@ static PYTHON_IMPORTS_REPLACEMENT: phf::Map<&'static str, &'static str> = phf_ma
"mysql" => "mysql-connector-python",
"tenable" => "pytenable",
"ns1" => "ns1-python",
"pymsql" => "PyMySQL",
};
fn replace_import(x: String) -> String {

View File

@@ -5,7 +5,7 @@ use regex::Regex;
use serde_json::json;
use std::collections::HashMap;
use windmill_parser::{Arg, MainArgSignature, Typ};
pub use windmill_parser::{Arg, MainArgSignature, Typ};
pub fn parse_mysql_sig(code: &str) -> anyhow::Result<MainArgSignature> {
let parsed = parse_mysql_file(&code)?;

View File

@@ -0,0 +1,20 @@
[package]
name = "windmill-sql-datatype-parser-wasm"
version.workspace = true
edition.workspace = true
authors.workspace = true
[lib]
crate-type = ["cdylib"]
name = "windmill_sql_datatype_parser_wasm"
path = "./src/lib.rs"
[dev-dependencies]
wasm-bindgen-test.workspace = true
[dependencies]
windmill-parser.workspace = true
windmill-parser-sql.workspace = true
wasm-bindgen.workspace = true
serde = { version = "1.0", features = ["derive"] }

View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -eou pipefail
deno task wasmbuild --out ../../../cli/wasm/

View File

@@ -0,0 +1,6 @@
{
"name": "windmill-parser-wasm",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@@ -0,0 +1,4 @@
{
"name": "windmill-sql-datatype-parser-wasm",
"version": "0.1.0"
}

View File

@@ -0,0 +1,40 @@
use wasm_bindgen::prelude::*;
use windmill_parser_sql::Typ;
fn to_str(typ: Typ) -> String {
match typ {
Typ::Str(_) => "str".to_string(),
Typ::Int => "int".to_string(),
Typ::Float => "float".to_string(),
Typ::Bool => "bool".to_string(),
Typ::List(t) => format!("list-{}", to_str(*t)),
Typ::Bytes => "bytes".to_string(),
Typ::Datetime => "datetime".to_string(),
_ => "unknown".to_string(),
}
}
#[wasm_bindgen]
pub fn parse_sql(typ: &str) -> String {
to_str(windmill_parser_sql::parse_pg_typ(typ))
}
#[wasm_bindgen]
pub fn parse_mysql(typ: &str) -> String {
to_str(windmill_parser_sql::parse_mysql_typ(typ))
}
#[wasm_bindgen]
pub fn parse_bigquery(typ: &str) -> String {
to_str(windmill_parser_sql::parse_bigquery_typ(typ))
}
#[wasm_bindgen]
pub fn parse_snowflake(typ: &str) -> String {
to_str(windmill_parser_sql::parse_snowflake_typ(typ))
}
#[wasm_bindgen]
pub fn parse_mssql(typ: &str) -> String {
to_str(windmill_parser_sql::parse_mssql_typ(typ))
}

View File

@@ -19,8 +19,8 @@ use windmill_api::HTTP_CLIENT;
use windmill_common::{
global_settings::{
BASE_URL_SETTING, BUNFIG_INSTALL_SCOPES_SETTING, CUSTOM_TAGS_SETTING,
DEFAULT_TAGS_PER_WORKSPACE_SETTING, DISABLE_STATS_SETTING, ENV_SETTINGS,
EXPOSE_DEBUG_METRICS_SETTING, EXPOSE_METRICS_SETTING, EXTRA_PIP_INDEX_URL_SETTING,
DEFAULT_TAGS_PER_WORKSPACE_SETTING, ENV_SETTINGS, EXPOSE_DEBUG_METRICS_SETTING,
EXPOSE_METRICS_SETTING, EXTRA_PIP_INDEX_URL_SETTING, HUB_BASE_URL_SETTING,
JOB_DEFAULT_TIMEOUT_SECS_SETTING, KEEP_JOB_DIR_SETTING, LICENSE_KEY_SETTING,
NPM_CONFIG_REGISTRY_SETTING, OAUTH_SETTING, PIP_INDEX_URL_SETTING,
REQUEST_SIZE_LIMIT_SETTING, REQUIRE_PREEXISTING_USER_FOR_OAUTH_SETTING,
@@ -47,10 +47,10 @@ use windmill_worker::{
use crate::monitor::{
initial_load, load_keep_job_dir, load_require_preexisting_user, load_tag_per_workspace_enabled,
monitor_db, monitor_pool, reload_base_url_setting, reload_bunfig_install_scopes_setting,
reload_extra_pip_index_url_setting, reload_job_default_timeout_setting, reload_license_key,
reload_npm_config_registry_setting, reload_pip_index_url_setting,
reload_retention_period_setting, reload_scim_token_setting, reload_server_config,
reload_worker_config,
reload_extra_pip_index_url_setting, reload_hub_base_url_setting,
reload_job_default_timeout_setting, reload_license_key, reload_npm_config_registry_setting,
reload_pip_index_url_setting, reload_retention_period_setting, reload_scim_token_setting,
reload_server_config, reload_worker_config,
};
#[cfg(feature = "parquet")]
@@ -498,7 +498,11 @@ Windmill Community Edition {GIT_VERSION}
tracing::error!(error = %e, "Could not send killpill to server");
}
},
DISABLE_STATS_SETTING => {},
HUB_BASE_URL_SETTING => {
if let Err(e) = reload_hub_base_url_setting(&db, server_mode).await {
tracing::error!(error = %e, "Could not reload hub base url setting");
}
},
a @_ => {
tracing::info!("Unrecognized Global Setting Change Payload: {:?}", a);
}

View File

@@ -14,6 +14,9 @@ use tokio::{
join,
sync::{mpsc, RwLock},
};
#[cfg(feature = "embedding")]
use windmill_api::embeddings::update_embeddings_db;
use windmill_api::{
oauth2_ee::{build_oauth_clients, OAuthClient},
DEFAULT_BODY_LIMIT, IS_SECURE, OAUTH_CLIENTS, REQUEST_SIZE_LIMIT, SAML_METADATA, SCIM_TOKEN,
@@ -24,8 +27,8 @@ use windmill_common::{
global_settings::{
BASE_URL_SETTING, BUNFIG_INSTALL_SCOPES_SETTING, DEFAULT_TAGS_PER_WORKSPACE_SETTING,
EXPOSE_DEBUG_METRICS_SETTING, EXPOSE_METRICS_SETTING, EXTRA_PIP_INDEX_URL_SETTING,
JOB_DEFAULT_TIMEOUT_SECS_SETTING, KEEP_JOB_DIR_SETTING, LICENSE_KEY_SETTING,
NPM_CONFIG_REGISTRY_SETTING, OAUTH_SETTING, PIP_INDEX_URL_SETTING,
HUB_BASE_URL_SETTING, JOB_DEFAULT_TIMEOUT_SECS_SETTING, KEEP_JOB_DIR_SETTING,
LICENSE_KEY_SETTING, NPM_CONFIG_REGISTRY_SETTING, OAUTH_SETTING, PIP_INDEX_URL_SETTING,
REQUEST_SIZE_LIMIT_SETTING, REQUIRE_PREEXISTING_USER_FOR_OAUTH_SETTING,
RETENTION_PERIOD_SECS_SETTING, SAML_METADATA_SETTING, SCIM_TOKEN_SETTING,
},
@@ -37,7 +40,7 @@ use windmill_common::{
load_worker_config, reload_custom_tags_setting, DEFAULT_TAGS_PER_WORKSPACE, SERVER_CONFIG,
WORKER_CONFIG,
},
BASE_URL, DB, METRICS_DEBUG_ENABLED, METRICS_ENABLED,
BASE_URL, DB, DEFAULT_HUB_BASE_URL, HUB_BASE_URL, METRICS_DEBUG_ENABLED, METRICS_ENABLED,
};
use windmill_queue::cancel_job;
use windmill_worker::{
@@ -136,6 +139,10 @@ pub async fn initial_load(
tracing::error!("Error reloading base url: {:?}", e)
}
if let Err(e) = reload_hub_base_url_setting(db, server_mode).await {
tracing::error!("Error reloading hub base url: {:?}", e)
}
#[cfg(feature = "parquet")]
if !_is_agent {
reload_s3_cache_setting(&db).await;
@@ -920,7 +927,7 @@ async fn handle_zombie_flows(
r#"
SELECT *
FROM queue
WHERE running = true AND suspend = 0 AND scheduled_for <= now() AND (job_kind = 'flow' OR job_kind = 'flowpreview')
WHERE running = true AND suspend = 0 AND suspend_until IS null AND scheduled_for <= now() AND (job_kind = 'flow' OR job_kind = 'flowpreview')
AND last_ping IS NOT NULL AND last_ping < NOW() - ($1 || ' seconds')::interval
"#,
).bind(FLOW_ZOMBIE_TRANSITION_TIMEOUT.as_str())
@@ -1025,3 +1032,45 @@ async fn cancel_zombie_flow_job(
ntx.commit().await?;
Ok(())
}
pub async fn reload_hub_base_url_setting(db: &DB, server_mode: bool) -> error::Result<()> {
let hub_base_url = load_value_from_global_settings(db, HUB_BASE_URL_SETTING).await?;
let base_url = if let Some(q) = hub_base_url {
if let Ok(v) = serde_json::from_value::<String>(q.clone()) {
if v != "" {
v
} else {
DEFAULT_HUB_BASE_URL.to_string()
}
} else {
tracing::error!(
"Could not parse hub_base_url setting as a string, found: {:#?}",
&q
);
DEFAULT_HUB_BASE_URL.to_string()
}
} else {
DEFAULT_HUB_BASE_URL.to_string()
};
let mut l = HUB_BASE_URL.write().await;
if server_mode {
#[cfg(feature = "embedding")]
if *l != base_url {
let disable_embedding = std::env::var("DISABLE_EMBEDDING")
.ok()
.map(|x| x.parse::<bool>().unwrap_or(false))
.unwrap_or(false);
if !disable_embedding {
let db_clone = db.clone();
tokio::spawn(async move {
update_embeddings_db(&db_clone).await;
});
}
}
}
*l = base_url;
Ok(())
}

View File

@@ -1079,7 +1079,8 @@ async fn test_deno_flow(db: Pool<Postgres>) {
mock: None,
timeout: None,
priority: None,
delete_after_use: None
delete_after_use: None,
continue_on_error: None,
},
FlowModule {
id: "b".to_string(),
@@ -1116,6 +1117,7 @@ async fn test_deno_flow(db: Pool<Postgres>) {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
}],
},
stop_after_if: Default::default(),
@@ -1128,6 +1130,7 @@ async fn test_deno_flow(db: Pool<Postgres>) {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
],
same_worker: false,
@@ -1229,6 +1232,7 @@ async fn test_deno_flow_same_worker(db: Pool<Postgres>) {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
FlowModule {
id: "b".to_string(),
@@ -1276,6 +1280,7 @@ async fn test_deno_flow_same_worker(db: Pool<Postgres>) {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
FlowModule {
id: "e".to_string(),
@@ -1308,7 +1313,9 @@ async fn test_deno_flow_same_worker(db: Pool<Postgres>) {
mock: None,
timeout: None,
priority: None,
delete_after_use: None
delete_after_use: None,
continue_on_error: None,
},
],
},
@@ -1321,7 +1328,8 @@ async fn test_deno_flow_same_worker(db: Pool<Postgres>) {
mock: None,
timeout: None,
priority: None,
delete_after_use: None
delete_after_use: None,
continue_on_error: None,
},
FlowModule {
id: "c".to_string(),
@@ -1362,6 +1370,7 @@ async fn test_deno_flow_same_worker(db: Pool<Postgres>) {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
],
same_worker: true,
@@ -2582,6 +2591,7 @@ async fn test_flow_lock_all(db: Pool<Postgres>) {
priority: None,
dedicated_worker: None,
timeout: None,
visible_to_runner_only: None,
},
draft_only: None,
deployment_message: None,
@@ -3153,6 +3163,7 @@ async fn run_deployed_relative_imports(db: &Pool<Postgres>, script_content: Stri
restart_unless_cancelled: None,
deployment_message: None,
concurrency_key: None,
visible_to_runner_only: None,
},
).await.unwrap();

View File

@@ -39,7 +39,6 @@ tower-http.workspace = true
hyper.workspace = true
itertools.workspace = true
reqwest.workspace = true
reqwest_11.workspace = true
serde.workspace = true
sqlx.workspace = true
async-oauth2.workspace = true

View File

@@ -5,5 +5,7 @@ npx @redocly/openapi-cli@latest bundle openapi.yaml > openapi-bundled.yaml
npx @redocly/openapi-cli@latest bundle openapi-bundled.yaml --ext yaml -d > openapi-deref.yaml
npx @redocly/openapi-cli@latest bundle openapi-bundled.yaml --ext json > openapi-deref.json
rm openapi-bundled.yaml

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
version: 1.296.1
version: 1.311.0
title: Windmill API
contact:
@@ -718,7 +718,6 @@ paths:
schema:
type: string
# pub use_ssl: Option<bool>,
# #[serde(rename = "accountName")]
# pub account_name: String,
@@ -1229,7 +1228,6 @@ paths:
schema:
type: string
/w/{workspace}/workspaces/change_workspace_id:
post:
summary: change workspace id
@@ -1957,6 +1955,22 @@ paths:
schema:
$ref: "#/components/schemas/LargeFileStorage"
/w/{workspace}/workspaces/usage:
get:
summary: get usage
operationId: getWorkspaceUsage
tags:
- workspace
parameters:
- $ref: "#/components/parameters/WorkspaceId"
responses:
"200":
description: usage
content:
text/plain:
schema:
type: number
/w/{workspace}/users/list:
get:
summary: list users
@@ -3876,6 +3890,7 @@ paths:
type: integer
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/WorkerTag"
- $ref: "#/components/parameters/CacheTtl"
- $ref: "#/components/parameters/NewJobId"
- name: invisible_to_owner
description: make the run invisible to the the script owner (default false)
@@ -3939,6 +3954,7 @@ paths:
- $ref: "#/components/parameters/ScriptPath"
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/WorkerTag"
- $ref: "#/components/parameters/CacheTtl"
- $ref: "#/components/parameters/NewJobId"
- $ref: "#/components/parameters/IncludeHeader"
- $ref: "#/components/parameters/QueueLimit"
@@ -3968,6 +3984,7 @@ paths:
- $ref: "#/components/parameters/ScriptPath"
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/WorkerTag"
- $ref: "#/components/parameters/CacheTtl"
- $ref: "#/components/parameters/NewJobId"
- $ref: "#/components/parameters/IncludeHeader"
- $ref: "#/components/parameters/QueueLimit"
@@ -5025,6 +5042,7 @@ paths:
type: integer
- $ref: "#/components/parameters/ParentJob"
- $ref: "#/components/parameters/WorkerTag"
- $ref: "#/components/parameters/CacheTtl"
- $ref: "#/components/parameters/NewJobId"
- $ref: "#/components/parameters/IncludeHeader"
- name: invisible_to_owner
@@ -5216,6 +5234,8 @@ paths:
- $ref: "#/components/parameters/ArgsFilter"
- $ref: "#/components/parameters/ResultFilter"
- $ref: "#/components/parameters/Tag"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- name: all_workspaces
description: get jobs from all workspaces (only valid if request come from the `admins` workspace)
in: query
@@ -5318,6 +5338,8 @@ paths:
- $ref: "#/components/parameters/ArgsFilter"
- $ref: "#/components/parameters/ResultFilter"
- $ref: "#/components/parameters/Tag"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- name: is_skipped
description: is the job skipped
in: query
@@ -5367,6 +5389,8 @@ paths:
- $ref: "#/components/parameters/ArgsFilter"
- $ref: "#/components/parameters/Tag"
- $ref: "#/components/parameters/ResultFilter"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- name: is_skipped
description: is the job skipped
in: query
@@ -5510,6 +5534,26 @@ paths:
flow_status:
$ref: "#/components/schemas/WorkflowStatusRecord"
/w/{workspace}/jobs_u/get_log_file/{path}:
get:
summary: get log file from object store
operationId: getLogFileFromStore
tags:
- job
parameters:
- $ref: "#/components/parameters/WorkspaceId"
- name: path
in: path
required: true
schema:
type: string
responses:
"200":
description: job log
content:
text/plain:
type: string
/w/{workspace}/jobs_u/get_flow_debug_info/{id}:
get:
summary: get flow debug info
@@ -6176,6 +6220,7 @@ paths:
- $ref: "#/components/parameters/WorkspaceId"
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/PerPage"
- $ref: "#/components/parameters/ArgsFilter"
- name: path
description: filter by path
in: query
@@ -7995,6 +8040,12 @@ components:
in: query
schema:
type: string
CacheTtl:
name: cache_ttl
description: Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
in: query
schema:
type: string
NewJobId:
name: job_id
description:
@@ -8303,6 +8354,8 @@ components:
type: integer
delete_after_use:
type: boolean
visible_to_runner_only:
type: boolean
required:
- hash
- path
@@ -8389,6 +8442,8 @@ components:
type: string
concurrency_key:
type: string
visible_to_runner_only:
type: boolean
required:
- path
- summary
@@ -8707,15 +8762,21 @@ components:
- tag
Job:
allOf:
- oneOf:
oneOf:
- allOf:
- $ref: "#/components/schemas/CompletedJob"
- type: object
properties:
type:
type: string
enum: [CompletedJob]
- allOf:
- $ref: "#/components/schemas/QueuedJob"
- type: object
properties:
type:
type: string
enum: [CompletedJob, QueuedJob]
- type: object
properties:
type:
type: string
enum: [QueuedJob]
discriminator:
propertyName: type
@@ -9685,6 +9746,11 @@ components:
- $ref: "../../openflow.openapi.yaml#/components/schemas/OpenFlow"
- $ref: "#/components/schemas/FlowMetadata"
ExtraPerms:
type: object
additionalProperties:
type: boolean
FlowMetadata:
type: object
properties:
@@ -9700,9 +9766,7 @@ components:
archived:
type: boolean
extra_perms:
type: object
additionalProperties:
type: boolean
$ref: "#/components/schemas/ExtraPerms"
starred:
type: boolean
draft_only:
@@ -9717,6 +9781,8 @@ components:
type: boolean
timeout:
type: number
visible_to_runner_only:
type: boolean
required:
- path
- edited_by
@@ -9741,6 +9807,8 @@ components:
type: boolean
timeout:
type: number
visible_to_runner_only:
type: boolean
required:
- path
@@ -9872,7 +9940,8 @@ components:
created_at:
type: string
format: date-time
value: {}
value:
type: object
policy:
$ref: "#/components/schemas/Policy"
execution_mode:
@@ -10097,6 +10166,8 @@ components:
type: string
use_individual_branch:
type: boolean
group_by_folder:
type: boolean
exclude_types_override:
type: array
items:

View File

@@ -39,6 +39,7 @@ use windmill_common::{
http_get_from_hub, not_found_if_none, paginate, query_elems_from_hub, Pagination, StripPath,
},
variables::build_crypt,
HUB_BASE_URL,
};
use windmill_git_sync::{handle_deployment_metadata, DeployedObject};
@@ -633,16 +634,12 @@ async fn create_app(
async fn list_hub_apps(Extension(db): Extension<DB>) -> impl IntoResponse {
let (status_code, headers, body) = query_elems_from_hub(
&HTTP_CLIENT,
"https://hub.windmill.dev/searchUiData?approved=true",
&format!("{}/searchUiData?approved=true", *HUB_BASE_URL.read().await),
None,
&db,
)
.await?;
Ok::<_, Error>((
status_code,
headers,
body
))
Ok::<_, Error>((status_code, headers, body))
}
pub async fn get_hub_app_by_id(
@@ -651,7 +648,7 @@ pub async fn get_hub_app_by_id(
) -> JsonResult<serde_json::Value> {
let value = http_get_from_hub(
&HTTP_CLIENT,
&format!("https://hub.windmill.dev/apps/{id}/json"),
&format!("{}/apps/{}/json", *HUB_BASE_URL.read().await, id),
false,
None,
&db,

View File

@@ -166,6 +166,7 @@ pub async fn migrate(db: &DB) -> Result<(), Error> {
tracing::error!("Database had been applied more migrations than this container.
This usually mean than another container on a more recent version migrated the database and this one is on an earlier version.
Please update the container to latest. Not critical, but may cause issues if migration introduced a breaking change. Version missing: {e}");
custom_migrator.unlock().await?;
Ok(())
}
Err(err) => Err(err),

View File

@@ -1,21 +1,22 @@
#[cfg(feature = "embedding")]
use anyhow::{anyhow, Error, Result};
#[cfg(feature = "embedding")]
use std::{collections::HashMap, path::PathBuf, sync::Arc};
#[cfg(feature = "embedding")]
use anyhow::{anyhow, Error, Result};
use windmill_common::DEFAULT_HUB_BASE_URL;
#[cfg(feature = "embedding")]
use windmill_common::HUB_BASE_URL;
use axum::Router;
#[cfg(feature = "embedding")]
use axum::{
extract::{Path, Query},
Json,
Json,
};
#[cfg(feature = "embedding")]
use axum::{
routing::get, Extension
};
use axum::routing::get;
#[cfg(feature = "embedding")]
use candle_core::{Device, Tensor};
#[cfg(feature = "embedding")]
@@ -45,9 +46,14 @@ use windmill_common::utils::http_get_from_hub;
use windmill_common::error::JsonResult;
#[cfg(feature = "embedding")]
use crate::{resources::ResourceType, HTTP_CLIENT};
#[cfg(feature = "embedding")]
lazy_static::lazy_static! {
pub static ref EMBEDDINGS_DB: Arc<RwLock<Option<EmbeddingsDb>>> = Arc::new(RwLock::new(None));
pub static ref MODEL_INSTANCE: Arc<RwLock<Option<Arc<ModelInstance>>>> = Arc::new(RwLock::new(None));
}
#[cfg(feature = "embedding")]
#[derive(Deserialize)]
struct HubScriptsQuery {
@@ -71,9 +77,8 @@ pub struct HubScriptResult {
#[cfg(feature = "embedding")]
async fn query_hub_scripts(
Query(query): Query<HubScriptsQuery>,
Extension(embeddings_db): Extension<Arc<RwLock<Option<EmbeddingsDb>>>>,
) -> JsonResult<Vec<HubScriptResult>> {
let embeddings_db = embeddings_db.read().await;
let embeddings_db = EMBEDDINGS_DB.read().await;
if let Some(embeddings_db) = embeddings_db.as_ref() {
let results = embeddings_db
@@ -88,7 +93,6 @@ async fn query_hub_scripts(
}
}
#[cfg(feature = "embedding")]
#[derive(Deserialize)]
struct ResourceTypesQuery {
@@ -106,9 +110,8 @@ pub struct ResourceTypeResult {
async fn query_resource_types(
Query(query): Query<ResourceTypesQuery>,
Path(w_id): Path<String>,
Extension(embeddings_db): Extension<Arc<RwLock<Option<EmbeddingsDb>>>>,
) -> JsonResult<Vec<ResourceTypeResult>> {
let embeddings_db = embeddings_db.read().await;
let embeddings_db = EMBEDDINGS_DB.read().await;
if let Some(embeddings_db) = embeddings_db.as_ref() {
let results = embeddings_db
@@ -123,7 +126,6 @@ async fn query_resource_types(
}
}
#[cfg(feature = "embedding")]
#[derive(Deserialize, Debug, Clone)]
struct HubScript {
@@ -292,24 +294,41 @@ impl EmbeddingsDb {
self.db
.create_collection("resource_types".to_string(), 384, Distance::Cosine)?;
let response = HTTP_CLIENT
.get("https://bucket.windmillhub.com/embeddings/scripts_embeddings.json")
.send()
.await;
let response =
if response.is_err() || response.as_ref().unwrap().error_for_status_ref().is_err() {
tracing::warn!("Failed to get scripts embeddings from bucket, trying hub...");
let hub_base_url = HUB_BASE_URL.read().await.clone();
let response = match hub_base_url.as_str() {
DEFAULT_HUB_BASE_URL => {
let response = HTTP_CLIENT
.get("https://bucket.windmillhub.com/embeddings/scripts_embeddings.json")
.send()
.await;
if response.is_err() || response.as_ref().unwrap().error_for_status_ref().is_err() {
tracing::warn!("Failed to get scripts embeddings from bucket, trying hub...");
http_get_from_hub(
&HTTP_CLIENT,
&format!("{}/scripts/embeddings", hub_base_url),
false,
None,
pg_db,
)
.await?
} else {
response.unwrap()
}
}
_ => {
http_get_from_hub(
&HTTP_CLIENT,
"https://hub.windmill.dev/scripts/embeddings",
&format!("{}/scripts/embeddings", hub_base_url),
false,
None,
pg_db,
)
.await?
} else {
response.unwrap()
};
}
};
if response.error_for_status_ref().is_err() {
return Err(anyhow!(
"Failed to get scripts embeddings from hub with error code: {}",
@@ -338,25 +357,40 @@ impl EmbeddingsDb {
self.db.insert_into_collection("scripts", embedding)?;
}
let response = HTTP_CLIENT
.get("https://bucket.windmillhub.com/embeddings/resource_types_embeddings.json")
.send()
.await;
let response = if response.is_err()
|| response.as_ref().unwrap().error_for_status_ref().is_err()
{
tracing::warn!("Failed to get resource types embeddings from bucket, trying hub...");
http_get_from_hub(
&HTTP_CLIENT,
"https://hub.windmill.dev/resource_types/embeddings",
false,
None,
pg_db,
)
.await?
} else {
response.unwrap()
let response = match hub_base_url.as_str() {
DEFAULT_HUB_BASE_URL => {
let response = HTTP_CLIENT
.get("https://bucket.windmillhub.com/embeddings/resource_types_embeddings.json")
.send()
.await;
if response.is_err() || response.as_ref().unwrap().error_for_status_ref().is_err() {
tracing::warn!(
"Failed to get resource types embeddings from bucket, trying hub..."
);
http_get_from_hub(
&HTTP_CLIENT,
&format!("{}/resource_types/embeddings", hub_base_url),
false,
None,
pg_db,
)
.await?
} else {
response.unwrap()
}
}
_ => {
http_get_from_hub(
&HTTP_CLIENT,
&format!("{}/resource_types/embeddings", hub_base_url),
false,
None,
pg_db,
)
.await?
}
};
if response.error_for_status_ref().is_err() {
return Err(anyhow!(
"Failed to get resource types embeddings from hub with error code: {}",
@@ -554,9 +588,7 @@ fn normalize_l2(v: &Tensor) -> Result<Tensor> {
}
#[cfg(feature = "embedding")]
pub fn load_embeddings_db(db: &Pool<Postgres>) -> Arc<RwLock<Option<EmbeddingsDb>>> {
let embeddings_db: Arc<RwLock<Option<EmbeddingsDb>>> = Arc::new(RwLock::new(None));
pub fn load_embeddings_db(db: &Pool<Postgres>) -> () {
let disable_embedding = std::env::var("DISABLE_EMBEDDING")
.ok()
.map(|x| x.parse::<bool>().unwrap_or(false))
@@ -564,24 +596,14 @@ pub fn load_embeddings_db(db: &Pool<Postgres>) -> Arc<RwLock<Option<EmbeddingsDb
if !disable_embedding {
let db_clone = db.clone();
let embeddings_clone: Arc<RwLock<Option<EmbeddingsDb>>> = embeddings_db.clone();
tokio::spawn(async move {
let model_instance = ModelInstance::new().await;
if let Ok(model_instance) = model_instance {
let model_instance = Arc::new(model_instance);
let mut model_instance_lock = MODEL_INSTANCE.write().await;
*model_instance_lock = Some(Arc::new(model_instance));
drop(model_instance_lock);
loop {
tracing::info!("Creating embeddings DB...");
let new_embeddings_db =
EmbeddingsDb::new(&db_clone, model_instance.clone()).await;
if let Err(e) = new_embeddings_db.as_ref() {
tracing::error!("Failed to create embeddings db: {}", e);
} else {
let mut embeddings_db = embeddings_clone.write().await;
*embeddings_db = new_embeddings_db.ok();
tracing::info!("Created embeddings DB");
}
update_embeddings_db(&db_clone).await;
tokio::time::sleep(std::time::Duration::from_secs(3600 * 24)).await;
}
} else {
@@ -592,39 +614,41 @@ pub fn load_embeddings_db(db: &Pool<Postgres>) -> Arc<RwLock<Option<EmbeddingsDb
}
});
}
embeddings_db
}
#[cfg(feature = "embedding")]
pub fn workspaced_service(embeddings_db: Option<Arc<RwLock<Option<EmbeddingsDb>>>>) -> Router {
if let Some(embeddings_db) = embeddings_db {
Router::new()
.route("/query_resource_types", get(query_resource_types))
.layer(Extension(embeddings_db))
pub async fn update_embeddings_db(db: &Pool<Postgres>) -> () {
if let Some(model_instance) = MODEL_INSTANCE.read().await.as_ref() {
tracing::info!("Creating embeddings DB...");
let new_embeddings_db = EmbeddingsDb::new(&db, model_instance.clone()).await;
if let Err(e) = new_embeddings_db.as_ref() {
tracing::error!("Failed to create embeddings db: {}", e);
} else {
let mut embeddings_db = EMBEDDINGS_DB.write().await;
*embeddings_db = new_embeddings_db.ok();
tracing::info!("Created embeddings DB");
}
} else {
Router::new()
tracing::error!("Could not update embeddings DB, model instance not initialized");
}
}
#[cfg(feature = "embedding")]
pub fn global_service(embeddings_db: Option<Arc<RwLock<Option<EmbeddingsDb>>>>) -> Router {
if let Some(embeddings_db) = embeddings_db {
Router::new()
.route("/query_hub_scripts", get(query_hub_scripts))
.layer(Extension(embeddings_db))
} else {
Router::new()
}
pub fn workspaced_service() -> Router {
Router::new().route("/query_resource_types", get(query_resource_types))
}
#[cfg(not(feature = "embedding"))]
pub fn workspaced_service(_embeddings_db: Option<()>) -> Router {
Router::new()
#[cfg(feature = "embedding")]
pub fn global_service() -> Router {
Router::new().route("/query_hub_scripts", get(query_hub_scripts))
}
#[cfg(not(feature = "embedding"))]
pub fn global_service(_embeddings_db: Option<()>) -> Router {
Router::new()
pub fn workspaced_service() -> Router {
Router::new()
}
#[cfg(not(feature = "embedding"))]
pub fn global_service() -> Router {
Router::new()
}

View File

@@ -31,6 +31,7 @@ use sqlx::{FromRow, Postgres, Transaction};
use windmill_audit::audit_ee::audit_log;
use windmill_audit::ActionKind;
use windmill_common::utils::query_elems_from_hub;
use windmill_common::HUB_BASE_URL;
use windmill_common::{
db::UserDB,
error::{self, to_anyhow, Error, JsonResult, Result},
@@ -167,7 +168,10 @@ async fn list_flows(
async fn list_hub_flows(Extension(db): Extension<DB>) -> impl IntoResponse {
let (status_code, headers, response) = query_elems_from_hub(
&HTTP_CLIENT,
"https://hub.windmill.dev/searchFlowData?approved=true",
&format!(
"{}/searchFlowData?approved=true",
*HUB_BASE_URL.read().await
),
None,
&db,
)
@@ -199,7 +203,7 @@ pub async fn get_hub_flow_by_id(
) -> JsonResult<serde_json::Value> {
let value = http_get_from_hub(
&HTTP_CLIENT,
&format!("https://hub.windmill.dev/flows/{id}/json"),
&format!("{}/flows/{}/json", *HUB_BASE_URL.read().await, id),
false,
None,
&db,
@@ -319,7 +323,7 @@ async fn create_flow(
sqlx::query!(
"INSERT INTO flow (workspace_id, path, summary, description, value, edited_by, edited_at, \
schema, dependency_job, draft_only, tag, dedicated_worker) VALUES ($1, $2, $3, $4, $5, $6, now(), $7::text::json, NULL, $8, $9, $10)",
schema, dependency_job, draft_only, tag, dedicated_worker, visible_to_runner_only) VALUES ($1, $2, $3, $4, $5, $6, now(), $7::text::json, NULL, $8, $9, $10, $11)",
w_id,
nf.path,
nf.summary,
@@ -329,7 +333,8 @@ async fn create_flow(
nf.schema.and_then(|x| serde_json::to_string(&x.0).ok()),
nf.draft_only,
nf.tag,
nf.dedicated_worker
nf.dedicated_worker,
nf.visible_to_runner_only.unwrap_or(false),
)
.execute(&mut tx)
.await?;
@@ -485,7 +490,7 @@ async fn update_flow(
let old_dep_job = not_found_if_none(old_dep_job, "Flow", flow_path)?;
sqlx::query!(
"UPDATE flow SET path = $1, summary = $2, description = $3, value = $4, edited_by = $5, \
edited_at = now(), schema = $6::text::json, dependency_job = NULL, draft_only = NULL, tag = $9, dedicated_worker = $10
edited_at = now(), schema = $6::text::json, dependency_job = NULL, draft_only = NULL, tag = $9, dedicated_worker = $10, visible_to_runner_only = $11
WHERE path = $7 AND workspace_id = $8",
nf.path,
nf.summary,
@@ -496,7 +501,8 @@ async fn update_flow(
flow_path,
w_id,
nf.tag,
nf.dedicated_worker
nf.dedicated_worker,
nf.visible_to_runner_only.unwrap_or(false),
)
.execute(&mut tx)
.await?;
@@ -669,6 +675,8 @@ pub struct FlowWDraft {
pub ws_error_handler_muted: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_worker: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub visible_to_runner_only: Option<bool>,
}
async fn get_flow_by_path_w_draft(
@@ -680,7 +688,7 @@ async fn get_flow_by_path_w_draft(
let mut tx = user_db.begin(&authed).await?;
let flow_o = sqlx::query_as::<_, FlowWDraft>(
"SELECT flow.path, flow.summary, flow,description, flow.schema, flow.value, flow.extra_perms, flow.draft_only, flow.ws_error_handler_muted, flow.dedicated_worker, draft.value as draft, flow.tag
"SELECT flow.path, flow.summary, flow,description, flow.schema, flow.value, flow.extra_perms, flow.draft_only, flow.ws_error_handler_muted, flow.dedicated_worker, draft.value as draft, flow.tag, flow.visible_to_runner_only
FROM flow
LEFT JOIN draft ON
flow.path = draft.path AND draft.workspace_id = $2 AND draft.typ = 'flow'
@@ -893,6 +901,7 @@ mod tests {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
FlowModule {
id: "b".to_string(),
@@ -919,6 +928,7 @@ mod tests {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
FlowModule {
id: "c".to_string(),
@@ -942,6 +952,7 @@ mod tests {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
},
],
failure_module: Some(FlowModule {
@@ -965,6 +976,7 @@ mod tests {
timeout: None,
priority: None,
delete_after_use: None,
continue_on_error: None,
}),
same_worker: false,
concurrent_limit: None,
@@ -973,6 +985,7 @@ mod tests {
cache_ttl: None,
priority: None,
early_return: None,
concurrency_key: None,
};
let expect = serde_json::json!({
"modules": [

View File

@@ -478,13 +478,22 @@ async fn delete_folder(
not_found_if_none(get_folderopt(&mut tx, &w_id, &name).await?, "Folder", &name)?;
sqlx::query!(
"DELETE FROM folder WHERE name = $1 AND workspace_id = $2",
let del = sqlx::query_scalar!(
"DELETE FROM folder WHERE name = $1 AND workspace_id = $2 RETURNING 1",
name,
w_id
)
.execute(&mut *tx)
.await?;
.fetch_optional(&mut *tx)
.await?
.flatten();
if del.is_none() {
return Err(windmill_common::error::Error::NotAuthorized(format!(
"Not authorized to delete folder {}",
name
)));
}
audit_log(
&mut *tx,
&authed.username,

View File

@@ -1,8 +1,6 @@
use crate::{db::DB, HTTP_CLIENT};
use axum::{
extract::Query, response::IntoResponse, routing::get, Extension, Router,
};
use windmill_common::{error::Error, utils::query_elems_from_hub};
use axum::{extract::Query, response::IntoResponse, routing::get, Extension, Router};
use windmill_common::{error::Error, utils::query_elems_from_hub, HUB_BASE_URL};
pub fn global_service() -> Router {
Router::new().route("/hub/list", get(list_hub_integrations))
@@ -24,14 +22,10 @@ async fn list_hub_integrations(
let (status_code, headers, response) = query_elems_from_hub(
&HTTP_CLIENT,
"https://hub.windmill.dev/integrations/list",
&format!("{}/integrations/list", *HUB_BASE_URL.read().await),
Some(query_params),
&db,
)
.await?;
Ok::<_, Error>((
status_code,
headers,
response
))
Ok::<_, Error>((status_code, headers, response))
}

Some files were not shown because too many files have changed in this diff Show More