xeus icon indicating copy to clipboard operation
xeus copied to clipboard

Check if the manual kernel spec refresh is still needed

Open jtpio opened this issue 6 months ago • 5 comments

Is this manually kernel spec refresh still needed?

https://github.com/jupyterlite/xeus/blob/5950a5bbe2c73b6d111a2eacd55b4512c78cdb97/packages/xeus-extension/src/index.ts#L136-L139

If there is an issue with how the specs are refreshed it looks like it should likely be fixed somewhere else (lab or lite).

jtpio avatar Jun 03 '25 06:06 jtpio

Agreed it should be fixed upstream 👍🏽

We actually had that patch some time ago, and we were able to remove it when I fixed it upstream https://github.com/jupyterlite/jupyterlite/pull/1596.

But now that jupyterlite uses JupyterLab's kernel spec logic, it uses the refreshSpec of JupyterLab which triggers a tick. Unfortunately triggering that tick is not instant and we seem to wait again another minute if you missed the first round. At least we've seen on slow connections, it takes a minute to show kernels in the launcher, which is far from being usable.

martinRenou avatar Jun 03 '25 06:06 martinRenou

More context in this PR https://github.com/jupyterlite/xeus/pull/204#issuecomment-2735839611

martinRenou avatar Jun 03 '25 06:06 martinRenou

Doesn't the manual spec refresh in JupyterLite help with this, when new lite specs are added?

https://github.com/jupyterlite/jupyterlite/blob/023ce0533a341f3320542a252e65348772882909/packages/services-extension/src/index.ts#L189-L192

jtpio avatar Jun 03 '25 06:06 jtpio

Doesn't seem so 🤷‍♂ Note that I had to bring back this hacky refresh patch two weeks ago https://github.com/jupyterlite/xeus/pull/236. Unless someone patched JupyterLab/JupyterLite in the past two weeks, this is definitely still required.

I believe this is due to using the JupyterLab spec manager for which refreshSpec is not meant for actually refreshing the launcher, but triggers a tick to eventually request the server for new specs, which is not a thing in JupyterLite? My understanding may be wrong though.

martinRenou avatar Jun 03 '25 07:06 martinRenou

Linking to the related JupyterLite issue: https://github.com/jupyterlite/jupyterlite/issues/663

jtpio avatar Jun 04 '25 06:06 jtpio