nebari-dev/jupyterlab-launchpad

Deleted Conda-Store environments showing up in kernel selector

Opened this issue · 3 comments

Context

It looks like the launchpad kernel selector is picking up environments that have been deleted via conda-store. In the screenshot, below the environments named "mytest*" have been deleted and should no longer be available to select.

image

Exploring a bit further, This may be an issue in nebari/conda-store not cleaning up old environments on disk when deleted in conda-store. Will file an issue on those repos.

Value and/or benefit

deleted environments showing up cause confusion.

Anything else?

No response

I would guess that the issue is not in this extension nor in nebari/conda-store. This may be due to the caching in nb_conda_kernels. I also experienced a similar frustration when creating a new environment and waiting for a long time for it to show up.

The cache in nb_conda_kernels is hard-coded to 1 minute and implemented here. Did the mytest* environments go away now?

If ii is still remains, the bug could be in the nb_conda_kernels in the logic for removal of environments here but I do not see anything wrong at a first glance.

We could add an environment list-based rather than time-base cache upstream to solve this. Listing all environments should be relatively cheap, or at least I hope it is.

upstream issue: nebari-dev/nebari#2608

I deleted those environments over a month ago. They can also be see running conda env list from the terminal so I think this is not a kernel-spec issue but that they are not being deleted from disk when deleted in the conda-store UI.