Conversation
widgetii
requested review from
cronyx,
flyrouter and
viktorxda
as code owners
September 1, 2026 20:55
PR Summary by QodoExpire stale rolling Majestic downloads before builds
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you |
…ched The majestic and majestic-webui downloads are rolling release assets: a fixed filename, no hash, refreshed upstream on every publish. Buildroot's dl cache keeps the first copy forever, so a from-source build with an old cache pairs a majestic that expects the setup page with a webui from before the page existed -- majestic then logs Not found: /setup.html on an unclaimed camera while the SSH door works, which is exactly how it was reported. Fresh copies are kept, offline rebuilds inside the day still work, and CI downloads into an empty cache every run and never gets here.
widgetii
added a commit
that referenced
this pull request
Sep 2, 2026
build.yml and build-one.yml cache `output/dl` and prune moving-ref tarballs from it. Buildroot never wrote there: DL_DIR defaults to $(TOPDIR)/dl, and TOPDIR is the source tree the Makefile hands to -C, so downloads landed in output/buildroot-$(BR_VER)/dl. $ make -C output/buildroot-2024.02.10 O=$PWD/output -p | grep '^DL_DIR' DL_DIR := .../output/buildroot-2024.02.10/dl output/dl therefore never existed. actions/cache only archives paths that exist, so the cache saved nothing and restored nothing, and the refresh find matched nothing -- both silently, the find because of its own `2>/dev/null || true`. The two cancelled to "every board re-downloads every tarball, every run", which is also why CI escaped the stale rolling tarball that #2352 fixed for local builds. Confirmed on this PR's own run: `Cache not found for input keys: dl-09, dl-`, while the per-board ccache beside it restored normally. Setting BR2_DL_DIR in the environment moves buildroot to the directory the cache already keys on, rather than teaching three more call sites to spell output/buildroot-$(BR_VER)/dl and keep it in step with BR_VER. Buildroot reads it ahead of .config by design, and the Makefile's expiry from #2352 already prefers $(BR2_DL_DIR). Turning the cache on makes the refresh live for the first time, which is the half that keeps it safe -- neither should be restored without the other. Its regex covers the moving-ref class this tree produces: 24 packages pin _VERSION = HEAD and download as <pkg>-HEAD.tar.gz, majestic-webui as -dist.tar.gz, majestic's S3 tarball as .master.tar.bz2. In a real 201-file dl, 9 files are moving and 192 are semver- or SHA-named and immutable. build-one.yml becomes restore-only. `dl-<month>` is one key shared with the whole matrix and actions/cache saves only on a key miss, so a single-board manual dispatch could otherwise freeze that month's snapshot for everyone. The matrix keeps the shared key deliberately: the repo already holds 197 active caches totalling 15.3 GB because ccache is keyed per board, and a second per-board series would evict the entries that buy the most build time. The suppression goes with it. A cold cache is legitimate and now says so; anything else is an error that reaches the log.
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
Field report from a from-source build (gk7205v200): the SSH claim door works, EULA and all,
but the browser door dead-ends —
while
cameras.htmlfrom the same directory serves fine. That "Not found" line issend_file_to_user'saccess()failure:/var/www/setup.htmlgenuinely is not in the image.The
majestic-webui-dist.tar.gzdownload is a rolling release asset — fixed filename, nohash — so buildroot's dl cache keeps the first copy forever. A cache primed between
cameras.html(≤ Aug 21) andsetup.html(Aug 30) reproduces the report exactly: a freshmajestic that expects the setup page, paired with a webui from before the page existed. The
majestic.*.master.tar.bz2tarballs have the same trap. (BothEmpty passwordlines aredevice_unclaimed()'s debug heartbeat — the camera and the gate are fine.)What this does
prepare(runs before every build) deletes cached copies of the two rolling assets whenthey are older than a day. Fresh copies are kept, so offline rebuilds inside that window
still work; CI downloads into an empty cache every run and never reaches the branch.
Hardware tested on
Not a camera-behavior change in itself — it changes which bytes a stale-cache build fetches.
The failure it prevents was reproduced end to end today on a hi3516ev300 lab camera: a local
build with an Aug-21 cached dist produced exactly
Not found: /setup.htmlon an unclaimedcamera; the same camera with the current dist serves
setup.html200 while unclaimed.Evidence
Before (stale cache, local build, unclaimed camera):
After (expiry applied to a scratch dl dir with one 2-day-old copy of each asset and one
fresh majestic tarball):
and with the current dist on the same camera, unclaimed:
ci-matrix.py --self-testpasses.Immediate workaround for anyone already bitten, no rebuild of the cache needed:
rm output/buildroot-*/dl/majestic*/majestic*and rebuild.Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from source