release 1.3.4: summary i18n, monpages code-21, aptdeploy path

This commit is contained in:
Hernâni Marques 2026-07-18 20:09:41 +02:00
parent 8840341079
commit 949837d2e6
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
6 changed files with 32 additions and 12 deletions

View file

@ -1 +1 @@
1.3.3
1.3.4

View file

@ -5,6 +5,7 @@ Release history for the standalone **taler-monitoring** suite
| Tag | Date (UTC) | Notes |
|-----|------------|--------|
| **v1.3.4** | 2026-07-18 | **Bugfix:** summary line printed raw `$(i18n_text …)` instead of message; aptdeploy remote rsync path `src/src/…`; monpages detects merchant code 21 on any HTTP status + checks bare URLs (no trailing slash); host-agent logs expected public FQDNs. |
| **v1.3.3** | 2026-07-18 | **Docs/fix:** `VERSIONS.md` is git/suite only (no Android blob, no dead `koopa-admin-log` cadence paths); Android stays in `android-test/GUI-AUTOMATION-NOTES.md`. monpages in TESTS; README/host-agent/DEPENDENCIES cleanup. |
| **v1.3.2** | 2026-07-18 | **Bugfix:** drop remaining `koopa-admin-log` suite paths — host-agent/install, path unit, aptdeploy dedupe use **only** `~/src/taler-monitoring`. Reinstall systemd units. |
| **v1.4.0** | *planned* | **L10n** for user-facing outputs that need localization: **fr-CH** (FrancPaysan, Suisse romande) and **de-CH** (hacktivism / Taler CH German). Not implemented yet — after **1.3.x**. |
@ -54,5 +55,5 @@ sudo ~/koopa-caddy/apply-monitoring-live.sh
```bash
git clone https://git.hacktivism.ch/hernani/taler-monitoring.git ~/src/taler-monitoring
cd ~/src/taler-monitoring && git checkout v1.3.3
cd ~/src/taler-monitoring && git checkout v1.3.4
```

View file

@ -104,14 +104,15 @@ check_one() {
local body code hint
body=$(mktemp)
code=$(curl -skS -L --max-redirs 5 -m "${TIMEOUT}" -o "$body" -w '%{http_code}' "$url" 2>/dev/null || echo 000)
if [ "$code" != "200" ]; then
fail "public mon page" "$url -> HTTP $code (want 200 HTML)"
if grep -qE '"code"[[:space:]]*:[[:space:]]*21' "$body" 2>/dev/null \
|| grep -qiE 'There is no endpoint defined for the URL' "$body" 2>/dev/null; then
fail "public mon page missing" \
"$url -> HTTP $code merchant/API JSON code 21 (Caddy handle not live — sudo ~/koopa-caddy/apply-monitoring-live.sh)"
rm -f "$body"
return 1
fi
if grep -qE '"code"[[:space:]]*:[[:space:]]*21' "$body" 2>/dev/null; then
fail "public mon page missing" \
"$url -> merchant/API JSON code 21 (Caddy handle not live or not published — sudo apply-monitoring-live.sh)"
if [ "$code" != "200" ]; then
fail "public mon page" "$url -> HTTP $code (want 200 HTML)"
rm -f "$body"
return 1
fi
@ -142,6 +143,22 @@ while IFS= read -r line; do
URLS+=("$line")
done < <(build_urls)
# also check non-trailing-slash forms (Caddy redir or merchant fallthrough)
_extra=()
for u in "${URLS[@]}"; do
case "$u" in
*/) _bare=${u%/}; [ -n "$_bare" ] && _extra+=("$_bare") ;;
esac
done
for u in "${_extra[@]+"${_extra[@]}"}"; do
skip=0
for e in "${URLS[@]+"${URLS[@]}"}"; do
[ "$e" = "$u" ] && skip=1 && break
done
[ "$skip" = "1" ] && continue
URLS+=("$u")
done
if [ "${#URLS[@]}" -eq 0 ]; then
fail "monpages" "no URLs to check (set MON_HOSTS or MONITORING_PAGE_URLS)"
exit 1

View file

@ -114,7 +114,7 @@ run_local() {
run_remote() {
echo "======== aptdeploy remote via ssh ${APT_DEPLOY_SSH} mode=$MODE ========"
if [ "${APT_DEPLOY_RSYNC:-1}" = "1" ]; then
echo "rsync mon suite → ${APT_DEPLOY_SSH}:src/src/taler-monitoring/"
echo "rsync mon suite → ${APT_DEPLOY_SSH}:src/taler-monitoring/"
rsync -az \
--exclude secrets.env \
--exclude 'android-test/artifacts' \
@ -122,7 +122,7 @@ run_remote() {
--exclude 'android-test/out*' \
--exclude '__pycache__' \
"$BOOT_MON/" \
"${APT_DEPLOY_SSH}:src/src/taler-monitoring/" \
"${APT_DEPLOY_SSH}:src/taler-monitoring/" \
|| echo "WARN: rsync failed" >&2
fi
ssh -o BatchMode=yes -o ConnectTimeout=25 "$APT_DEPLOY_SSH" bash -s -- "$MODE" <<'EOS'

View file

@ -385,9 +385,10 @@ htmlify_host() {
}
for host in $MON_HOSTS; do
htmlify_host "$host"
echo "public URL (expected): https://${host}${HTML_URL_OK}"
done
# Publish to live web root when possible (v1.3.1: never silent-skip)
# Publish to live web root when possible (v1.3.1+: never silent-skip)
if [ -n "$DEPLOY_WWW" ]; then
if [ -w "$DEPLOY_WWW" ] 2>/dev/null; then
if rsync -a --delete "$HTML_BASE/" "$DEPLOY_WWW/"; then

5
lib.sh
View file

@ -878,10 +878,11 @@ summary() {
printf -- ' %s[ WARN ] warnings only (no hard fail)%s\n' "$Y" "$N"
fi
else
_fail_msg=$(i18n_text 'failed — see list above')
if [ "${BOX:-0}" = "1" ]; then
printf -- ' %s┌ ERROR ┐%s %s"$(i18n_text "failed — see list above")"%s\n' "$BG_ERR" "$N" "$R" "$N"
printf -- ' %s┌ ERROR ┐%s %s%s%s\n' "$BG_ERR" "$N" "$R" "$_fail_msg" "$N"
else
printf -- ' %s[ ERROR ] "$(i18n_text "failed — see list above")"%s\n' "$R" "$N"
printf -- ' %s[ ERROR ] %s%s\n' "$R" "$_fail_msg" "$N"
fi
fi
[ "$FAIL_N" -eq 0 ]