forked from windmill-labs/windmill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow setProgress and getProgress from within the script (windm…
…ill-labs#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 (windmill-labs#4373 (comment)) * 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 <[email protected]>
- Loading branch information
1 parent
938b8d8
commit d3e0b1c
Showing
31 changed files
with
727 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ frontend/src/routes/test.svelte | |
CaddyfileRemoteMalo | ||
*.swp | ||
**/.idea/ | ||
.direnv |
15 changes: 15 additions & 0 deletions
15
backend/.sqlx/query-76ca60e456022cf3d1931245b7daf22783c81bc757d735a4b247cc693dfed719.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
backend/.sqlx/query-9422431d79de41518f651ef24e86819d7b6a2f5531740a7deea1b51775335977.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
backend/.sqlx/query-d600a0ad953ed131952d9c46deb8f65143894f86517f2b5b2d51bc9a2857695c.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.