Skip to content

Try APT fallback mirrors sooner in Linux CI - #21198

Merged
zanieb merged 1 commit into
mainfrom
zb/apt-mirror-fallback
Aug 18, 2026
Merged

zanieb merged 1 commit into
mainfrom
zb/apt-mirror-fallback

Conversation

@astral-automations-bot

Copy link
Copy Markdown
Contributor

Linux CI is exhausting its ten-minute limit while installing gnome-keyring from the EC2 Ubuntu mirror. APT retries transient download failures before trying another configured mirror, so those retries can consume the job before Cargo starts.

Keep the runner's preferred mirror and existing fallbacks, but disable repeated download attempts and bound HTTP connection and data waits to ten seconds. Print the mirror list so future failures show which fallbacks were available. This only changes APT setup in the Linux cargo-test job.

Related to astral-sh#542.

@zanieb
zanieb enabled auto-merge (squash) August 18, 2026 18:23
@zanieb
zanieb merged commit 24fb703 into main Aug 18, 2026
55 checks passed
@zanieb
zanieb deleted the zb/apt-mirror-fallback branch August 18, 2026 18:39
zanieb added a commit that referenced this pull request Aug 18, 2026
The ARMv7 development build can exhaust its fifteen-minute limit in
`apt-get update` when the Azure Ubuntu mirror stalls. The main archive
can serve the release metadata, but subsequent package-index downloads
still try the preferred mirror. The fallback settings added in
#21198 only apply to the separate Linux cargo-test runner.

Apply the same zero-retry policy and ten-second HTTP connection and data
timeouts before updating package indexes and installing the ARMv7
cross-compiler. Preserve the runner's mirror priorities and print the
configured fallbacks. Other build jobs and runner selection are
unchanged.

Related to astral-sh#542.

Co-authored-by: Zanie Blue <[email protected]>
baszalmstra added a commit to baszalmstra/rattler that referenced this pull request Aug 19, 2026
run-on-arch.sh runs `sudo apt update -q -y` on the runner before it
configures QEMU. When azure.archive.ubuntu.com goes bad, apt retries it
before falling through to archive.ubuntu.com, then stalls mid download
with nothing bounding the wait. Both jobs cancelled at the 30 minute cap
in the last run died there, 20 minutes of silence after:

  09:14:37  Ign:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
  09:14:37  Hit:2 https://archive.ubuntu.com/ubuntu noble InRelease
  09:14:38  Get:5 https://archive.ubuntu.com/ubuntu noble-security InRelease

The container never started, so this is not architecture specific and has
nothing to do with the apt inside the emulated rootfs. Retries 0 plus a
10 second timeout is what uv landed for the same stall in
astral-sh/uv#21198.

This makes apt fail fast rather than succeed, so a bad mirror still turns
into a red job, just in a minute instead of thirty.
@zaniebot

Copy link
Copy Markdown
Contributor

Upstream tracking issue: actions/runner-images#14594

This branch was previously deployed

1 inactive deployment
automations — 9d6398d6 Deployed Aug 18, 2026 by astral-automations-bot[bot] via review / security review #44933
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.

2 participants