Skip to content

Commit

Permalink
Backport #64125 to 24.3: Add retries in git submodule update
Browse files Browse the repository at this point in the history
  • Loading branch information
robot-clickhouse committed May 20, 2024
1 parent 8e81d97 commit 3e26933
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docker/test/fasttest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,17 @@ function clone_submodules

git submodule sync
git submodule init
# --jobs does not work as fast as real parallel running
printf '%s\0' "${SUBMODULES_TO_UPDATE[@]}" | \
xargs --max-procs=100 --null --no-run-if-empty --max-args=1 \
git submodule update --depth 1 --single-branch

# Network is unreliable
for _ in {1..10}
do
# --jobs does not work as fast as real parallel running
printf '%s\0' "${SUBMODULES_TO_UPDATE[@]}" | \
xargs --max-procs=100 --null --no-run-if-empty --max-args=1 \
git submodule update --depth 1 --single-branch && break
sleep 1
done

git submodule foreach git reset --hard
git submodule foreach git checkout @ -f
git submodule foreach git clean -xfd
Expand Down

0 comments on commit 3e26933

Please sign in to comment.