From 3b568a0452d38a8b89e3e0cd020897d47de15349 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 2 Dec 2026 19:45:10 -0600 Subject: [PATCH 1/2] fix(ci): bound and retry the e2e browser system package install --- .github/scripts/install-playwright.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/scripts/install-playwright.sh b/.github/scripts/install-playwright.sh index c9065602919..9527dbcc452 100644 --- a/.github/scripts/install-playwright.sh +++ b/.github/scripts/install-playwright.sh @@ -2,6 +2,12 @@ # The dependency dry run uses the pinned driver's package list without updating apt. set -euo pipefail +# A healthy apt install takes under a minute. A stalled mirror download otherwise holds the +# install, and with it the whole suite step's budget, with no output: apt's inactivity timeout +# misses a download that trickles. Each retry resumes apt's partial downloads. +DEPS_ATTEMPT_SECONDS=120 +DEPS_ATTEMPTS=3 + browsers=() for argument in "$@"; do case "$argument" in @@ -11,6 +17,18 @@ for argument in "$@"; do done if ! bunx --no-install playwright install-deps --dry-run "${browsers[@]}"; then - bunx --no-install playwright install-deps "${browsers[@]}" + for attempt in $(seq "$DEPS_ATTEMPTS"); do + if timeout --kill-after=15 "$DEPS_ATTEMPT_SECONDS" \ + bunx --no-install playwright install-deps "${browsers[@]}"; then + break + fi + if [ "$attempt" -eq "$DEPS_ATTEMPTS" ]; then + echo "::error::Browser system packages did not install in $DEPS_ATTEMPTS attempts." >&2 + exit 1 + fi + echo "Browser system package install attempt $attempt failed or stalled; retrying." >&2 + # An attempt cut off while dpkg was unpacking leaves it interrupted, which blocks the retry. + sudo dpkg --configure -a + done fi exec bunx --no-install playwright install "$@" From 3c0ebcdb6072d68574b1d8daaf539b7b73115f61 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 2 Dec 2026 19:55:52 -0600 Subject: [PATCH 2/2] fix(ci): bound the dpkg recovery between browser package attempts --- .github/scripts/install-playwright.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/install-playwright.sh b/.github/scripts/install-playwright.sh index 9527dbcc452..bb808360270 100644 --- a/.github/scripts/install-playwright.sh +++ b/.github/scripts/install-playwright.sh @@ -28,7 +28,9 @@ if ! bunx --no-install playwright install-deps --dry-run "${browsers[@]}"; then fi echo "Browser system package install attempt $attempt failed or stalled; retrying." >&2 # An attempt cut off while dpkg was unpacking leaves it interrupted, which blocks the retry. - sudo dpkg --configure -a + if ! timeout --kill-after=15 "$DEPS_ATTEMPT_SECONDS" sudo dpkg --configure -a; then + echo "Browser system package recovery failed or stalled; retrying anyway." >&2 + fi done fi exec bunx --no-install playwright install "$@"