From 9d85e993fb989998799d1bde11bea01ca6aba4cb Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sun, 28 Jun 2026 14:00:25 +0300 Subject: [PATCH] ci: evict majestic's moving S3 tarball from the dl cache too (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #105 added a "Refresh moving-ref package downloads" step that drops *-{HEAD,master,main,dist}.tar.gz before each build so buildroot re-fetches the current ref. That fixed the majestic-webui-dist.tar.gz staleness (the *-dist.tar.gz case), but it never matched majestic itself. majestic downloads from S3 as majestic...master.tar.bz2 (majestic.mk) — a DOT separator, .tar.bz2, and an S3 host the old pattern deliberately spared as "content-addressed". But that S3 object is a moving `master` build, re-uploaded on every majestic CI run, with no .hash to force a refetch. So it stayed frozen in the monthly builder-dl cache while the webui refreshed — the exact desync that shipped a pre-x-groups majestic in a t31 lite image against the current webui, blanking the settings page with "No settings groups in schema." Broaden the eviction to a regex covering both -ref and .ref separators across gz/bz2/xz, so majestic.*.master.tar.bz2 and majestic-webui-dist.tar.gz are both dropped while semver/SHA-pinned tarballs keep their cache. Co-authored-by: Claude Opus 4.8 (1M context) --- .github/workflows/build-one.yml | 14 ++++++++------ .github/workflows/master.yml | 25 ++++++++++++++----------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-one.yml b/.github/workflows/build-one.yml index f600a36..9ccfd1c 100644 --- a/.github/workflows/build-one.yml +++ b/.github/workflows/build-one.yml @@ -69,12 +69,14 @@ jobs: - name: Refresh moving-ref package downloads run: | - # The monthly builder-dl cache freezes moving-ref downloads (VERSION = HEAD / - # branch, or the majestic-webui `dist` release asset) under a constant - # -.tar.gz filename, so buildroot keeps reusing a stale tarball. - # Drop them so it re-fetches the current ref each run. See master.yml. - find /tmp/builder-dl -type f \ - \( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' -o -name '*-dist.tar.gz' \) \ + # The monthly builder-dl cache freezes moving-ref downloads under a constant + # filename, so buildroot keeps reusing a stale tarball. Drop them so it + # re-fetches the current ref each run. See master.yml for the rationale. + # Covers both the dash form (-.tar.gz, e.g. majestic-webui-dist) and + # the dot form (..tar.bz2, e.g. majestic.t31.lite.master from S3 — + # a moving build with no .hash, NOT a content-addressed pin). + find /tmp/builder-dl -type f -regextype posix-extended \ + -regex '.*[-.](HEAD|master|main|dist)\.tar\.(gz|bz2|xz)' \ -print -delete 2>/dev/null || true - name: Build firmware diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 0b57d71..64a6aac 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -226,17 +226,20 @@ jobs: run: | # builder caches BR2_DL_DIR (/tmp/builder-dl) under a monthly key # (date +%m) and actions/cache only saves on a key miss, so the first build - # of the month freezes it for weeks. Packages pinned to a moving ref - # (VERSION = HEAD / branch, or the majestic-webui `dist` release asset) - # download as a constant -.tar.gz, so buildroot keeps reusing the - # stale tarball — even though builder re-clones firmware HEAD each run for - # freshness. (Empirically: a 06-14 builder nightly shipped a ~2-week-old - # majestic-webui — full bootstrap.min.css, no mj-settings.js — while the - # firmware nightly shipped the current UI.) Drop those archives so buildroot - # re-fetches the current ref each run. Content-addressed packages - # (S3 / semver / SHA pins) keep their cache. - find /tmp/builder-dl -type f \ - \( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' -o -name '*-dist.tar.gz' \) \ + # of the month freezes it for weeks. Packages pinned to a moving ref keep a + # constant download filename, so buildroot reuses the stale tarball — even + # though builder re-clones firmware HEAD each run for freshness. Two forms: + # - dash: -.tar.gz e.g. majestic-webui-dist.tar.gz + # - dot: ..tar.bz2 e.g. majestic.t31.lite.master.tar.bz2 + # The dot form is majestic's S3 tarball: it LOOKS S3-pinned but is a moving + # `master` build re-uploaded every majestic CI run, with no .hash to force a + # refetch — so it must be evicted too. (Empirically: a 06-14 nightly shipped a + # ~2-week-old majestic-webui; later a t31 lite image shipped a pre-x-groups + # majestic against the current webui — "No settings groups in schema".) Drop + # both forms so buildroot re-fetches the current ref. Only genuinely + # content-addressed tarballs (semver / SHA in the name) keep their cache. + find /tmp/builder-dl -type f -regextype posix-extended \ + -regex '.*[-.](HEAD|master|main|dist)\.tar\.(gz|bz2|xz)' \ -print -delete 2>/dev/null || true - name: Build firmware