release 1.15.5: fix devtesting ladder stdin (ssh ate rungs)

This commit is contained in:
Hernâni Marques 2026-07-19 05:05:48 +02:00
parent b4f5f060cc
commit 56ba5adff6
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
3 changed files with 57 additions and 42 deletions

View file

@ -1 +1 @@
1.15.4
1.15.5

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.15.5** | 2026-07-19 | **Bugfix:** devtesting CHF ladder — `ssh` was draining ladder stdin (only rung 1/23 ran → progress 45/98 then snap 52/52); use `ssh -n` + `mapfile`; incomplete ladder is WARN not false complete. |
| **v1.15.4** | 2026-07-19 | **Bugfix:** French sticky titles — page label *surveillance*, stack summary *public + interne*, SUMMARY verdict/totals via i18n (`tout est clair`, `totaux :`). |
| **v1.15.3** | 2026-07-19 | **Bugfix:** console language auto-**fr** for `*lefrancpaysan*` domains again — env `TALER_MON_LANG=en` no longer locks English; only `--lang` / `TALER_MON_LANG_SET=1` is explicit. |
| **v1.15.2** | 2026-07-19 | **Bugfix:** warn/error filter — drop blank log lines from HTML; compact console (no black voids above/mid/below); context skips SUMMARY chrome & pure box frames; tighter filter-gap. |

View file

@ -49,19 +49,20 @@ fi
: "${SSH_CMD_TIMEOUT:=60}"
ssh_dt() {
# Prefer Host alias; fall back to explicit user@host if config missing
# Prefer Host alias; fall back to explicit user@host if config missing.
# Always -n: do not read local stdin (ladder while-read must not be drained by ssh).
local target="$DEVTESTING_SSH"
if ! ssh -G "$target" >/dev/null 2>&1; then
target="devtesting@rusty.taler-ops.ch"
fi
if command -v timeout >/dev/null 2>&1; then
timeout "${SSH_CMD_TIMEOUT}" ssh \
timeout "${SSH_CMD_TIMEOUT}" ssh -n \
-o BatchMode=yes \
-o ConnectTimeout="${SSH_CONNECT_TIMEOUT}" \
-o StrictHostKeyChecking=accept-new \
"$target" "$@"
else
ssh \
ssh -n \
-o BatchMode=yes \
-o ConnectTimeout="${SSH_CONNECT_TIMEOUT}" \
-o StrictHostKeyChecking=accept-new \
@ -254,7 +255,7 @@ else:
lines = ["CHF:%s" % fmt(a) for a in amts]
out.write_text("\n".join(lines) + "\n")
PY
n_rungs=$(grep -cE '^CHF:' "$LADDER_FILE" || echo 0)
n_rungs_plan=$(grep -cE '^CHF:' "$LADDER_FILE" || echo 0)
ladder_sum=$(python3 -c '
from decimal import Decimal
s=Decimal(0)
@ -265,14 +266,22 @@ for ln in open("'"$LADDER_FILE"'"):
print(s)
' 2>/dev/null || echo "?")
info "ladder plan" "steps=${n_rungs} max=CHF:${DEVTESTING_LADDER_MAX} min=CHF:${DEVTESTING_LADDER_MIN} sum≈CHF:${ladder_sum} (synthetic debit geniban each rung)"
info "ladder plan" "steps=${n_rungs_plan} max=CHF:${DEVTESTING_LADDER_MAX} min=CHF:${DEVTESTING_LADDER_MIN} sum≈CHF:${ladder_sum} (synthetic debit geniban each rung)"
info "ladder funding" "each rung uses geniban debit payto — no real bank withdraw; volume covers max rung CHF:${DEVTESTING_LADDER_MAX}"
LADDER_OK=0
LADDER_FAIL=0
LADDER_WARN=0
rung=0
while IFS= read -r amt || [ -n "$amt" ]; do
# Load amounts into an array first — never `while read … done <file` around ssh:
# without ssh -n, OpenSSH drains the ladder file as remote stdin (only rung 1 ran).
mapfile -t LADDER_AMTS < <(grep -E '^CHF:' "$LADDER_FILE" || true)
rm -f "$LADDER_FILE"
n_rungs=${#LADDER_AMTS[@]}
if [ "$n_rungs" -eq 0 ]; then
fail "ladder" "no CHF: amounts generated"
else
for amt in "${LADDER_AMTS[@]}"; do
[ -n "$amt" ] || continue
rung=$((rung + 1))
subject="mon-fake-ladder-${ts_base}-r${rung}-$$"
@ -300,20 +309,25 @@ print(s)
fail "rung ${rung}" "${amt} · ${FI_STATUS}" "$(printf '%s' "$FI_FLAT" | head -c 180)"
LADDER_FAIL=$((LADDER_FAIL + 1))
if [ "${DEVTESTING_LADDER_STOP_ON_FAIL}" = "1" ]; then
warn "ladder stop" "DEVTESTING_LADDER_STOP_ON_FAIL=1 after rung ${rung}"
warn "ladder stop" "DEVTESTING_LADDER_STOP_ON_FAIL=1 after rung ${rung}/${n_rungs}"
break
fi
fi
done <"$LADDER_FILE"
rm -f "$LADDER_FILE"
done
fi
info "ladder summary" "ok=${LADDER_OK} warn=${LADDER_WARN} fail=${LADDER_FAIL} / planned=${n_rungs} · max=CHF:${DEVTESTING_LADDER_MAX}"
if [ "$LADDER_FAIL" -gt 0 ] && [ "$LADDER_OK" -eq 0 ]; then
if [ "$n_rungs" -eq 0 ]; then
:
elif [ "$LADDER_FAIL" -gt 0 ] && [ "$LADDER_OK" -eq 0 ]; then
fail "ladder" "all rungs failed"
elif [ "$LADDER_FAIL" -gt 0 ]; then
warn "ladder" "partial failures fail=${LADDER_FAIL} ok=${LADDER_OK}"
warn "ladder" "partial failures fail=${LADDER_FAIL} ok=${LADDER_OK}/${n_rungs}"
elif [ "$LADDER_OK" -lt "$n_rungs" ]; then
# e.g. stdin-eaten loop used to stop after 1 rung with ok=1 fail=0
warn "ladder incomplete" "only ${LADDER_OK}/${n_rungs} rungs ran (ok) — not through max CHF:${DEVTESTING_LADDER_MAX}"
else
ok "ladder complete" "ok=${LADDER_OK} through max CHF:${DEVTESTING_LADDER_MAX}"
ok "ladder complete" "ok=${LADDER_OK}/${n_rungs} through max CHF:${DEVTESTING_LADDER_MAX}"
fi
else
info "ladder" "skipped (DEVTESTING_LADDER=0)"