From d3dd6f4b9f8568b68f3fa9110b9494f16ac2bd2a Mon Sep 17 00:00:00 2001 From: Dmitri Plotnikov Date: Wed, 27 May 2026 14:19:07 -0700 Subject: [PATCH] Fix Kokoro Windows build/release script failures and linux release copy - In release_windows.bat and build_windows.bat, replace the 'timeout' command with a 'ping'-based sleep workaround to prevent crashes in non-interactive Kokoro environments. - In build_release_linux.sh, copy release files recursively to ensure all nested files are included correctly. PiperOrigin-RevId: 922342615 --- release/kokoro/build_windows.bat | 5 ++++- release/kokoro/release_windows.bat | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/release/kokoro/build_windows.bat b/release/kokoro/build_windows.bat index f8b254f..69e79d1 100644 --- a/release/kokoro/build_windows.bat +++ b/release/kokoro/build_windows.bat @@ -50,7 +50,10 @@ if !FETCH_STATUS! NEQ 0 ( if !ERRORLEVEL! EQU 0 ( if !ATTEMPTS! LSS %FETCH_RETRIES% ( echo Fetch failed with timeout. Retrying in %FETCH_RETRY_DELAY_S% seconds... - timeout /t %FETCH_RETRY_DELAY_S% /nobreak >nul + :: Use ping instead of timeout because timeout command fails in non-interactive Kokoro environments + :: with "ERROR: Input redirection is not supported, exiting the process immediately." + set /a PINGS=%FETCH_RETRY_DELAY_S%+1 + ping -n !PINGS! 127.0.0.1 >nul goto fetch_loop ) ) diff --git a/release/kokoro/release_windows.bat b/release/kokoro/release_windows.bat index 88c98b1..0138110 100644 --- a/release/kokoro/release_windows.bat +++ b/release/kokoro/release_windows.bat @@ -135,7 +135,10 @@ if !FETCH_STATUS! NEQ 0 ( if !ERRORLEVEL! EQU 0 ( if !ATTEMPTS! LSS %FETCH_RETRIES% ( echo Fetch failed with timeout. Retrying in %FETCH_RETRY_DELAY_S% seconds... - timeout /t %FETCH_RETRY_DELAY_S% /nobreak >nul + :: Use ping instead of timeout because timeout command fails in non-interactive Kokoro environments + :: with "ERROR: Input redirection is not supported, exiting the process immediately." + set /a PINGS=%FETCH_RETRY_DELAY_S%+1 + ping -n !PINGS! 127.0.0.1 >nul goto fetch_loop ) )