-
Notifications
You must be signed in to change notification settings - Fork 5
Educational JupyterHub considerations for notebook v7 switch #10
Comments
I'm not convinced that this is the responsibility of the frontend to define the prefix of the tool. The versioning as suggested here is actually not proper as versioning is about server API not the frontend (although I would also love the server API to get versioned 😉). And in this particular case the server is the same and the endpoints won't change. However, as mentioned by @williamstein in the notebook meeting, using the base URL to distinguish the frontends and documenting how to use that approach (if it is possible) sounds like a good way forward and JupyterHub is a proxy after all; routing is what it does. The question is probably more should nb v6 and v7 be installed in the same environment. The current answer is no and we should consider providing both similarly as providing RStudio next to JupyterLab. |
Thanks @yuvipanda for raising this and the detailed write-up 👍 And for promoting RetroLab / Notebook v7 to be adopted for Data 8, this is really exciting 🎉 As mentioned above, prefixing the frontend endpoints with
The URLs will not break because Notebook v7 is taking the same endpoints as Notebook v6. The nbgitpuller links will just redirect to the new interface (via We also need to clarify what the proposal of having
Because
Right, but continuing to provide the classic v6 UI could give the wrong message that we are still maintaining it, which hasn't been the case for many years since the original plan was to even sunset |
Thanks for the responses, @fcollonval and @jtpio. I really appreciate all the work you and others are doing on this. Just to answer one specific question,
This is only about the v6 frontend, and doesn't require any other API endpoints. I agree with you that this would mostly entail moving the assets to nbclassic (or another package - @Zsailer had some more specific ideas here). I think there are two primary issues here:
(2) seems to be a bit more contentious than (1). |
Ah, apologies for using an unclear version of 'break'. Instead, let's say they might end up with a different UI than what they selected in nbgitpuller.link: Note that the option there explicitly says Classic Jupyter Notebook, rather than just Jupyter Notebook. There are many layers this problem can be solved - including by 'fixing' this in nbgitpuller itself. I'll think about this for another day or two. But it does fundamentally require that both the classic notebook UI and the new notebook UI are available on the same server, under different URLs. |
Trying to draw diagrams to describe the scenarii - don't hesitate to edit to correct them
flowchart TD
JupyterLab --> Server[Jupyter Server]
RetroLab --> Server
Notebook[Notebook v6] --> Server
flowchart TD
JupyterLab --> Server[Jupyter Server]
RetroLab[Notebook v7] --> Server
Notebook[Notebook v6] --> Server
flowchart TD
JupyterLab --> Server[Jupyter Server]
RetroLab[Notebook v7] --> Server
Notebook[Notebook v6] --> Server2[another Jupyter Server]
One important issue with scenario B is linked to future developments. If we want to break the Jupyter server API, we will either:
|
Maybe we should also consider dropping the "Classic Jupyter Notebook" from the nbgitpuller. And instead have the following entries:
As a side effect, there will be no difference for those who have pinned on |
@fcollonval aha, so your fundamental concern is that we don't want to constrain the server endpoints to continue to be compatible with classic notebook UI. That if the classic notebook UI is still talking to the same jupyter-server endpoints as the new UI, there will need to be fixes to the classic notebook UI if something breaks. Is that an accurate summary of the primary concern? I agree that's definitely not long term sustainable, and not something I want us to do at all. |
@fcollonval to expand on scenario C, it'd look more like this flowchart TD
JupyterLab --> Server[Jupyter Server]
RetroLab[Notebook v7] --> Server
jsp[jupyter-server-proxy] --> Server
notebookv6[Notebook API Server] --> jsp
notebookv6UI[Classic Notebook UI] --> notebookv6
The most important difference from your scenario B (which was what I was advocating for!) is that classic notebook will not be talking to the primary jupyter-server, but to a different server process that doesn't receive guarantees of maintenance. Does that sound right? |
By invoking jupyter-server-proxy, I think your scenario B+C may work today with the right configuration - you need to tell the subprocess notebook server about its new prefix, but notebook already works fine on any URL prefix. If this is the right way to go, it's extensible to any combination of versions. Installation might be the hardest part, since the 'classic' server will eventually need to be in its own env to avoid conflicts on jupyter-client/other dependency versions. Might need to be careful about getting auth right (jupyter-server will enforce the hub auth, notebook should only require requests from jupyter-server rather than redoing hub auth or its own token auth). But this should mostly be a matter of getting the right config/env. I'm sure we can make that smoother after we show what is needed to make it work with what we have now. |
Me and @ian-r-rose actually did pretty much exactly this in jupyterlab/jupyterlab#5952, for the jupyterlab dev mode setup on binder. The latest released version of jupyterlab + jupyter-server starts up, but then we use jupyter-server-proxy to run another jupyter-server instance from the current master of jupyterlab in dev mode, so new changes can be tested out. It works fairly well, with the primary problem being one of confusion around serverextensions and nbextensions - since they share config, the serverextensions are loaded by both I think. But mostly alright. |
We discussed this during the JupyterHub team call today. I think the primary goal here is to make sure that JupyterHub admins are prepared for the notebook v7 release, and know what their options are. We want to avoid frustration on their part, as well as preempt any negativity that might get thrown towards the notebook team. @choldgraf just opened jupyterhub/team-compass#498 to track and discuss what would be needed from a JupyterHub perspective. |
Here's a proposal for discussion to achieve a balance of encouraging forward progress while giving people a less-stark transition opportunity. We can create a new, separate Here is a list of practical steps and outcomes:
It has the added advantage that we can transfer issues targeted at the classic Notebook UI from of the To help visualize all the moving parts/packages necessary, here is my attempt at drawing a new technical diagram with all the moving parts. graph TD
subgraph Classic Notebook UIs
nbclassic
notebook.v6
end
subgraph JupyterLab-based Notebook UIs
notebook.v7
jupyterlab
end
subgraph REST API servers
jupyter_server
notebook-api-server
end
notebook.v7 --> jupyter_server;
jupyterlab --> jupyter_server;
nbclassic --> jupyter_server;
nbclassic --> classic-notebook-ui;
notebook.v6 --> classic-notebook-ui;
notebook.v6 --> notebook-api-server;
(For the sake of clarity, I didn't include In the diagram above, we run the risk that classic-Notebook UI falls behind Jupyter Server development (mentioned by @fcollonval), but that's on the shoulders for |
The downside of this approach is that we'd likely need to create a bunch of mostly empty python submodules in the For example, we'd have to do something like: # notebook/services/contents/manager
from jupyter_server.services.contents.manager import * for every module in notebook. This would become really painful over time... |
Back in the old days of The Big Split, we used import shims (ipython/ipython#8186) to help manage the maintenance of shims as implementations moved between packages. |
Thanks a lot @Zsailer for the detailed explanation and diagram and @yuvipanda for highlighting a similar setup for jlab dev on Binder. I'm 👍 on Zach proposal. |
Just want to say thanks everybody for your brainstorming and thoughtful considerations here. I want to re-iterate one other point, that seems relevant to comments like "this will be painful over time to maintain". I think we are all in agreement here that "simultaneously use notebook v6 and v7 on the same environment" is not the long-term goal. I see this as a mechanism for speeding up the transition of many communities to v7 by reducing the perceived risk of using v7 for these communities, even though we temporarily give ourselves more maintenance burden. In my opinion, we should consider putting a clear message in the "shim repository / project" that it is not a long-term solution, we make no long-term promises about maintaining it, and consider putting a date where we'll actively stop maintaining the project in the future (with the implication that communities should have migrated to notebook v7 by then). |
I like @Zsailer proposal as well! Even when the latest @yuvipanda proposal (the Binder one) is super interesting, I feel it is too complex for the average user/admin and I foresee them getting pretty confused about the underlying model. |
This has just been discussed at today classic notebook meeting, and the outcome is summarised on https://hackmd.io/gl6x_SL0S_aYVn0Y0lSBpQ (see section |
@yuvipanda just checking if you had the opportunity to try the latest versions of JupyterLab 4, NBClassic 1 and Notebook 7 and see if they address the concerns raised in this issue? Thanks! |
Looks like this issue can be closed now that Notebook 7 final is released: https://github.com/jupyter/notebook/releases/tag/v7.0.0 There is also a migration guide in the documentation for running the classic notebook UI alongside Notebook 7 via Please open new issues here on the team compass repo or on the notebook repo if there are remaining items to be addressed. Thanks! |
Very excited about the upcoming notebook v7! With help from @jtpio, we (Berkeley) already moved a 1500 beginner data8 class to retrolab (berkeley-dsep-infra/datahub#2422) and it has gone super well!
One of the most important considerations from instructors when we were pitching them the switch is that there was always an option to switch back to the classic notebook whenever they encounter issues. This actually led me to working on jupyterlab/retrolab#158, and getting that in before the semester started was very important in convincing instructors to switch. The pitch was - we are changing the default, but the older one is still available. I think everyone enjoyed retrolab, but it definitely took some time to move.
The other important aspect here is that a single JupyterHub often serves many different classes, 20-30, and they often have different UI needs. In our primary hub, we offer classic notebook, jupyterlab, RStudio and retrolab. The nbgitpuller link generator is used by instructors to pick which UI they want their students to launch into. All UIs are fairly heavily in use, and we've been slowly moving people away from classic notebook to jupyterlab or retrolab.
What I'd love to do with the notebook v7 transition is:
As a JupyterHub admin, I expect to have to put in a bunch of work to make this happen - notebook v7 is after all a big breaking change!
Here's what I'd love for how this works.
This has a few advantages:
This is an exciting transition, and I'm very grateful for all the folks who have put in a lot of emotional and technical work into making this happen. Feels like we're on the home stretch, and this will hopefully help make the transition easier for everyone.
Thanks a lot to @Zsailer and @jtpio for conversations around this.
The text was updated successfully, but these errors were encountered: