release 1.15.5: fix devtesting ladder stdin (ssh ate rungs)
This commit is contained in:
parent
b4f5f060cc
commit
56ba5adff6
3 changed files with 57 additions and 42 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
1.15.4
|
1.15.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 |
|
| 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.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.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. |
|
| **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. |
|
||||||
|
|
|
||||||
|
|
@ -49,19 +49,20 @@ fi
|
||||||
: "${SSH_CMD_TIMEOUT:=60}"
|
: "${SSH_CMD_TIMEOUT:=60}"
|
||||||
|
|
||||||
ssh_dt() {
|
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"
|
local target="$DEVTESTING_SSH"
|
||||||
if ! ssh -G "$target" >/dev/null 2>&1; then
|
if ! ssh -G "$target" >/dev/null 2>&1; then
|
||||||
target="devtesting@rusty.taler-ops.ch"
|
target="devtesting@rusty.taler-ops.ch"
|
||||||
fi
|
fi
|
||||||
if command -v timeout >/dev/null 2>&1; then
|
if command -v timeout >/dev/null 2>&1; then
|
||||||
timeout "${SSH_CMD_TIMEOUT}" ssh \
|
timeout "${SSH_CMD_TIMEOUT}" ssh -n \
|
||||||
-o BatchMode=yes \
|
-o BatchMode=yes \
|
||||||
-o ConnectTimeout="${SSH_CONNECT_TIMEOUT}" \
|
-o ConnectTimeout="${SSH_CONNECT_TIMEOUT}" \
|
||||||
-o StrictHostKeyChecking=accept-new \
|
-o StrictHostKeyChecking=accept-new \
|
||||||
"$target" "$@"
|
"$target" "$@"
|
||||||
else
|
else
|
||||||
ssh \
|
ssh -n \
|
||||||
-o BatchMode=yes \
|
-o BatchMode=yes \
|
||||||
-o ConnectTimeout="${SSH_CONNECT_TIMEOUT}" \
|
-o ConnectTimeout="${SSH_CONNECT_TIMEOUT}" \
|
||||||
-o StrictHostKeyChecking=accept-new \
|
-o StrictHostKeyChecking=accept-new \
|
||||||
|
|
@ -254,7 +255,7 @@ else:
|
||||||
lines = ["CHF:%s" % fmt(a) for a in amts]
|
lines = ["CHF:%s" % fmt(a) for a in amts]
|
||||||
out.write_text("\n".join(lines) + "\n")
|
out.write_text("\n".join(lines) + "\n")
|
||||||
PY
|
PY
|
||||||
n_rungs=$(grep -cE '^CHF:' "$LADDER_FILE" || echo 0)
|
n_rungs_plan=$(grep -cE '^CHF:' "$LADDER_FILE" || echo 0)
|
||||||
ladder_sum=$(python3 -c '
|
ladder_sum=$(python3 -c '
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
s=Decimal(0)
|
s=Decimal(0)
|
||||||
|
|
@ -265,55 +266,68 @@ for ln in open("'"$LADDER_FILE"'"):
|
||||||
print(s)
|
print(s)
|
||||||
' 2>/dev/null || echo "?")
|
' 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}"
|
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_OK=0
|
||||||
LADDER_FAIL=0
|
LADDER_FAIL=0
|
||||||
LADDER_WARN=0
|
LADDER_WARN=0
|
||||||
rung=0
|
rung=0
|
||||||
while IFS= read -r amt || [ -n "$amt" ]; do
|
# Load amounts into an array first — never `while read … done <file` around ssh:
|
||||||
[ -n "$amt" ] || continue
|
# without ssh -n, OpenSSH drains the ladder file as remote stdin (only rung 1 ran).
|
||||||
rung=$((rung + 1))
|
mapfile -t LADDER_AMTS < <(grep -E '^CHF:' "$LADDER_FILE" || true)
|
||||||
subject="mon-fake-ladder-${ts_base}-r${rung}-$$"
|
|
||||||
info "rung ${rung}/${n_rungs}" "amount=${amt} subject=${subject}"
|
|
||||||
if run_fake_incoming "$amt" "$subject" "$credit_payto" "$debit_payto"; then
|
|
||||||
case "$FI_STATUS" in
|
|
||||||
ok_bounce)
|
|
||||||
ok "rung ${rung}" "${amt} · nexus IN + bounce (plumbing OK)"
|
|
||||||
LADDER_OK=$((LADDER_OK + 1))
|
|
||||||
;;
|
|
||||||
ok_in)
|
|
||||||
ok "rung ${rung}" "${amt} · nexus IN recorded"
|
|
||||||
LADDER_OK=$((LADDER_OK + 1))
|
|
||||||
;;
|
|
||||||
ok_cli)
|
|
||||||
ok "rung ${rung}" "${amt} · CLI ok"
|
|
||||||
LADDER_OK=$((LADDER_OK + 1))
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
warn "rung ${rung}" "${amt} · status=${FI_STATUS}"
|
|
||||||
LADDER_WARN=$((LADDER_WARN + 1))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
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}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done <"$LADDER_FILE"
|
|
||||||
rm -f "$LADDER_FILE"
|
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}-$$"
|
||||||
|
info "rung ${rung}/${n_rungs}" "amount=${amt} subject=${subject}"
|
||||||
|
if run_fake_incoming "$amt" "$subject" "$credit_payto" "$debit_payto"; then
|
||||||
|
case "$FI_STATUS" in
|
||||||
|
ok_bounce)
|
||||||
|
ok "rung ${rung}" "${amt} · nexus IN + bounce (plumbing OK)"
|
||||||
|
LADDER_OK=$((LADDER_OK + 1))
|
||||||
|
;;
|
||||||
|
ok_in)
|
||||||
|
ok "rung ${rung}" "${amt} · nexus IN recorded"
|
||||||
|
LADDER_OK=$((LADDER_OK + 1))
|
||||||
|
;;
|
||||||
|
ok_cli)
|
||||||
|
ok "rung ${rung}" "${amt} · CLI ok"
|
||||||
|
LADDER_OK=$((LADDER_OK + 1))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
warn "rung ${rung}" "${amt} · status=${FI_STATUS}"
|
||||||
|
LADDER_WARN=$((LADDER_WARN + 1))
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
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}/${n_rungs}"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
info "ladder summary" "ok=${LADDER_OK} warn=${LADDER_WARN} fail=${LADDER_FAIL} / planned=${n_rungs} · max=CHF:${DEVTESTING_LADDER_MAX}"
|
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"
|
fail "ladder" "all rungs failed"
|
||||||
elif [ "$LADDER_FAIL" -gt 0 ]; then
|
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
|
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
|
fi
|
||||||
else
|
else
|
||||||
info "ladder" "skipped (DEVTESTING_LADDER=0)"
|
info "ladder" "skipped (DEVTESTING_LADDER=0)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue