monitoring: wallet-cli version in e2e

This commit is contained in:
Hernâni Marques 2026-07-17 13:18:40 +02:00
parent b9d37f6729
commit acac6d0ed3
No known key found for this signature in database
GPG key ID: CB5738652768F7E9

View file

@ -317,7 +317,41 @@ WALLET_CLI=$(find_wallet_cli) || {
blocker "prereq" "taler-wallet-cli not found (set WALLET_CLI=)" blocker "prereq" "taler-wallet-cli not found (set WALLET_CLI=)"
exit 1 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 "e2e mode" "$([ "$E2E_REMOTE" = "1" ] && echo "remote/public domain (no SSH)" || echo "local koopa stack")"
info "currency" "$CUR" info "currency" "$CUR"
info "ATM withdraw ladder" "$WITHDRAW_LIST (credit $CREDIT_AMT)" info "ATM withdraw ladder" "$WITHDRAW_LIST (credit $CREDIT_AMT)"