From 7e081da6fe9dbca897a96636faaa955ca2a96b2d Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Fri, 2 Oct 2026 07:35:26 +0200 Subject: [PATCH] The rehearsal tore down a stack it did not start and left the one it did running The console stage starts the stack through the host daemon with whatever COMPOSE_PROJECT_NAME the caller passed, so the CI-named project is what is running. Its cleanup container passed no such name, so it removed the stack named after this directory - nothing - and printed PASS while two containers held the CI port. Re-running the stage with the CI console job's own environment is what showed it: 53 assertions, 0 failed, and 2 containers still up. With the name passed through, the same stage leaves 0. --- scripts/ci-linux-rehearsal.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/ci-linux-rehearsal.sh b/scripts/ci-linux-rehearsal.sh index 1b3c2ac..b4dec1d 100755 --- a/scripts/ci-linux-rehearsal.sh +++ b/scripts/ci-linux-rehearsal.sh @@ -211,8 +211,13 @@ if [ "$STAGE" = all ] || [ "$STAGE" = console ]; then ' || console_status=$? fi + # The teardown has to name the same project the seeding container named. + # Without COMPOSE_PROJECT_NAME this removes the stack named after this + # directory and leaves the CI-named one — and its port — running behind a + # summary line that says PASS. docker run --rm -v "$PWD:$PWD" -w "$PWD" \ -v "$DOCKER_SOCKET:/var/run/docker.sock" \ + -e COMPOSE_PROJECT_NAME -e EDGE_PORT \ "$COMPOSE_IMAGE" sh -c 'docker compose down >/dev/null 2>&1 || true' fi fi