SanyamSuyal commented on code in PR #2733:
URL: https://github.com/apache/fory/pull/2733#discussion_r2417509439
##########
ci/run_ci.sh:
##########
@@ -96,7 +96,23 @@ install_bazel() {
BINARY_URL="https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-${OS}-${ARCH}"
echo "Downloading bazel from: $BINARY_URL"
- curl -L -sSf -o "$BAZEL_DIR/bazel" "$BINARY_URL" || { echo "Failed to
download bazel"; exit 1; }
+ # Retry download with exponential backoff to avoid transient network errors
in CI
+ MAX_ATTEMPTS=5
+ SLEEP_SECONDS=2
+ attempt=1
+ while [ $attempt -le $MAX_ATTEMPTS ]; do
+ if curl -L -sSf -o "$BAZEL_DIR/bazel" "$BINARY_URL"; then
Review Comment:
> do we need to delete previous file? or it will overwrite directly?
Hey , By default `curl -o` will overwrite the target file, but that can
leave a partially downloaded/ corrupted file if the download is interrupted.
To be safer I can change the script to download to a temporary file (e.g.
`bazel.tmp`) and `mv` it into place only after the download succeeds. That
avoids replacing a working binary with a partial file. I can apply the same
approach in the Python installer helper too. Would you like me to update the PR
with that change?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]