-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle supervisor exits more gracefully (#5062)
This change causes Positron to handle an abrupt or unexpected exit of the supervisor process more gracefully. Before the change, the IDE basically became unresponsive. After the change, the situation is still Not Great, but it's recoverable; it's about the same as having all your interpreters crash at once. You'll see some error popups, but you can get back to a working state. Because Positron has open websockets for all the active sessions, the best clue that the supervisor process has been terminated is that these sockets mysteriously all disconnect. So the main approach here is to fire disconnect events from the sessions; if we get one of these for a session that hasn't exited, we check the process table to see what's going on. There are a couple of significant caveats: - This approach only works when the supervisor process is local. We will probably want to implement a mechanism that works for remote supervisors too, if we add support for those. - This approach won't help if the supervisor process is alive but unresponsive. Though that state hasn't occurred in nature so far, we will eventually want to guard against it. Addresses #5037. ### QA Notes We don't expect supervisor exits to happen to anyone during the normal course of events, and this change does not attempt to make a supervisor exit a pleasant experience. This change also has a drive-by fix that addresses an issue running notebook kernels under the supervisor. --------- Signed-off-by: Jonathan <jonathan@posit.co> Co-authored-by: sharon <sharon-wang@users.noreply.github.com>
- Loading branch information
1 parent
3054948
commit f0a0049
Showing
2 changed files
with
155 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters