Skip to content

test: Remove fixed container_name from node integration test docker-compose files#22134

Open
mydea wants to merge 1 commit into
developfrom
test/remove-docker-container-name
Open

test: Remove fixed container_name from node integration test docker-compose files#22134
mydea wants to merge 1 commit into
developfrom
test/remove-docker-container-name

Conversation

@mydea

@mydea mydea commented Jul 9, 2026

Copy link
Copy Markdown
Member

A fixed container_name is a global name on the Docker daemon, not scoped to the Compose project. When a suite's teardown was skipped (process killed, crash, --wait timeout, etc.), the orphaned container kept holding that name, and the next run's project-scoped docker compose down could not remove it — so the subsequent docker compose up failed with:

Conflict. The container name "/integration-tests-postgres-streamed" is already in use by container ...

Nothing connects by container name — the scenario apps reach the DB via the published host port, and healthchecks run inside the container — so dropping container_name from all 16 tracing suite compose files lets Compose auto-name containers per (stable, cwd-derived) project. Startup becomes resilient to a leftover container without any change to the existing teardown behaviour.

Root cause: container names are a daemon-global namespace; a fixed name plus project-scoped teardown means an orphan from an aborted run collides with the next run and can't be cleaned up by that run's down.

…ompose files

A fixed `container_name` is a global name on the Docker daemon, not scoped to
the Compose project. When a suite's teardown was skipped (process killed, crash,
etc.), the orphaned container kept holding the name, and the next run's
project-scoped `docker compose down` could not remove it — so `up` failed with
"the container name ... is already in use".

Nothing connects by container name (the app uses the published host port and
healthchecks run inside the container), so dropping it lets Compose auto-name
containers per project. Startup is then resilient to a leftover container
without changing the existing teardown behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mydea mydea requested a review from a team as a code owner July 9, 2026 09:26
@mydea mydea requested review from JPeer264 and andreiborza and removed request for a team July 9, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant