From d1d2564fd3c0b79fc2ed29e6a76624aa708199ed Mon Sep 17 00:00:00 2001 From: alehel Date: Wed, 4 Nov 2026 21:52:03 +0100 Subject: [PATCH] craft-audio: review fixes, round 18 (#442) CI: time-limit and retry the ffmpeg install. A stalled apt mirror used up the oracle job's 20 minutes on #442, #443 and #447 before any test ran, and its log is only printed when the step fails. Each try now gets 3 minutes, up to three tries, and a timed-out install prints why. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/audio.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/audio.yml b/.github/workflows/audio.yml index f2d7d49e..fd7ec4a5 100644 --- a/.github/workflows/audio.yml +++ b/.github/workflows/audio.yml @@ -102,7 +102,16 @@ jobs: run: | # The man-db index rebuild after dpkg is slow on hosted runners. sudo rm -f /var/lib/man-db/auto-update - (sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends ffmpeg) > "$RUNNER_TEMP/apt.log" 2>&1 & + # A mirror can stall for most of the job's time limit, and the next try usually gets a good one. + install_ffmpeg() { + for attempt in 1 2 3; do + timeout -k 10 180 sudo sh -c 'apt-get update -qq && apt-get install -y -qq --no-install-recommends ffmpeg' && return 0 + echo "apt: attempt $attempt failed with exit code $?" + sudo dpkg --configure -a || true + done + return 1 + } + install_ffmpeg > "$RUNNER_TEMP/apt.log" 2>&1 & apt=$! cargo test -p craft-audio --all-features --locked --no-run wait "$apt" || { cat "$RUNNER_TEMP/apt.log"; exit 1; }