785 Commits

Author SHA1 Message Date
Sybren A. Stüvel
b186ea1828 Manager: write to task log when assigning it to a worker 2022-06-09 10:59:44 +02:00
Sybren A. Stüvel
b4d2fc4231 Manager: keep track of when a Worker last worked on a task
This will be used for keeping track of stuck tasks.
2022-06-03 16:33:50 +02:00
Sybren A. Stüvel
0be1ca30dd Cleanup: manager, move api_impl interfaces to interfaces.go
The number of interfaces declared by the `api_impl` package is getting
large, so they deserve their own file.

No functional changes.
2022-06-03 15:52:07 +02:00
Sybren A. Stüvel
bba5c6020d FEATURES.md: mark some features as done, add some others 2022-06-03 15:52:07 +02:00
Sybren A. Stüvel
b41feee313 Web: reduce workers table height
The 720px was almost filling up the entire height, making it hard to add
anything new at the top. Soon it should be auto-resizing anyway, making
this less relevant.
2022-06-03 13:02:23 +02:00
Sybren A. Stüvel
375a6666c2 Web: move Worker status change requests to drop-down
This basically copies the drop-down approach from Flamenco Manager 2.
2022-06-03 13:01:47 +02:00
Sybren A. Stüvel
df36d93d7b Web: style "current page" links differently
This makes it visible which section of Flamenco you're actually in.
2022-06-02 18:56:24 +02:00
Sybren A. Stüvel
f1a3d98c5b Roll back color changes
By request of Francesco.
2022-06-02 18:51:20 +02:00
Sybren A. Stüvel
17f1b42d19 Web: slightly bluer purple 2022-06-02 18:42:57 +02:00
Sybren A. Stüvel
3818d4df83 Web: add simple worker action bar
UI/UX needs improvements, but there now are some buttons to manage Workers.
They request forced status changes, so nothing lazy yet. Still have to
consider how to include that in the UI. Could probably follow the
Flamenco 2 Manager design.
2022-06-02 18:42:34 +02:00
Sybren A. Stüvel
72fd1ac761 Web: simplify log tail fetching a bit 2022-06-02 18:29:16 +02:00
Sybren A. Stüvel
326e54e45a Web: fix job & task subscriptions
Making the UUID optional (rF221ed17fa27193086ec5c9201d48f7cd826e75a4) made
the generated JavaScript code ignore the 3rd parameter. Apparently the
constructor parameters are only for the mandatory properties, and the
rest has to be set on a per-property basis.
2022-06-02 18:29:03 +02:00
Sybren A. Stüvel
276b026f02 Web: change accent hue
The blue was so boring. Purple is much better.
2022-06-02 18:22:06 +02:00
Sybren A. Stüvel
ce2e11c35c Web: handle corner case where worker is deselected 2022-06-02 16:45:37 +02:00
Sybren A. Stüvel
8e7f1e2868 Manager: some extra unit tests for worker signoff behaviour 2022-06-02 16:37:29 +02:00
Sybren A. Stüvel
6cf82e5d43 Manager: cleanup, refactor Worker state change request persistence code
Move the setting & clearing of worker state change requests into separate
functions.

No functional changes.
2022-06-02 16:36:06 +02:00
Sybren A. Stüvel
132ce8f2ec Merge 'shutdown' and 'offline' states
Move the 'shutdown' state code to the 'offline' state, to match the
removal of the 'shutdown' state from the OpenAPI definition.
2022-06-02 16:35:07 +02:00
Sybren A. Stüvel
cf8b4e18b1 OAPI: regenerate code 2022-06-02 16:25:38 +02:00
Sybren A. Stüvel
31e128d7f5 OAPI: remove shutdown worker state
Remove the `shutdown` worker state. It was only used in Flamenco 2 to
signal to the worker that it should go offline. In other words, it didn't
use the target state in the request.

As of this change, just send `offline` as the requested state for the
worker if you want it to go offline.
2022-06-02 16:19:26 +02:00
Sybren A. Stüvel
678308fb6d Manager: allow cancelling worker state change requests
A worker state change request can now be cancelled by requesting the worker
to go to its current state. In other words, a previously requested change
`A → B` can be cancelled by requesting the worker goes to state `A`.

Previously this would simply overwrite the last request, resulting in a
requested state change `A → A`. Having this non-lazy would even interrupt
the currently running task.
2022-06-02 12:43:16 +02:00
Sybren A. Stüvel
3ce225b6e1 Web: remove debug console log 2022-06-02 12:33:38 +02:00
Sybren A. Stüvel
bc33f55b3c Web: update for extraction of status change requests to struct
See recent OpenAPI change.
2022-06-02 12:33:32 +02:00
Sybren A. Stüvel
9ed6b6d931 Manager: adjust code for WorkerStatusChangeRequest extraction
See preceeding OpenAPI change.
2022-06-02 12:17:54 +02:00
Sybren A. Stüvel
9ca14cd471 OAPI: regenerate code 2022-06-02 12:16:51 +02:00
Sybren A. Stüvel
0d50a7eae5 OAPI: clean, remove unnecessary quotes 2022-06-02 12:16:14 +02:00
Sybren A. Stüvel
169aa3ddc3 OAPI: extract worker status request fields into their own struct
Instead of always passing `status_requested` and `lazy_status_request`
in tandem, and requiring one when the other is present, they are now
always passed as a struct `WorkerStatusChangeRequest`. This struct has
both fields required.

`WorkerStatusChangeRequest` already existed, and is now altered by changing
its field `status_requested` to simply `status` -- the fact that it's
requested is already clear from the context.
2022-06-02 12:16:03 +02:00
Sybren A. Stüvel
ae6831ce6e Manager: fix unit test
rFcfb17b178da2055ef12b2aa2ad8f7f778a952bc3 changed the semantics of
`SocketIOWorkerUpdate`, in the sense that any update that doesn't change
the worker status can omit `previous_status`. This commit adjusts the
unit test for this.
2022-06-02 12:13:25 +02:00
Sybren A. Stüvel
487a31624f Cleanup: manager, make workerDBtoAPI(w) use workerSummary(w)
This makes the `workerDBtoAPI(w)` and `workerSummary(w)` functions
consistent, and makes the former use the latter.
2022-06-02 12:10:53 +02:00
Sybren A. Stüvel
3c1b0e0539 Web: status indicator, swap arrows
➜ is more visible than ➠, and thus should be used for the stronger
status change request.
2022-06-02 11:44:29 +02:00
Sybren A. Stüvel
3e1137ca65 Web: fix status_requested not disappearing from Tabulator 2022-05-31 17:28:40 +02:00
Sybren A. Stüvel
85e24d2b1c FEATURES.md: addition of some more details about the worker management 2022-05-31 17:24:11 +02:00
Sybren A. Stüvel
f97f0a34c3 Manager: implement worker status change requests
Implement the OpenAPI `RequestWorkerStatusChange` operation, and handle
these changes in the web interface.
2022-05-31 17:22:03 +02:00
Sybren A. Stüvel
fdb0b82664 OAPI: regenerate code 2022-05-31 17:19:06 +02:00
Sybren A. Stüvel
cfb17b178d OAPI: allow worker status change requests
This also introduces the 'lazy' status change boolean, which indicates
whether the status change should interrupt the worker's current task
(lazy=false), or only take effect after the task is finished (lazy=true).
2022-05-31 17:17:37 +02:00
Sybren A. Stüvel
dd3f99ebaa Manager: Fix unit test 2022-05-31 16:12:28 +02:00
Sybren A. Stüvel
68cd14db2d Fix: add missing <span> around state transition arrow 2022-05-31 15:51:31 +02:00
Sybren A. Stüvel
1510489f4d Web: show requested worker state transition 2022-05-31 15:50:59 +02:00
Sybren A. Stüvel
e18dab5c82 Web: make the worker list narrower, occupying only a single column 2022-05-31 15:48:00 +02:00
Sybren A. Stüvel
fc4e3d60d7 Web: show more info in the worker details 2022-05-31 15:47:49 +02:00
Sybren A. Stüvel
f6dff086ef Manager: show worker version in the workers table 2022-05-31 15:47:26 +02:00
Sybren A. Stüvel
237b208fb2 Web: show Worker software version in worker list 2022-05-31 15:31:56 +02:00
Sybren A. Stüvel
3063e1fe6d Manager: construct api.Worker from api.WorkerSummary + extra fields 2022-05-31 15:30:46 +02:00
Sybren A. Stüvel
90707dceed OAPI: regenerate code 2022-05-31 15:30:26 +02:00
Sybren A. Stüvel
d82333635a OAPI: define Worker schema as extension of WorkerSummary
This makes their relation clearer. This also moves the `version` field
into the `WorkerSummary` schema.
2022-05-31 15:29:54 +02:00
Sybren A. Stüvel
66edc5c4d3 Web: include name of status in worker list
This makes it a bit easier to interpret. Just having the colours might
be too little information.
2022-05-31 15:23:42 +02:00
Sybren A. Stüvel
2e11c1c240 Manager: Implement SocketIO worker updates 2022-05-31 15:19:12 +02:00
Sybren A. Stüvel
1f49880b7f OAPI: regenerate code 2022-05-31 15:18:48 +02:00
Sybren A. Stüvel
3b2f58dd27 OAPI: add allWorkers SocketIO subscription type 2022-05-31 15:17:39 +02:00
Sybren A. Stüvel
ec02247973 Manager: logging in the FetchWorkers API endpoint 2022-05-31 15:17:39 +02:00
Sybren A. Stüvel
2b89399206 Manager: handle allJobs subscription
SocketIO clients no longer automatically subscribe to the jobs updates.
This is now done explicitly via the `allJobs` subscription type, and
unsubscribing is also possible.
2022-05-31 15:00:37 +02:00