Repository navigation
fix(ci): name the mirrored toolchain bundle after the vendor asset + arm64 slice proof harness - #1962
Merged
Merged
Conversation
…whole bundle after the vendor asset #1956 step for linux-arm64: slice, mirror and list esp32s3 only (chips stay additive), plus the arm64 proof workflow that builds the fixture twice. publish_toolchain_slices.py keyed the mirrored whole bundle off the operator's local file name, so a bundle downloaded as arm64.tar.xz landed at .../whole/arm64.tar.xz while the shard's asset.filename named the vendor file.
_mirror_whole keyed the bucket object off the operator's local file name, so a bundle saved as arm64.tar.xz landed at .../whole/arm64.tar.xz while the shard listed the vendor filename -- a second copy nothing names, and a new orphan per re-publish under another alias. Also adds the ubuntu-24.04-arm ESP32-S3 slice proof harness (#1956), which is expected red until #1961 (FBUILD_MIRROR_MANIFEST_URL does not move slice resolution).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Found while preparing the
linux-arm64@esp-toolchainslice for #1956.The bug
_mirror_wholekeyed the mirrored bundle off the operator's local file name:The shard's
asset.filenameis derived from the vendor URL, so the two onlyagree when the download happens to be saved under the vendor's name. The
linux-arm64 bundle arrives as
arm64.tar.xz(that is the name in the vendorrelease), and the first real publish produced:
Two consequences: the listed name points at a second copy of the same bytes that
nothing names, and every re-publish under a different local alias adds another
object for the same host. The old test could not see it — the fixture named the
archive exactly as the vendor does.
The fix
whole_keynow takes the vendor file name and validates it as a safe keytoken; the traversal case is neutralised by
Path::name(pinned by a test).Tests (real output)
uv run --no-project --with boto3 --with zstandard python -m unittest ci.test_publish_toolchain_slices→
Ran 32 tests ... OK(was 28). New:test_the_whole_archive_is_stored_under_the_vendor_filename— publishes withthe archive named
arm64.tar.xzand asserts the bucket key keeps the vendorname and that the URL basename equals
asset.filename;test_the_key_follows_the_vendor_filename_given_to_it,test_a_filename_that_is_not_a_safe_token_is_refused,test_a_path_in_the_filename_cannot_escape_the_whole_prefix.Red witness (production call reverted to
archive.name):ruff checkandci/check_python_complexity.py→ clean.Also in this PR: the arm64 proof harness
.github/workflows/esp32s3-arm64-slice-proof.yml— a manual, dispatch-only jobon
ubuntu-24.04-armthat builds the ESP32-S3 fixture twice from empty cachesand requires (a) identical flash/ram to the vendor whole archive and (b) a
chip-scoped
…+esp32s3install directory. It is expected red today; seebelow.
Live repair
The mis-keyed object from the first publish was deleted from the bucket
(
…/linux-arm64/whole/arm64.tar.xz), leaving exactly the vendor-named bundle(
HTTP 200,content-length171,504,672 matching the metadata pin) and theesp32s3slice object.Not done, and why
linux-arm64slice is NOT listed here. feat(toolchain): publish per-chip Xtensa slices for linux-arm64, macos* and win32 #1956 requires a real build onthe host before listing (a listed slice is authoritative). Both arm64 proof
runs built the fixture successfully —
flash 356075 / ram 74919, identical tothe control — but neither used the slice: with
FBUILD_MIRROR_MANIFEST_URLpointing at the candidate manifest, fbuild stilldownloaded the vendor whole archive and created no
+esp32s3install dir. Thesame happens on linux-amd64, where the slice is published and proven. Filed as
bug(ci): FBUILD_MIRROR_MANIFEST_URL does not move slice resolution — a new host slice cannot be proven before it is listed #1961; the harness above is what will prove the slice once that is fixed.
proof; nothing resolves them until the shard entry exists.