From 15964a06f8323f175c42128282d920b1c45c0770 Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 9 Nov 2026 15:51:32 +0100 Subject: [PATCH] swarm-controller: put a failed jobq node's error in the log message --- swarm-controller/README.md | 4 ++-- swarm-controller/src/jobq.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swarm-controller/README.md b/swarm-controller/README.md index 176a1d25f..d766adc61 100644 --- a/swarm-controller/README.md +++ b/swarm-controller/README.md @@ -23,8 +23,8 @@ The swarm's control plane. The swarm UI and `swarmctl` are its clients. one hive whose declaration places it. - **Job graph** — a `hive-jobq` scheduler, served at `GET /api/jobq/graph`. Every provisioning step below runs as a node in it. A node that fails logs - one `warn` line, `swarm jobq: node failed`, with its `node` id, `kind` and - `error`. + one `warn` line, `swarm jobq: node failed: `, with its `node` id and + `kind`. - **Agent creation** — `POST /api/agents` queues the SSO identity (through `swarm-authelia-bridge`), forge user, config repo, store identity, forge token and matrix account, declares the agent `paused`, then sends its hive diff --git a/swarm-controller/src/jobq.rs b/swarm-controller/src/jobq.rs index 19a25693d..dcfd2a47b 100644 --- a/swarm-controller/src/jobq.rs +++ b/swarm-controller/src/jobq.rs @@ -344,7 +344,7 @@ pub(crate) async fn run_swarm_node( let node_kind = hive_jobq_wire::WireNode::label(&kind); let (builder, outcome) = run_node_work(kind, builder, deps).await; if let hive_jobq::scheduler::Outcome::Failed(error) = &outcome { - tracing::warn!(node = id.get(), kind = %node_kind, %error, "swarm jobq: node failed"); + tracing::warn!(node = id.get(), kind = %node_kind, "swarm jobq: node failed: {error}"); } (builder, outcome) } @@ -4797,7 +4797,7 @@ mod mint_identity_tests { assert_eq!(field("kind"), "set_agent_wanted"); assert_eq!(field("node"), ids[0].get().to_string()); assert!( - field("error").contains("no swarm queue is configured"), + field("message").contains("no swarm queue is configured"), "{fields:?}" ); }