Skip to content
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

Kernel Interrupt not working in interactive window for cells submitted from a #%% file #6983

Closed
greazer opened this issue Aug 6, 2021 · 3 comments · Fixed by #7067
Closed
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window

Comments

@greazer
Copy link
Contributor

greazer commented Aug 6, 2021

Version: 1.59.0 (system setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.22000

  1. Run a long running notebook using a python script with #%% cells, run it via a codelens then try to stop it with Interrupt Kernel.

It doesn't stop. No notification that it's even trying to stop it as is expected.

@greazer greazer added bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window labels Aug 6, 2021
@greazer greazer added this to the July 2021 Recovery milestone Aug 6, 2021
@robclouth
Copy link

Same issue. After closing, the window opens again automatically because it's still running, then the Interrupt button works correctly.

@joyceerhl
Copy link
Contributor

joyceerhl commented Aug 10, 2021

This is happening because cell execution for the interactive window is not managed through the KernelExecution codepath, so when we call interrupt here:

const result = await this.kernel.interrupt(notebookEditor.document);

There's no executionQueue, so we report success and never attempt the interrupt:

const executionQueue = this.documentExecutions.get(document);
if (!executionQueue) {
return InterruptResult.Success;
}

The right fix here is probably to rework execution in the interactive window to use the KernelExecution codepath like native notebooks.

@joyceerhl joyceerhl changed the title Kernel Interrupt not working in interactive window Kernel Interrupt not working in interactive window for cells submitted from a #%% file Aug 10, 2021
@joyceerhl
Copy link
Contributor

Hotfixed in release branch for upcoming recovery build via #7070

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants