hive-c0re logs each container build with build_id, agent, kind, start and finish lines
Every output line of a nixos-container operation already reached the journal with its command line. They now also carry the build-log row id, the agent and the kind, and a start and a finish line (status, runtime) bracket them, so the swarm log store can group a build and a board can list builds.
This commit is contained in:
parent
9a773349a8
commit
febeb0d395
1 changed files with 209 additions and 21 deletions
|
|
@ -210,6 +210,14 @@ Writes are best-effort: `append_stdout` / `append_stderr` / `finish`
|
|||
log a warning on sqlite error and let the build continue. A failed
|
||||
log row never blocks a rebuild.
|
||||
|
||||
Each operation also logs to the host journal, target `nixos-container`, and the
|
||||
swarm log store collects those lines. Every line carries `build_id` (this
|
||||
table's row id; empty without the store), `agent`, `kind` and `cmdline`. A
|
||||
`start` line (`event=start`) opens the build, one line follows per line of
|
||||
output, and a `finish` line (`event=finish`) closes it with `status` (`ok` or
|
||||
`fail`) and `runtime_secs`. hive-c0re logs a nix warning or error at warn, and a failed
|
||||
finish too.
|
||||
|
||||
A row is open (`finished_at IS NULL`) only while its child runs. At startup
|
||||
`Coordinator::open` closes every row still open as `fail` and appends a
|
||||
line saying hive-c0re stopped: the previous process died mid-build, and
|
||||
|
|
|
|||
Loading…
Reference in a new issue