Repository navigation
Fix CI for #125: cover the new spawn-failure branches in tests - #127
Closed
davidanthoff wants to merge 4 commits into
Closed
davidanthoff wants to merge 4 commits into
davidanthoff wants to merge 4 commits into
Conversation
`start` spawns the test process before its own error handler. When the spawn fails, for example because the program in `juliaCmd` does not exist, the error escapes to the `@async` task in `_launch_julia_process!`, and its `catch` only logs it. The reactor gets no message, so the process stays in ProcessStarting, its test run never completes, and a shutdown waits the full grace period for the process. The `catch` now also posts `TestProcessIOErrorMsg(ps.id, :fatal)`, as the other error paths in this file do. The existing fatal IO error path then errors the queued test items and removes the process.
A `juliaCmd` that cannot be run is a configuration mistake, but it was logged with `@error`. Under the crash-reporting logger that VS Code installs, any `@error` sends a crash report and exits the test item controller, so the reactor message added in the previous commit never ran there. `start` now catches the `IOError` from the spawn itself, logs a warning, and posts the fatal IO error with a short reason such as "`…/julia`: no such file or directory (ENOENT)". The reason is built from the error code because the `IOError` message embeds the whole environment. The startup-crash path errors the queued test items with that reason instead of saying the process crashed. In `_launch_julia_process!`, which now only sees unexpected errors, the message is posted before the `@error` rather than after it. New test: one controller completes a run with a bad `juliaCmd` and then runs the same item with a working one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov/patch on #125 was below target because no test reached the hint for a `juliaCmd` that holds arguments, nor the plain "crashed during startup" branch next to the new launch-failure one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Superseded: the test commit was pushed directly onto #125. |
davidanthoff
added a commit
that referenced
this pull request
Oct 5, 2026
1e169a21 Set version to v3.1.1 caa18a4c Merge pull request #127 from julia-vscode/crashfix/int64-request-ids 7b9fd4e3 Don't use `only` in the request id test 3b7b9e1b Type incoming request ids as Int64, not Int 14e3bb51 Merge pull request #125 from julia-vscode/dependabot/julia/UUIDs-lt-0.0.1-and-1 9b015bbe Merge branch 'main' into dependabot/julia/UUIDs-lt-0.0.1-and-1 c559dc3e Merge pull request #126 from julia-vscode/dependabot/julia/Sockets-lt-0.0.1-and-1 7d5d4a8e Update Sockets requirement to < 0.0.1, 1 1c342abf Update UUIDs requirement to < 0.0.1, 1 1857bf9c Merge pull request #124 from julia-vscode/claude/cancel-on-pr-close 28bdf569 Cancel the JSON 0.20 workflow's runs on PR close as well 9ee0cd5c Cancel CI runs when a pull request is closed d8d83d82 Set version to v3.1.1-DEV git-subtree-dir: packages/JSONRPC git-subtree-split: 1e169a213b39b432e2861b50503a4a83cf4dcd9d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened by Claude (Claude Code) on David's behalf.
This branch is #125 (
disberd:fix/spawn-failure-errors-itemsat 8e6d7c8) plus one test commit. It fixes the red checks on #125. Merge this PR or #125 with the commit cherry-picked onto it, not both.What was red on #125 and why
codecov/patch: 76.47% of the diff hit, target 83.36%. This is the only failure caused by Error the test items when the controller cannot spawn a test process #125. The missed lines were the "juliaCmdis run as a single program; pass arguments … injuliaArgs" hint (src/testprocess.jl), the unchanged "crashed during startup"@infobranch next to the new launch-failure branch (src/testitemcontroller.jl), and two catch-only paths.run-tests (macos-26, 1.13.1~aarch64):test_julia_versions.jl"Julia 1.9 platform" hung inPrecompiling project...for BasicPackage until the 1800 s timeout. This is not related to Error the test items when the controller cannot spawn a test process #125. Earliertest_julia_versions.jlruns failed the same way on main and on release branches (runs 35488840838 and 36153559028).run-tests (windows-latest, 1.13.1~x86): "A timed-out test item leaves hang diagnostics in its output" got only the header of the hang dump. The "Task backtraces" section never arrived before the process was killed. This is not related to Error the test items when the controller cannot spawn a test process #125 either: the PR does not touch the watchdog. Main's latest run (37085021065) also failed, on two other Windows legs with other timeouts.Change
Two new test items in
test/test_process_crash.jl:julia_cmd="julia +1.12". It checks that the item errors with "Could not start the test process" and with thejuliaArgshint.--no-such-option, so Julia exits before it connects. It checks that the item gets the "crashed before running test item" message and not the launch-failure one, and that the process is reported as terminated. This test also keeps the two messages apart.Together they bring the patch coverage to about 88% (15 of 17 lines). The two lines that remain are catch-only paths.
Run locally on Windows with Julia 1.13.1: the spawn-failure,
juliaArgsand startup-crash test items intest_process_crash.jlall pass (16/16 assertions).The macOS and Windows flakes are left alone here; they need their own investigation.
🤖 Generated with Claude Code