Skip to content

Fix both Rust test failures - #103

Open
thomasjm wants to merge 2 commits into
mainfrom
rust-data-science-start-timeout
Open

Fix both Rust test failures#103
thomasjm wants to merge 2 commits into
mainfrom
rust-data-science-start-timeout

Conversation

@thomasjm

@thomasjm thomasjm commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Two unrelated causes behind the rust jobs failing.

use polars... — kernel start timeout

RuntimeError: Kernel didn't respond in 120 seconds

Not a compile error: evcxr builds polars, ndarray, plotters and smartcore at kernel startup, past
papermill's --start-timeout, which was hardcoded at 120. The cell has no outputs at all in
out.ipynb because nothing ever executed. That test takes ~141s here, so 120 is marginally too low
even on this machine and well short on a loaded runner. Reproduces locally every time.

runKernelCode / notebookShouldSatisfy now take the timeout, defaultStartTimeout = 120 keeps
every other caller unchanged, and testKernelSucceeds' lets the one slow test ask for 600. Raising
the global default instead would make every hung kernel take five times longer to report.

test.rs with missing struct field — batch-dependent assertion

This one passes locally and fails in CI. rust-analyzer publishes its own diagnostics first and
rustc's later once flycheck runs, so which of them share a batch varies by machine and load. The
test asserted the batch equalled exactly one entry, which only holds if a batch happens to contain
rustc's diagnostic alone.

Concretely: CI's last received batch had all three (rust-analyzer's non_upper_case_globals and
E0063, plus rustc's E0063) so nothing ever matched; the local run's had rustc's alone, so it passed.

New assertDiagnosticRangesContain' asserts the expected diagnostics are among those published and
ignores the rest, which is stable regardless of how they get batched.

Testing

Both fail on main locally in their respective environments and pass with this change.

For the assertion I also checked it isn't vacuous: changing the expected message to a nonexistent
one (missing field \zzz``) makes it fail, as it should.

@thomasjm thomasjm changed the title Give the Rust data science kernel longer to start Fix both Rust test failures Aug 27, 2026
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