From deffbe31d853dfcb597a9f7ecc8b5a5e193e0024 Mon Sep 17 00:00:00 2001 From: abrichr Date: Wed, 19 Aug 2026 15:27:41 -0400 Subject: [PATCH] ci: bound the apt install and prefer the canonical Ubuntu archive The Install system dependencies step had no timeout. On 2026-08-19 the Azure apt mirror failed, and the step ran for over an hour on main before I cancelled it. The same mirror fault stopped the paper build in openadapt-flow on the same day. The hosted runner resolves its mirror through /etc/apt/apt-mirrors.txt, which points at azure.archive.ubuntu.com. apt does fall back to the canonical archive, but it spends the whole budget first. Point the file at the canonical archive before apt-get update, retry update three times with backoff, and fail with a clear message instead of a silent hang. The step also gets a 10 minute bound. The package list is unchanged. Co-Authored-By: Claude Opus 5 --- .github/workflows/test.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01d5e56..934dd3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,8 +28,31 @@ jobs: run: uv python install ${{ matrix.python-version }} - name: Install system dependencies + timeout-minutes: 10 run: | - sudo apt-get update + set -uo pipefail + # The hosted runner resolves its Ubuntu mirror through + # /etc/apt/apt-mirrors.txt, which points at azure.archive.ubuntu.com. + # That mirror fails intermittently. On 2026-08-19 it hung this step + # for over an hour on main, because the step had no bound of its own. + # Prefer the canonical archive, and keep this best-effort. + sudo sed -i \ + 's|http://azure.archive.ubuntu.com/ubuntu|http://archive.ubuntu.com/ubuntu|g' \ + /etc/apt/apt-mirrors.txt 2>/dev/null || true + update_ok="" + for attempt in 1 2 3; do + if sudo apt-get update; then + update_ok=1 + break + fi + echo "::warning::apt-get update failed (attempt ${attempt}/3); retrying" + sleep $((attempt * 10)) + done + if [ -z "$update_ok" ]; then + echo "::error::apt-get update failed three times; the Ubuntu mirror is unreachable" + exit 1 + fi + set -e sudo apt-get install -y ffmpeg libportaudio2 - name: Install dependencies