Skip to content

Prompt of "Select kernel from undefined" when selecting new kernel for notebook #197619

@tomqwpl

Description

@tomqwpl

Does this issue occur when all extensions are disabled?: No, as issue requires there to be extensions registering notebook kernels

  • VS Code Version: 1.84.0
  • OS Version: Windows

Steps to Reproduce:

  1. You need an extension that registers notebook kernels using the vscode.notebooks.createNotebookController API
  2. From a suitable notebook, use the "Select kernel" button in the top right, or click on the current kernel.
  3. Get a prompt as follows:
    image
  4. Select the extension that has provided a kernel using the createNotebookController API
  5. Get a dialog as follows:
    image

This seems to be caused by code in notebookKernelQuickPickStrategy.ts. Source of the message is

quickPick.title = localize('selectKernelFromExtension', "Select Kernel from {0}", source);

source here is a parameter to the _selectOneKernel method. This comes from

await this._selectOneKernel(notebook, selectedKernelPickItem.source, selectedKernelPickItem.kernels);

The selectedKernelPickItem is constructed from the _calculdateKernelSources method (method name spelling mistake?). Quick pick items are constructed by

			if (group.length > 1) {
				quickPickItems.push({
					label: source,
					kernels: group
				});
			} else {
		}

This code doesn't populate a value for source.
So this looks like a straighforward bug in this code, the code in _calculdateKernelSources just needs to be populating source. Unclear whether it needs to do this as well as, or instead of label, haven't got into it that far. Or possibly at the point of use it needs to refer to label rather than source. Also unclear whether there are other cases where source may be needed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions