mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
Exclude Spark notebook kernels when running on SAW devices. (#11416)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user