From acac6d0ed330eea7b60698b1c856a1c1df0994d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A2ni=20Marques?= Date: Fri, 17 Jul 2026 13:18:40 +0200 Subject: [PATCH] monitoring: wallet-cli version in e2e --- scripts/taler-monitoring/check_e2e.sh | 36 ++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/scripts/taler-monitoring/check_e2e.sh b/scripts/taler-monitoring/check_e2e.sh index 44d1b41..25cde8b 100755 --- a/scripts/taler-monitoring/check_e2e.sh +++ b/scripts/taler-monitoring/check_e2e.sh @@ -317,7 +317,41 @@ WALLET_CLI=$(find_wallet_cli) || { blocker "prereq" "taler-wallet-cli not found (set WALLET_CLI=)" exit 1 } -ok "wallet-cli ($WALLET_CLI)" +# Implementation version (--version) + wallet-core API ranges (version command) +WALLET_IMPL_VER=$( + node "$WALLET_CLI" --version 2>/dev/null | head -1 | tr -d '\r' || true +) +WALLET_CORE_VER=$( + _wver_db=$(mktemp "${TMPDIR:-/tmp}/wver.XXXXXX.sqlite3" 2>/dev/null || echo "${TMPDIR:-/tmp}/wver-$$.sqlite3") + node "$WALLET_CLI" --wallet-db="$_wver_db" --no-throttle --skip-defaults version 2>/dev/null \ + | python3 -c ' +import json,re,sys +raw=sys.stdin.read() +d=None +for m in re.finditer(r"\{", raw): + try: + d=json.loads(raw[m.start():]) + if isinstance(d, dict) and "version" in d: + break + except Exception: + d=None +if not isinstance(d, dict): + sys.exit(0) +parts=[] +# wallet-core libversion + protocol ranges used against exchange/merchant/bank +for k in ("version","implementationSemver","exchange","merchant","bank","bankIntegrationApiRange","corebankApiRange"): + if k in d and d[k] is not None: + parts.append("%s=%s" % (k, d[k])) +print(" ".join(parts)) +' 2>/dev/null || true + rm -f "$_wver_db" "$_wver_db"-* 2>/dev/null || true +) +ok "wallet-cli" "${WALLET_IMPL_VER:-?} ยท ${WALLET_CLI}" +if [ -n "${WALLET_CORE_VER:-}" ]; then + info "wallet-core" "$WALLET_CORE_VER" +else + info "wallet-core" "version details unavailable (impl ${WALLET_IMPL_VER:-?})" +fi info "e2e mode" "$([ "$E2E_REMOTE" = "1" ] && echo "remote/public domain (no SSH)" || echo "local koopa stack")" info "currency" "$CUR" info "ATM withdraw ladder" "$WITHDRAW_LIST (credit $CREDIT_AMT)"