Repository navigation
fix(dogfood/coder): read Ubuntu packages from Canonical hosts - #31778
Conversation
|
@codex review |
|
Chat: Review posted | View chat Review history
deep-review v0.13.0 | Round 1 | Last posted: Round 1, 2 findings (1 P3, 1 P4), COMMENT. Review Finding inventoryFindings
Contested and acknowledgedNone. Round logRound 1Full panel, round 1. Focused (one file, Dockerfile). Netero: no findings, 2 out of scope. Panel: Pariston, Mafuuu, Gon, Leorio, Mafu-san, Hisoka, Komugi, Kite, wildcard Zoro. No domain specialist trigger matched a Dockerfile-only diff. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This comment has been minimized.
This comment has been minimized.
61388c1 to
00b2ff8
Compare
00b2ff8 to
5d9b6e3
Compare
This comment has been minimized.
This comment has been minimized.
The first apt step read archive.ubuntu.com and the later package install read mirrors.edge.kernel.org. On 2026-11-05 unminimize upgraded apt to 3.2.1ubuntu0.1 from the archive, the kernel.org mirror did not have that version yet, and installing apt-utils, which requires the exact apt version, failed the main build. Switching the sources before the first apt-get update makes every step read the same mirror. The removed comment referred to a teraswitch mirror override that was dropped in #11999.
The kernel.org mirror that every apt step now reads lags the archive by more than a day: at 2026-11-05 12:00 UTC the server that AWS us-east-1 reaches had the archive state from 2026-11-03 19:00, and it caused all three Ubuntu-source failures in the retained CI logs. No Ubuntu host returned a 403, the reason the kernel.org switch was made, in any retained log. Use apt's mirror+file method instead: archive.ubuntu.com first, then Canonical's Azure mirror, which falls back per file on any error, including 403. Both serve the archive's current state, so a fallback cannot hand a later step an older index than an earlier step used. 80-retries set APT::Acquire::Retries, which apt does not read. Set Acquire::Retries and the http timeout so a failing host is skipped sooner, and copy both files in before the first apt step.
The previous commit said both mirror hosts serve the archive's current state. The Azure mirror picked up the archive's 11:49 UTC resolute-updates publication between 12:43 and 12:53 UTC on 2026-11-05, so a fallback can still read a slightly older index.
The comments narrated the investigation. State instead what each line keeps true for someone changing it: why the mirror list is copied before the first apt step, which hosts may be listed and why they use http, and why the retry values are low. The measurements stay in the PR description.
The comment gave one reason for two files. Both are copied before the first apt step so that step also uses the mirror list and its retry settings.
5d9b6e3 to
709e554
Compare
The dogfood build on main failed on 2026-11-05 because two apt steps in
Dockerfile.baseread different sources. The first step usedarchive.ubuntu.com, and itsunminimizeupgradedaptto 3.2.1ubuntu0.1. The package install step switched tomirrors.edge.kernel.org, which did not have that version yet, soapt-utils, which requires the exactaptversion, could not be installed.Every apt step now reads Ubuntu packages through apt's
mirror+file:method:archive.ubuntu.comfirst, then Canonical's Azure mirror, falling back per file on any error, including 403. kernel.org is no longer used.80-retriesnow sets the keys apt reads, so a failing host is skipped sooner, and both files are copied in before the first apt step.Decision log
The evidence comes from the 323 retained dogfood
build_imagelogs (2026-08-11 to 11-05), 56 coder/images jobs, live probes and apt 3.2.0 experiments.mirrors.edge.kernel.org(a geo CNAME) sends todfw.mirrors.kernel.org. At 12:00 UTC on 2026-11-05, dfw had the archive state from 2026-11-03 19:00 and the EU server from 2026-11-04 20:14.libssl3t64) and 2026-11-05 (apt).archive.ubuntu.comandsecurity.ubuntu.comlogged no errors in 55 apt steps each, and no Ubuntu host returned a 403 in any retained log. coder/images, which builds on Depot with the default sources, had one archive timeout incident (2026-09-11). The archive has had public outages since (2025-09-05, 2026-04-17), so a fallback host is kept.mirror+file:setup with these hosts (configure-apt-sources.sh).security.ubuntu.comadds nothing as a fallback because it resolves to the same servers asarchive.ubuntu.com.resolute-securityandresolute-updates. Azure's US East endpoint, which AWS us-east-1 reaches, served each one 0.3 to 3.0 hours later, and its EU endpoint 0.4 to 1.2 hours later. kernel.org took 0.5 to 8.3 hours (Amsterdam) and 1.1 to 12.3 hours (Dallas) for the same updates, and Dallas started the window 40 hours behind. 9 of 360 samples from Dallas failed; none from the archive or Azure did. Inside that window, a fallback to Azure can still give a later apt step an older index than an earlier step got from the archive, but only if the archive fails for the later step.apt-get updateexit 100.APT::Acquire::Retries, the old key, is not read by apt.Acquire::Retries "1"andAcquire::http::Timeout "15"match GitHub's runner images. The timeout only affects the http Ubuntu hosts. The retry count also applies to the HTTPS third-party sources, which have no fallback host.ca-certificates: the hosts use http because the base image has no CA certificates before the first apt step. apt still verifies the signed InRelease files.ca-certificatesstill has to come before copying the rest offiles/, whose third-party apt sources use HTTPS. The old comment described a teraswitch mirror override that fix(dogfood): stop overriding /etc/apt/sources.list with tsw mirrors #11999 removed.docker buildthrough the package install passed. Every Ubuntu fetch went toarchive.ubuntu.com,apt-utils3.2.1ubuntu0.1 installed, andapt-configshows the new retry and timeout values.archive.ubuntu.compointed at:apt-get updateand a.debdownload moved to Azure in 5 seconds;apt-get updatetook 18 seconds and three.debdownloads 17 seconds;make pre-commit-lightpasses.build_imagebuilt the base image on Depot with no fallback. All 559 Ubuntu fetches went toarchive.ubuntu.com,apt3.2.1ubuntu0.1 installed, and the image tooling tests passed.