Notify the user when a notebook kernel autorestarts #6246
This tackles some of the same issues as #4724, but is way less ambitious.
A dialog pops up in a notebook when a kernel is autorestarted, with the same text as the classic notebook.
import os os.kill(os.getpid(), 9)
The text was updated successfully, but these errors were encountered:
One of the things I am seeing in my logging is that if I open a notebook, then open an associated console, then close the associate console, the websocket for the console kernel connection stays open, which means that it receives all of the broadcast iopub messages. We should probably close the kernel connection when a console is closed.
Edit: I opened #6290 to deal with this issue
This is now getting much closer. Restarts now don't disconnect and reconnect the websocket. The kernel status should switch from
…he banner. Instead of requesting the kernel info a second time, just use the original kernel info we request for a kernel connection.
This makes sure we don’t miss messages during the restart, and helps the browser not have so many different websocket connections.
Now that we don’t reconnect when restarting, we’ll just show the banner right away.
Tests are still failing. This commit is a checkpoint in the work.
…to true along with resolving the promise.
…ring kernel state. Before, as soon as one kernel future rejected, clearState would return. Now all outstanding futures must resolve or reject before the state is considered cleared.
If a session or kernel is disposed, the requestKernelInfo done promise might reject. In that case, we should do nothing.
…rejection. This fixes a number of tests as well.
Also clean up obsolete todo items.
jupyter/notebook#3705 noted some issues with kernel messages. I think these were mainly because we disconnected and reconnected the websocket on restart. We no longer do this, and these tests seem to pass, so let’s remove the TODO and keep an eye on it.
…n to match existing behavior. Throwing an error when shutting down a dead kernel causes a lot of test failures. So we keep the existing behavior and update the documentation, rather than changing the behavior to match the documentation.