Exclude Spark notebook kernels when running on SAW devices. (#11416)

This commit is contained in:
Cory Rivera
2020-07-20 12:36:40 -07:00
committed by GitHub
parent 26f833f728
commit 047c51921b
9 changed files with 93 additions and 19 deletions

View File

@@ -35,6 +35,7 @@ import { NotebookChangeType } from 'sql/workbench/services/notebook/common/contr
import { onUnexpectedError } from 'vs/base/common/errors';
import { notebookConstants } from 'sql/workbench/services/notebook/browser/interfaces';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IProductService } from 'vs/platform/product/common/productService';
export interface NotebookProviderProperties {
provider: string;
@@ -118,6 +119,7 @@ export class NotebookService extends Disposable implements INotebookService {
@ILogService private readonly _logService: ILogService,
@IQueryManagementService private readonly _queryManagementService: IQueryManagementService,
@IContextKeyService private contextKeyService: IContextKeyService,
@IProductService private readonly productService: IProductService
) {
super();
this._providersMemento = new Memento('notebookProviders', this._storageService);
@@ -264,6 +266,10 @@ export class NotebookService extends Disposable implements INotebookService {
} else {
standardKernels.push(provider.standardKernels);
}
// Filter out unusable kernels when running on a SAW
if (this.productService.quality === 'saw') {
standardKernels = standardKernels.filter(kernel => !kernel.blockedOnSAW);
}
this._providerToStandardKernels.set(providerUpperCase, standardKernels);
}