👷 ci: retry transient apt failures on Linux#3139
Merged
Merged
Conversation
Linux jobs intermittently fail at the OS dependency setup step when ppa.launchpadcontent.net (fish-shell PPA) refuses connections, taking down every Linux matrix entry on PRs that touch nothing in the network path (e.g. pre-commit autoupdate runs). Wrap the apt-get and add-apt-repository invocations in a small retry loop and let curl retry the nushell GPG fetch as well, so a single upstream blip stops cascading into a wave of red checks instead of masking flakes that no amount of rerunning can avoid.
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.
Linux test jobs have been failing in waves because
ppa.launchpadcontent.net(the fish-shell PPA used by theInstall OS dependenciesstep) intermittently refuses connections duringapt-get install. When this happens, every Linux matrix entry across CPython 3.8–3.14, free-threaded variants, PyPy, and GraalPy turns red on PRs that touch nothing related to the failure, including the pre-commit autoupdate run on #3137.Wrap
apt-get install,apt-add-repository, andapt-get updatein a small bash retry loop, and add--retry/--retry-all-errorsto thecurlcall that fetches the nushell GPG key. Five attempts with a ten-second backoff is enough to absorb single-host blips without blocking forever when the upstream is genuinely down. macOS and Windows steps are untouched because their failures have not been the recurring source of flakes.