positron icon indicating copy to clipboard operation
positron copied to clipboard

Runtime/notebook integration may be causing stability problems in Jupyter notebooks

Open ntluong95 opened this issue 1 year ago • 4 comments

Positron Version:

Positron Version: 2024.06.1 (system setup) build 2024.06.1-27 Code - OSS Version: 1.90.0 Commit: a893e5b282612ccb2200102957ac38d3c14e5196 Date: 2024-06-26T01:33:58.809Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22621

Steps to reproduce the issue:

  1. Open a Jupyter Notebook
  2. Run a random cell

To be honest, I don't know how to reproduce the problem. It works fine for me before but not now

What did you expect to happen?

The cell run

Were there any error messages in the output or Developer Tools console?

The cell didn't run. As can be seen from the screenshot, it took 11 minutes and not yet finished package loading image

ntluong95 avatar Jul 02 '24 13:07 ntluong95

If this happens in a reproducible way for you (or even if something seems to make it happen more often), please do share that with us!

juliasilge avatar Jul 02 '24 16:07 juliasilge

One possible issue I can see from the code is that we aren't listening to and handling session.onDidEndSession in the NotebookSessionService for potential errors after startup.

seeM avatar Jul 10 '24 16:07 seeM

Something like this may also be behind https://github.com/posit-dev/ark/issues/707?

petetronic avatar Jul 10 '24 20:07 petetronic

@petetronic yes that sounds very possible.

seeM avatar Jul 11 '24 10:07 seeM

Verified Fixed

Positron Version(s) : 2025.01.0-32 OS Version(s) : MacOS

Test scenario(s)

Confirmed that basic running and interrupting cells in the notebook works as expected. The real test of this fix will be whether it reduces the flakiness of our automated notebook-create tests. We’ve occasionally encountered issues where a simple cell execution hangs in CI, and hopefully this change fixes that.

Link(s) to TestRail test cases run or created:

n/a

midleman avatar Dec 06 '24 15:12 midleman