test: Remove fixed container_name from node integration test docker-compose files#22134
Open
mydea wants to merge 1 commit into
Open
test: Remove fixed container_name from node integration test docker-compose files#22134mydea wants to merge 1 commit into
mydea wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fixed
container_nameis a global name on the Docker daemon, not scoped to the Compose project. When a suite's teardown was skipped (process killed, crash,--waittimeout, etc.), the orphaned container kept holding that name, and the next run's project-scopeddocker compose downcould not remove it — so the subsequentdocker compose upfailed with: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_namefrom 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.