From c3681dc865f1fd3bde1e08d44c83bf7e1079464a Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Tue, 19 Nov 2024 23:46:14 +0100 Subject: [PATCH] chore: try make Setup Rust CI step immune to network hang (#13495) Try add a timeout to the apt-get invocation so that retry can kick in. --- .github/actions/setup-builder/action.yaml | 14 +++++++------- ci/scripts/retry | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-builder/action.yaml b/.github/actions/setup-builder/action.yaml index 0f45d51835f4..22d2f2187dd0 100644 --- a/.github/actions/setup-builder/action.yaml +++ b/.github/actions/setup-builder/action.yaml @@ -28,18 +28,18 @@ runs: - name: Install Build Dependencies shell: bash run: | - RETRY="ci/scripts/retry" - "${RETRY}" apt-get update - "${RETRY}" apt-get install -y protobuf-compiler + RETRY=("ci/scripts/retry" timeout 120) + "${RETRY[@]}" apt-get update + "${RETRY[@]}" apt-get install -y protobuf-compiler - name: Setup Rust toolchain shell: bash # rustfmt is needed for the substrait build script run: | - RETRY="ci/scripts/retry" + RETRY=("ci/scripts/retry" timeout 120) echo "Installing ${{ inputs.rust-version }}" - "${RETRY}" rustup toolchain install ${{ inputs.rust-version }} - "${RETRY}" rustup default ${{ inputs.rust-version }} - "${RETRY}" rustup component add rustfmt + "${RETRY[@]}" rustup toolchain install ${{ inputs.rust-version }} + "${RETRY[@]}" rustup default ${{ inputs.rust-version }} + "${RETRY[@]}" rustup component add rustfmt - name: Configure rust runtime env uses: ./.github/actions/setup-rust-runtime - name: Fixup git permissions diff --git a/ci/scripts/retry b/ci/scripts/retry index 0569dea58c94..411dc532ca52 100755 --- a/ci/scripts/retry +++ b/ci/scripts/retry @@ -7,7 +7,7 @@ x() { "$@" } -max_retry_time_seconds=$(( 3 * 60 )) +max_retry_time_seconds=$(( 5 * 60 )) retry_delay_seconds=10 END=$(( $(date +%s) + ${max_retry_time_seconds} ))