Commit Graph

836 Commits

Author SHA1 Message Date
pyranota
d3e0b1c636 feat: Allow setProgress and getProgress from within the script (#4400)
* Allow setting progress explicitly from script body.

This feature exposes:
 * `getProgress`
 * `setProgress`
 * `incProgress`

API in TypeScript client (python is coming soon).

NOTE: Progress cannot be out of range 0..100 and cannot decrease.

With exposed APIs there is also UI changes, so progress can be shown for individual jobs as well.

For optimization reasons, jobs start to ask for progress only after N-seconds of execution.

* feat: Add `shell.nix`

If you dont have anything but nix, dont worry, run nix-shell in root, or activate with direnv and get all needed dependencies

NOTE: You will still need docker

* feat: Add `dev.nu` to typescript client

Little helper function, allowing developer to work on ts client easier.

To use:
  `./dev.nu watch`

Now add import of windmill in body of your script and `//nobundle` on top of the file

Edit ts client in your favourite editor and hit save. Script will do the rest.

* Cleanup files

* Fix: Failed to deserialize query string: missing field `get_progress`

* perf: Implement non-naive polling mechanism for getting job progress

* Add independant delay for getProgress

Problem in `TestJobLoader`:

There should be 2 delays:

    One until we find our first progress (every 5s)
    Once we found our first progress, we can do it every second

* nit: Use `query_scalar!` instead of `query_as`

* Fix: Sql error, no rows returned by a query that expected to return at least one row

* refactor: Remove global CSS for JobProgressBar

* Change UI for progress of flow subjobs

* Replace `Step 1` with `Running` in ProgressBar for individual jobs

* Remove `incProgress`

incProgress is not very usefull and error-prone

* perf: Set metric only for jobs that are actually using it

(https://github.com/windmill-labs/windmill/pull/4373#discussion_r1759843773)

* Offload registering progress from clients to server

* Add `jobId?` argument to typescript-client's `setProgress` and `getProgress`

Allows to set progress of other jobs and flows,
if jobId specified, than flow id will be inferred automatically.

Could be used by SDK.

* Add `Error::MetricNotFound` for better error handling

* Fix: Make `JobProgressBar` display in red when failed

* Add persistant progress bar

Now you can reload the page after job is done and progress will be still there

* Allow succeeded individual job's progress bar stick to 100%

* Add python support 

* nit: Remove usage of undefined variable in python-client

* Add `async` in ts client (for error handling)

* nit(frontend): Remove unused import

* Dont load JobProgressBar when it is not needed

* nit: npm check fix

* cargo sqlx prepare

* fix sqlx

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2024-09-18 01:16:19 +02:00
Ruben Fiszel
87bf6b8511 rm legacy hubScripts 2024-09-17 17:33:52 +02:00
Ruben Fiszel
f864709ab2 fix: cannot create duplicate apps and raw_apps 2024-09-16 21:15:29 +02:00
HugoCasa
d3e8731be2 feat: failed key renewal alert + renew on start if no recent renewal (#4387)
* feat: failed key renewal alert + renew on start if no recent renewal

* Update ee-repo-ref.txt
2024-09-16 16:54:35 +02:00
Ruben Fiszel
d533a017a7 fix: improve first time setup experience 2024-09-15 21:02:36 +02:00
HugoCasa
6ca628c811 fix: queue metrics graph (#4388) 2024-09-13 23:34:48 +02:00
HugoCasa
d3dc65b740 fix: tighten inputs for granular kinds (#4379)
* fix(backend): acls perms

* nit
2024-09-12 14:40:22 +02:00
Ruben Fiszel
7d29651d3e fix: graceful worker exits for same worker jobs (#4371)
* all

* fix compile
2024-09-11 18:32:08 +02:00
Ruben Fiszel
d55159367d fix: default success handler key can be viewed by anyone in the workspace 2024-09-11 12:16:10 +02:00
Ruben Fiszel
8423e5f8c2 put sed helpers to remove anscii codes in downloaded logs 2024-09-09 10:26:17 +02:00
Ruben Fiszel
5817efc16f fix(cli): guide users to migrate to node version of the CLI 2024-09-07 21:27:36 +02:00
HugoCasa
a009c8df23 feat: schedule success handler (#4346) 2024-09-06 19:03:09 +02:00
Ruben Fiszel
4c174cb359 feat: add load more to runs page if nb of jobs >= 1000 2024-09-04 22:45:35 +02:00
HugoCasa
04a3af8024 fix: increase AI gen timeout + upgrade to 16k gpt4o (#4340) 2024-09-04 19:33:23 +02:00
Ruben Fiszel
84e18c73c0 fix: improve wm_labels indices + UX nits 2024-09-04 11:40:23 +02:00
Ruben Fiszel
c93ccb6f55 improve service logs with json_fmt 2024-08-31 23:04:12 +02:00
Ruben Fiszel
c62e152d27 feat: service logs (#4244) 2024-08-31 14:57:35 +02:00
wendrul
91d328b132 feat: add rust (#4253)
* Add rust on frontend

* Add parser for rust

* Handle rust job execution

* Main has to return a result that is serializable

* Update parser: parse many rust types

* Rust parser dependencies

* Frontend wasm parser

* Add windmill parser rust to windmill parser wasm (temporarily)

* Add rust as a tag on worker__default

* Change init code for rust

* Cleanup rust_executor.rs

* Remove tree-sitter dep and fix unused imports

* Add lockfile and build logic

* Add cargo and rustup to windmill image

* Fix env var to work on docker image and dev env

* modify package.json

* Deps after parser publish

* Add stashed migration

* Unify rust versions

* Add error message when php or cargo are not present to use another image

* Error message conditionally on feature flag

* all ci/cd changes

* all ci/cd changes

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2024-08-30 17:01:04 +02:00
Ruben Fiszel
dc0251b1be fix: improve history navigation on the runs page 2024-08-30 13:13:16 +02:00
Ruben Fiszel
c876edfb3f nits runs page 2024-08-30 00:03:21 +02:00
HugoCasa
304de14674 fix: items with starred info (#4298) 2024-08-28 11:45:50 +02:00
HugoCasa
5a300fb3e2 feat: show last job instead of current job on workers page (#4293)
* feat: show last job instead of current job on workers page

* fix: keep old sql column name
2024-08-27 22:04:02 +02:00
HugoCasa
9efad477da optional starred info on get item + update name of user instance (#4295) 2024-08-27 21:58:51 +02:00
HugoCasa
5e5b3e2b53 feat: put email triggers attachments on s3 (#4272)
* feat: put email triggers attachments on s3

* update ee ref
2024-08-26 11:06:09 +02:00
wendrul
ccc86ca88b refactor windmill concurrent index migrations using a macro (#4275)
* Add macro to run migrations

* Factor windmill migrations into the new macro

* Run formatter
2024-08-21 17:15:08 +02:00
HugoCasa
6a99d999a2 feat: improve early stop (#4257) 2024-08-21 00:47:34 +02:00
HugoCasa
904b5b4ea1 feat: cache common hub scripts in image (#4249)
* feat: cache common hub scripts in image

* Delete backend/src/hubPaths.json

* fix: missing file

* fix: dockerfile

* fix: cache by path

* fix

* fix

* precreate cache folder
2024-08-16 17:30:44 +02:00
HugoCasa
94ff662915 fix: add missing change for better key renewal (#4237) 2024-08-14 09:55:23 +02:00
Ruben Fiszel
8950aae44e feat(frontend): improve display of waiting jobs + schedule filter + suspended jobs on runs page 2024-08-13 10:41:36 +02:00
Guilhem
f25a927b44 dev(frontend) move component options into editor menu (#4221)
* dev(frontend) move component options into editor menu

* dev(frontend) move component options into editor menu

* dev(frontend) add editor menu popovers

---------

Co-authored-by: Guilhem Le Mouel <guilhem.le-mouel.ext@altran.com>
2024-08-12 09:52:04 +02:00
HugoCasa
08e529fbd0 feat: secure ctx variables in runnable inputs (#4142)
* feat: secure ctx variables

* feat: add on behalf of email

* oups

* fix: from onBehalfOfEmail to author
2024-08-06 17:06:02 +02:00
HugoCasa
80a41669b2 feat: email triggers (#4163)
* feat: email triggers v0

* update docker compose to nginx with tcp reverse proxy + move smtp to private

* fix: open source build

* test: update ee ref for testing

* feat: use caddy with layer4

* fix: nit

* feat: configurable email domain

* fix: nit

* fix: nit

* fix: get l4 from main

* fix: default email domain to mail.domain

* update ee ref
2024-08-06 16:17:33 +02:00
wendrul
752acde7db Remove admin requirement to cancel job selection (#4188) 2024-08-06 10:48:53 +02:00
Ruben Fiszel
4a295f7dd5 support tarbundle in vscode extension 2024-08-06 01:02:41 +02:00
wendrul
af0e901954 feat: deployment UI filter deployable items (#4183)
* Add column to workspace settings table

* Add endpoint to change the deploy UI settings

* Make frontend page to edit UI settings

* Prepare sqlx

* Add deployment restrictions to frontend

* Fix function name

* Change dependency to minimatch, CE compatibility

* Remove default include_path

* Remove picomatch types (old dep)

* Use empty list instead of globstar as default

* All deployable if config is null
2024-08-05 13:27:13 +02:00
Ruben Fiszel
25434168d8 add global created_at index 2024-08-05 13:12:15 +02:00
Ruben Fiszel
c956ecd1a8 feat: improve indices of completed_runs for faster load 2024-08-05 12:46:07 +02:00
Ruben Fiszel
59e9a0889a feat: add support for assets using tar for codebase deploy 2024-08-04 23:02:51 +02:00
Ruben Fiszel
eb32cecda9 fix: fix delete job 2024-08-03 08:26:29 +02:00
Ruben Fiszel
b45165b736 fix: improve cancel_selection job for running jobs 2024-08-01 16:08:17 +02:00
Ruben Fiszel
69e400563c feat: variables created by password fields expire after 7 days 2024-08-01 16:05:03 +02:00
Ruben Fiszel
78c115c68c fix: improve index usage and runs page performance 2024-07-31 13:08:28 +02:00
Ruben Fiszel
acaa11d18b add limits to variable list 2024-07-31 01:37:51 +02:00
Ruben Fiszel
0fcbfefb3e fix: improve codebase handling by ignoring creating lock and bundle 2024-07-30 20:22:34 +02:00
Ruben Fiszel
abe0528fa4 fix: fix bunnative lock creation 2024-07-30 10:01:29 +02:00
Ruben Fiszel
12ec75551e feat: remove nativets in favor of bun with native pragma 2024-07-29 19:20:00 +02:00
Ruben Fiszel
135f57eb5a fix: improve runs page performance through pg indices 2024-07-27 12:16:13 +02:00
HugoCasa
31c12f0454 feat: job view audit logging based on env variable (#4131)
* feat: job view audit logging based on env variable

* Update jobs.rs

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2024-07-26 11:07:15 +02:00
Ruben Fiszel
408880001c improve s3 bucket tests 2024-07-25 13:02:59 +02:00
Ruben Fiszel
248c7472e8 fix: support npmjs mode for raw deps of package.json from CLI 2024-07-25 09:53:18 +02:00