Supporting partial cache-hit git pullthroughs

Open
#399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

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!

Dominant language
Go
Stars
41
Forks
14
Avg merge
23h 22m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from block/cachew

All issues in block/cachew

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.