Repository navigation
ci: let the testnet image fall back to the shared cache mount - #214
Merged
Merged
Conversation
#208 gave the testnet image its own cache-mount key prefix so the production job can no longer take an exact hit on testnet's cache and stop saving. It also dropped the general restore-key, and that left the testnet job with no source of dependency objects at all: its own prefix started empty, and the ~170 chain objects it saves per run (29-58 MiB) never contain the ones the shared cache holds (190-250 MiB). Measured on master, same workflow otherwise: 29110a2 testnet 2m53s, ccache 2730/3112 hits (87.7%) bf5389e testnet 13m07s, ccache 0/174 hits (0%) - first run on the new key 4bbcf2d testnet 14m08s, ccache restored its own 29 MiB entry, still cold So every push to master pays ~10 extra minutes for the testnet image, and it does not heal by itself. Restoring from the shared cache is read-only and safe: ccache is content-addressed (the testnet objects simply miss) and the apt caches come from the same base image. Saving still goes to the testnet key, so production can never exact-hit it. Also drop the comment paragraph above the step: it still claimed both jobs hash both Dockerfiles and share a key prefix, which stopped being true in #208.
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.
#208 stopped the production job from taking an exact hit on the testnet cache. It also removed the general restore-key from the testnet job, and that left the testnet build with no source of dependency objects at all: its own prefix started empty, and the ~170 chain objects it saves per run (29–58 MiB) never contain the ones the shared cache holds (190–250 MiB).
Measured on master, nothing else changed
29110a28(before #208)bf5389e8(first run on the new key)4bbcf2d5(second run)The restore step in
bf5389e8says it plainly:Cache not found for input keys: viz-cache-mount-testnet-…-<sha>, viz-cache-mount-testnet-…-<hash>-, viz-cache-mount-testnet-…-main-— every key is testnet-scoped, and no testnet entry existed yet. The second run does restore a testnet entry, but by then it only holds what that run compiled itself, so it stays at 14 minutes. It does not heal.What the change does
Adds the shared prefix as the last restore-key of the testnet job:
Reading is safe and does not undo #208:
viz-cache-mount-testnet-…key, so production can never exact-hit it again — the bug ci: give the testnet image its own ccache on master #208 fixed stays fixed;The testnet job prefers its own entries: the general prefix is listed last and only matches production keys.
Also drops the comment paragraph above the step — it still said both jobs hash both Dockerfiles and share a key prefix, which stopped being true in #208.
Verification
YAML parses and both jobs keep their intended key lists (
yaml.safe_load, printed per job). The real acceptance is the first master push after the merge: the testnet job should be back near 3 minutes and its ccache report in the 75–90 % range. Until then this is an unproven prediction, not a result.