This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 9bf514a874 GH-35292: [Release] Retry "apt install" (#36836)
9bf514a874 is described below
commit 9bf514a874baf8a19ef4a5a2fb2fea676e57b2ed
Author: Sutou Kouhei <[email protected]>
AuthorDate: Tue Jul 25 17:18:43 2023 +0900
GH-35292: [Release] Retry "apt install" (#36836)
### Rationale for this change
Timeout is still happen on my local environment.
### What changes are included in this PR?
Retry `apt install`.
This is just a workaround. We should not close GH-35292 by this.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* Closes: #35292
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
dev/release/verify-apt.sh | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/dev/release/verify-apt.sh b/dev/release/verify-apt.sh
index 187482cbf5..49671f01cc 100755
--- a/dev/release/verify-apt.sh
+++ b/dev/release/verify-apt.sh
@@ -45,7 +45,21 @@ echo "::group::Prepare repository"
export DEBIAN_FRONTEND=noninteractive
-APT_INSTALL="apt install -y -V --no-install-recommends"
+retry()
+{
+ local n_retries=0
+ local max_n_retries=3
+ while ! "$@"; do
+ n_retries=$((n_retries + 1))
+ if [ ${n_retries} -eq ${max_n_retries} ]; then
+ echo "Failed: $@"
+ return 1
+ fi
+ echo "Retry: $@"
+ done
+}
+
+APT_INSTALL="retry apt install -y -V --no-install-recommends"
apt update
${APT_INSTALL} \