Conversation

K. Ryabitsev-Prime 🍁

Got git bundle clones working reliably. This is a feature in newer git versions that allows offloading downloads to a CDN. But:

a) it's not currently very useful without redoing how we generate bundles -- we first made it work for Android's "repo" tool, which is very blunt in how it works.
b) it must be enabled in the client (set transfer.bundleURI=true) to even trigger -- it's not on by default.

I'll play with bundle generation next, especially for stable.git -- maybe we can prebuild bundles for specific branches.
3
1
7

@monsieuricon i was *just* about to ask you why shallow clones are garbage from your last blog, i guess that bundles missing might not help with that for sure. and god i wish that client would flip, it's a huge deal for large monorepos (e.g. our firefox clone...)

0
0
0

@monsieuricon id love this. We do weekly ish builds of kernel and to keep size down I put bundles into a docker image in our local cache (only docker images get cached, thus…) but it’s still pretty rough to get up to a current tag.

So the bundle clones would help me at least to not hammer the bandwidth each attempt.

1
0
0

@monsieuricon This is what we've been doing for Armbian build system: https://github.com/armbian/shallow

This takes the kernel.org bundles (torvalds & stable), updates them from live trees, and produces .git tarballs in OCI (ORAS) artifacts backed by GH's CDN, ready to go, in a few variants (full tree, shallow-per-version, which includes all -rc tags and stable point releases).

eg to get a shallow 6.18.y tree: get oras `apt install oras`, then `oras pull ghcr.io/armbian/shallow/kernel-git-shallow-6.18:latest`, untar, and you get a `.git`.

Compared to shallow cloning from git, it reduces server load drastically, but also by delivering a .git (instead of cloning) it saves client cycles and time.

build/armbian uses a few heuristics (disk free space/speed) to auto-determine for the (casual) user if a full or shallow tree is better suited for their specific build...

1
0
0
@rpardini shipping tarballs of a git tree is perfectly reasonable for infrastructure you trust. blobcatthumbsup

I've considered publishing something like this for others as well, but I wouldn't honestly recommend grabbing a tarball of a git tree from somewhere and running commands inside it (git implicitly trusts the hooks) -- so the potential for abuse was too great.
0
0
0
@Spider the bundles are fully set up now, so if you set transfer.bundleURI=true, then you will immediately benefit from them, plus any local CDN caching.
0
0
1