thebe icon indicating copy to clipboard operation
thebe copied to clipboard

New JupyterLab API for spawning kernels has a different config option name for which kernel to spawn

Open rkevin-arch opened this issue 4 years ago • 2 comments

Describe the bug

The commit 11ff270 (in PR #268) updated the APIs we use to spawn a kernel in Jupyter. We were using Session.startNew, but are now using kernelManager.startNew to spawn the kernel.

The new API uses name to refer towhich kernel should be spawned, but the old API uses kernelName for this purpose.

This means that using kernelOptions.kernelName to specify which kernel to use in a Thebe config will be ignored in Thebe 0.6.0 and above. Instead, users should use kernelOptions.name.

To Reproduce

Here's a sample HTML file that reproduces this issue. If Thebe version is 0.5.1 and we use kernelName: "ir", it works. If Thebe version is 0.6.0 and we use kernelName: "ir", it doesn't work. If Thebe version is 0.6.0 and we use name: "ir", it works.

Expected behavior

We should do one of the following:

  1. Update documentation, saying that 0.6.0 is a breaking change and you should change the kernelName config option to name
  2. Add some logic in our code to use kernelName as name if a name field is not defined, to maintain backwards compatibility.

rkevin-arch avatar Jan 15 '21 03:01 rkevin-arch

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Jan 15 '21 03:01 welcome[bot]

Update on this. In thebe 0.9.x, thebe-core has switched back to using the SessionManager, so kernelName remains a relevant parameter and should be maintained.

Suggestion 2) in the OP is the preferred way to go in that case.

Tracking modifications on both release branches in #595

stevejpurves avatar Feb 21 '23 12:02 stevejpurves