mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 17:22:20 -05:00
Mitigate (but not fully fix) Run Cell from disconnected notebook (#4960)
This is a partial fix that lays groundwork for full "Prompt to connect" if a kernel needs a connection. I am waiting on Yurong's refactoring of connection handling before doing any of the prompt work. - Adds kernel metadata about whether a connection is required. - For Jupyter, only Spark kernels are listed as requiring a connection - If this is true and there's no active connection, will show notification and not call execute In the future, this path will still be used if user is prompted to connect and cancels out. The future change will be to inject a "connect" handler from notebook.component to the cell callback and use to set connection context
This commit is contained in:
@@ -352,6 +352,10 @@ class KernelWrapper implements azdata.nb.IKernel {
|
||||
return this.kernelDetails.supportsIntellisense;
|
||||
}
|
||||
|
||||
get requiresConnection(): boolean {
|
||||
return this.kernelDetails.requiresConnection;
|
||||
}
|
||||
|
||||
get info(): azdata.nb.IInfoReply {
|
||||
return this._info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user