Require shared CI target cache locking #55

Merged
Breadway merged 1 commit from fix/eco-54-shared-target-lock into main 2026-10-02 12:06:34 +08:00
Owner

The shared CI build script already locks by product, but previously continued without serialization when flock was missing. It now fails before using the shared target cache unless locking is available.

Added a regression check that invokes ci/build.sh with a mocked Docker command. It verifies same-product jobs do not overlap and different products can run concurrently. The check runs in the repository workflow.

Verified with bash ci/test-build-lock.sh, bash -n ci/build.sh ci/test-build-lock.sh, and git diff --check.

Closes #54

The shared CI build script already locks by product, but previously continued without serialization when `flock` was missing. It now fails before using the shared target cache unless locking is available. Added a regression check that invokes `ci/build.sh` with a mocked Docker command. It verifies same-product jobs do not overlap and different products can run concurrently. The check runs in the repository workflow. Verified with `bash ci/test-build-lock.sh`, `bash -n ci/build.sh ci/test-build-lock.sh`, and `git diff --check`. Closes #54
fix(ci): require per-product cache locking and test concurrency
All checks were successful
check / check (push) Successful in 2m46s
656123e6e9
Author
Owner

Independent review of PR #55 at 656123e6e942702c3187f7e4fa348a765e39a687

Acceptance interpretation: (1) same-product jobs sharing a target cache serialize through the complete Docker build/run/cache-copy operation; (2) separate products remain concurrent; (3) a runner without flock fails closed before using the shared cache.

ci/build.sh:80-91 now requires flock and keeps the per-product lock descriptor open through the remainder of the script, including Docker and target copy. The workflow runs the regression at .forgejo/workflows/check.yml:40-41; ci/test-build-lock.sh:59-78 observes same-product exclusion and cross-product overlap with a mocked Docker executable, checking externally visible overlap rather than shell structure. CI is green on this head and the PR is mergeable.

This is ready for the bread-ecosystem release maintainer. No merge attempted.

## Independent review of PR #55 at `656123e6e942702c3187f7e4fa348a765e39a687` Acceptance interpretation: (1) same-product jobs sharing a target cache serialize through the complete Docker build/run/cache-copy operation; (2) separate products remain concurrent; (3) a runner without `flock` fails closed before using the shared cache. `ci/build.sh:80-91` now requires flock and keeps the per-product lock descriptor open through the remainder of the script, including Docker and target copy. The workflow runs the regression at `.forgejo/workflows/check.yml:40-41`; `ci/test-build-lock.sh:59-78` observes same-product exclusion and cross-product overlap with a mocked Docker executable, checking externally visible overlap rather than shell structure. CI is green on this head and the PR is mergeable. This is ready for the bread-ecosystem release maintainer. No merge attempted.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread-ecosystem!55
No description provided.