From d44a052a3e2d7d943e77085d34d22a48ddaea7b6 Mon Sep 17 00:00:00 2001 From: librelad Date: Fri, 17 Jul 2026 23:42:32 +0100 Subject: [PATCH] fix(updater): don't drop up-to-date apps from updates.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-app object build used `available_version:($available_version|select(.!=""))` to omit the field when empty. But in jq, a `{key: (empty)}` makes the WHOLE object construction emit nothing — so every app with no available update (empty available_version) produced no object and was silently dropped from updates.json. Only apps WITH a pending update survived; an all-up-to-date fleet showed an empty list. (Missed in P2's sandbox test because both fixture apps had updates.) Emit an explicit null instead: `(if $available_version=="" then null else … end)`. Verified: an up-to-date app (trivy, local==registry digest) now emits with available_version:null; apps with updates still carry the string. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: librelad --- scripts/webui/data/generators/updater/webui_updater_scan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/webui/data/generators/updater/webui_updater_scan.sh b/scripts/webui/data/generators/updater/webui_updater_scan.sh index c94e5bc..37efbbc 100644 --- a/scripts/webui/data/generators/updater/webui_updater_scan.sh +++ b/scripts/webui/data/generators/updater/webui_updater_scan.sh @@ -212,7 +212,7 @@ webuiUpdaterScan() { '{name:$name,displayName:$displayName,type:$type,channel:$channel, current_image:$current_image,current_version:$current_version,current_digest:$current_digest, available_image:$available_image, - available_version:($available_version|select(.!="")), + available_version:(if $available_version=="" then null else $available_version end), available_digest:$available_digest,update_available:$update_available, scanned:true,last_checked:$last_checked,services:$services}' \ >> "$objs" 2>/dev/null