Files
openwaf/scripts
Pavlo Ratushnyi ea68b550e2 Two CI jobs sharing one compose project: one job's teardown was the other's connection refused
The full local runner pass (act 0.2.89, catthehacker/ubuntu:act-latest) on this
tree went 4 jobs succeeded, 1 failed: the console job died 33 s in, at the
seeding curl of scripts/console-smoke.sh, with curl exit 7 — nothing listening on
127.0.0.1:8080 any more.

Not a product failure and not flakiness. The image job and the console job each
run `docker compose up -d` and each tear the stack down on exit, and both take the
project name from the repository directory and the host port from a literal 8080
in docker-compose.yml. On any machine where two jobs share one docker daemon — a
self-hosted runner, or act — they are the same stack, so the image job's
`compose down` removes the containers the console job is seeding into. Run alone,
the same console job passes (act -j console: 1 job succeeded, 53 assertions). On
GitHub's hosted runners each job gets its own machine, which is exactly why this
has never been seen there and why "the workflow has never run on GitHub" is still
a gap this repository carries rather than a solved problem.

Fix: the published port is ${EDGE_PORT:-8080}, and each job names its own compose
project (openwafci-image on 8080, openwafci-console on 8090). Separate projects
means separate containers, separate volumes and separate ports, so neither job can
see the other's stack. scripts/ci-linux-rehearsal.sh passes COMPOSE_PROJECT_NAME
and EDGE_PORT through to the seeding container so an operator can isolate a
rehearsal the same way.

Measured after: the same full act pass is 5 jobs succeeded, 0 failed — lint,
source (128/128, 117/117, smoke 25/0), image (261 MB, compose smoke 53/0),
console (53 assertions / 0 failed, screenshot artifact), freshness. Locally:
compose gate 53/0 with the default project and port unchanged, and the console
gate 53/0 driven through the CI configuration (COMPOSE_PROJECT_NAME=openwafci-console,
EDGE_PORT=8090).
2026-10-02 07:21:13 +02:00
..