fix(stacks): surface pull failures and log before/after image IDs on mismatch

update run silently swallowed pull errors and never logged what actually
differed, making a recurring false "updates found" for pulsenode (no
registry-side change since Aug 19) impossible to diagnose.
This commit is contained in:
2026-08-22 09:22:13 +02:00
parent 7584da9115
commit db4fc948d8
+5 -1
View File
@@ -417,11 +417,15 @@ _update_run() {
local before after
before=$(_stack_image_ids "$stack_dir" "${env_flag[@]+"${env_flag[@]}"}") || true
(cd "$stack_dir" && docker compose "${env_flag[@]}" pull 2>&1) || true
if ! (cd "$stack_dir" && docker compose "${env_flag[@]}" pull 2>&1); then
warn " Pull reported a non-zero exit for $stack (see output above) — comparison may be unreliable"
fi
after=$(_stack_image_ids "$stack_dir" "${env_flag[@]+"${env_flag[@]}"}") || true
if [[ "$before" != "$after" ]]; then
info " Updates found — recreating $stack"
info " before: ${before:-<empty>}"
info " after: ${after:-<empty>}"
if (cd "$stack_dir" && docker compose "${env_flag[@]}" up -d 2>&1); then
updated+=("$stack")
ok " $stack updated"