Repository navigation
Install CI packages through an apt helper that skips the Microsoft source - #868
Merged
Merged
Conversation
…urce GitHub's Ubuntu runner images ship a packages.microsoft.com source that memtier never installs from. When it answers 403, apt-get update exits 100 and the job fails before any memtier code runs, as in the ASan and UBSan (scan-staircase) jobs in #866. Add utils/apt_install.sh and call it at the apt-get update/install sites of every workflow. It renames the runner's /etc/apt/sources.list.d/microsoft-prod.list (the file that packages-microsoft-prod.deb installs on Ubuntu 22.04 and 24.04; also a .sources variant) to *.disabled, which apt skips silently. Other sources, including packages.redis.io, stay. It then runs apt-get -qq update and apt-get install with the caller's arguments, 3 attempts each, 10 s then 20 s apart; a failed install refreshes the package lists before the retry, and an unknown package fails at once. apt's output is shown, and the final failure names the step. --no-update skips the update for a second install in the same job. It uses sudo unless already root, so the container jobs call it the same way. The soak, CLI-fuzz and monitor-fuzz nightlies also build the 2.4 branch, which has no helper, so they take it from the workflow revision with a sparse checkout, as monitor-fuzz already does for its harness. release-rpm's publish-to-yum job had no checkout and gets a sparse one. Two sites keep plain apt-get: the git install in test-debian-versions runs before the checkout, and release.yml's smoke-test-packages has no checkout; both run in Debian/Ubuntu containers, which have no Microsoft source. utils/test_apt_install.sh tests the helper against a stub apt-get and a temporary sources directory, without root; the non-root distcheck job runs it. Fixes #866 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add cases for a deb822 microsoft-prod.sources, a source that cannot be disabled, a package with no installation candidate, and an install retry whose package-list refresh keeps failing. Each catches a helper change the self-test missed before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8e8824b. Configure here.
Match a source file by the host it names rather than by its file name, so one installed under another name, such as an azure-cli source, is disabled too. The self-test adds such a file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Review summary for e698ad3. All 7 lenses approve (semantics, output, tests, lifecycle, interactions, maintainability, build).
|
fcostaoliveira
added a commit
that referenced
this pull request
Oct 25, 2026
Master now routes CI apt installs through utils/apt_install.sh (#868), which drops the runner's packages.microsoft.com source and retries update and install. The compat cells were left on bare apt-get, so a 403 from that source would fail them before building. Use the helper for the build dependencies and Redis, and add it to the harness regex. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Fixes #866.
Problem
GitHub's Ubuntu runner images ship a
packages.microsoft.comsource that memtier never installs from. When that repo returns 403,apt-get updateexits 100 and the job fails before it builds or runs anything. This happened on 2026-10-23 (ASAN Single Endpoint: TCP Plaintext) and on 2026-10-25 (UBSan TCP TLS scan-staircase, on #865). No workflow retried apt.Change
New
utils/apt_install.sh [--no-update] [apt-get install options] package...:/etc/apt/sources.list.d/microsoft-prod.list(and a.sourcesvariant) by renaming it to*.disabled. That is the only filepackages-microsoft-prod.debinstalls on the 22.04 and 24.04 images.packages.redis.ioand every other source stay.apt-get -qq update, thenapt-get installwith the caller's flags unchanged. Each step gets 3 attempts, 10 s then 20 s apart, and a failed install refreshes the lists before its retry.--no-update: for a second install in a job that already ran the update.It is modelled on #844's pip helper (
utils/install_test_requirements.sh).Workflows: 38 sites across 12 workflow files now call the helper.
.apt-helper.publish-to-yumgets a sparse checkout as well.test-debian-versions, which runs before the checkout. The other issmoke-test-packagesinrelease.yml, which has no checkout and installs local.debfiles.Self-test:
utils/test_apt_install.shruns the helper against a stub apt-get and a temporary sources directory, with no root. The non-root distcheck job inci.ymlruns it.Validation
git diff --checkis clean.Merges cleanly with #855, #822, #851, #823 and #545. #545 adds
libevent-compat.ymlwith 4 plain apt-get lines; whichever of the two merges second should switch those to the helper.Affected versions
CI configuration only; no released memtier binary or package is affected. The bare
apt-get updatesteps date from c9278c0 (#114). The2.*maintenance branches run the same workflows (#549), but they won't have the helper until it is backported.🤖 Generated with Claude Code
Note
Low Risk
CI-only packaging glue; no memtier binary or release artifact logic changes beyond how Ubuntu runners invoke apt.
Overview
Adds
utils/apt_install.shso CI can install Debian packages without flakyapt-get updatefailures when GitHub runners’ unusedpackages.microsoft.comrepos return 403 (#866). Before update/install, the helper renames any.list/.sourcesentry pointing at Microsoft to*.disabled, retries update and install up to three times (with list refresh on install retry), supports--no-updatefor follow-on installs, and fails fast on missing packages.utils/test_apt_install.shexercises that behavior with a stubapt-get(no root);ci.ymlruns it in the distcheck job.Across 12 workflow files (~38 call sites), raw
sudo apt-get update+installis replaced with the helper. Nightly jobs that build2.4sparse-checkout onlyutils/apt_install.shfrom the workflow SHA into.apt-helperbecause maintenance branches may lack the script;publish-to-yumdoes a similar sparse checkout. A few container paths still use plainapt-get(e.g. git before checkout on Debian matrix, release smoke.debinstall).Reviewed by Cursor Bugbot for commit e698ad3. Bugbot is set up for automated code reviews on this repo. Configure here.