Repository navigation
Backlog
Description
Summary
Audit of fbuild's artifact serving, download mirror failover, and bucket publishing pipeline for migrating the 110.5 GB (29,416-object) artifact datalake from DigitalOcean Spaces (fbuild.sfo3.digitaloceanspaces.com) to Cloudflare R2 (fbuild, https://pub-7c5c27ede6434441a4ba3cd065938e8c.r2.dev) with zero-egress reads and clean multi-backend portability.
Audit Findings & Bug Fix Checklist
1. Client-side backend-agnostic mirror routing (crates/fbuild-packages-fetch)
- 1.1 Index
mirrors[]+serialrollback guard +FBUILD_ARTIFACT_MIRRORS(downloader_mirror_manifest.rs,downloader_mirrors.rs): Implemented in480f0e67. - 1.2 Multi-mirror
DEFAULT_MIRRORS+ per-process circuit breaker (downloader_mirrors.rs): Implemented in480f0e67(R2 primary, DO Spaces fallback, 3-failure host circuit breaker). - 1.3 Fix slice downloads bypassing retries, mirror failover, and streaming (
chip_slice.rs,variants.rs,downloader_mirror_manifest.rs): Implemented in480f0e67via shared streamingdownload_verified_candidates. - 1.4 Manifest freshness: shorter fresh TTL, conditional GET (
ETag/Last-Modified->304),serialguard, and miss-triggered revalidation (downloader_mirror_manifest.rs): Implemented in480f0e67. - 1.5 Fix prebuilt core-objects retired
prebuilt/...path & wireIndex.mirrors[](prebuilt/mod.rs,prebuilt/reader.rs): Implemented in480f0e67.
2. Publisher, mirror, and migration tooling (ci/)
- 2.1 Shared S3-compatible artifact backend abstraction + fix R2
PutObjectAcl501 crash (ci/artifact_backend.py+ci/gen_mirror_manifest.py,ci/publish_esp_slices.py,ci/publish_toolchain_slices.py,ci/mirror/mirror.py,ci/mirror/rotate.py): Implemented in9679cf91. - 2.2 Emit and preserve
mirrors[]andserialinci/gen_mirror_manifest.py: Implemented in9679cf91. - 2.3 Add datalake sync & parity verification tool (
ci/sync_artifact_backend.py): Implemented in9679cf91.
3. Datalake copy, cutover, and documentation
- 3.1 Copy entire 110.5 GB (29,416-object) datalake from DO Spaces
fbuildto Cloudflare R2fbuildand verify 100% key+size parity plus live public HTTPS SHA-256 downloads across registry,@esp-libs,@esp-toolchain, andvendor/prefixes. - 3.2 Publish
mirrors[](R2 primary, DO Spaces fallback) +serialinsite/mirror/manifest.json, updatedocs/design/artifact-serving-decisions.md(add*.r2.devto the host allowlist) andcrates/fbuild-packages-fetch/README.md, and verify full Rust + Python test suites pass (ac4361be).
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Dec 2, 2026
All items on this meta issue are complete on branch
feat/2239-r2-artifact-backend(480f0e67,9679cf91,ac4361be).Datalake Migration & Parity Verification
fbuild(WNAM) with public managed domainhttps://pub-7c5c27ede6434441a4ba3cd065938e8c.r2.dev.7d44421a33c8f4560b56d201b94acedff8d73ef3efd448ffcc275c8e221216b6(0failed objects).ci/sync_artifact_backend.py verify:src_count: 29416,dst_count: 29416src_bytes: 110510876769,dst_bytes: 110510876769missing_count: 0,extra_count: 0,size_mismatch_count: 0https://pub-7c5c27ede6434441a4ba3cd065938e8c.r2.devsucceeded across registry packages (.xyz,fastled),@esp-libsslice (SHA-256 verified),@esp-toolchainslice (106,462,349bytes), andvendor/developer.arm.com/(155,499,480bytes).Verification Suite
soldr cargo test -p fbuild-packages-fetch --lib: 426 passed, 0 failed (2 network-ignored)soldr cargo clippy -p fbuild-packages-fetch --all-targets -- -D warnings: 0 warnings, 0 errorssoldr cargo check --workspace --all-targets: 0 warnings, 0 errors across all 21 workspace cratessoldr cargo fmt --all -- --check: passuv run --no-project python ci/check_python_types.py: 0 errors, 0 warnings (basedpyright)test_artifact_backend,test_sync_artifact_backend,test_gen_mirror_manifest,test_mirror_tool,test_publish_toolchain_slices,test_artifact_serving_bench,test_gate_script_coverage): 202 passed, 0 failedcheck_workspace_crates.py,check_usb_vidpid_literals.py,check_no_legacy_cross.py): all passzackees commentedon Dec 3, 2026
Added commit
b500b37aonfeat/2239-r2-artifact-backend:variants.rssoPrebuiltLibsPolicy::WholeBundlealso switches backends viaIndex.mirrors[]and fails over on error/checksum mismatch.crates/fbuild-packages-fetch/src/backend_switch_tests.rscementing end-to-end backend switchover purely viamanifest.jsonmirrors[](with immutable DO Spaces shards) across registry packages,@esp-libsslices + whole bundles,@esp-toolchainslices, prebuilt core archives, and un-shardedvendor/tarballs.soldr cargo clippy -p fbuild-packages-fetch --all-targets -- -D warnings: 0 warnings;soldr cargo test -p fbuild-packages-fetch --lib: 430 passed, 0 failed.zackees commentedon Dec 3, 2026
Steward triage receipt (2026-12-03 19:1xZ, FastLED/fbuild hourly steward). Same run as the #2241 receipt: all eight cells here are
[x]and implemented, but the implementing commits exist only on a local branch, and the published manifest does not yet carry the switchover. I made no code change.Where the work lives
~/dev/fbuild=feat/2239-r2-artifact-backend@11b8a31c, 8 commits ahead oforigin/maina6c6d59c, tree clean. Not onorigin:git ls-remote --heads origin | grep 2239= no match;gh pr list --state all --search 2239= no PR for this branch. Commits:480f0e67(client routing),9679cf91(backend abstraction + sync verifier),ac4361be(manifestmirrors[]),b500b37a(tests),6d96c9ff/23a405d1/1d56b330/11b8a31c(#2241 audit follow-ups).What I verified
soldr cargo test -p fbuild-packages-fetch --lib→ 437 passed; 0 failed; 2 ignored;python -m unittest ci.test_local_suites ci.test_artifact_backend ci.test_sync_artifact_backend ci.test_publish_esp_slices→ Ran 29 tests, OK;ci/check_python_types.py→ 0 errors, 0 warnings, 0 notes. Cell 3.2's Rust+Python green claim holds on this sha.https://fastled.github.io/fbuild/mirror/manifest.json(what real clients fetch, served frommain) is 200 but carries nomirrorskey and noserial(serial: null,mirrors: null). The branch copy declares[{id: r2, weight 100}, {id: do-sfo3, weight 50}]withserial: 1. So until the branch lands, published clients get nomirrors[]and the R2-primary switchover has no effect.https://fastled.github.io/fbuild/mirror/shards/43be97c30102be98.jsonanswers 200, 1193 B (matches the manifest'ssize_bytes), while the same key onhttps://pub-7c5c27ede6434441a4ba3cd065938e8c.r2.devanswers 404 — also 404 for themirror/,site/mirror/,public/,fbuild/mirror/andv1/prefixes I tried — and DO Spaces answers 403 (bucket no longer anonymously readable). Either the R2 object keys carry a prefix I cannot derive from the public manifest, or the public mirror paths differ; nothing here disproves the copy, but nothing confirms it either. Confirming it needs the authenticatedci/sync_artifact_backend.py verifyrerun (or the key layout named in the issue), which is the author's claim in the comment above.Remaining cell = delivery, and it is Zach's
Every code cell is complete on the branch; the branch is Zach's own in-flight work (unpushed, in his live tree) and my standing rule is to never touch, push or duplicate it. Pushing it + opening the PR for #2239/#2241, then re-publishing
site/mirror/manifest.jsonfrommain, is the owner action that makes this real.Re-verify trigger:
--unblock-issue 2239when a PR fromfeat/2239-r2-artifact-backendappears (PRs are listed independently of blocked issues), or whenmain'ssite/mirror/manifest.jsoncarriesmirrors[]— then close as completed.