Repository navigation
feat(git): serve exact-commit snapshots for CI - #426
Draft
joshfriend wants to merge 1 commit into
Draft
joshfriend wants to merge 1 commit into
joshfriend wants to merge 1 commit into
Conversation
CI workers need one specific commit, not the default branch head, and should not have to freshen from GitHub on a cache hit.
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.
CI needs to restore one specific commit on thousands of workers, and today Cachew only snapshots the default branch head. This adds an immutable snapshot per commit SHA at
/git/{host}/{repo}/snapshots/v1/{sha}.tar.zst, holding a depth-one detached checkout with its LFS files already materialized.cachew git prepare <repo> --sha <sha>builds it once before workers fan out, andcachew git restore <repo> <dir> --sha <sha>restores it with no bundle or freshen step, so a hit never touches GitHub or the LFS upstream. The restore verifies the served and extracted commit before moving the checkout into place.This differs from #415, which snapshots branch tips that move. Known gaps before this can carry CI scale: builds are only deduplicated within a replica, each replica builds one SHA at a time, every SHA is a full checkout rather than a delta from a base snapshot, and all bytes still flow through Cachew.