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:
+5
-1
@@ -417,11 +417,15 @@ _update_run() {
|
|||||||
|
|
||||||
local before after
|
local before after
|
||||||
before=$(_stack_image_ids "$stack_dir" "${env_flag[@]+"${env_flag[@]}"}") || true
|
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
|
after=$(_stack_image_ids "$stack_dir" "${env_flag[@]+"${env_flag[@]}"}") || true
|
||||||
|
|
||||||
if [[ "$before" != "$after" ]]; then
|
if [[ "$before" != "$after" ]]; then
|
||||||
info " Updates found — recreating $stack"
|
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
|
if (cd "$stack_dir" && docker compose "${env_flag[@]}" up -d 2>&1); then
|
||||||
updated+=("$stack")
|
updated+=("$stack")
|
||||||
ok " $stack updated"
|
ok " $stack updated"
|
||||||
|
|||||||
Reference in New Issue
Block a user