Repository navigation
ci: rebuild the layer cache from scratch on develop, and on a manual dispatch (#282) - #856
Merged
Merged
Conversation
…dispatch (#282) Signed-off-by: Rozhnov Alexandr <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
.github/workflows/ci.ymlonly:Publish the layer cache(thebuild-cachejob) now builds withno-cache: trueand nocache-from, so everydeveloppush rebuilds the cache from scratch.workflow_dispatchofdevelop, 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
rubytag 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 (0CACHED, 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 todeveloprebuilds the cache (dispatch CI ondevelopif that job fails). Then, in the following PR and push runs, check:Build test imagelogsCACHEDlayers and takes about 60 s;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 incode-check.yml.Refs #282