release 1.13.9: suppress mid-run SUMMARY and progress standings

Multi-phase runs no longer print intermediate progress bars, numbered
checks, or SUMMARY boxes after each phase (e.g. 34/52 after urls).
Only the last phase (or a solo check_*.sh) may full-summary; global
progress_finish still ends the run.
This commit is contained in:
Hernâni Marques 2026-07-19 04:05:09 +02:00
parent 99ad23f9af
commit f5abc50e55
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
4 changed files with 48 additions and 24 deletions

View file

@ -1 +1 @@
1.13.8
1.13.9

View file

@ -17,6 +17,7 @@ Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.8.0`). File `VERSION` omits the `v` pre
| Tag | Date (UTC) | Notes |
|-----|------------|--------|
| **v1.13.9** | 2026-07-19 | **Bugfix:** no mid-run SUMMARY / progress standings between phases (no more 34/52 + SUMMARY after urls while monpages still runs); full stand only on last phase or solo check script; `progress_finish` remains. |
| **v1.13.8** | 2026-07-19 | **Bugfix:** monpages **TOP** meta/marker failures (missing generated/version-link/taler-mon-page, empty race body) are **WARN only** — no longer self-red the run; optional `MONPAGES_TOP_STRICT=1` restores ERROR. |
| **v1.13.7** | 2026-07-19 | **Bugfix:** move optional/meta scripts under `meta/` (deprecated mail/mm units, firecuda outside-runner, legacy multi-host site-gen); production path stays host-agent + `site-gen/console_to_html.py`. |
| **v1.13.6** | 2026-07-19 | **Bugfix:** machine paths and SSH hosts only via env (`~/.config/taler-monitoring/env` / `taler-monitoring-env`); suite loads env before defaults; no `/home/hernani` or bogus host hardcodes. |

56
lib.sh
View file

@ -862,29 +862,36 @@ section() {
summary() {
local blk_n=${#BLOCKERS[@]}
echo ""
# Phase progress snapshot — keep GLOBAL total (do not snap N to phase-local done).
# Snapping here made mid-run bars like 34/34 then 38/47. Whole-run snap: progress_finish.
if [ "${PROGRESS_OFF:-0}" != "1" ] && [ "${PROGRESS_DONE:-0}" -gt 0 ]; then
if [ "${PROGRESS_FINAL:-0}" = "1" ]; then
# last phase / explicit final: done/total exact
if [ "$PROGRESS_TOTAL" -gt 0 ] && [ "$PROGRESS_DONE" -ne "$PROGRESS_TOTAL" ]; then
PROGRESS_TOTAL=$PROGRESS_DONE
_mon_state_save
fi
fi
_progress_rebalance
_progress_bar_line "$PROGRESS_DONE" "$PROGRESS_TOTAL"
# Multi-phase runs: no intermediate progress bar / numbered checks / SUMMARY box
# (v1.13.9+). Solo check_*.sh still full summary. Parent sets TALER_MON_MULTI_PHASE=1
# and only the last phase gets PROGRESS_FINAL=1. Mid-run still lists ERRORS/BLOCKERS.
local _full=1
if [ "${TALER_MON_MULTI_PHASE:-0}" = "1" ] && [ "${PROGRESS_FINAL:-0}" != "1" ]; then
_full=0
fi
if [ "$GLOBAL_N" -gt 0 ]; then
# Always show global position: current # / expected total (if known)
if [ "${PROGRESS_TOTAL:-0}" -gt 0 ]; then
printf -- '%s %s #001…#%03d · %d/%d %s%s\n' \
"$D" "$(i18n_text 'numbered checks:')" "$GLOBAL_N" \
"$PROGRESS_DONE" "$PROGRESS_TOTAL" \
"$(i18n_text '(global done/total)')" "$N"
else
printf -- '%s %s #001…#%03d%s\n' "$D" "$(i18n_text 'numbered checks this run:')" "$GLOBAL_N" "$N"
echo ""
if [ "$_full" = "1" ]; then
# Progress snapshot — whole-run snap also in progress_finish.
if [ "${PROGRESS_OFF:-0}" != "1" ] && [ "${PROGRESS_DONE:-0}" -gt 0 ]; then
if [ "${PROGRESS_FINAL:-0}" = "1" ]; then
if [ "${PROGRESS_TOTAL:-0}" -gt 0 ] && [ "$PROGRESS_DONE" -ne "$PROGRESS_TOTAL" ]; then
PROGRESS_TOTAL=$PROGRESS_DONE
_mon_state_save
fi
fi
_progress_rebalance
_progress_bar_line "$PROGRESS_DONE" "$PROGRESS_TOTAL"
fi
if [ "$GLOBAL_N" -gt 0 ]; then
if [ "${PROGRESS_TOTAL:-0}" -gt 0 ]; then
printf -- '%s %s #001…#%03d · %d/%d %s%s\n' \
"$D" "$(i18n_text 'numbered checks:')" "$GLOBAL_N" \
"$PROGRESS_DONE" "$PROGRESS_TOTAL" \
"$(i18n_text '(global done/total)')" "$N"
else
printf -- '%s %s #001…#%03d%s\n' "$D" "$(i18n_text 'numbered checks this run:')" "$GLOBAL_N" "$N"
fi
fi
fi
if [ "$blk_n" -gt 0 ]; then
@ -911,7 +918,10 @@ summary() {
done
fi
# Coloured totals — same severity badges as check lines (always; NO_COLOR blanks ANSI)
# Coloured totals — only at full/final summary (not mid multi-phase)
if [ "$_full" != "1" ]; then
return 0
fi
if [ "${BOX:-0}" = "1" ]; then
printf -- '\n%s┌ %s ┐%s\n' "$BG_SEC" "$(i18n_tag SUMMARY)" "$N"
_sum_badge() { # $1=bg $2=tag $3=fg $4=n

View file

@ -570,6 +570,12 @@ chmod +x "$ROOT"/check_*.sh 2>/dev/null || true
ec=0
_phase_idx=0
_n_phases=${#PHASES[@]}
# Suppress mid-run SUMMARY / progress standings when more than one phase
if [ "$_n_phases" -gt 1 ]; then
export TALER_MON_MULTI_PHASE=1
else
export TALER_MON_MULTI_PHASE=0
fi
while [ "$_phase_idx" -lt "$_n_phases" ]; do
p="${PHASES[$_phase_idx]}"
if [ "$RUN_TIMED_OUT" = "1" ]; then
@ -585,6 +591,12 @@ while [ "$_phase_idx" -lt "$_n_phases" ]; do
_phase_idx=$((_phase_idx + 1))
continue
fi
# Only last phase may print full SUMMARY + progress standings
if [ "$((_phase_idx + 1))" -ge "$_n_phases" ]; then
export PROGRESS_FINAL=1
else
export PROGRESS_FINAL=0
fi
case "$p" in
urls) run_phase urls "$ROOT/check_urls.sh" || ec=1 ;;
inside) run_phase inside "$ROOT/check_inside.sh" || ec=1 ;;
@ -618,6 +630,7 @@ while [ "$_phase_idx" -lt "$_n_phases" ]; do
_phase_idx=$((_phase_idx + 1))
done
unset _phase_idx _n_phases
unset PROGRESS_FINAL TALER_MON_MULTI_PHASE 2>/dev/null || true
# Extraordinary run-budget failure: always report at end; HTML links top → here.
if [ "$RUN_TIMED_OUT" = "1" ]; then