Skip to content

ci: re-fetch moving-ref (VERSION=HEAD) package downloads each build#2192

Merged
widgetii merged 3 commits into
masterfrom
ci-refresh-head-pkg-downloads
Jun 14, 2026
Merged

ci: re-fetch moving-ref (VERSION=HEAD) package downloads each build#2192
widgetii merged 3 commits into
masterfrom
ci-refresh-head-pkg-downloads

Conversation

@widgetii

Copy link
Copy Markdown
Member

Problem

Packages pinned to a moving ref (VERSION = HEAD / a branch) download into the
buildroot 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)) and actions/cache only saves on a key miss, so the
first nightly of each month freezes output/dl for weeks. From then on buildroot
finds 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:

find output/dl -type f \
  \( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' \) \
  -print -delete

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

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>
widgetii and others added 2 commits June 14, 2026 17:25
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>
@widgetii widgetii merged commit ddf4563 into master Jun 14, 2026
3 of 7 checks passed
@widgetii widgetii deleted the ci-refresh-head-pkg-downloads branch June 19, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant