evindj commented on code in PR #807:
URL: https://github.com/apache/iceberg-cpp/pull/807#discussion_r3524355280


##########
ci/scripts/build_iceberg.sh:
##########
@@ -99,5 +99,13 @@ fi
 
 popd
 
-# clean up between builds
-rm -rf ${build_dir}
+# Clean up after the build. Windows can briefly hold a just-built exe/dll,
+# so retry but do not fail an otherwise successful CI job.
+for attempt in 1 2 3; do
+    if rm -rf "${build_dir}"; then
+        break
+    fi
+    if [[ "${attempt}" != "3" ]]; then
+        sleep 2
+    fi

Review Comment:
   ditto.



##########
ci/scripts/build_example.sh:
##########
@@ -23,7 +23,16 @@ source_dir=${1}
 build_dir=${1}/build
 run_example=${ICEBERG_RUN_EXAMPLE:-OFF}
 
-rm -rf "${build_dir}"
+# Clean up before configuring. If Windows still holds a just-built exe/dll
+# after the retries, let mkdir fail rather than reuse a half-deleted tree.
+for attempt in 1 2 3; do
+    if rm -rf "${build_dir}"; then
+        break
+    fi
+    if [[ "${attempt}" != "3" ]]; then
+        sleep 2
+    fi
+done

Review Comment:
   It would be nice to print a message in case all three attempts fail to 
remove the folder, that way it is easier to debug. 



-- 
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]

Reply via email to