Repository navigation
Fail CI in minutes, not an hour, when Ubuntu's mirror stops answering - #240
Merged
Merged
Conversation
On 2026-11-11 the GitHub runners could not reach Ubuntu's package mirror. apt waited out every package in turn, and the Linux jobs sat in setup for 48 to 58 minutes before anything built. Nothing bounded them: no job had a timeout, so GitHub's six hours was the limit. apt.sh now fails the update when an index does not download, gives each request 20 seconds, caps the update at 2 minutes and the download at 10, and tries once more after a minute. The install reads only what was downloaded and is never cut short. Against a mirror that does not answer it fails in under two minutes; against a working one it installs as before. Every CI, Mobile and Release build job also has a timeout, about twice its slowest run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed and why
This morning the GitHub runners couldn't reach Ubuntu's package mirror.
packaging/ci/apt.shwaited out every package in turn, so each Linux job sat in setup for 48 to 58 minutes before it built anything. No job had a timeout, so nothing would have stopped them before GitHub's 6-hour limit. With this change, a dead mirror fails the job in under two minutes with an error that says to re-run it, and no build job can run past about twice its slowest time.--error-on=any), instead of carrying on with stale lists.test60 min (macOS has taken 30),package45 (slowest 16).linux-smoke30.apt.sh, so a tag build gets the same bound.Type
Platforms
Proof
CI change, no app behaviour. I ran the new
apt.shinubuntu:22.04containers:This PR's own Linux jobs run the new script against the real mirror.
Compatibility
CI only.
Risk and rollback
--error-on=anyturns any index download failure into a failed try, where apt used to ignore it. A blip clears on the retry a minute later. A longer outage now fails the job, where it used to hang, and the job needs a re-run either way. Rollback: revert the commit.Release note
None (CI only).
🤖 Generated with Claude Code