Commit Graph

5945 Commits

Author SHA1 Message Date
Ruben Fiszel
c3c965c478 feat(backend): add WM_FLOW_JOB_ID 2022-10-01 09:02:00 +02:00
Ruben Fiszel
fd5921dc30 hotfix trusted host for pip-compile 2022-09-28 09:17:08 +02:00
Ruben Fiszel
7fd76265f7 feat: add private registries pip (#636)
* add private registries pip

* add private registries pip

* fix

* fix

* fix

* echo parameters
2022-09-28 08:47:43 +02:00
Ruben Fiszel
dc57402be9 buildcache not on ghcr 2022-09-26 04:19:31 +02:00
Ruben Fiszel
a4f31bbdd6 do not restart flow as zombie job 2022-09-26 00:45:26 +02:00
Ruben Fiszel
04ab59f928 refactor logs panel everywhere applicable (#625)
* init

* init

* progress

* progress

* refactor logs entirely

* fix sqlx
2022-09-25 18:03:51 +02:00
Ruben Fiszel
772195baed fix cancel job 2022-09-25 17:49:11 +02:00
Ruben Fiszel
4bdeb1b294 fix cancel job 2022-09-25 17:13:03 +02:00
Ruben Fiszel
f1fdb4e0b9 fix cancel job 2022-09-25 16:36:32 +02:00
sqwishy
c3ce89ec5f reorganize handle_child (#606)
* reorganize handle_child

There were a couple issues with the current implementation:

1. When reading stdout and stderr from the child, as soon as we hit EOF
   on one we would stop reading from both (line 1420). This could lead
   to the return value not being read from the job program.

2. Lines read from stdout and stderr are put into a channel and read
   elsewhere with `rx.recv()` (line 1497) but that channel isn't read
   until empty.  It is only read in the `while !done.load(...)` (line
   1449) loop and that loop can stop after any `.store(true, ...)`.
   Which happens when the child exits, when the job is cancelled, when
   either stdout or stderr reach EOF...

   This can be verified by putting `dbg!(rx.recv().await)` or a similar
   assertion after the while loop before returning from that function.
   It shows the channel still containing log lines on rare occasions.

I was pretty careful in this to maintain the current behaviour; adding
comments to express intention.

One difference in this is that some regular intervals (cancel check and
ping update) should be more regular?

Before...

> at 00ms wait for 10ms
> at 10ms do things for 3ms
> at 13ms wait again for *10ms*
> at 23ms do things again ...

With change...

> at 00ms wait for 10ms
> at 10ms do things for 3ms
> at 13ms wait again but for *7ms*
> at 20ms do things again ...

Which I'm guessing is preferable but I could be wrong.

* renames; interpolate values in log messages

* do `append_logs()` in tokio::task

* tokio::time::interval & close pipe after limit

* clean up comments
2022-09-24 22:55:52 +02:00
sqwishy
e81b53b3ef update cron v0.12.0 (#623) 2022-09-24 21:18:36 +02:00
sqwishy
45d0760ab9 remove delay between spawning each worker (#614) 2022-09-21 21:05:19 -07:00
dependabot[bot]
84267eee0b chore(deps): bump anyhow from 1.0.64 to 1.0.65 in /backend (#600)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.64 to 1.0.65.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.64...1.0.65)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 22:06:10 +00:00
dependabot[bot]
8e09502031 chore(deps): bump thiserror from 1.0.34 to 1.0.35 in /backend (#604)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.34 to 1.0.35.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.34...1.0.35)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 22:03:02 +00:00
dependabot[bot]
0aeec2e735 chore(deps): bump swc_ecma_parser from 0.119.7 to 0.119.12 in /backend (#597)
Bumps [swc_ecma_parser](https://github.com/swc-project/swc) from 0.119.7 to 0.119.12.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_ecma_parser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 22:00:28 +00:00
dependabot[bot]
81139c0ba7 chore(deps): bump swc_common from 0.28.7 to 0.28.8 in /backend (#601)
Bumps [swc_common](https://github.com/swc-project/swc) from 0.28.7 to 0.28.8.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 21:05:54 +00:00
dependabot[bot]
56cec8d731 chore(deps): bump itertools from 0.10.3 to 0.10.4 in /backend (#592)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.3 to 0.10.4.
- [Release notes](https://github.com/rust-itertools/itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.3...v0.10.4)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 20:39:40 +00:00
dependabot[bot]
1cfe6d299f chore(deps): bump swc_ecma_ast from 0.91.3 to 0.91.7 in /backend (#599)
Bumps [swc_ecma_ast](https://github.com/swc-project/swc) from 0.91.3 to 0.91.7.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_ecma_ast
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 20:27:42 +00:00
dependabot[bot]
799a877579 chore(deps): bump swc_common from 0.28.3 to 0.28.7 in /backend (#593)
Bumps [swc_common](https://github.com/swc-project/swc) from 0.28.3 to 0.28.7.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 19:43:11 +00:00
dependabot[bot]
6d64827ea7 chore(deps): bump deno_core from 0.150.0 to 0.151.0 in /backend (#590)
Bumps [deno_core](https://github.com/denoland/deno) from 0.150.0 to 0.151.0.
- [Release notes](https://github.com/denoland/deno/releases)
- [Changelog](https://github.com/denoland/deno/blob/main/Releases.md)
- [Commits](https://github.com/denoland/deno/commits)

---
updated-dependencies:
- dependency-name: deno_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 19:18:05 +00:00
dependabot[bot]
9c542225bf chore(deps): bump sqlx from 0.6.1 to 0.6.2 in /backend (#589)
Bumps [sqlx](https://github.com/launchbadge/sqlx) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/launchbadge/sqlx/releases)
- [Changelog](https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md)
- [Commits](https://github.com/launchbadge/sqlx/compare/v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: sqlx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 19:06:04 +00:00
dependabot[bot]
7e9aee7443 chore(deps): bump tokio from 1.21.0 to 1.21.1 in /backend (#587)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.0...tokio-1.21.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 18:44:19 +00:00
ex0ns
f5cd65093c feat(dev): setup devcontainer (#549)
Co-authored-by: ex0ns <ex0ns@protonmail.ch>
2022-09-19 16:58:22 +02:00
Ruben Fiszel
cdab7befcd more details on error handling job 2022-09-18 10:11:21 +02:00
sqwishy
a4a583f4e3 feat(backend): flow suspend resume (#522)
Flow observes `suspend` setting and will wait for resume messages sent for the job before continuing to the next step in a flow.

Adds endpoints under workspaces at `/jobs/<cancel|resume>/<job-uuid>` to either cancel or resume the job with a payload. For POST requests to the endpoint, payload is a JSON document. For GET requests to the endpoints, the payload is a base64url encoded JSON document as the value of the payload query parameter.
2022-09-14 11:46:57 -07:00
Ruben Fiszel
9d991f968c feat: implement go support (#571)
* progress

* progress

* all in one

* frontend

* small nits

* go job test

* go.sum is optional

* add golang-go to backend test image

Co-authored-by: sqwishy <somebody@froghat.ca>
2022-09-13 21:14:21 +02:00
Ruben Fiszel
52ec744992 fix: iterator input transform is made more generic (#524)
* fix: iterator expr is standardized with regular input transforms

* fix: iterator expr is standardized with regular input transforms

* v2
2022-09-13 20:11:00 +02:00
Ruben Fiszel
1c922085f3 chore(deps): update backend 2022-09-13 11:12:54 +02:00
dependabot[bot]
6723770034 chore(deps): bump deno_core from 0.149.0 to 0.150.0 in /backend (#560)
Bumps [deno_core](https://github.com/denoland/deno) from 0.149.0 to 0.150.0.
- [Release notes](https://github.com/denoland/deno/releases)
- [Changelog](https://github.com/denoland/deno/blob/main/Releases.md)
- [Commits](https://github.com/denoland/deno/commits)

---
updated-dependencies:
- dependency-name: deno_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 19:41:19 +00:00
dependabot[bot]
b350be1a11 chore(deps): bump swc_ecma_ast from 0.90.16 to 0.90.20 in /backend (#561)
Bumps [swc_ecma_ast](https://github.com/swc-project/swc) from 0.90.16 to 0.90.20.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_ecma_ast
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 19:17:08 +00:00
dependabot[bot]
638d8ca8a0 chore(deps): bump url from 2.2.2 to 2.3.0 in /backend (#558)
Bumps [url](https://github.com/servo/rust-url) from 2.2.2 to 2.3.0.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.2.2...v2.3.0)

---
updated-dependencies:
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 19:02:33 +00:00
dependabot[bot]
da5d25bb00 chore(deps): bump swc_common from 0.27.13 to 0.27.16 in /backend (#554)
Bumps [swc_common](https://github.com/swc-project/swc) from 0.27.13 to 0.27.16.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 18:38:24 +00:00
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
dependabot[bot]
f3c3efb662 chore(deps): bump swc_ecma_parser from 0.118.3 to 0.118.6 in /backend (#537)
Bumps [swc_ecma_parser](https://github.com/swc-project/swc) from 0.118.3 to 0.118.6.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_ecma_parser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 19:50:26 +00:00
dependabot[bot]
e86ec81f4d chore(deps): bump anyhow from 1.0.62 to 1.0.64 in /backend (#531)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.62 to 1.0.64.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.62...1.0.64)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 19:42:55 +00:00
dependabot[bot]
3424a22be6 chore(deps): bump thiserror from 1.0.32 to 1.0.34 in /backend (#536)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.32 to 1.0.34.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.32...1.0.34)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 19:34:43 +00:00
dependabot[bot]
a0dd06ae9f chore(deps): bump swc_ecma_ast from 0.90.15 to 0.90.16 in /backend (#532)
Bumps [swc_ecma_ast](https://github.com/swc-project/swc) from 0.90.15 to 0.90.16.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits)

---
updated-dependencies:
- dependency-name: swc_ecma_ast
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 19:19:53 +00:00
dependabot[bot]
100a8f28f0 chore(deps): bump urlencoding from 2.1.0 to 2.1.2 in /backend (#530)
Bumps [urlencoding](https://github.com/kornelski/rust_urlencoding) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/kornelski/rust_urlencoding/releases)
- [Commits](https://github.com/kornelski/rust_urlencoding/commits/v2.1.2)

---
updated-dependencies:
- dependency-name: urlencoding
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 19:11:16 +00:00
dependabot[bot]
4f2d9fa0da chore(deps): bump headers from 0.3.7 to 0.3.8 in /backend (#528)
Bumps [headers](https://github.com/hyperium/headers) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/hyperium/headers/releases)
- [Commits](https://github.com/hyperium/headers/compare/headers-v0.3.7...headers-v0.3.8)

---
updated-dependencies:
- dependency-name: headers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 18:58:09 +00:00
dependabot[bot]
b13038e74a chore(deps): bump deno_core from 0.148.0 to 0.149.0 in /backend (#527)
Bumps [deno_core](https://github.com/denoland/deno) from 0.148.0 to 0.149.0.
- [Release notes](https://github.com/denoland/deno/releases)
- [Changelog](https://github.com/denoland/deno/blob/main/Releases.md)
- [Commits](https://github.com/denoland/deno/commits)

---
updated-dependencies:
- dependency-name: deno_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 18:52:23 +00: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
Ruben Fiszel
23cc49c576 fix audit log can accept username up to 255 2022-09-04 00:25:45 +02:00
Ruben Fiszel
9323f1f461 fix audit log can accept username up to 255 2022-09-04 00:07: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
f61e882cb6 chore(main): release 1.35.0 (#457)
* chore(main): release 1.35.0

* Apply automatic changes

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2022-09-02 10:38:25 +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