Skip to content

Forward max-workers to julia-run-testitems - #8

Merged
davidanthoff merged 1 commit into
mainfrom
forward-max-workers
Aug 19, 2026
Merged

Forward max-workers to julia-run-testitems#8
davidanthoff merged 1 commit into
mainfrom
forward-max-workers

Conversation

@davidanthoff

@davidanthoff davidanthoff commented Aug 19, 2026

Copy link
Copy Markdown
Member

julia-actions/julia-run-testitems has had a max-workers input all along (action.yml, forwarded to juliati --max-workers), but this workflow never passed one through — so a repository using it has no way to bound the number of test processes. Its four siblings threads, gc-between-testitems, memory-threshold and schedule are all forwarded already, so this looks like a plain omission rather than a decision.

Two lines: the input, and the forward next to threads. Default is "", so every existing caller is unaffected.


Note on the original motivation, which no longer applies. I opened this to work around a Windows + Julia 1.0 precompile race in DebugAdapter.jl. That diagnosis was wrong: TestItemControllers already serializes environment activation precisely so the test environment is precompiled once, and the real bug was that on Julia 1.0–1.8 that window built nothing, because only the TestEnv variants for 1.9 and later finish activate with Pkg._auto_precompile. That is fixed at the source in julia-testitems/TestItemControllers.jl#66, and DebugAdapter needs no max-workers setting.

So this PR now stands purely on its own merits — filling in a forwarding gap — rather than as a fix for anything. Happy to close it if you would rather not add the knob.

🤖 Generated with Claude Code

`julia-run-testitems` has had a `max-workers` input all along, but this workflow
never passed one through, so a repository using it has no way to bound the number
of test processes — even though its four siblings (`threads`,
`gc-between-testitems`, `memory-threshold`, `schedule`) are all forwarded.

DebugAdapter.jl needs it: on Julia 1.0 there is no precompile cache locking, and
on Windows a `.ji` file that another process holds open cannot be replaced, so as
soon as that package has more than one test item the processes race and whichever
loses reports `Cannot write cache file`.
davidanthoff added a commit to julia-vscode/DebugAdapter.jl that referenced this pull request Aug 19, 2026
Julia 1.0 has no precompile cache locking, and on Windows a `.ji` that another
process holds open cannot be replaced. This package had exactly one test item, so
one test process started and nothing raced; adding the debug session tests makes
several start together, all loading JuliaInterpreter, and whichever loses dies
with "Cannot write cache file". Nothing in the package can fix that, so CI now
runs the test items one at a time — they take seconds each, so it costs nothing.

Requires julia-testitems/testitem-workflow#8, which forwards `max-workers` to
`julia-run-testitems`; the action has always accepted it, the workflow just never
passed one through.

The README documented only the four-positional form of `debug_code`, and the
README is what people actually read, so it now covers `notify_termination` too.
@davidanthoff
davidanthoff merged commit b4b1159 into main Aug 19, 2026
@davidanthoff
davidanthoff deleted the forward-max-workers branch August 19, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant