release 1.13.5: progress bar env-aware estimates and phase re-fit
Stage jobs estimated 139 checks (urls 95 + monpages 20 + phantom post-check 12 + devtesting) but only ~46 ran, so bars sat at 42/139 then snapped to 46/46. Estimate from CHECK_BANK/LANDING and mon hosts; after each phase set total = done + remaining; no suite credit for host-agent monpages post-check outside the process.
This commit is contained in:
parent
e450470429
commit
981e64f8e6
4 changed files with 84 additions and 26 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
1.13.4
|
||||
1.13.5
|
||||
|
|
|
|||
|
|
@ -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.5** | 2026-07-19 | **Bugfix:** progress bar — env-aware phase estimates (CHECK_BANK/LANDING, mon hosts); re-fit total after each phase (done+remaining); drop fake +12 for host-agent monpages post-check (fixes stage 42/139→46/46 snap). |
|
||||
| **v1.13.4** | 2026-07-19 | **Bugfix:** monpages race-proof — atomic HTML write; rsync `--delay-updates` + settle; fetch retries; larger head windows; pre-publish soft content (`MONPAGES_PRE_PUBLISH`); bootstrap markers. |
|
||||
| **v1.13.3** | 2026-07-19 | **Bugfix:** sticky **generated** time in **Europe/Zurich** (CEST/CET · MESZ/MEZ), not UTC `…Z`; ISO keeps offset for age JS. |
|
||||
| **v1.13.2** | 2026-07-19 | **Bugfix:** sticky version link uses **commit** URL (`/src/commit/<sha>`) not `/src/tag/v…` (tags not yet pushed → Forgejo fat 404); tags v1.11–v1.13.1 pushed to origin. |
|
||||
|
|
|
|||
3
lib.sh
3
lib.sh
|
|
@ -574,8 +574,9 @@ set_progress_total() {
|
|||
# Optional: expected number of numbered checks in this run.
|
||||
# PROGRESS_TOTAL=0 → no percent, only "done=N".
|
||||
# Does not reset GLOBAL_N / PROGRESS_DONE if already mid-run (state file).
|
||||
# May shrink when parent re-fits after a short phase (total = done + remaining est),
|
||||
# but never below PROGRESS_DONE.
|
||||
local n="${1:-0}"
|
||||
# Never shrink below already completed work (re-estimate mid-run safe)
|
||||
if [ "${PROGRESS_DONE:-0}" -gt 0 ] && [ "$n" -gt 0 ] && [ "$n" -lt "$PROGRESS_DONE" ]; then
|
||||
n=$PROGRESS_DONE
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -396,36 +396,73 @@ if [ "${#PHASES[@]}" -eq 0 ]; then
|
|||
fi
|
||||
|
||||
# Global expected check count for progress bar done/total (override: PROGRESS_TOTAL=N).
|
||||
# One estimate for the whole run — phase summary() must NOT reset this mid-run.
|
||||
# Prefer slightly high; lib.sh only grows if short (never shrinks until progress_finish).
|
||||
# Auto estimate is env-aware (CHECK_BANK=0 etc.) and re-fit after each phase so stage
|
||||
# jobs do not sit at 42/139 then snap to 46/46. Phase summary() must NOT snap mid-run.
|
||||
# Host-agent monpages post-check is outside this process — never counted here.
|
||||
_progress_estimate_phase() {
|
||||
local p="$1" n=0 hosts=1
|
||||
hosts=$(printf '%s' "${MON_HOSTS:-x}" | wc -w)
|
||||
[ "$hosts" -lt 1 ] && hosts=1
|
||||
case "$p" in
|
||||
urls)
|
||||
# Core: exchange + merchant + webui + perf + terms (~28–40). Bank/landing optional.
|
||||
# Stage (CHECK_BANK=0 CHECK_LANDING=0) lands near ~34 numbered lines — keep close.
|
||||
n=28
|
||||
[ "${CHECK_BANK:-1}" != "0" ] && n=$((n + 24))
|
||||
[ "${CHECK_LANDING:-1}" != "0" ] && n=$((n + 18)) # intro + stats.json + qr
|
||||
n=$((n + 6)) # headroom (SPA / terms / privacy / alt paths)
|
||||
;;
|
||||
inside) n=30 ;;
|
||||
versions) n=35 ;;
|
||||
sanity) n=35 ;;
|
||||
server) n=20 ;;
|
||||
# e2e: ATM ladder emits many INFO lines (coins before/after each note)
|
||||
e2e) n=240 ;;
|
||||
ladder|goa-ladder) n=120 ;;
|
||||
auth401) n=70 ;;
|
||||
aptdeploy) n=40 ;;
|
||||
surface|ecosystem) n=120 ;;
|
||||
monpages|pages)
|
||||
# slash + bare (+ optional _err) per inventory host; GOA full suite ≈20 URLs
|
||||
case "${TALER_DOMAIN:-}" in
|
||||
*hacktivism*) n=24 ;;
|
||||
*lefrancpaysan*|*francpaysan*) n=$((hosts * 2 + 6)); [ "$n" -lt 12 ] && n=12 ;;
|
||||
*) n=$((hosts * 2 + 4)); [ "$n" -lt 8 ] && n=8 ;;
|
||||
esac
|
||||
[ "$n" -gt 48 ] && n=48
|
||||
;;
|
||||
mattermost) n=25 ;;
|
||||
mail) n=40 ;;
|
||||
devtesting|franken|fake-franken|fake_franken) n=10 ;;
|
||||
*) n=15 ;;
|
||||
esac
|
||||
printf '%s' "$n"
|
||||
}
|
||||
|
||||
# Recompute PROGRESS_TOTAL = done + estimate(remaining phases). Allows shrink after short phases.
|
||||
_progress_refit_remaining() {
|
||||
[ "${PROGRESS_TOTAL_AUTO:-0}" = "1" ] || return 0
|
||||
local rem=0 rp
|
||||
for rp in "$@"; do
|
||||
rem=$((rem + $(_progress_estimate_phase "$rp")))
|
||||
done
|
||||
if type _mon_state_load >/dev/null 2>&1; then
|
||||
_mon_state_load
|
||||
fi
|
||||
set_progress_total "$(( ${PROGRESS_DONE:-0} + rem ))"
|
||||
}
|
||||
|
||||
PROGRESS_TOTAL_AUTO=0
|
||||
if [ "${PROGRESS_TOTAL:-0}" = "0" ] || [ -z "${PROGRESS_TOTAL:-}" ]; then
|
||||
PROGRESS_TOTAL_AUTO=1
|
||||
_pt=0
|
||||
for p in "${PHASES[@]}"; do
|
||||
case "$p" in
|
||||
urls) _pt=$((_pt + 95)) ;; # +qr + webui SPA fingerprints
|
||||
inside) _pt=$((_pt + 30)) ;;
|
||||
versions) _pt=$((_pt + 35)) ;; # + disk probes can be many
|
||||
sanity) _pt=$((_pt + 35)) ;;
|
||||
server) _pt=$((_pt + 20)) ;;
|
||||
# e2e: ATM ladder emits many INFO lines (coins before/after each note)
|
||||
e2e) _pt=$((_pt + 240)) ;;
|
||||
ladder|goa-ladder) _pt=$((_pt + 120)) ;;
|
||||
auth401) _pt=$((_pt + 70)) ;;
|
||||
aptdeploy) _pt=$((_pt + 40)) ;;
|
||||
surface|ecosystem) _pt=$((_pt + 120)) ;;
|
||||
monpages|pages) _pt=$((_pt + 20)) ;;
|
||||
mattermost) _pt=$((_pt + 25)) ;;
|
||||
mail) _pt=$((_pt + 40)) ;;
|
||||
devtesting|franken|fake-franken|fake_franken) _pt=$((_pt + 12)) ;;
|
||||
esac
|
||||
_pt=$((_pt + $(_progress_estimate_phase "$p")))
|
||||
done
|
||||
# monpages post-check after htmlify can add another inventory pass
|
||||
case " ${PHASES[*]} " in
|
||||
*" monpages "*|*" pages "*) _pt=$((_pt + 12)) ;;
|
||||
esac
|
||||
set_progress_total "$_pt"
|
||||
unset _pt
|
||||
fi
|
||||
export PROGRESS_TOTAL_AUTO
|
||||
|
||||
# Whole-run wall clock (default 10 min). Override: RUN_TIMEOUT=0 (unlimited).
|
||||
: "${RUN_TIMEOUT:=600}"
|
||||
|
|
@ -516,9 +553,13 @@ unset _INSIDE_ACCESS_HINT
|
|||
chmod +x "$ROOT"/check_*.sh 2>/dev/null || true
|
||||
|
||||
ec=0
|
||||
for p in "${PHASES[@]}"; do
|
||||
_phase_idx=0
|
||||
_n_phases=${#PHASES[@]}
|
||||
while [ "$_phase_idx" -lt "$_n_phases" ]; do
|
||||
p="${PHASES[$_phase_idx]}"
|
||||
if [ "$RUN_TIMED_OUT" = "1" ]; then
|
||||
RUN_SKIPPED_PHASES+=("$p")
|
||||
_phase_idx=$((_phase_idx + 1))
|
||||
continue
|
||||
fi
|
||||
left=$(mon_seconds_left)
|
||||
|
|
@ -526,6 +567,7 @@ for p in "${PHASES[@]}"; do
|
|||
RUN_TIMED_OUT=1
|
||||
RUN_TIMEOUT_AT_PHASE="${RUN_TIMEOUT_AT_PHASE:-$p}"
|
||||
RUN_SKIPPED_PHASES+=("$p")
|
||||
_phase_idx=$((_phase_idx + 1))
|
||||
continue
|
||||
fi
|
||||
case "$p" in
|
||||
|
|
@ -546,7 +588,21 @@ for p in "${PHASES[@]}"; do
|
|||
run_phase devtesting "$ROOT/check_devtesting.sh" || ec=1
|
||||
;;
|
||||
esac
|
||||
# After each phase: refit total = actual done + estimate(remaining). Fixes
|
||||
# stage over-estimate (e.g. 42/139 while only ~4 checks left).
|
||||
if [ "${PROGRESS_TOTAL_AUTO:-0}" = "1" ]; then
|
||||
_rem_args=()
|
||||
_j=$((_phase_idx + 1))
|
||||
while [ "$_j" -lt "$_n_phases" ]; do
|
||||
_rem_args+=("${PHASES[$_j]}")
|
||||
_j=$((_j + 1))
|
||||
done
|
||||
_progress_refit_remaining "${_rem_args[@]+"${_rem_args[@]}"}"
|
||||
unset _rem_args _j
|
||||
fi
|
||||
_phase_idx=$((_phase_idx + 1))
|
||||
done
|
||||
unset _phase_idx _n_phases
|
||||
|
||||
# Extraordinary run-budget failure: always report at end; HTML links top → here.
|
||||
if [ "$RUN_TIMED_OUT" = "1" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue