Skip to content

Comments

try to fix ci on windows#1600

Merged
minrk merged 8 commits intojupyter-server:mainfrom
minrk:windows-execution-state
Feb 13, 2026
Merged

try to fix ci on windows#1600
minrk merged 8 commits intojupyter-server:mainfrom
minrk:windows-execution-state

Conversation

@minrk
Copy link
Contributor

@minrk minrk commented Feb 12, 2026

while True: pass uses 100% cpu, which might be why we have a problem in CI on Windows.

Using time.sleep() lets the main thread be blocked, but mostly idle, in case it's the main thread starving IO threads that could be the problem.

while True: pass uses 100% cpu, which might be why we have a problem in CI on Windows
@minrk
Copy link
Contributor Author

minrk commented Feb 13, 2026

ok, I think I know what it is: the kernel _activity_stream created here takes a finite time to subscribe, but in the test, the execution is processed right away, before that subscription propagates.

The kernel connection waits for its iopub channel to be fully connected via the nudge mechanism to resolve this same issue, but since it's not applied to the _activity_stream socket, there's always a chance that one won't be

So what happens:

  1. kernel start requested
  2. kernel execution request sent
  3. kernel starts
  4. kernel processes execution
  5. replies and iopub messages finish
  6. _activity_stream subscription resolves, but no iopub messages are forthcoming anymore
  7. the test waits for _activity_stream to receive a message and update .execution_state

If we include checking kernel.execution_state in the nudge, I think that might fix it.

should avoid starting test when execution_state is not responding
@minrk minrk changed the title test_execution_state: try a less busy wait try to fix ci on windows Feb 13, 2026
@minrk minrk requested a review from krassowski February 13, 2026 05:35
@minrk
Copy link
Contributor Author

minrk commented Feb 13, 2026

@krassowski I think this may have fixed Windows CI (at least one pass), by making sure the execution_state is set during the nudge.

Copy link
Collaborator

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, it does fix the CI 🎉 Thank you!

@minrk minrk force-pushed the windows-execution-state branch from 0468315 to 56b24e3 Compare February 13, 2026 18:28
@minrk minrk merged commit b26faff into jupyter-server:main Feb 13, 2026
64 of 66 checks passed
@minrk minrk deleted the windows-execution-state branch February 13, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants