rook
August 1, 2023, 9:06pm
1
Using zero-to-k8s when I upgrade notebook to 7.0.0 (from 6.5.5) logins are directed to /tree rather than /lab
Additonally
singleuser:
defaultUrl: ...
Described in Customizing User Environment — Zero to JupyterHub with Kubernetes documentation seems to lose its effect. defaultUrl
does seem to work with notebook 6.5.5
Upgrade helm chart by vivian-rook · Pull Request #317 · toolforge/paws · GitHub has the changes I’m making where I’m seeing this if I bump up the notebook version.
I didn’t see anything in the notebook changelog suggesting a breaking change of this type. What am I missing? I would like logins to continue to be directed to /lab
Thank you!
manics
August 1, 2023, 9:51pm
2
There’s an issue on the notebook repo:
opened 06:51PM - 27 Jun 23 UTC
bug
## Description
basic environment: jupyterhub 4.0.1/jupyterlab 4.0.2/jupyter-no… tebook 7.0.0rc2
i followed the [z2h instructions to set the default environment to jupyterlab](https://z2jh.jupyter.org/en/stable/jupyterhub/customizing/user-environment.html#use-jupyterlab-by-default).
here is that relevant bit in our config: https://github.com/berkeley-dsep-infra/datahub/blob/staging/deployments/data100-jl4/config/common.yaml#L23
when logging in, however, all users are by default sent to `tree`:
<img width="305" alt="image" src="https://github.com/jupyter/notebook/assets/1606572/e44efc09-42ea-41d3-a673-b42e634e4333">
you can only access lab via the drop down menu:
<img width="307" alt="image" src="https://github.com/jupyter/notebook/assets/1606572/7f9a739a-fb8f-4e18-875b-bbad346b0b4c">
checking the logs (` kubectl -n data100-jl4-staging logs -f jupyter-sknapp`), i see that `defaultUrl` is being correctly passed to the container at startup:
```
[I 2023-06-27 18:12:47.820 JupyterHubSingleUser] Starting jupyterhub single-user server extension version 4.0.1
[I 2023-06-27 18:12:47.820 JupyterHubSingleUser] Using default url from environment $JUPYTERHUB_DEFAULT_URL: /lab
[I 2023-06-27 18:12:47.823 ServerApp] jupyterhub | extension was successfully linked.
```
and when the server is ready, it reports back that it's using `/lab` as the default -- but at the end of this snippet i'm redirected to `/tree` instead:
```
[I 2023-06-27 18:12:48.031 ServerApp] Serving notebooks from local directory: /home/jovyan
[I 2023-06-27 18:12:48.032 ServerApp] Jupyter Server 2.6.0 is running at:
[I 2023-06-27 18:12:48.032 ServerApp] http://jupyter-sknapp:8888/user/sknapp/lab?token=...
[I 2023-06-27 18:12:48.032 ServerApp] http://127.0.0.1:8888/user/sknapp/lab?token=...
[I 2023-06-27 18:12:48.032 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
<snip one useless line of output>
[I 2023-06-27 18:12:49.921 ServerApp] 302 GET /user/sknapp/oauth_callback?code=[secret]&state=[secret] -> /user/sknapp/ (@10.0.0.43) 43.15ms
[I 2023-06-27 18:12:49.972 ServerApp] 302 GET /user/sknapp/ -> /user/sknapp/tree (sknapp@10.0.0.43) 1.54ms
[I 2023-06-27 18:12:50.035 ServerApp] 200 GET /user/sknapp/tree (sknapp@10.0.0.43) 12.71ms
```
i believe this is happening as a consequence of this PR: https://github.com/jupyter/notebook/pull/6941/files
## Reproduce
1. install notebook 7.0.0rc1 or 7.0.0rc2, JL 4+, JH4+
2. set your jupyterhub default interface to JupyterLab
3. launch and log in to your container
4. notice you're not in jupyterlab
## Expected behavior
respect `defaultUrl` when set in the jupyterhub deployment config.
## Context
notebook 7.0.0rc1 or 7.0.0rc2, JL 4+, JH4+
here's our image config: https://github.com/berkeley-dsep-infra/datahub/blob/staging/deployments/data100-jl4/image/environment.yml
1 Like
jtp
August 2, 2023, 7:38am
3
3 Likes
rook
August 2, 2023, 10:41am
4
Ah very good! Thank yinz!
jtp
August 4, 2023, 6:59am
5
FYI a new 7.0.2
release of notebook
is available and should fix the redirect issue: Release v7.0.2 · jupyter/notebook · GitHub
2 Likes