From 4e303cd0adc864e74c28d261661e9e43059c00c3 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Mon, 5 Oct 2026 20:46:22 +0200 Subject: [PATCH] the two docker jobs install the CLI the runner image never shipped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First real run of this workflow: Gitea Actions run 2316 on 6f92d37. Three jobs red, each with a cause that names itself in the log: lint — shellcheck 0.11.0: 2x SC2086 in scripts/smoke.sh (835, 837) image — ./scripts/ci-gates.sh:44: docker: command not found (exit 127) console — - starting the stack / compose up failed (exit 7) source — success, 1m53s The runner's job image ships no docker CLI while /var/run/docker.sock is mounted from the host, so the image and console jobs now install docker-ce-cli and docker-compose-plugin themselves and then fail loudly, at that step, if the socket is not there — an infrastructure answer should read as infrastructure rather than as a broken product three steps later. Same install the neemle-landing pipeline on this instance already uses. The two SC2086 findings are the string-concatenation trick inside a single-quoted python -c: '$EDGE_PORT' expands unquoted. Now '"$EDGE_PORT"', which is what shellcheck proposed and what the scene was already meaning. Gate evidence on this tree: shellcheck 0.11.0 (the pinned version, same command as the gate: shellcheck -s bash scripts/*.sh) clean; scripts/smoke.sh 256 passed / 0 failed on EDGE_PORT=18411. build and unit were green at ddddfc8 and nothing here touches C# — integration was not re-run locally, its two host-specific races are OPEN-47 and OPEN-76. The header comments that said this file had never executed on a runner are now wrong and say what happened instead. --- .github/workflows/ci.yml | 101 +++++++++++++++++++++++++++++++++++---- scripts/smoke.sh | 4 +- 2 files changed, 94 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc4472e..3956551 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,19 @@ # chose to run them. Four mergeEvidence fields on that epic say "no CI pipeline # exists yet — every gate quoted above was run locally"; this closes that. # -# Honest status of this file itself: it has never executed on a GitHub-hosted -# runner, because the repository has no remote yet. It has executed start to +# Honest status of this file itself, as of the run that first executed it: the +# repository's remote is Gitea at git.vezha.io (ssh git@vezha.io), and its +# Actions runner ran this file on a push — run 2316, head 6f92d37, 2026-10-05. +# Three of the four jobs below were red there, each with a named cause: lint +# found two SC2086 findings in scripts/smoke.sh (now fixed), and the image and +# console jobs died on `docker: command not found`, because the runner's job +# image ships no docker CLI even though /var/run/docker.sock is mounted from the +# host — which is why both jobs install docker-ce-cli and docker-compose-plugin +# themselves. `build, test, smoke` was green: 1m53s, unit and integration and +# smoke on Linux. Before that run this file had only ever executed start to # finish in a local Actions-compatible runner (nektos/act 0.2.89, image -# catthehacker/ubuntu:act-latest): all four jobs below reported success, and so -# did the freshness job in geo-freshness.yml — five jobs on a push in total, -# four here plus one there. That run proves the YAML plays and the pinned tools +# catthehacker/ubuntu:act-latest), where all four jobs below and the freshness +# job in geo-freshness.yml reported success. That run proves the YAML plays and the pinned tools # resolve — and it is how the lint # job's shellcheck version drift was found (ubuntu-latest ships 0.9.0-1, the # pinned step now runs 0.11.0 with a checksum). Do not read this file as proof @@ -32,8 +39,9 @@ # only wall clock ever measured for the source job is 1:02.81 cold (first # rehearsal); later rehearsals were not re-timed, so that number is quoted as # measured once, not as current. So every gate this file runs has a Linux -# number. What it does not have is a runner: the repository has no remote, so -# this file has never executed on GitHub. It has been executed by a local +# number, and a runner has now executed it: run 2316 on the Gitea instance, +# where the source job took 1m53s and was the only green one — the rest of the +# reds are the docker-CLI and shellcheck causes named at the top of this file. It has been executed by a local # Actions-compatible runner (nektos/act 0.2.89, catthehacker/ubuntu:act-latest) # at dc88f36: 5 jobs succeeded, 0 failed - lint, source (132/132, 173/173, smoke # 28/0), image (261 MB, compose smoke 185/0), console (70 assertions, screenshot @@ -159,6 +167,41 @@ jobs: steps: - uses: actions/checkout@v4 + # The gate below talks to docker, and the runner's job image does not ship + # 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 + # 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 + run: | + set -eu + if command -v docker >/dev/null 2>&1; then + echo "docker already present: $(docker --version)" + else + export DEBIAN_FRONTEND=noninteractive + apt-get update -qq + apt-get install -qq -y ca-certificates curl gnupg >/dev/null + install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/debian/gpg \ + | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + chmod a+r /etc/apt/keyrings/docker.gpg + 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 + 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 + # an infrastructure answer, so it says so here rather than failing + # three steps later as a broken product. + docker --version + docker compose version + [ -S /var/run/docker.sock ] || { echo "no /var/run/docker.sock on this runner"; exit 1; } + docker info --format 'daemon {{.ServerVersion}} on {{.OperatingSystem}}' + # The plain build, the one the README shows, plus its size: this is the # step that catches a Dockerfile regression the compose path would hide. - name: docker build and image size @@ -183,8 +226,13 @@ jobs: # the inline script, a fetch that 401s, a table that renders nothing while the # summary looks fine. This drives it in a real Chromium. # - # Honest status: this job has never run on a GitHub-hosted runner. It has run - # in a local Actions-compatible runner (act, catthehacker/ubuntu:act-latest): + # Honest status: on the Gitea runner (run 2316) this job reached the gate and + # died at `- starting the stack / compose up failed`, exit 7 — the missing + # docker CLI, not the page. The playwright half of it did work there: + # playwright@1.63.0 installed and Chrome Headless Shell 153.0.8010.12 + # (chromium-headless-shell v1243) downloaded to /root/.cache/ms-playwright. + # It has also run start to finish in a local Actions-compatible runner (act, + # catthehacker/ubuntu:act-latest): # the pinned playwright@1.63.0 installed, chromium-1243 downloaded, the gate # reported 33 assertions / 0 failed, and the screenshot step published the # artifact (console-evidence.png 335998 bytes, console-evidence.phone.png @@ -201,6 +249,41 @@ jobs: steps: - uses: actions/checkout@v4 + # The gate below talks to docker, and the runner's job image does not ship + # 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 + # 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 + run: | + set -eu + if command -v docker >/dev/null 2>&1; then + echo "docker already present: $(docker --version)" + else + export DEBIAN_FRONTEND=noninteractive + apt-get update -qq + apt-get install -qq -y ca-certificates curl gnupg >/dev/null + install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/debian/gpg \ + | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + chmod a+r /etc/apt/keyrings/docker.gpg + 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 + 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 + # an infrastructure answer, so it says so here rather than failing + # three steps later as a broken product. + docker --version + docker compose version + [ -S /var/run/docker.sock ] || { echo "no /var/run/docker.sock on this runner"; exit 1; } + docker info --format 'daemon {{.ServerVersion}} on {{.OperatingSystem}}' + - uses: actions/setup-node@v4 with: node-version: '22' diff --git a/scripts/smoke.sh b/scripts/smoke.sh index e1ff30a..703f838 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -832,9 +832,9 @@ check 'with a path the dossier and the dry run give the same verdict' yes \ "$(python3 -c ' import json,subprocess d=json.loads(subprocess.run(["curl","-s","-H","X-Admin-Token: '$TOKEN'", - "http://127.0.0.1:'$EDGE_PORT'/admin-api/source?ip='$DOS_INSIDE'&path=/wp-admin"],capture_output=True,text=True).stdout) + "http://127.0.0.1:'"$EDGE_PORT"'/admin-api/source?ip='$DOS_INSIDE'&path=/wp-admin"],capture_output=True,text=True).stdout) p=json.loads(subprocess.run(["curl","-s","-H","X-Admin-Token: '$TOKEN'", - "http://127.0.0.1:'$EDGE_PORT'/admin-api/decide?ip='$DOS_INSIDE'&path=/wp-admin"],capture_output=True,text=True).stdout) + "http://127.0.0.1:'"$EDGE_PORT"'/admin-api/decide?ip='$DOS_INSIDE'&path=/wp-admin"],capture_output=True,text=True).stdout) print("yes" if d["wouldAnswer"]["verdict"]==p["verdict"]==d["verdict"]=="block_operator" else "no")')" check 'a question it cannot answer is refused by name' '400 400' \ "$(code -H "X-Admin-Token: $TOKEN" "http://127.0.0.1:$EDGE_PORT/admin-api/source?ip=192.0.2") \