From 65781aaca72cc10017a5f486d5a9d68d97dfec49 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 26 Jan 2026 18:18:42 -0300 Subject: [PATCH] atlasbot: improve worker node answers --- services/comms/atlasbot-deployment.yaml | 2 +- services/comms/scripts/atlasbot/bot.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index d5d8f06..69aef2f 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: manual-atlasbot-14 + checksum/atlasbot-configmap: manual-atlasbot-15 vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/role: "comms" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" diff --git a/services/comms/scripts/atlasbot/bot.py b/services/comms/scripts/atlasbot/bot.py index 57549b3..3b9082d 100644 --- a/services/comms/scripts/atlasbot/bot.py +++ b/services/comms/scripts/atlasbot/bot.py @@ -1097,6 +1097,7 @@ def sync_loop(token: str, room_id: str): ready_nodes, not_ready_nodes = worker_nodes_status() total = len(ready_nodes) + len(not_ready_nodes) if total: + missing_hint = missing_nodes_answer("Atlas") if any(word in lower_body for word in ("ready", "not ready", "unready")): if not_ready_nodes: send_msg( @@ -1105,14 +1106,19 @@ def sync_loop(token: str, room_id: str): f"Worker nodes not Ready: {', '.join(not_ready_nodes)}.", ) else: - send_msg(token, rid, f"All {len(ready_nodes)} worker nodes are Ready.") + msg = f"All {len(ready_nodes)} worker nodes are Ready." + if missing_hint and "no missing" not in missing_hint: + msg += f" {missing_hint}" + send_msg(token, rid, msg) continue if any(word in lower_body for word in ("how many", "should")): - send_msg( - token, - rid, - f"Atlas has {total} worker nodes; {len(ready_nodes)} Ready, {len(not_ready_nodes)} NotReady.", + msg = ( + f"Atlas has {total} worker nodes; " + f"{len(ready_nodes)} Ready, {len(not_ready_nodes)} NotReady." ) + if missing_hint and "no missing" not in missing_hint: + msg += f" {missing_hint}" + send_msg(token, rid, msg) continue if "missing" in lower_body and "node" in lower_body: missing = missing_nodes_answer("Atlas")