I’m working on a custom spawner for JupyterHub based on SSH connections - this can mean that the initialization and startup is a little slow while the remote session connects, runs all of the login scripts etc. Because of this, I’d like to use the progress reporting introduced in JuyterHub 0.9 to show users what’s actually going on.
I’ve tried a lot of things to get this working, but to no avail. I’ve checked other spawners and how they do it, and I’ve tried going through the jupyterhub code too but to no avail, I just can’t work out what I need to do to get it to start and then update while the remote server is starting.
The spawner code can be found here: GitHub - VIB-CBD/SSHSpawner - Most of the progress code is local, but a description follows. It’s pretty specific to our environment, but I’m sure there’s also more than a couple of weird bits in it, so any other feedback is always welcome.
Currently what happens is, once a user selects a remote server and hits the “Start” button, a small loading wheel shows, as far as I can tell, right up until the
start() function actually returns the
(ip, port) tuple. Once that’s returned, then the progress bar shows up, but by that time everything, including the long running parts are done so no useful feedback is given to the user. From other spawners, such as the batchspawner from JupyterHub, it seems like there should be the ability to have this progress updated during the
start() function: batchspawner/batchspawner.py at 1decdf259a25c8e33e90de7a5817da11a92c0326 · jupyterhub/batchspawner · GitHub
If anyone can point me in the direction of getting this working, it’d be greatly appreciated.