Repository navigation
Route the explicit Vulkan setup failures through the setup failure helpers - #7645
Conversation
…lpers #7188 added three bare exits to studio/setup.sh and three to studio/setup.ps1 for the explicit-Vulkan paths. Bare exits skip setup_fail / Exit-SetupFailure, so the [TAURI:ERROR] line that #7529 added never reaches Studio desktop and a Vulkan install failure shows up there with no actionable context. tests/sh/test_tauri_retry_failure_context.sh already asserts that each setup script has exactly one explicit exit and that it lives inside the helper. That assertion was failing, but the failure was invisible: Backend CI skips the Shell installer tests step whenever the auto-discovered pytest step fails first, and it had been failing on an unrelated encoding assertion until #7642. Exit codes are unchanged: setup_fail 1 and Exit-SetupFailure both exit 1, and the Tauri line is still emitted only when UNSLOTH_TAURI_MODE is set.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ffb313f58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| step "llama.cpp" "Vulkan was explicitly requested, but this installation requires a source build" "$C_ERR" | ||
| substep "Vulkan source builds are not supported by this installer; use the prebuilt Vulkan bundle or unset the Vulkan override" | ||
| exit 1 | ||
| setup_fail 1 "Vulkan was explicitly requested, but this installation requires a source build, which this installer does not support. Use the prebuilt Vulkan bundle or unset the Vulkan override." |
There was a problem hiding this comment.
Update the Vulkan fail-closed tests for the helpers
When Backend CI runs studio/backend/tests, test_explicit_vulkan_prebuilt_failure_does_not_change_backend and test_explicit_vulkan_source_build_fails_closed still require the guarded Unix and PowerShell blocks to contain the literal exit 1 (lines 137/146 and 159/169 of test_setup_llama_cpp_backend.py). Replacing those exits with setup_fail/Exit-SetupFailure therefore makes both tests fail in every Python matrix job; update these assertions to verify the corresponding helper invocation instead.
Useful? React with 👍 / 👎.
Problem
tests/sh/test_tauri_retry_failure_context.shfails on currentmain:studio/setup.shcarries 4 explicitexitstatements andstudio/setup.ps1carries 4, where the guard allows exactly 1 each: the one insidesetup_fail/Exit-SetupFailure. The three extra in each file are the explicit-Vulkan paths added by #7188.Why it matters
#7529 added the
[TAURI:ERROR] <message>channel so Studio desktop can surface an actionable reason when the installer fails.setup_failandExit-SetupFailureare the only places that emit it. A bareexit 1bypasses them, so a user who explicitly requests Vulkan and hits one of these three conditions gets a failed install in Studio desktop with no context attached, which is the exact failure mode #7529 set out to remove.Why nobody noticed
Backend CI runs
Shell installer testsafterRepo tests (CPU, auto-discovered)in the same job. That earlier step had been failing on an unrelated encoding assertion, so every later step was skipped, including the one that runs this guard. #7642 fixed the encoding assertion, the shell step started running again, and this surfaced immediately.Change
Each of the six sites now calls the helper instead of exiting directly, carrying the message that the adjacent
step/substepalready prints. The precedingstep/substepoutput is untouched, so the terminal experience is identical.Exit codes are unchanged. Verified directly against the extracted helper:
UNSLOTH_TAURI_MODE01[TAURI:ERROR] <message>true[TAURI:ERROR] <message>Identical to the bare
exit 1for CLI users, and it restores the Tauri channel.Verification
tests/sh/test_tauri_retry_failure_context.sh: all assertions pass, including the two that were previously unreachable (Windows setup routes explicit exits through Exit-SetupFailurenever ran before, because the Unix assertion exited first).Shell installer testsstep run verbatim: 26 files, 0 failed (was 1 failed).bash -n studio/setup.shclean;studio/setup.ps1parses under the PowerShell AST parser.test_managed_node_runtime.pyandtest_tokenizers_and_torch_constraint.pyreproduce identically on unmodifiedmain.