diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3956551..7622622 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -171,8 +171,10 @@ jobs: # the docker CLI. Measured, not guessed: the first real run of this file # (Gitea Actions run 2316, head 6f92d37) died here with # `./scripts/ci-gates.sh: line 44: docker: command not found`, exit 127. - # /var/run/docker.sock is mounted from the host, so the CLI and the compose - # v2 plugin are all that is missing — the same install the neemle-landing + # /var/run/docker.sock is mounted from the host, so what is missing is the + # client side: the CLI, the compose v2 plugin, and buildx — `docker compose + # up --build` reaches the daemon through buildx, so the compose plugin alone + # does not bring this stack up. The same install the neemle-landing # pipeline on this instance uses. Pinned to the Debian bookworm docker.com # repo so the version does not drift with the image. - name: Install Docker CLI + compose plugin @@ -191,7 +193,7 @@ jobs: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" \ > /etc/apt/sources.list.d/docker.list apt-get update -qq - apt-get install -qq -y docker-ce-cli docker-compose-plugin >/dev/null + apt-get install -qq -y docker-ce-cli docker-compose-plugin docker-buildx-plugin >/dev/null fi # compose-smoke.sh calls `docker compose`, and every command in it # talks to the host daemon over the mounted socket. A missing socket is @@ -199,6 +201,7 @@ jobs: # three steps later as a broken product. docker --version docker compose version + docker buildx version [ -S /var/run/docker.sock ] || { echo "no /var/run/docker.sock on this runner"; exit 1; } docker info --format 'daemon {{.ServerVersion}} on {{.OperatingSystem}}' @@ -253,8 +256,10 @@ jobs: # the docker CLI. Measured, not guessed: the first real run of this file # (Gitea Actions run 2316, head 6f92d37) died here with # `./scripts/ci-gates.sh: line 44: docker: command not found`, exit 127. - # /var/run/docker.sock is mounted from the host, so the CLI and the compose - # v2 plugin are all that is missing — the same install the neemle-landing + # /var/run/docker.sock is mounted from the host, so what is missing is the + # client side: the CLI, the compose v2 plugin, and buildx — `docker compose + # up --build` reaches the daemon through buildx, so the compose plugin alone + # does not bring this stack up. The same install the neemle-landing # pipeline on this instance uses. Pinned to the Debian bookworm docker.com # repo so the version does not drift with the image. - name: Install Docker CLI + compose plugin @@ -273,7 +278,7 @@ jobs: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" \ > /etc/apt/sources.list.d/docker.list apt-get update -qq - apt-get install -qq -y docker-ce-cli docker-compose-plugin >/dev/null + apt-get install -qq -y docker-ce-cli docker-compose-plugin docker-buildx-plugin >/dev/null fi # compose-smoke.sh calls `docker compose`, and every command in it # talks to the host daemon over the mounted socket. A missing socket is @@ -281,6 +286,7 @@ jobs: # three steps later as a broken product. docker --version docker compose version + docker buildx version [ -S /var/run/docker.sock ] || { echo "no /var/run/docker.sock on this runner"; exit 1; } docker info --format 'daemon {{.ServerVersion}} on {{.OperatingSystem}}' diff --git a/scripts/compose-smoke.sh b/scripts/compose-smoke.sh index e2983ed..fa3ca9c 100755 --- a/scripts/compose-smoke.sh +++ b/scripts/compose-smoke.sh @@ -112,7 +112,19 @@ cleanup() { trap cleanup EXIT echo '- starting the stack' -docker compose up -d --build >/dev/null 2>&1 || { echo "compose up failed"; exit 1; } +# What compose said has to reach the log. `compose up failed` with the output +# thrown away is the gate going blind at the one moment that decides whether the +# rest of the run means anything — the same complaint OPEN-39 records about a +# later assertion. Measured: on the Gitea runner this step failed after 5s and +# the job log carried the words `compose up failed` and nothing else. +UP_LOG=$(mktemp "${TMPDIR:-/tmp}/openwaf-compose-up.XXXXXX") +if ! docker compose up -d --build >"$UP_LOG" 2>&1; then + echo 'compose up failed — what compose said:' + cat "$UP_LOG" + exit 1 +fi +rm -f "$UP_LOG" + for _ in $(seq 1 120); do curl -fsS "$EDGE/healthz" >/dev/null 2>&1 && break; sleep 0.5; done CID=$(docker compose ps -q edge) diff --git a/scripts/console-smoke.sh b/scripts/console-smoke.sh index 6989f5c..0d1aa51 100755 --- a/scripts/console-smoke.sh +++ b/scripts/console-smoke.sh @@ -66,7 +66,19 @@ cleanup() { trap cleanup EXIT echo '- starting the stack' -docker compose up -d --build >/dev/null 2>&1 || { echo 'compose up failed'; exit 1; } +# What compose said has to reach the log. `compose up failed` with the output +# thrown away is the gate going blind at the one moment that decides whether the +# rest of the run means anything — the same complaint OPEN-39 records about a +# later assertion. Measured: on the Gitea runner this step failed after 5s and +# the job log carried the words `compose up failed` and nothing else. +UP_LOG=$(mktemp "${TMPDIR:-/tmp}/openwaf-compose-up.XXXXXX") +if ! docker compose up -d --build >"$UP_LOG" 2>&1; then + echo 'compose up failed — what compose said:' + cat "$UP_LOG" + exit 1 +fi +rm -f "$UP_LOG" + for _ in $(seq 1 120); do [ "$(docker compose ps -q edge | xargs docker inspect --format '{{.State.Health.Status}}')" = healthy ] && break sleep 0.5