Skip to content

Commit c3681dc

Browse files
authored
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.
1 parent 96d76ab commit c3681dc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/actions/setup-builder/action.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ runs:
2828
- name: Install Build Dependencies
2929
shell: bash
3030
run: |
31-
RETRY="ci/scripts/retry"
32-
"${RETRY}" apt-get update
33-
"${RETRY}" apt-get install -y protobuf-compiler
31+
RETRY=("ci/scripts/retry" timeout 120)
32+
"${RETRY[@]}" apt-get update
33+
"${RETRY[@]}" apt-get install -y protobuf-compiler
3434
- name: Setup Rust toolchain
3535
shell: bash
3636
# rustfmt is needed for the substrait build script
3737
run: |
38-
RETRY="ci/scripts/retry"
38+
RETRY=("ci/scripts/retry" timeout 120)
3939
echo "Installing ${{ inputs.rust-version }}"
40-
"${RETRY}" rustup toolchain install ${{ inputs.rust-version }}
41-
"${RETRY}" rustup default ${{ inputs.rust-version }}
42-
"${RETRY}" rustup component add rustfmt
40+
"${RETRY[@]}" rustup toolchain install ${{ inputs.rust-version }}
41+
"${RETRY[@]}" rustup default ${{ inputs.rust-version }}
42+
"${RETRY[@]}" rustup component add rustfmt
4343
- name: Configure rust runtime env
4444
uses: ./.github/actions/setup-rust-runtime
4545
- name: Fixup git permissions

ci/scripts/retry

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ x() {
77
"$@"
88
}
99

10-
max_retry_time_seconds=$(( 3 * 60 ))
10+
max_retry_time_seconds=$(( 5 * 60 ))
1111
retry_delay_seconds=10
1212

1313
END=$(( $(date +%s) + ${max_retry_time_seconds} ))

0 commit comments

Comments
 (0)