Skip to content

Add the build nodes pages - #614

Open
eabdullin1 wants to merge 1 commit into
AlmaLinux:masterfrom
eabdullin1:build-node-balancing
Open

eabdullin1 wants to merge 1 commit into
AlmaLinux:masterfrom
eabdullin1:build-node-balancing

Conversation

@eabdullin1

@eabdullin1 eabdullin1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

A "Build nodes" section for superusers to watch and manage the build nodes registered by the web server (/api/v1/build_nodes):

  • /build-nodes: a queue summary per arch (queued tasks, accepting nodes, busy/total slots of the nodes taking new tasks, tasks of nodes not in the registry yet), a table of nodes with status badges (disabled, maintenance, offline, drain, online), arches, slots and effective capacity, load per CPU, RAM used, free disk, version and last seen time, and an expandable row with the running tasks and the done/failed/excluded counters of the last 24 hours;
  • /build-nodes/:nodeId: the node details with its instance ID, host metrics, running and recent tasks and the 24 hours statistics;
  • host metrics above the thresholds are highlighted and stale ones greyed out, long running tasks are marked;
  • both pages refresh every 15 seconds while the tab is visible and can be refreshed by hand.

Drain/undrain, enable/disable and the manual slot limit are applied with PATCH and ask for a confirmation where needed. The limit dialog follows the server rule: a limit only lowers the reported slots, and a node that reports no slots gets one slot unless the limit says otherwise; a limit of 0 asks for a separate confirmation. An action goes to the node its dialog was opened for: the table rows are keyed by node, the list is not refreshed while a dialog or its request is open, and the node id and name are fixed when the dialog opens; if the component is handed another node anyway, the dialog is closed and nothing is sent.

The menu link and the routes are for superusers only, like the Administration section: the routes refresh isAdmin from the server and send other users to the build feed, and /users uses the same guard. A 401 or a 403 turns the auto-refresh off and is shown in a banner, a 404 tells that the API is not deployed, and the FastAPI 422 details are shown as messages. API datetimes without a timezone are read as UTC.

The Version column is the albs-node commit the node runs, the first 12 characters of the git hash, and the pages say so; nodes without a version run an older albs-node or are not deployed from a git clone.

The pure helpers and the node actions are covered by unit tests on the built-in Node.js test runner (npm test); the actions are mounted with a renderer of Vue that needs no DOM. A small loader hook loads src/ as ES modules, so the tests also run on the Node.js 16 of the Docker image.

A "Build nodes" section for superusers to watch and manage the build
nodes registered by the web server (/api/v1/build_nodes):

- /build-nodes: a queue summary per arch (queued tasks, accepting
  nodes, busy/total slots of the nodes taking new tasks, tasks of
  nodes not in the registry yet), a table of nodes with status badges
  (disabled, maintenance, offline, drain, online), arches, slots and
  effective capacity, load per CPU, RAM used, free disk, version and
  last seen time, and an expandable row with the running tasks and
  the done/failed/excluded counters of the last 24 hours;
- /build-nodes/:nodeId: the node details with its instance ID, host
  metrics, running and recent tasks and the 24 hours statistics;
- host metrics above the thresholds are highlighted and stale ones
  greyed out, long running tasks are marked;
- both pages refresh every 15 seconds while the tab is visible and
  can be refreshed by hand.

Drain/undrain, enable/disable and the manual slot limit are applied
with PATCH and ask for a confirmation where needed. The limit dialog
follows the server rule: a limit only lowers the reported slots, and
a node that reports no slots gets one slot unless the limit says
otherwise; a limit of 0 asks for a separate confirmation. An action
goes to the node its dialog was opened for: the table rows are keyed
by node, the list is not refreshed while a dialog or its request is
open, and the node id and name are fixed when the dialog opens; if
the component is handed another node anyway, the dialog is closed
and nothing is sent.

The menu link and the routes are for superusers only, like the
Administration section: the routes refresh isAdmin from the server
and send other users to the build feed, and /users uses the same
guard. A 401 or a 403 turns the auto-refresh off and is shown in a
banner, a 404 tells that the API is not deployed, and the FastAPI 422
details are shown as messages. API datetimes without a timezone are
read as UTC.

The Version column is the albs-node commit the node runs, the first
12 characters of the git hash, and the pages say so; nodes without a
version run an older albs-node or are not deployed from a git clone.

The pure helpers and the node actions are covered by unit tests on
the built-in Node.js test runner (npm test); the actions are mounted
with a renderer of Vue that needs no DOM. A small loader hook loads
src/ as ES modules, so the tests also run on the Node.js 16 of the
Docker image.
@eabdullin1
eabdullin1 force-pushed the build-node-balancing branch from ab80c83 to e51d000 Compare December 2, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant