Add partial-clone mirror caches and config upgrade#5
Merged
Conversation
Add opt-in blobless repository-local cache hydration for path mirrors, config version 2 migration, and the upgrade-config command.
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.
What changed
braid add --partial-clone, restricted to mirrors with--pathblob:nonefilter and fetch partial downstream objects directly from the filter-capable upstream.braids.jsonto version 2 with optionalpartial_clonebraid upgrade-config [--no-commit]with isolated commit/staging behavior and rollbackWhy
Path mirrors can otherwise download large blobs that live outside the selected upstream subtree. Partial clone avoids transferring and storing those unrelated blobs while preserving the existing full-cache behavior by default.
The downstream fetch intentionally connects directly to upstream rather than serving the promisor cache through local upload-pack. A real Git exercise showed that serving the partial bare cache can recursively hydrate omitted objects and hang.
Validation
bazel run @rules_go//go -- fmt ./...git diff --exit-codegit --versiongit merge-tree --write-tree "--merge-base=HEAD^{tree}" "HEAD^{tree}" "HEAD^{tree}"bazel test --test_env=PATH //...bazel run @rules_go//go -- vet ./...bazel run @rules_go//go -- run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.0 runbazel test --test_env=PATH //integration/...Integration coverage verifies add/pull materialization, rejection of filter-incapable upstreams, config upgrade commit/no-commit behavior, and absence of a known unrelated blob from both cache and downstream with lazy fetch disabled.