Commit Graph

42 Commits

Author SHA1 Message Date
Ruben Fiszel
e6e08108a6 fix: improve handling of schedules with retries and concurrency limits 2024-07-05 20:37:30 +02:00
Ruben Fiszel
2812792326 fix: memory optimization for flow with big args (#4019) 2024-07-04 10:08:42 +02:00
HugoCasa
ec673ac6b4 feat: schedule pausing (#3976)
* feat: schedule pausing

* fix: improve UI
2024-06-25 23:39:34 +02:00
HugoCasa
93f58056a0 feat: replace ephemeral tokens by jwt (#3908)
* feat: replace ephemeral tokens by jwt

* fix: migration + sqlx

* fix: tests, agent, ee ref

* fix: sqlx

* fix: tests

* fix: jwt prefix change + fix tests

* fix: nit

* fix: handle agent mode
2024-06-14 13:07:35 +02:00
Ruben Fiszel
c43d04b95d feat: reduce memory usage (#3768)
* all

* all

* optimize deserialize

* all

* all

* fix issue

* fix compile

* fix compile

* fix compile

* fix compile

* fix compile

* fix compile

* fix compile

* fix compile

* fix compile

* fix compile
2024-05-19 21:58:38 +02:00
wendrul
60b036c1ae Add concurrency limits observability (#3586)
* Add concurrency_key table and field to payload

Add a new table custom_concurrency_key for storing concurrency keys on a
per job basis. Add the field to the job payload to populate the table on
creation of a new job.

* Rename to custom_concurrency_key

Be more explicit about the nature of the option variable by calling it
a more appropriate name.

* Delete concurrency_keys on delete_expire_items

* Propagate db errors up

* Add ref to EE changes

* update sqlx

* Add concurrency_key to tests

* Revert renaming of FlowValue field

FlowValue field concurrency_key must be named concurrency_key for
serialization purposes.

* Remove debug print statement

* Get concurrency_key from Job

Whether it is a Completed job or a queued one, add a ways to get the
associated concurrency key

* Add endpoint to get concurrency_key

* Add endpoint and button to get job concurrency_key

Add a line with a link on the FlowMetadata that goes to the
concurrency_groups page. add endpoint to get the concurrency_key of a
job

* Merge concurrency_key tables into one

migration + change all related querrys

* Add concurrency plot to the runs page

* Prepare sqlx

* Add concurrency Key filter on UI

* Prepare sqlx

* Prepare sqlx

* Fix filter and order query

The limit makes more sense if we cut the older rows, so order by
started_at

* Factor interpolation to reuse on concurrency key

Factor the arg interpolation logic into a function and finish the
processing of concurrency key before insertion

* Remove old concurrency key processing logic

* Second transaction with userdb

To send all concurrency intervals but revealing only uuids of accessible
jobs, make a second transaction with the userdb.

* Remove old second endpoint

the intervals endpoint now also gets the concurrencyt key information
for all jobs

* Show external jobs

* Put filters into a dropdown

Create a ToggleButtonMore and put elements into a dropdown

* Add toggle between two graphs

* Add filter functionality to concurrency graph

* Improve concurrency graph front

* Fix concurrency groups page

* Prepare sqlx

* Add ref to ee

* Change migration to create new table instead

Instead of renaming the custom_concurrency_key_ended atble, we create a
new table and we will delete custom_concurrency_key_ended in the future
when it is no longer linked to any jobs

* Do small UI improvements

* Fix range fusion by not filtering past jobs

Instead of filtering jobs in the backend on a startedAfter value, limit
the query to 1000 and query all possible towards the past to get a good
context for the graph in most sane situations

* Improve frontend UI
2024-05-15 20:15:14 +02:00
HugoCasa
cb132671d3 feat: critical error side channel (#3625)
* feat: critical error side channel

* feat: trigger workspace error handler or critical channel on schedule error handling failure

* fix: build

* feat: finish critical error side channel

* feat: channels instead of just emails + move to EE

* fix: remove superfluous func

* fix: nits + ee ref

* fix: open source build

* fix: nits

* chore: update ee ref
2024-05-02 20:21:23 +02:00
Ruben Fiszel
a6cae2915a handle schedule with empty tags 2024-02-21 23:08:53 +01:00
Ruben Fiszel
fcf99217c5 nit logs around schedules 2024-02-11 23:40:56 +01:00
Guillaume Bouvignies
2edba18038 feat: Tag override for scheduled scripts (#2998)
* feat: Tag override for scheduled scripts

* Refactor WorkerTagPicker to component

* Fix test
2024-01-13 00:06:54 +01:00
Guillaume Bouvignies
2870d4882d feat: Retry for scheduled scripts (#2893)
* feat: Retry for scheduled scripts

* rename scheduldedscriptwithretry to singlescriptflow

* Schedule options under tabs
2023-12-22 14:59:46 +01:00
Guillaume Bouvignies
7c71b65a99 feat: Add default timeout for instance and custom timeout for scripts (#2811)
* feat: Add default timeout for instance and custom timeout for scripts

* final

* sqlx prepare

* Logs a warning in the job logs

* Fix merge

* JOB_DEFAULT_TIMEOUT is an optional

* Fix JOB_DEFAULT_TIMEOUT monitor loading

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2023-12-13 07:08:07 +01:00
Ruben Fiszel
518a8396b3 feat: dedicated workers for flows (#2637)
* dw for flows

* dw for flows

* all

* sqlx

* sqlx

* dedicated workers

* more comments
2023-11-17 10:00:04 +01:00
Ruben Fiszel
f15d12c3ab fix compile 2023-11-07 09:42:28 +01:00
Guillaume Bouvignies
bd69bafe59 feat: Priority queue (#2476)
* BE v1 for priority queue

* Add FE prototype

* sqlx prepare

* Disply priority badge in job detail view

* sqlx prepare post merge

* Add priority number input field next to toggle

* increase dnd timeout for app events

* Update db migration

* Fix FE import

* Add badge to script/flow details page and fix EE-only mention in tooltip

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2023-10-23 14:22:59 +02:00
Ruben Fiszel
5ac99b817e feat: dedicated workers for native-throughput performance (EE only) (#2239)
* dedicated worker

* dedicated worker

* merge

* progress

* progress

* progress

* merge

* update

* sqlx

* fix imports
2023-09-06 10:32:53 +02:00
Ruben Fiszel
8d62fbdbdc feat: add caching to flows and scripts (#2193)
* cachettl

* all
2023-08-29 13:00:20 +02:00
Ruben Fiszel
6787c8f824 fix schedule edit issue 2023-08-22 19:30:55 +02:00
Ruben Fiszel
c77d38563d remove unecessary postgres transactions and improve performance 2023-08-22 00:34:44 +02:00
Ruben Fiszel
9970f6daeb feat: migrate state path to new schema 2023-08-11 18:54:47 +02:00
Ruben Fiszel
b0660619c8 feat: add step's custom timeout 2023-07-30 20:42:24 +02:00
Jakub Kołodziejczak
223b80768a chore(backend): upgrade sqlx to ^0.7 (#1865)
* DRAFT chore(backend): upgrade sqlx to ^0.7

related to:
* https://github.com/windmill-labs/windmill/pull/1858
* https://github.com/launchbadge/sqlx/issues/1163#issuecomment-1627685514

* (vol. 2) in 0.7, `Transaction` can no longer implement `Executor` directly

ref: afb6b1066e/examples/postgres/transaction/src/main.rs (L14-L17)

notice that I'm temporarly using my custom patch
16e4c9a8f3
it's related to https://github.com/launchbadge/sqlx/issues/2611

* post git rebase chores

* use upstream fix from 0.7.1

* fix compile

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2023-07-15 14:06:20 +02:00
Guillaume Bouvignies
0327b85f89 feat: Per script concurrency limit with time window (#1816)
* Add concurrency a per-script concurrency limit

* Add a per-script per time window concurrency limit

* Improve feature with a better estimation of the next schedule timestamp

* Add concurrency limits for inline scripts

* Fix tests

* run sqlx prepare

* Add requeue event to job logs
2023-07-11 23:35:26 +02:00
Ruben Fiszel
c93393d5c0 feat: schedule error handler (#1636)
* handleError

* revert

* all
2023-05-23 20:25:41 +02:00
Ruben Fiszel
9ea18b4593 feat(backend): add job_id as a query arg to force set the new job_id 2023-05-15 10:50:43 +02:00
Ruben Fiszel
2d62ced3a5 fix script in schedule should use latest hash 2023-04-27 18:03:12 +02:00
Ruben Fiszel
02ba82064f feat(backend): worker groups (#1452)
* tagged scripts

* tagged scripts

* fix

* fix

* fix

* all

* update sqlx
2023-04-23 16:57:23 +02:00
Ruben Fiszel
1ba0e24155 feat(backend): only run fully deployed scripts 2023-04-21 12:49:47 +02:00
Ruben Fiszel
be41e45130 split worker.rs into more files 2023-04-13 17:44:47 +02:00
Kai Jellinghaus
63102b036c feat(backend): Redis based queue (#1324)
* Merge?

* Fix V8 breaking change

* WIP

* WIP

* Cleanup

* Move to git reference

* Fix Merge conflict

* update

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2023-04-11 12:24:13 +02:00
Oliver Veal
0b444ce395 feat: improved cron/schedule editor (#1362)
* basic cron schedule editing ui

* schedules run in a user-specified timezone

* fix other uses of CronInput component

* use now() from database to schedule next job

* offset -> IANA timezone conversion on db migration

* sqlx ci

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2023-04-05 16:37:24 +02:00
Ruben Fiszel
0263c20a5b introduce root_job and leaf_jobs for efficient result_by_id 2023-03-03 12:44:44 +01:00
Ruben Fiszel
49aeed88fa fix permissioned_as from username 2023-01-17 12:49:24 +01:00
Ruben Fiszel
bb4ca8c99f playwright against uffizzi (#1109)
* all

* fix perms

* move build to depot

* login

* revert to docker build

* revert to docker build

* fix playwright
2023-01-16 18:01:45 +01:00
Ruben Fiszel
e19fcce575 fix schedule permissions 2023-01-16 16:42:42 +01:00
Ruben Fiszel
6e2890f0f1 require ownership to move items && automatically edit schedule paths 2022-12-18 18:45:32 +01:00
Ruben Fiszel
59a3ba0a25 add visible_to_owner 2022-12-15 16:01:17 +01:00
Ruben Fiszel
039e1fa1e6 feat: implement usage tracker + quotas 2022-12-11 18:47:39 +01:00
Kai Jellinghaus
b87fc7796a feat(backend): Input transform errors (#1006)
* Add pre run error & propagate input transforms there

* Handle pre-run errors

* Update SQLX data

* Update SQLX data
2022-12-08 23:56:49 +01:00
Ruben Fiszel
018f8896bc feat: add include_header to pass request headers to script 2022-12-05 23:36:31 +01:00
Ruben Fiszel
4aeed1ffc8 fix edit schedule 2022-11-10 16:49:16 +01:00
Kai Jellinghaus
6263e90735 restructure the entire backend layout using workspaces (#815) 2022-10-29 11:58:06 +02:00