aboutcode-org / aboutcode-org/federatedcode

Investigate git partial clone/sparse checkout

Offen
#82 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
6
Forks
2
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

As we are scaling up the deployment of many git repos, a partial clone (which is not a shallow clone) may help federatedcode clients to fetch just what they need.

The expected effects are ensuring each federatedcode client can clone, fetch and checkout exactly what they need out of the "fleet" of 1000's git repos and tens of millions of package PURLs, metadata, scans, SBOMs and more.

This is just a bunch of pointer to review and support the design of efficient partial sync of a decentralized PurlDB/vcio deployment through federatedcode and focusing only on a slice as the "packages of interest".

The git partial clone feature and sparse checkout features have been there for a while. See these doc:
- https://git-scm.com/docs/partial-clone
- https://git-scm.com/docs/git-sparse-checkout

The two are closely related to achieve expected effects, as explained most clearly by @mslinn :
- https://mslinn.com/git/600-partial-clone.html

> Sparse checkouts allow you to restrict the files and directories that Git can retrieve from the remote repository. When sparse checkout is used with partial cloning, the two features work together so that not only is the size of the working tree reduced, but the Git object database also reduced in size, so that only the requested objects are fetched from the remote repository, on demand.

See also:

- https://about.gitlab.com/blog/partial-clone-for-massive-repositories/
- https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/
- https://github.blog/open-source/git/bring-your-monorepo-down-to-size-with-sparse-checkout/
- https://www.canva.dev/blog/engineering/we-put-half-a-million-files-in-one-git-repository-heres-what-we-learned/
- https://stolee.dev/docs/git-merge-2022.pdf on git internals

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.