Hi everyone,
I’ve got a question that is more about trying to understand what’s happening instead of asking for support. I have a JupyterHub deployment on K8 using the helm chart (with a significant number of my own modifications), and I’ve been fighting to allow users to delete non-empty directories for a while (it is related to a few long standing github issues, but if you want to go down the rabbit trail you can start here or here). Last year with my annual academic cycle deployment, I ended up just patching the filemanager.py
file from the notebook app to allow for deleting non-empty directories, but it is a bit of a kludge to manually patch the file.
This year, when I was creating my single user docker container, I realized that my old patch didn’t work when running Jupyter Lab locally due to JupyterLab 3.0 having switched to jupyter_server as the notebook backend instead of the notebook app. Moreover, I discovered that jupyter_server had two configurables that when set allowed deleting directories (--FileContentsManager.always_delete_dir=True --FileContentsManager.delete_to_trash=False
)!
However, when I then set up my JupyterHub k8 deployment with my new single user docker image, those configurables didn’t work, and I had to revert to patching filemanager.py for the notebook app, not jupyter_server.
So, that was the long winded way to get to my real question: Why doesn’t JupyterLab when launched from JupyterHub use the jupyter_server backend and instead uses the notebook app backend? I know that when launching the single user server the “jupyterhub-singleuser” command is ultimately used to launch the server (and the default url needs to be set to “/lab” in order to actually use the Jupyter Lab interface), and it seems that this command makes JupyterLab use the notebook app backend instead of the jupyter_server backend (which is the official backend for JupyterLab 3.*).
So, why does jupyterhub-singleuser work this way? I can find no explanation, and I’m having a really hard time tracking down what exactly that command calls even. I don’t know if this is expected behavior, so I haven’t opened an issue with the JupyterHub repo yet, but if this is not intended behavior, I’m happy to do so. It does seem, since JupyterLab is moving to jupyter_server and (I think) there are plans to sunset the notebook app, at some point JupyterHub will need to also use the jupyter_server backend.
I’d appreciate any insight anyone has on this!