diff --git a/CHANGELOG.md b/CHANGELOG.md index 625a9e6..a85c9dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versio ## [Unreleased] +### Fixed +- The image smoke test piped `curl` and `acaua doctor` into `grep -q` under `pipefail`; `grep` exits at the first match, the writer can get SIGPIPE, and the step failed at random (it already broke Xexéu's arm64 build). Outputs are now captured before checking. + ## [0.1.0] - 2026-11-01 ### Added diff --git a/CHANGELOG.pt-BR.md b/CHANGELOG.pt-BR.md index 61dee6b..ac2d5d8 100644 --- a/CHANGELOG.pt-BR.md +++ b/CHANGELOG.pt-BR.md @@ -6,6 +6,9 @@ Formato baseado no [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/); ## [Unreleased] +### Corrigido +- O smoke test da imagem passava a saída de `curl` e `acaua doctor` por pipe para `grep -q` sob `pipefail`; o `grep` sai no primeiro acerto, quem escreve pode levar SIGPIPE e o passo falhava ao acaso (isso já quebrou o build arm64 do Xexéu). As saídas agora são capturadas antes da checagem. + ## [0.1.0] - 2026-11-01 ### Adicionado diff --git a/scripts/smoke-image.sh b/scripts/smoke-image.sh index d6dd2c6..3981e44 100755 --- a/scripts/smoke-image.sh +++ b/scripts/smoke-image.sh @@ -17,9 +17,15 @@ for _ in $(seq 1 30); do docker exec "$name" curl -fsS http://127.0.0.1:8787/api/health >/dev/null 2>&1 && break sleep 1 done -docker exec "$name" curl -fsS http://127.0.0.1:8787/api/health | grep -q '"status":"ok"' || fail "/api/health did not answer" -docker exec "$name" curl -fsS http://127.0.0.1:8787/ | grep -qi '&2; fail "acaua doctor --json failed"; } +duckdb=$(grep -A1 '"name": "duckdb"' <<<"$out") || true +grep -q '"ok": true' <<<"$duckdb" || { echo "$out" >&2; fail "libduckdb is not usable"; } [ "$(docker inspect -f '{{if .Config.Healthcheck}}yes{{end}}' "$name")" = yes ] || fail "image has no HEALTHCHECK" [ "$(docker exec "$name" id -u)" != 0 ] || fail "daemon runs as root" docker stop -t 10 "$name" >/dev/null