From 85cf0a41ea6981a4e8526c01ede49a7d4b034b26 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 15 May 2026 13:14:34 -0700 Subject: [PATCH 1/2] ci: switch Windows Stop Studio to a cmd no-op marker (#5462) The prior set +e + redirect + exit 0 fix in #5460 did not stop the Stop Studio step from exiting 143 (SIGTERM) on Git Bash; bash on windows-latest exits with that signal before any inline guard runs, regardless of redirection. The teardown does not gate correctness -- the runner reclaims the Studio child process at job end -- so swap the shell from Git Bash to cmd and just emit a marker line. After this, Job 3 (JSON, images) and the two other Windows GGUF CI jobs cannot fail at the teardown step. --- .../studio-windows-inference-smoke.yml | 48 ++++++++----------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/studio-windows-inference-smoke.yml b/.github/workflows/studio-windows-inference-smoke.yml index 096ec95d03..188cdf5a19 100644 --- a/.github/workflows/studio-windows-inference-smoke.yml +++ b/.github/workflows/studio-windows-inference-smoke.yml @@ -345,15 +345,13 @@ jobs: - name: Stop Studio if: always() - # `set +e` + redirect everything: Git Bash on windows-latest - # has been observed to exit 143 from the kill/sleep block even - # when the upstream test work passed, masking a green run. The - # teardown does not gate correctness, so absorb any signal. - run: | - set +e - kill "${STUDIO_PID}" >/dev/null 2>&1 || true - sleep 2 >/dev/null 2>&1 || true - exit 0 + # Run as cmd so we are not running through the Git Bash shell; + # Git Bash on windows-latest has been observed to exit 143 + # (SIGTERM) from any inline kill/sleep block, masking a green + # test run. The runner reclaims the Studio child process at + # job end either way, so just emit a marker and exit 0. + shell: cmd + run: echo Stop Studio (no-op; runner reclaims STUDIO_PID=%STUDIO_PID% at job end) - name: Upload logs if: always() @@ -768,15 +766,13 @@ jobs: - name: Stop Studio if: always() - # `set +e` + redirect everything: Git Bash on windows-latest - # has been observed to exit 143 from the kill/sleep block even - # when the upstream test work passed, masking a green run. The - # teardown does not gate correctness, so absorb any signal. - run: | - set +e - kill "${STUDIO_PID}" >/dev/null 2>&1 || true - sleep 2 >/dev/null 2>&1 || true - exit 0 + # Run as cmd so we are not running through the Git Bash shell; + # Git Bash on windows-latest has been observed to exit 143 + # (SIGTERM) from any inline kill/sleep block, masking a green + # test run. The runner reclaims the Studio child process at + # job end either way, so just emit a marker and exit 0. + shell: cmd + run: echo Stop Studio (no-op; runner reclaims STUDIO_PID=%STUDIO_PID% at job end) - name: Upload logs if: always() @@ -1162,15 +1158,13 @@ jobs: - name: Stop Studio if: always() - # `set +e` + redirect everything: Git Bash on windows-latest - # has been observed to exit 143 from the kill/sleep block even - # when the upstream test work passed, masking a green run. The - # teardown does not gate correctness, so absorb any signal. - run: | - set +e - kill "${STUDIO_PID}" >/dev/null 2>&1 || true - sleep 2 >/dev/null 2>&1 || true - exit 0 + # Run as cmd so we are not running through the Git Bash shell; + # Git Bash on windows-latest has been observed to exit 143 + # (SIGTERM) from any inline kill/sleep block, masking a green + # test run. The runner reclaims the Studio child process at + # job end either way, so just emit a marker and exit 0. + shell: cmd + run: echo Stop Studio (no-op; runner reclaims STUDIO_PID=%STUDIO_PID% at job end) - name: Upload logs if: always() From 4b23af48b116785f95505a07f192e5f67618ca8e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 15 May 2026 14:18:04 -0700 Subject: [PATCH 2/2] tests: raise pwsh/bash subprocess timeout from 10s to 60s (#5463) CI surfaced a flaky failure on Linux 'Repo tests (CPU)': TestPwshPrForcePromotion.test_baked_in_pr_force_promotes -> subprocess.TimeoutExpired after 10s on /usr/bin/pwsh startup. The scripts under test run in well under a second; the 10s budget only covered pwsh / bash launch time, which spikes on heavily- loaded GitHub-hosted runners. Raise the default helper timeout to 60s for both run_bash and run_pwsh. Real bugs in the script logic will still surface as wrong output or non-zero exit; this just absorbs runner-side launch jitter. --- .../install/test_llama_pr_force_and_source.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/studio/install/test_llama_pr_force_and_source.py b/tests/studio/install/test_llama_pr_force_and_source.py index 114680f458..2d7c038861 100644 --- a/tests/studio/install/test_llama_pr_force_and_source.py +++ b/tests/studio/install/test_llama_pr_force_and_source.py @@ -35,9 +35,11 @@ requires_pwsh = pytest.mark.skipif(not PWSH_AVAILABLE, reason = "pwsh not availa # Helpers # --------------------------------------------------------------------------- def run_bash( - script: str, *, timeout: int = 10, env: dict | None = None + script: str, *, timeout: int = 60, env: dict | None = None ) -> subprocess.CompletedProcess: - """Run a bash script fragment and return the CompletedProcess.""" + """Run a bash script fragment and return the CompletedProcess. + 60s default tolerates slow shell startup on heavily-loaded CI + runners; the scripts themselves run in well under a second.""" run_env = os.environ.copy() if env: run_env.update(env) @@ -51,9 +53,12 @@ def run_bash( def run_pwsh( - script: str, *, timeout: int = 10, env: dict | None = None + script: str, *, timeout: int = 60, env: dict | None = None ) -> subprocess.CompletedProcess: - """Run a PowerShell script fragment and return the CompletedProcess.""" + """Run a PowerShell script fragment and return the CompletedProcess. + 60s default tolerates slow pwsh startup on heavily-loaded CI + runners; the scripts themselves run in well under a second. + A 10s budget previously surfaced as a flaky TimeoutExpired.""" run_env = os.environ.copy() run_env["NO_COLOR"] = "1" if env: