Skip to content

Commit

Permalink
chore: try make Setup Rust CI step immune to network hang (#13495)
Browse files Browse the repository at this point in the history
Try add a timeout to the apt-get invocation so that retry can kick in.
  • Loading branch information
findepi authored Nov 19, 2024
1 parent 96d76ab commit c3681dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/actions/setup-builder/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/retry
Original file line number Diff line number Diff line change
Expand Up @@ -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} ))
Expand Down

0 comments on commit c3681dc

Please sign in to comment.