Skip to content

ci: rebuild the layer cache from scratch on develop, and on a manual dispatch (#282) - #856

Merged
NOX73 merged 1 commit into
developfrom
fix/ci-layer-cache
Nov 23, 2026
Merged

NOX73 merged 1 commit into
developfrom
fix/ci-layer-cache

Conversation

@NOX73

@NOX73 NOX73 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

What changed

.github/workflows/ci.yml only:

  • Publish the layer cache (the build-cache job) now builds with no-cache: true and no cache-from, so every develop push rebuilds the cache from scratch.
  • The job also runs on a manual workflow_dispatch of develop, so the cache can be refreshed on demand.

Why

The job that writes the layer cache and the jobs that read it use different builders. When the base image behind the ruby tag got a new digest with no Dockerfile change, the writer still matched its previous cache by layer content and re-exported the old records, which carry the old digest. The check jobs resolve the new digest, match none of the records, and rebuild every layer (0 CACHED, about +130 s per job). A build from scratch records the keys of the base image as it is now. Nothing waits on the cache job, so the longer build adds no wall clock.

How to check

The cache is written only from develop, so this PR's own runs still miss. After the merge, the push to develop rebuilds the cache (dispatch CI on develop if that job fails). Then, in the following PR and push runs, check:

  • Build test image logs CACHED layers and takes about 60 s;
  • the run wall clock is back at the old baseline (bin/ci-timings).

If the first refresh still gives 0 CACHED, the next suspect is the builder mismatch: switch the writer to the setup used in code-check.yml.

Refs #282

@NOX73
NOX73 merged commit abd6e05 into develop Nov 23, 2026
18 checks passed
@NOX73
NOX73 deleted the fix/ci-layer-cache branch November 23, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant