block / block/cachew

Supporting partial cache-hit git pullthroughs

Open
#399 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
41
Forks
12
PR merge metrics
No merged PRs in 30d

Description

I've been experimenting with Cachew a bit, and ran into an unexpected behavior.

Cachew keeps a bare mirror per upstream repo and serves git-upload-pack from it via the git http-backend. On any partial cache miss, cachew fell back to pulling the entire upload-pack request from upstream. I was testing this in a small CI deployment, and when running through the cache it was always doing a full pull when run on a fresh commit.

I was able to get a partial pack pull working by filtering missing objects from the upload-pack request and doing some dynamic serving. Validated it working with a watch on the deployment ingress. Putting together a PR this week if that's a feature the cachew team is open to adding. Cheers!

Contributor guide

Open the contributing guide

Research direction

Start at the git-upload-pack path through git http-backend and trace the partial-cache-miss fallback; the payload names no source file or test, so locate the handler and its existing miss coverage first. Reproduce a fresh-commit pull in the CI deployment, then verify via ingress traffic that only missing objects are fetched rather than the entire upload-pack request.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
backend, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.