ci: add network timeouts and retries to setup-backend apt calls (#5181)

apt-get has no network timeout by default, so a stalled Ubuntu mirror
blocked a migrate-mariadb job in `apt-get update` until the 15 minute
job limit cancelled it. Retry up to 3 times with a 30s timeout instead.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Georges-Antoine Assi
2026-10-07 14:15:44 -04:00
committed by GitHub
co-authored by Claude Opus 5.5
parent d3e07a3d60
commit 34e994d61e
+4 -2
View File
@@ -21,8 +21,10 @@ runs:
APT_PACKAGES: ${{ inputs.apt-packages }}
run: |
read -ra extra <<<"$APT_PACKAGES"
sudo apt-get update
sudo apt-get install -y libmariadb3 libmariadb-dev "${extra[@]}"
# apt has no network timeout by default, so a stalled mirror hangs until the job limit.
apt_opts=(-o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30)
sudo apt-get "${apt_opts[@]}" update
sudo apt-get "${apt_opts[@]}" install -y libmariadb3 libmariadb-dev "${extra[@]}"
- name: Install uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0