Repository navigation
feat(fetch): server-side download fallback settings via manifest.json (#1810) - #1811
Merged
Merged
Conversation
…on document (#1810) fbuild now reads a zackees/manifest.json v1 Release published on GitHub Pages (site/mirror/manifest.json, generated by ci/gen_mirror_manifest.py) whose assets list, in order, the URLs each artifact can be fetched from plus its sha256. Mirror bytes that do not match the sha are rejected and the next URL is tried; vendor bytes are never rejected for a manifest mismatch. The document is cached for 24 h with a stale-cache fallback; one invalid entry rejects the whole document. FBUILD_DOWNLOAD_MIRRORS still wins; FBUILD_MIRROR_MANIFEST_URL overrides or (empty) disables. Closes #1810
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…n mirror manifest (#1810)
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 #1810.
What
site/mirror/manifest.jsonis a zackees/manifest.json v1Release. Each asset listsurls: [bucket, vendor]withsize_bytesandsha256. It is generated byci/gen_mirror_manifest.py, which HEAD-checks the bucket and hashes the bucket copy, and it passesmanifest-validate. The Pages publish step inbenchmark-build-comparison.ymlcopies it tohttps://fastled.github.io/fbuild/mirror/manifest.json, and the raw file onmainis the second source.fbuild-packages-fetch):sha256, and a mismatch makes fbuild skip that mirror. Vendor bytes are never rejected for a manifest mismatch.FBUILD_DOWNLOAD_MIRRORSstill wins.FBUILD_MIRROR_MANIFEST_URLoverrides the source, and an empty value disables the manifest.Adversarial verification
soldr cargo test -p fbuild-packages-fetchpasses 238 tests, 26 of them new manifest tests: hostile documents, a down server with a stale cache, no cache, a corrupt cache, a second source, oversized streaming, a tampered mirror (buffered and streaming, part file removed), a wrong manifest sha, and yanked entries. Clippy is clean.fbuild install tests/platform/uno -e uno, each run with a fresh cache and a locally served manifest:FBUILD_MIRROR_MANIFEST_URL: the manifest was never fetched.#[ignore]testpublished_manifest_resolves_live, after Pages deploys.🤖 Generated with Claude Code