Hard-coded experimenter_test container name causes conflicts between concurrent worktrees
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- docker
- Domain
- build-system, devops
Research direction
Start in the Makefile at the listed lines and trace how COMPOSE_TEST_RUN, docker rm, and docker cp use the fixed experimenter_test name. Update those references to use a directory-derived name, then run make check or make lint from two concurrent worktrees to confirm their containers no longer conflict.
Written by the indexing model from the issue text.
Description
When running make check (or make lint) from two different git worktrees concurrently, the builds collide because the test container name experimenter_test is hard-coded in the Makefile:
COMPOSE_TEST_RUN = ${COMPOSE_TEST} run --name experimenter_test
All the docker rm experimenter_test and docker cp experimenter_test:... references also use this fixed name. When two worktrees try to run checks at the same time, the second one fails with:
Error response from daemon: Conflict. The container name "/experimenter_test" is already in use
Proposed fix: Derive the container name from the current directory so each worktree gets a unique name, e.g.:
TEST_CONTAINER_NAME = experimenter_test_$(notdir $(CURDIR))
COMPOSE_TEST_RUN = ${COMPOSE_TEST} run --name $(TEST_CONTAINER_NAME)
Then update all docker rm and docker cp lines to use $(TEST_CONTAINER_NAME) instead of the hard-coded string.
Affected lines in Makefile: 10, 174, 180, 182, 183, 185, 188, 305, 311, 315, 316
┆Issue is synchronized with this Jira Task
- Dominant language
- Python
- Stars
- 151
- Forks
- 229
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 212
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/experimenter
-
[Rollout UI] Documentation link title errors are hidden for every link, not just newly added ones Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mozilla/experimenter#17258 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mozilla/experimenter#17133 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mozilla/experimenter#17119 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mozilla/experimenter#16723 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
mozilla/experimenter#16586 ·
All issues in mozilla/experimenter
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100