ci: serialize builds per product in the shared build.sh #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/ci-serialize-builds-per-product"
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?
Follow-up to ECO-38.
Two jobs for the same product (a dev-release and a check, say) share the
target-<product>cache directory. While one job's cargo rewritesincremental/, the other's finalcp -a /cargo-target/. target/fails withcannot stat '/cargo-target/./debug/incremental/...'. This was seen on breadcast during the ECO-38 rollout, and it is why one run there needed a retrigger.ci/build.shnow takes anflockontarget-<product>.lockbefore the docker build and holds it until the script exits.BREAD_CI_LOCK_WAITseconds (default 3600), then fails with a clear message.flockis not installed.CACHE_ROOTand its directories are now created before the lock, since the lock file lives there.Tested with a fake
dockeron PATH: two builds of one product ran back to back while a build of another product ran alongside them, and the timeout path exits 1 without starting a build.Consumers pick this up when their
ci/bread-ecosystem.revpin is bumped to the merged commit.