Serialize shared CI target cache by product #54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A Hestia runner check for Breadcloud PR #75 failed while simultaneous check and test jobs shared the same product target cache. The observed error was
cp: cannot stat /cargo-target/./debug/deps/libbreadcloud_webdav-...rlib.ci/build.shbind-mounts${CACHE_ROOT}/target-${PRODUCT}into each container and copies it back into each checkout. A concurrent Cargo invocation can remove or replace an artifact during the copy. Hold a host lock per product across Docker build, run and target copy, while preserving cross-product parallelism and cache reuse. Verify with shell checks and concurrent invocations. Keep the fix in the shared script; separate ECO-28 tracks its vendored checkout race.Implemented a fail-closed per-product lock requirement and added a mocked-Docker concurrency regression check to CI. The check confirms same-product invocations serialize while different products overlap. Local verification passes. PR: #55. Forgejo CI is running.
Independent review verdict
Acceptance mapping for PR #55 at
656123e6e942702c3187f7e4fa348a765e39a687:${CACHE_ROOT}/target-${PRODUCT}.lock, held from before Docker build until Docker run and the target copy complete:ci/build.sh:73-91,93-141.ci/build.sh:84;ci/test-build-lock.sh:70-79asserts overlapping mock runs for separate products.flockfails before Docker or Cargo touches the target cache:ci/build.sh:80-83. Docker/build failures propagate underset -e, and the shell releases the lock when the script exits.ci/test-build-lock.sh:58-81,.forgejo/workflows/check.yml:41.Forgejo CI is successful for this exact head, and the PR is mergeable. The lock scope and test behavior are correct by inspection.
bread-ecosystemis release-sensitive, so I leave the merge to the maintainer.