Commit Graph

169 Commits

Author SHA1 Message Date
ex0ns dc55d45bae feat(job): run job by hash (#551)
It was possible to run them using a webhook, but not through an endpoint.
This PR aims to fix that so the user can target a specific version of
the script to run.
2022-09-11 16:39:48 +02:00
Ruben Fiszel 66df58af47 feat: is_trigger is just a type tag, soon to include failure and command (#523)
* script kind

* all

* init code flow

* kind: trigger

* kind: trigger
2022-09-05 09:55:04 +02:00
Ruben Fiszel 778ed223b1 logs around fetching job 2022-09-04 13:30:48 +02:00
Ruben Fiszel 42abded48e logs around job execution contain job id 2022-09-04 13:11:43 +02:00
Ruben Fiszel 218b611db2 use local time for timeout 2022-09-04 13:05:39 +02:00
Ruben Fiszel 5485bf7bce fix: last ping is set when the job is started avoiding erronous restart 2022-09-04 12:51:55 +02:00
sqwishy afd18c44b9 flow step retry feature (#493)
* flow step retry feature

* comparison constant on right side for clarity

* raise high retry values when starting a flow

also renamed duration to interval to be more specific about the retry
interval/period between tries or attempts

* add flow retry to openflow openapi

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2022-09-03 20:38:31 +02:00
Ruben Fiszel 1d873d5bd5 feat: clean openflow spec v1 (#491)
* clean api 2

* the rest

* clean tests

* stop_after_if test

* unbox `modules: Vec<FlowModule>` in `ForloopFlow`

* migrate

* initFlow stop_after_if_expr and skip_if_stopped

* s/migrateInitTransform/migrateFlowModule

I didn't read the name before... oops

* sql migration for openflow changes

* fix frontend migration code

Co-authored-by: sqwishy <somebody@froghat.ca>
2022-09-02 01:26:39 +02:00
Ruben Fiszel 84762df53b pass language to completed job 2022-08-25 14:55:38 +02:00
Ruben Fiszel adb1974c29 list flow steps only on the tab 'all' 2022-08-23 15:18:44 +02:00
Ruben Fiszel 5563990d74 add base_url to DENO_AUTH_TOKENS 2022-08-22 02:47:44 +02:00
Ruben Fiszel 925c581f07 feat: pass bearerToken as queryArg 2022-08-21 22:39:19 +02:00
Ruben Fiszel b467845aa6 feat: implicit types infered from default parameters 2022-08-21 22:01:24 +02:00
Ruben Fiszel e18f814d77 fix: restart zombie jobs was restarting all jobs 2022-08-21 12:19:31 +02:00
Ruben Fiszel 59140a570c remove unecessary comment in worker 2022-08-21 12:10:03 +02:00
Ruben Fiszel c265e1a385 remove unecessary transaction in worker 2022-08-21 12:08:15 +02:00
Ruben Fiszel f1c8f593da optimize python parsing + adding tests 2022-08-21 10:53:41 +02:00
Ruben Fiszel c9e0afd652 fix: cancel a flow now does the expected behavior 2022-08-20 19:23:43 +02:00
Ruben Fiszel f01991b7a4 fix(backend): clear_schedule only clear non running jobs 2022-08-20 19:14:16 +02:00
Ruben Fiszel feb49e9561 fix(backend): started_at info for completed_job is no more completed_at 2022-08-20 17:06:13 +02:00
Ruben Fiszel 8f15bc1543 optimize for python code having no imports 2022-08-20 16:21:04 +02:00
Ruben Fiszel 0caf7e4070 fix collection on forloops + increase number of tests 2022-08-20 16:08:11 +02:00
Ruben Fiszel f679e67de8 feat: rely on PG time rather than worker time 2022-08-20 15:16:08 +02:00
sqwishy 84fd2e2532 feat(backend): failure_module (#452)
* run failure_module

- renames FlowModule.input_transform to input_transforms
- parse_deno_signature prints source on failure instead of debug
  representation of AST

* s/should_continue_job/should_continue_flow
2022-08-19 20:18:07 +02:00
sqwishy e42355b27c fix(backend): fixes forloop with 257 items only iterates once (#446)
usize as u8 will mask out the higher bits, so 0x100 as u8 is 0x00, 0x101
is 0x01 and only iterates once, etc....

refactors push_next_flow_job a bit
2022-08-19 17:14:46 +02:00
Ruben Fiszel 131483751f pass BASE_INTERNAL_URL to the python process 2022-08-19 07:09:50 +02:00
Ruben Fiszel 8329e1ab95 pass BASE_INTERNAL_URL to the deno process 2022-08-19 07:02:10 +02:00
Ruben Fiszel f26ace0cf1 fix export to tarball 2022-08-19 00:55:38 +02:00
Ruben Fiszel 7564901a84 use ts extension for private imports 2022-08-18 22:18:57 +02:00
Ruben Fiszel d2f5505589 feat: private imports 2022-08-18 21:49:24 +02:00
Ruben Fiszel d3e0982bac fix behavior of disable nsjail and disable nuser 2022-08-18 17:22:16 +02:00
Ruben Fiszel 79ec90acfc fix forloop empty no step afterward 2022-08-18 00:01:04 +02:00
Ruben Fiszel 47169f9c0b fix: handle 0 length for-loops in the backend (#440)
* wip

* TODO

* my fix works I think
2022-08-17 15:56:49 +02:00
Ruben Fiszel ad4c06df94 remove zendesk 2022-08-16 23:45:58 +02:00
Ruben Fiszel d31804802e fix(backend): collecting result when for loop is not the last step #422
* wip: step after forloop results

Adding a failing test so I don't forget out about it.

In the last step, `items` is `4`, the last item in iteration, rather
than the collected list.  My guess is this is because the results aren't
collected unless the flow quits early or the forloop module is the last
module so that `last_step` is true.

* test

Co-authored-by: sqwishy <somebody@froghat.ca>
2022-08-16 23:03:55 +02:00
Ruben Fiszel f1b9964fe0 pass path as env variable 2022-08-15 13:51:16 +02:00
Ruben Fiszel 7b81de9665 make executable paths configurable 2022-08-15 13:32:51 +02:00
Ruben Fiszel 95274ea651 fix: set secure only for https 2022-08-15 10:40:01 +02:00
Ruben Fiszel 8a643b2209 remove hardcoded paths when nsjail is disabled 2022-08-15 10:08:40 +02:00
Ruben Fiszel 698c510f81 set local authorization -> set role 2022-08-14 23:33:09 +02:00
Ruben Fiszel 08374e7984 feat: db users: admin -> windmill_admin, app -> windmill_user (#404)
* feat: db users: admin -> windmill_admin, app -> windmill_user

* clean up

* backend tests

* backend tests

* backend tests

* lock roles in first migration

* check if user is superuser too

* add init-db

* add init-db
2022-08-14 18:20:27 +02:00
Ruben Fiszel 3d6167399a remove println 2022-08-13 21:20:50 +02:00
Ruben Fiszel 6e8e0e59d0 feat: add literal object type support (#401) 2022-08-13 21:18:54 +02:00
Ruben Fiszel 7ff94381b1 feat: support union type will null | undefined (#400) 2022-08-13 19:35:52 +02:00
Ruben Fiszel 2d60bf2396 feat: support union types (#398) 2022-08-13 17:25:16 +02:00
Ruben Fiszel 152287ab9f full backend ci tests
* attempt ci in container

* attempt ci in container

* psql

* psql

* psql

* psql

* privileged

* cache
2022-08-12 11:21:19 +02:00
sqwishy 876709fbe9 make initialize_tracing sync and infallable (#395)
also remove tiny bit of raceyness from worker tests, there's a bit of
sync around Once but it's short so it should be fine
2022-08-12 10:44:41 +02:00
sqwishy b17c1b1d02 pass broadcast::Receiver instead of Sender (#396)
I think this was just added a couple months ago.  If all Senders drop
the Receivers close.  This change helps avoid creating Senders that you
never send on that are just held in scope and prevent the channel from
closing.
2022-08-12 10:43:06 +02:00
sqwishy 289cd2ebaa remove unused mutex parameter for run_worker (#394) 2022-08-12 10:42:46 +02:00
Ruben Fiszel b79ac67987 fix schedule bug 2022-08-12 04:03:39 +02:00