Repository navigation
ci: resolve Tier 2 package versions weekly and open a drift PR - #5528
Merged
Merged
Conversation
apt-packages.txt names packages, not versions, so the image identity hashes a list that resolves to different content as -updates and -security move. A stale archive also 404s a superseded .deb, which is the failure the cache retry paths exist to paper over (#5497). ci/apt_updates.py resolves the list against the current archive with `apt-get -s --reinstall install` and renders a sorted name=version lock; the scheduled job regenerates it and opens a pull request only when the lock moves. A version bump that breaks Tier 2 is then reviewable in a diff instead of being discovered inside a red merge queue. The lock is generated, sorted and one package per line, so the PR diff is the review. check exit status is non-zero on drift, so the same command works as a local gate. Stacked on #5527 because both edit ci.toml's workflow allow list.
zackees
force-pushed
the
feat/apt-updates
branch
from
November 23, 2026 21:32
1827671 to
df93e61
Compare
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.
Stacked on #5527 (both edit
ci.toml's workflow allow list; merge that first).Why
apt-packages.txtnames packages, not versions. Two consequences today:tier2_image.py identity()hashes the Dockerfile plus the two package lists. Rebuild the same tag a month later andapt-get installresolves to newer-updates/-securityversions — same tag, different content..debdisappears andapt-getfails on it — the reason the retry paths inInstall Gitexist at all (bug: CI: AI rebase feedback and unlimited retries burn runner capacity #5497).Neither is visible until something breaks in a red merge queue.
What this adds
ci/apt_updates.py, with two stages:resolve— runsapt-get --reinstall -s install -y --no-install-recommends <list>and parses theInst <name> (<version> ...)lines into a sortedname=versionlock.--reinstallis what makes preinstalled packages (a runner'sgit,curl) appear too, so the lock is complete rather than "whatever wasn't already there".check— resolves and diffs against the committed lock; printschanged cmake: 3.30 -> 3.31/added …/removed …and exits 1 on drift, so it also works as a local gate..github/workflows/apt-updates.yaml— weekly (Mon 05:23) plusworkflow_dispatch:rust/tools/linux-validate/apt-versions.txt,git diff --quietto decide whether anything moved,peter-evans/create-pull-request(already in the allow list) only when it moved.So the job is silent while the archive is stable, and hands you a reviewable diff the week it isn't.
Why a PR and not an auto-commit
A version bump that breaks Tier 2 is worth one human look. Merging the PR is what rebuilds the prebaked image under a new identity — the change and its blast radius stay in one place.
Tests
ci/test_apt_updates.pycovers the half that doesn't need a live archive:Instlines → name/version,Conflines and chatter ignored,=versionis refused,changed()reports added / removed / changed, sorted, and returns[]when nothing moved,resolvecommand end-to-end against a fakeapt-getonPATH, so the subprocess plumbing and the printed lock are exercised without an apt host,timeout-minutes, pins every action by SHA, and writes the same path the script reads.Follow-up (not in this PR)
The lock exists but the Dockerfile still installs unpinned names. Wiring
apt-versions.txtinto the build — installname=version— would make the image tag genuinely content-addressed and turn a lock mismatch into a hard build failure instead of a silent drift. That changes what the build does, so it wants your call rather than mine.