Fix Spark kernel connections and switch from Kusto to Spark kernels (#12436)

* Fix connection dialog for Spark and issue when switching from Kusto to Spark

* Address comments
This commit is contained in:
Vasu Bhog
2020-09-17 22:16:42 -05:00
committed by GitHub
parent a9f78694ee
commit eea35d4920
2 changed files with 14 additions and 4 deletions

View File

@@ -658,8 +658,11 @@ export class NotebookModel extends Disposable implements INotebookModel {
let providerFeatures = this._capabilitiesService.getCapabilities(profile.providerName);
if (connectionProviderIds?.length) {
this._currentKernelAlias = providerFeatures?.connection.notebookKernelAlias;
// Adds Kernel Alias and Connection Provider to Map if new Notebook connection contains notebookKernelAlias
if (this._currentKernelAlias) {
// Switching from Kusto to another kernel should set the currentKernelAlias to undefined
if (this._selectedKernelDisplayName !== this._currentKernelAlias && this._selectedKernelDisplayName) {
this._currentKernelAlias = undefined;
} else {
// Adds Kernel Alias and Connection Provider to Map if new Notebook connection contains notebookKernelAlias
this._kernelDisplayNameToConnectionProviderIds.set(this._currentKernelAlias, [profile.providerName]);
}
}