mp53348_cache_bundler_and_npm - #22
Open
derfred wants to merge 2 commits into
Open
Conversation
Builds previously ran implicitly inside `docker compose up`, using the local image store. On a fresh runner that store is empty, so every build re-ran bundle install and yarn install from scratch. Split the build into an explicit step that can use a registry-backed BuildKit cache, controlled by the new cache-ref input. When cache-ref is empty the action builds exactly as before, so this is opt-in per application. mode=max is required here: the bundler and yarn layers live in the discarded `build` stage of the multi-stage Dockerfile, so the default mode=min would export nothing useful. The docker-container driver is needed for cache export, which builds outside the local image store, so the build --load's the result back in for the subsequent `docker compose up`. compose_run reads the cache but does not export it, so test runs cannot overwrite the cache produced by the push workflow. Also declares makandra_registry_user/pass in compose_run's secrets block. They were referenced by its docker login step but never declared, so that login was running with empty credentials. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
https://miceportal.atlassian.net/browse/MP-53348
This introduces (max) caching to our image building. This is the type of caching that would occur if we always ran the building on the same machine. On the github runners we always start with an empty build cache, so it has to be populated for the caching do any work.
Three consequences:
apt dist-upgradeis also cached. that means we have less control over it. we could mitigate this by adding an build variable that we can manually adjust if we want an update of the packages.NOTE: before merging the tag for the action in the workflow files has to be updated and then the version of the repo here bumped