From a681fe9976027f82318a2cda46462cd6d7802f9e Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 8 Oct 2025 12:24:27 -0500 Subject: [PATCH] Retry on Rocky Linux Python install (#16190) I'm not sure why these mirrors have been flaky lately. e.g. https://github.com/astral-sh/uv/actions/runs/18346934817/job/52256348387?pr=16182 --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d876d0567..99d84f7b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2201,12 +2201,24 @@ jobs: - name: "Install Python" if: matrix.rocky-version == '8' run: | - dnf install python39 python39-pip which -y + for i in {1..5}; do + dnf install python39 python39-pip which -y && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; } + if [ $i -eq 5 ]; then + echo "Failed to install Python after 5 attempts" + exit 1 + fi + done - name: "Install Python" if: matrix.rocky-version == '9' run: | - dnf install python3.9 python3.9-pip which -y + for i in {1..5}; do + dnf install python3.9 python3.9-pip which -y && break || { echo "Attempt $i failed, retrying in 10 seconds..."; sleep 10; } + if [ $i -eq 5 ]; then + echo "Failed to install Python after 5 attempts" + exit 1 + fi + done - name: "Install Python" if: matrix.rocky-version == '10'