Repository navigation
feat(fetch): fbuild-owned sha256 for every bucket object via a sharded manifest (#1815) - #1817
Merged
Merged
Conversation
…d manifest (#1815) ci/gen_mirror_manifest.py now lists the whole mirror bucket, hashes each object from the bucket's own copy (incremental, checkpointed), and writes site/mirror/manifest.json as a manifest.json Index pointing at one sha256-pinned shard Release per registry owner (8024 shards, 29299 objects). The client fetches only the shard for the owner being downloaded, verifies it against the index, caches it, and falls back to the last cached shard when no source serves the current one; bucket bytes that do not match are rejected and the vendor URL serves the file. fbuild never contacts PlatformIO except for the primary download: no registry mirrors, no bypass iteration, no metadata requests. The bucket mirrors only the registry layout; the github.com mapping from #1806 is removed. URL validation now also rejects control characters, and registry URLs with literal spaces match their %20 manifest entries. Closes #1815
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Member
Author
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.
Closes #1815.
What
ci/gen_mirror_manifest.pylists the wholefbuildSpaces bucket and SHA-256-hashes every registry object from the bucket's own copy. It's incremental and checkpointed: an object already in a shard with the same size is never re-downloaded.site/mirror/manifest.jsonis now a zackees/manifest.jsonIndex(1.7 MB) mapping each registry owner to a sha256-pinned shardReleaseinsite/mirror/shards/. That's 8,024 shards covering 29,299 objects, and every one passesmanifest-validate._state/, are left out.fbuild-packages-fetch):?bypass=iteration and no metadata requests.github.com/…mapping from Builds should download from the fbuild-controlled mirror bucket by default #1806 is removed.Bugs found while testing
\\bdecoded to a backspace inside a URL. They are now rejected.dmytro korniienko/...). Those now match their%20manifest entry and shard key, and the primary is always kept in the attempt order.Verification
Unit tests:
soldr cargo test -p fbuild-packages-fetchpasses 246 tests. They cover:Clippy is clean.
Sample against PlatformIO: a one-time maintainer check of 40 random objects compared our hashes with the bytes downloaded from the PlatformIO registry. All 40 matched.
End to end with the real CLI (
fbuild install, a fresh cache, a project withlib_deps = bblanchon/[email protected], a package resolved at runtime and not named in fbuild's code):site/mirrorserved locally: exactly 2 shards fetched (platformio,bblanchon), both packages served from the bucket and verified, nothing rejected, no bypass.Still to run after merge and Pages deploy: the
#[ignore]live testpublished_manifest_resolves_live.Note
The hash run ran from a workstation (about 26 MB/s with 32 streams, roughly 90 minutes) instead of a droplet in sfo3. That avoided provisioning a paid machine, and the transfer should stay within the bucket's included monthly allowance.
🤖 Generated with Claude Code