-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Veto extension restart when there is an active notebook kernel #216922
Comments
@rebornix Are you looking for some API support here? Do you have an idea how to veto here? |
@sandy081 it's the most accurate if it can be controlled by extensions (since only kernel extensions know if the kernel is stateful or not), but I think maybe we can start having an veto hook/api internally in renderer process, and the notebook component can veto whenever there is a notebook open and kernel selected. How does this sound to you? |
We already have such an event in the workbench for the components to listen to and react vscode/src/vs/workbench/services/extensions/common/extensions.ts Lines 440 to 444 in ca8cb6f
|
@sandy081 would you ever consider having an extension api, with which extensions can declare if they have intermediate state that can't be restored if EH restarts? Vetoing from the core can be a good start, but in practice only kernel extensions know if it should veto the restart. For example, GitHub Issue Notebook's kernel is stateless so it doesn't need to block the start. Jupyter should block if users are using a local kernel, but it should not if users are using remote kernels (as it knows how to auto reconnect). Asking for a more granular control since if we veto if there is a kernel selected, it might mean a good amount of data science users will never get "auto restart" since their main editor is notebook. |
Actually we are trying to avoid that. But if it is needed, we can definitely work on it. It seems to be a problem not just during auto restart of extensions, but also when user restart extensions manually which can happen on profile switch / workspace trust / updating extensions.
Seems to make sense to me. |
@rebornix Lets start with a veto when there is an open notebook. Should I go ahead and adopt the existing API in notebook land? |
#216922 do not auto restart when there is an open notebook
Closing this and will open separate issue for custom editors |
To verify:
@rebornix Can you please verify this. |
Step 5 fails. I'm uninstalling the Pull Requests extension for Step 3, and have a .ipynb notebook open for Step 2. |
Does this issue occur when all extensions are disabled?: Yes/No
We might want to veto extension host auto restart when users are using a notebook kernel. Auto restarting will lead to data loss.
The text was updated successfully, but these errors were encountered: