chore(project): cache docker image layers across CI jobs with buildx gha cache - #16334
Closed
jaredlockhart wants to merge 2 commits into
Closed
chore(project): cache docker image layers across CI jobs with buildx gha cache#16334jaredlockhart wants to merge 2 commits into
jaredlockhart wants to merge 2 commits into
Conversation
…gha cache Because * setup-cached-build ran buildx with driver: docker and no cache-from/cache-to, so every CI job rebuilt megazords, schemas, cirrus and the experimenter images from scratch, duplicating the poetry/npm install and application-services fetch layers across the whole PR run. This commit * switches the builder to the docker-container driver and adds type=gha cache-from/cache-to with a per-image scope to every build the action drives. * stands up a throwaway localhost:5000 registry and pushes megazords there, so the container-driver builds resolve the experimenter:megazords build context (which the daemon driver used to satisfy from a locally loaded image). * parametrizes the megazords tag as MEGAZORD_IMAGE so local builds keep loading into the daemon while CI targets the registry. Fixes #16332
Collaborator
Author
|
We tried this before but I wanted to try again and it still seems as if we lose more time on rehydrating the cache than it saves on build steps, which is annoying, so closing this. |
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.
Because
driver: dockerand nocache-from/cache-to, so every CI job rebuilt megazords, schemas, cirrus and the experimenter images from scratch, duplicating the poetry/npm install and application-services fetch layers across the whole PR run.This commit
docker-containerdriver and addstype=ghacache to every build the action drives, scoped per image.localhost:5000registry and pushes megazords there so the container-driver builds can resolve theexperimenter:megazordsbuild context (previously satisfied from a locally loaded image under the daemon driver).MEGAZORD_IMAGEso local builds keep loading into the daemon while CI targets the registry.This PR touches root/
.githubpaths, socheck-changed-pathsruns the full CI suite here: the cache warms on this run and the payoff shows on subsequent runs of the same branch/base.Fixes #16332