8000 ci: retry, time out and fall back to another apt mirror by aorumbayev · Pull Request #134 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

ci: retry, time out and fall back to another apt mirror - #134

Merged
aorumbayev merged 5 commits into
mainfrom
ci/apt-timeout
Nov 11, 2026
Merged

aorumbayev merged 5 commits into
mainfrom
ci/apt-timeout

Conversation

@aorumbayev
@aorumbayev aorumbayev commented Nov 11, 2026 •
Copy link
Copy Markdown
Member

What

The Linux package step (and the "Linux libraries" step in release.yml) runs scripts/apt-update.sh instead of a bare apt-get update. Package lists and the install lines are unchanged. Runner images are unchanged (ubuntu-latest).

scripts/apt-update.sh:

  • Runs apt-get update with a 120 s cap, 2 retries and a 20 s network timeout.
  • If that fails, rewrites http://azure.archive.ubuntu.com/ubuntu to http://archive.ubuntu.com/ubuntu in /etc/apt/sources.list.d/ubuntu.sources, /etc/apt/sources.list and /etc/apt/apt-mirrors.txt (whichever exist; hosted runners read their mirrors from that last file). security.ubuntu.com is left alone.
  • Runs apt-get update again with the original retry settings.

All five copies (4 in ci.yml, 1 in release.yml) call the same script. The step timeout is 10 minutes.

Why

Run 43046349109 shows the azure mirror stalling on ubuntu-latest (now resolute), so the step timed out.

What we found since

  • The fallback works as written: after azure stalls, the script switches to archive.ubuntu.com.
  • The runners cannot resolve Ubuntu hosts by name at all: archive.ubuntu.com, security.ubuntu.com and ports.ubuntu.com all fail with "Temporary failure resolving". This is on the GitHub runner side, not on the status page.
  • It happens on both ubuntu-latest (resolute, runs 43046349109, 43048528337, 43050691756) and ubuntu-24.04 (noble, run 43052749488). So the image is not the cause.
  • The arm job uses ports.ubuntu.com (jammy), which the script does not change. It fails the same way.
  • Pinning to ubuntu-24.04 was tried and reverted. It did not help.
  • One Windows failure (run 43052749488, windows-tests (2)): killing_the_process_kills_a_background_grandchild and dropping_the_process_kills_a_background_grandchild ("grandchild did not report its pid"). It passed in the run before. It looks flaky and unrelated to apt.

Checks

  • sh -n scripts/apt-update.sh passes.
  • The four workflow files parse as YAML.
  • Package lists are the same as before.

The apt-get update and install step can hang on the Ubuntu mirror. The job then runs into its 30-minute limit and is cancelled. Add apt retries and a 30s network timeout to every copy of the step, and cap each step at 10 minutes so a hang fails fast. The package lists are unchanged.
The azure Ubuntu mirror did not answer on hosted runners, so the Linux package step timed out. The update now tries azure with a short timeout, then switches the sources to archive.ubuntu.com and updates again. Package lists are unchanged.
@aorumbayev aorumbayev changed the title ci: retry and time out the Linux package step ci: retry, time out and fall back to another apt mirror Nov 11, 2026
Hosted Ubuntu runners read their mirrors from /etc/apt/apt-mirrors.txt, so rewriting only the sources files left the stalled azure mirror in use.
ubuntu-latest moved to resolute, and its runners could not reach the Ubuntu mirrors. The two Linux jobs that install apt packages now run on ubuntu-24.04.
Pinning to ubuntu-24.04 did not help. Both images fail to resolve the Ubuntu mirrors, so the image is not the cause.
@aorumbayev
aorumbayev merged commit c25b164 into main Nov 11, 2026
47 of 56 checks passed
@aorumbayev
aorumbayev deleted the ci/apt-timeout branch November 11, 2026 17:06
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

0