Repository navigation
ci: seed the Tier 2 apt archive on a schedule - #5527
Merged
Merged
Conversation
The Tier 2 jobs download ~339 MB of .debs inside a ten-minute step. On a slow link no build ever finishes the download, so #5522 (keep a timed-out download instead of discarding it) preserves partial progress but has no run that ends with a complete archive to publish. The archive only grows when a build gets lucky. Add ci/seed_apt_cache.py and apt-seed.yaml: a scheduled job with no build to lose. It restores the same cache entry the builds restore, downloads the package list into the same archive directory in bounded attempts, and saves the larger result under the same content key with the .deb count appended. Every scheduled run either finishes the set or leaves a strictly larger archive than it found, so the cache converges without a human and without depending on a build surviving its timeout. The seed reuses build-project's exact path and key shape on purpose: a seed that writes a different path or key warms nothing. ci/test_apt_seed.py pins that parity against build-project.yaml rather than against a copy of the key, so a future edit to either side fails the test instead of silently de-warming the cache. Job guards follow the repository rules: root jobs in a scheduled workflow skip a scheduled run in a fork (#1258), cache writers publish only from master, and the workflow is declared in ci.toml's allow list.
zackees
added a commit
that referenced
this pull request
Nov 23, 2026
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.
This was referenced Nov 23, 2026
KelboLive
pushed a commit
to KelboLive/obs-studio
that referenced
this pull request
Nov 29, 2026
…ust#5528) 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 (obs-rust#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 obs-rust#5527 because both edit ci.toml's workflow allow list.
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.
Why
The Tier 2 jobs download ~339 MB of
.debsinside a 10-minute step. On a slow link that never finishes — run45194364427reachedGet:145of ~594 before the timeout. #5522 (merged) stopped throwing that away: the save step now runs on!cancelled()and keys entries by.debcount so restores pick up the newest.But #5522 has nothing to publish if no run ever finishes. If every build run times out at 145 packages, every save is a 145-package archive, and the count-key scheme keeps re-saving the same size. The cache only advances when a build gets lucky.
What this adds
A scheduled job with no build to lose.
ci/seed_apt_cache.py:apt-get update+apt-get install --download-onlyinto$TIER2_APT_ARCHIVESin bounded attempts (180 s update, 600 s install) under a 45-minute budget,apt-seed.yamlruns it on a 6-hour cron (41 */6 * * *) and onworkflow_dispatch, then saves under the same content key with the.debcount appended.Every run either completes the set or leaves a strictly larger archive than it found, so the cache converges with no human in the loop and no dependency on a build surviving its own timeout.
Parity is the whole point
A seed job that writes a different path or key warms nothing.
ci/test_apt_seed.pypins both againstbuild-project.yamlitself rather than against a copy of the key:path: ../../_temp/apt-archives/*.deb—actions/cacheversions by the literal path, so a near-miss silently de-warms.Edit either side and the test fails instead of the cache quietly stopping working.
Repository rules honoured
master;setup-uvkeeps the samesave-cacheexpression.ci.toml's[allow] workflowslist../.github/actions/cacheonly (CACHE-001), all actions SHA-pinned.Validation
Not covered by tests (needs a real runner): the actual
apt-getdownload loop. First scheduled run is its proof;SEED_BUDGET_SECONDS/SEED_ATTEMPTSare env-tunable if 45 minutes turns out wrong.