From ac8fe9a9e152c8e1ea03c9f85e651a3e7f56c7ef Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 11 Nov 2026 06:53:13 -0800 Subject: [PATCH] fix(ci): recover package retries across headless jobs --- .github/scripts/install-ubuntu-apt-packages.sh | 9 +++++++-- .github/workflows/e2e.yml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/scripts/install-ubuntu-apt-packages.sh b/.github/scripts/install-ubuntu-apt-packages.sh index f0beef866d3..dd47cdd3390 100644 --- a/.github/scripts/install-ubuntu-apt-packages.sh +++ b/.github/scripts/install-ubuntu-apt-packages.sh @@ -28,5 +28,10 @@ for source in /etc/apt/apt-mirrors.txt /etc/apt/sources.list /etc/apt/sources.li fi done -timeout 60 sudo apt-get update -timeout 180 sudo apt-get install -y "$@" +# A timed-out install may leave a transaction that apt cannot resume itself. +timeout 30 sudo dpkg --configure -a || true +# Unrelated repositories may fail refresh; apt still verifies the requested packages. +if ! timeout 60 sudo apt-get update; then + echo 'Index refresh incomplete; attempting the requested packages with available authenticated indexes.' >&2 +fi +timeout 150 sudo apt-get install -y "$@" diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9c823cb4aae..ca0f42a63c9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -533,7 +533,12 @@ jobs: ref: ${{ inputs.ref || github.ref }} persist-credentials: false - name: Install headless tools - run: sudo apt-get update && sudo apt-get install -y build-essential ripgrep xvfb openbox x11-utils + run: &install_headless_tools | + if [ -f .github/scripts/install-ubuntu-apt-packages.sh ]; then + bash .github/scripts/install-ubuntu-apt-packages.sh build-essential ripgrep xvfb openbox x11-utils + else + sudo apt-get update && sudo apt-get install -y build-essential ripgrep xvfb openbox x11-utils + fi - uses: ./.github/actions/install-node-dependencies with: native-runtime: electron @@ -640,7 +645,7 @@ jobs: - name: Fetch the 1.4.224 relay sources run: git fetch --no-tags --depth=1 origin +refs/tags/v1.4.224:refs/tags/v1.4.224 - name: Install headless tools - run: sudo apt-get update && sudo apt-get install -y build-essential ripgrep xvfb openbox x11-utils + run: *install_headless_tools - uses: ./.github/actions/install-node-dependencies with: native-runtime: electron