Repository navigation
ci: Install Git in the Tier 2 Linux build recovers dpkg before each retry - #5506
Merged
Merged
Conversation
Run the Install Git retry loop of the Tier 2 Linux build with mocked apt-get and dpkg. An install that a timeout stops in the unpack leaves dpkg interrupted, and every later apt install refuses to run until dpkg --configure -a. Today one such stop fails all 3 attempts (run 45113911635). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Before each attempt the Install Git retry loop of the Tier 2 Linux build runs dpkg --configure -a and apt-get -f install, as the Tier 2 package step does. A timeout that stops the install in the unpack no longer fails the retries; the downloaded .debs stay in apt's cache. 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.
Problem
The
Install Git 📦step ofBuild 🧱 / Rust Tier 2 Linux 🐧 (build)cannot recover when itstimeout 180stopsapt-get installwhile dpkg unpacks (#5504). Its retry loop runsapt-get updateandapt-get installagain, but notdpkg --configure -a, so every retry fails at once withE: dpkg was interrupted. This failed #5142 (fork PR, no prebaked image) in run 45113911635, attempt 3, whilearchive.ubuntu.comsent about 100 to 200 KB/s.Change
Before each attempt, the loop runs
dpkg --configure -a || trueand, after the index refresh,apt-get -f install -y. This is whatInstall Tier 2 Packages 📦in the same job already does (job 134123589625). The.debfiles that an earlier attempt downloaded stay in apt's cache, so the next attempt does not download them again. The prebaked branch of the step does not change.Tests
test_tier2_apt_cache.test_install_git_recovers_dpkg_before_each_retry: runs the step's real retry loop with mockedapt-getanddpkg. An install stopped in the unpack leaves dpkg interrupted, and apt refuses untildpkg --configure -a. Cases: 0, 1, 2 and 3 stopped installs.dpkg --configure -a, thenapt-get update, thenapt-get -f installci/test_*.pythat readbuild-project.yaml(82 modules)Real run of the new step in a fresh
ubuntu:26.04container (the job's image) on 2026-11-23: the mirror was still slow, attempt 1 failed, the recovery ran, and attempt 2 installed git (rc=0, 221 s,dpkg --auditclean).No user-visible change, so no features ledger line. No new workflow file. Tiers 1 to 4 do not apply (CI only).
Test cost: no Rust tests. The new case runs in about 0.5 s and starts 4 short shell processes.
Refs #5504 (PR 1 of 2; PR 2 bounds the runtime delta apt in
ci-runtime.py)🤖 Generated with Claude Code