ci: re-fetch moving-ref (VERSION=HEAD) package downloads each build#2192
Merged
Conversation
The dl cache is keyed on the month (CACHE_DATE=date +%m) and actions/cache only saves on a key miss, so the first nightly of the month freezes output/dl for weeks. Packages pinned to a moving ref (VERSION = HEAD/branch) download as a constant filename <pkg>-<ref>.tar.gz, so buildroot keeps reusing the frozen, stale tarball while content-addressed packages (e.g. majestic from S3) refresh. That silently desynced majestic-webui (cached pre-title/hint) from a fresh majestic, blanking every field/switch label in the settings UI on nightlies. ~28 GitHub packages (ipctool, divinus, go2rtc, msposd, the wifi/SDK drivers, …) share this latent hazard. Delete the cached *-HEAD/master/main tarballs before the build so buildroot re-fetches the current ref each run; content-addressed (S3/semver/SHA) downloads keep their cache. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
build-one (single-platform / bisect dispatch) has its own dl-cache restore and would otherwise still reuse the month-frozen *-HEAD tarballs, defeating the fix for one-off rebuilds. Drop the moving-ref archives before its build too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Packages pinned to a moving ref (
VERSION = HEAD/ a branch) download into thebuildroot dl cache under a constant filename —
<pkg>-<ref>.tar.gz(e.g.majestic-webui-HEAD.tar.gz). The dl cache is keyed on the month(
CACHE_DATE=$(date +%m)) andactions/cacheonly saves on a key miss, so thefirst nightly of each month freezes
output/dlfor weeks. From then on buildrootfinds the constant filename already present and never re-fetches — the nightly
silently ships a weeks-old snapshot of every moving-ref package, while
content-addressed packages (majestic from S3, semver/SHA pins) keep refreshing.
This desynced a stale-cached majestic-webui from a fresh majestic: the
streamer's config schema moved field labels to a new key, but the frozen webui
still read the old one, so every field/switch label in the settings UI went
blank on affected nightlies. ~28 GitHub packages (ipctool, divinus, go2rtc,
msposd, the wifi/SDK drivers, …) share this same latent staleness hazard.
Fix
Before the build, delete the cached moving-ref archives so buildroot re-fetches
the current ref each run:
Content-addressed downloads (S3 / semver / SHA pins) keep their cache untouched,
so this only re-fetches the handful of packages that are supposed to track a
moving ref. Runs right after the dl-cache restore, before
Build firmware.🤖 Generated with Claude Code