From 026cbb29419cb24e7869336b44ba0b86acae806c Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Mon, 22 Jun 2026 14:08:15 +0200 Subject: [PATCH] Sleep after wait in Windows CI job When terminating the bare deployment, bb-storage didn't always write the persistent state file before it is started again. The reason seems to be that the batch wrapper doesn't wait for its subprocess to finish. Workaround that with a simple sleep. --- tools/test-deployment-bare.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/test-deployment-bare.sh b/tools/test-deployment-bare.sh index e487fc03..2c09f736 100755 --- a/tools/test-deployment-bare.sh +++ b/tools/test-deployment-bare.sh @@ -72,6 +72,10 @@ grep -E '^INFO: [0-9]+ processes: .*[0-9]+ remote[.,]' \ # --- Check that we get cache hit even after rebooting the server --- kill -s $kill_sig "$buildbarn_pid" wait "$buildbarn_pid" || true +# On Windows, wait doesn't wait for the bare.exe process to exit. +# The batch wrapper terminates directly. Give bb-storage some time to write down the persistent state. +# TODO: 2026-06-22 Make sure wait works and remove the sleep. +sleep 2 $script_exec 2>"${bare_output}" & buildbarn_pid=$! sleep 5