Flaky test: TestCacheMountDefaultID (buildkit, worker=dockerd/frontend=builtin)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 72.1k
- Forks
- 19.2k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 164
Description
Description
TestCacheMountDefaultID in frontend/dockerfile is flaky when run with worker=dockerd/frontend=builtin. In the same test run, the frontend=client variant passes while frontend=builtin fails, confirming this is an intermittent issue rather than a consistent regression.
Failure symptom
--- FAIL: TestIntegration/TestCacheMountDefaultID/worker=dockerd/frontend=builtin (2.85s)
dockerfile_mount_test.go:335:
Error: Received unexpected error:
process "/bin/sh -c [ -f /mycache/foo ]" did not complete successfully: exit code: 1
The test runs a RUN --mount=type=cache build and then checks whether the cache mount directory /mycache/foo exists in a subsequent RUN. The file is not found (exit code 1) when the builtin frontend is used, but IS found when the client frontend is used in the same run. This suggests a race or state-isolation difference between the two frontend paths.
Observed CI runs
| Date | Branch | Run | Job |
|---|---|---|---|
| 2026-08-20 | master | 32418421142 | test-linux (dockerd, frontend/dockerfile, integration) |
| 2026-08-20 | master | 32418392972 | test-linux (dockerd-containerd, client, integration) |
Both master runs on 2026-08-20 showed this failure. The frontend=client variant passed in both.
Pass/fail in same run
--- PASS: TestIntegration/TestCacheMountDefaultID/worker=dockerd/frontend=client (1.99s)
--- FAIL: TestIntegration/TestCacheMountDefaultID/worker=dockerd/frontend=builtin (2.85s)
cc @vvoland
Flagged by automated CI flakiness scan.
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.
Research direction
Start with TestCacheMountDefaultID in frontend/dockerfile, particularly dockerfile_mount_test.go:335, and compare the dockerd builtin and client frontend paths. Run the integration test with both frontend variants and investigate why the cache-mounted file is absent only for builtin; done means the builtin variant passes reliably without changing the client result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100