-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Raw kernel auto start fix + #12337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raw kernel auto start fix + #12337
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix raw kernel autostart and remove jupyter execution from interactive base. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,6 @@ const LocalHosts = ['localhost', '127.0.0.1', '::1']; | |
|
|
||
| export class JupyterExecutionBase implements IJupyterExecution { | ||
| private usablePythonInterpreter: PythonInterpreter | undefined; | ||
| private eventEmitter: EventEmitter<void> = new EventEmitter<void>(); | ||
| private startedEmitter: EventEmitter<INotebookServerOptions> = new EventEmitter<INotebookServerOptions>(); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In interactiveBase.ts you'll notice that I also removed a usage of jupyterExecution that was watching this event. Turns out this event has never (or at least when I went back a year in the code) been hooked up. It's here, but it's never having .fire() called on it. So I removed it and the associated code in a couple of different places. This is part of LiveShare, but I checked that the live share tests passed, and as this has never been hooked up I feel ok removing it. |
||
| private disposed: boolean = false; | ||
| private readonly jupyterInterpreterService: IJupyterSubCommandExecutionService; | ||
|
|
@@ -71,10 +70,6 @@ export class JupyterExecutionBase implements IJupyterExecution { | |
| } | ||
| } | ||
|
|
||
| public get sessionChanged(): Event<void> { | ||
| return this.eventEmitter.event; | ||
| } | ||
|
|
||
| public get serverStarted(): Event<INotebookServerOptions> { | ||
| return this.startedEmitter.event; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change here is the crux of the fix. Our autostart preload is handled in serverLoad.ts for two main cases.
After my fix to honor the disableJupyterAutoStart setting raw kernel was respecting case #1 above (which is why we were not initially seeing the issue, for all of us #1 would apply basically all of the time) but we were not honoring #2. Case two is handled by this change here.
But more changes here were for code health cleanup as well. The interactiveBase is supposed to be communicating the the notebook provider for getting a notebook and associated info. It's very crummy coupling for it to have awareness of jupyterExecution and to be referencing it. So in addition to this change I've also made changes to remove jupyterExecution fully from interactiveBase.