Skip to content

fix(ci): each retry of the i686 apt step takes a different mirror - #1451

Merged
DrunkOnJava merged 6 commits into
mainfrom
fix/i686-apt-mirror
Nov 5, 2026
Merged

DrunkOnJava merged 6 commits into
mainfrom
fix/i686-apt-mirror

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

The i686 job's apt step retried three times against the same mirror list. On 2026-11-05 the Azure mirror crawled at 30 to 40 kB/s, never idle long enough for apt's own timeout or failover, so all three attempts ran to their limit, twice: main went red at d5de57b (run 42041502131) and #1441's update merge failed the same way (run 42053988520, which passed when the failed job was rerun). No code was at fault.

Each retry now leads with a different mirror and keeps the others behind it: attempt 1 uses the runner's own list, attempt 2 archive.ubuntu.com, attempt 3 mirrors.edge.kernel.org. Three failed attempts still fail the job.

Changes

One step of .github/workflows/ci.yml:

  • The rotated list keeps priorities, the runner's own format, so a retry still fails over within its list. A list with no priorities would leave the order to apt.
  • Only the download is bounded tightly (60 s for update, 120 s for --download-only). The install then runs from the local files with its own 300 s bound, so a kill never lands in dpkg. Worst case fits the step's 15 minutes.
  • The warning names the next mirror, so a job that goes green on a retry still shows the mirror was slow.
  • A warning if the image stops reading /etc/apt/apt-mirrors.txt, since a retry could then not change mirror.

Testing

Run 42056218076, on ubuntu-24.04 (the job's image), ran a generated copy of this script with the first attempts forced to fail by one added condition, and a gcc -m32 link added. It has since been removed from the branch.

attempts forced to fail result Get: lines by host gcc -m32
0 green on attempt 1 35 Azure links and runs
1 green on attempt 2 35 archive.ubuntu.com links and runs
2 green on attempt 3 33 mirrors.edge.kernel.org links and runs
3 red: apt did not finish on three mirrors none not reached

Each also has 3 lines from packages.microsoft.com, which is not in the mirror list and is unchanged. The real step runs in this PR's own i686 job.

Not measured

  • A real slow mirror on the new path. The forced failure happens before apt starts, so it does not show a retry after timeout kills apt mid-download. Run 42041502131 did show that on the old step: attempts 2 and 3 started cleanly after the kill and carried the partial download over.
  • In-list failover within attempts 2 and 3. It relies on apt's mirror method, as the runner's own list does.
  • packages.microsoft.com stalling. It is fetched in every update and is outside the rotation; neither run shows that.

Scope

CI only, so no changelog fragment, no Measure and no gates verdict. Other template sections N/A.

tmp-apt-mirror.yml forces the first attempts to fail, to prove the other two mirrors; it goes before this leaves draft.
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 15:30
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
… only the download is bounded tightly

tmp-apt-mirror.yml is the same script with the first attempts forced to fail; it goes before this lands.
@DrunkOnJava
DrunkOnJava marked this pull request as draft November 5, 2026 15:33
@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 5, 2026 15:56
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant