Skip to content

fix(ci): prefer Ubuntu mirrors before R setup - #73

Merged
schloerke merged 4 commits into
mainfrom
prefer-non-azure-ubuntu-mirrot
Nov 6, 2026
Merged

schloerke merged 4 commits into
mainfrom
prefer-non-azure-ubuntu-mirrot

Conversation

@karangattu

@karangattu karangattu commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #75

On some GitHub-hosted Ubuntu runners, apt downloads from azure.archive.ubuntu.com drop to ~100 kB/s. This slows R setup and the system requirement installs. Some jobs take 10+ minutes longer, and the linked ggally run took almost 49 minutes before it was cancelled.

This change makes setup-r-package put the Ubuntu archive mirrors ahead of Azure in /etc/apt/apt-mirrors.txt before setup-r runs. Azure stays as the last fallback. The step only runs on GitHub-hosted Ubuntu runners that have the mirror list file. It changes only the three standard mirror priorities and leaves custom entries alone.

This is not a temporary workaround. actions/runner-images#14643 made apt move to the next mirror when a download stalls. It does not help downloads that are slow but still moving, which is the case here. That PR also keeps Azure first on purpose, so the mirror order will not change upstream.

Local tests passed for mirror order, repeat runs, custom entries, Debian, and a missing mirror file. YAML parsing, shell syntax, and whitespace checks also passed. Download speed on a GitHub-hosted runner remains untested.

Related: slow R test run, slow rstudio/shiny job, actions/runner-images#14594.

@karangattu

Copy link
Copy Markdown
Contributor Author

This is a temporary workaround, and since this was merged in runner-images - actions/runner-images#14643, we will just wait till the runner-image deployments take place within 3 days

@schloerke
schloerke merged commit 04cc985 into main Nov 6, 2026
9 checks passed
@schloerke
schloerke deleted the prefer-non-azure-ubuntu-mirrot branch November 6, 2026 21:23
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.

Slow apt downloads from azure.archive.ubuntu.com add 10+ min to Ubuntu jobs

2 participants