Skip to content

Commit 1c2b1e0

Browse files
committed
[SPARK-52258][BUILD][FOLLOW-UP] Add retries when connecting to the ASF repo
### What changes were proposed in this pull request? This PR adds retries when connecting to the ASF repo ### Why are the changes needed? `curl` to ASF repo is actually flaky. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? Manually. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50983 from HyukjinKwon/SPARK-52258-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent 7ee8f63 commit 1c2b1e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev/create-release/release-build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ if [[ "$1" == "publish-release" ]]; then
516516
if ! is_dry_run; then
517517
echo "Creating Nexus staging repository"
518518
repo_request="<promoteRequest><data><description>Apache Spark $SPARK_VERSION (commit $git_hash)</description></data></promoteRequest>"
519-
out=$(curl -X POST -d "$repo_request" -u $ASF_USERNAME:$ASF_PASSWORD \
519+
out=$(curl --retry 10 --retry-all-errors -X POST -d "$repo_request" -u $ASF_USERNAME:$ASF_PASSWORD \
520520
-H "Content-Type:application/xml" -v \
521521
$NEXUS_ROOT/profiles/$NEXUS_PROFILE/start)
522522
staged_repo_id=$(echo $out | sed -e "s/.*\(orgapachespark-[0-9]\{4\}\).*/\1/")
@@ -594,7 +594,7 @@ if [[ "$1" == "publish-release" ]]; then
594594

595595
echo "Closing nexus staging repository"
596596
repo_request="<promoteRequest><data><stagedRepositoryId>$staged_repo_id</stagedRepositoryId><description>Apache Spark $SPARK_VERSION (commit $git_hash)</description></data></promoteRequest>"
597-
out=$(curl -X POST -d "$repo_request" -u $ASF_USERNAME:$ASF_PASSWORD \
597+
out=$(curl --retry 10 --retry-all-errors -X POST -d "$repo_request" -u $ASF_USERNAME:$ASF_PASSWORD \
598598
-H "Content-Type:application/xml" -v \
599599
$NEXUS_ROOT/profiles/$NEXUS_PROFILE/finish)
600600
echo "Closed Nexus staging repository: $staged_repo_id"

0 commit comments

Comments
 (0)