jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.04k stars 341 forks source link

Visual feedback that the hub restarted #112

Closed betatim closed 3 years ago

betatim commented 6 years ago

Right now when restarting the hub there is almost now feedback on whether that worked or not. In particular if you are running the restart command from a web terminal in your single-user server.

Having some kind of feedback that "jupp this thing restarted and loaded your newly modified configuration" would be good. Mostly as a way to reassure users. Even better would be if there was some validation of the configuration before restarting and a corresponding error message. In particular checking for yaml keys that aren't recognised as they are potential typos.

yuvipanda commented 6 years ago

I think I was partially (and unconsciously) following the ol' school unix setup of 'if everything went ok, output nothing'. I think that's the wrong thing here, so we should fix that.

JSON Schema validation! <3

betatim commented 6 years ago

I think "output nothing on success" would work if we tell the user that 100% guaranteed there will be a message you can not miss if something went wrong. In my case I had a typo in the config, got no feedback from restarting, and did not observe my attempted reconfiguration taking effect. Which made me wonder "config wrong or mistake restarting or need to restart more??"

consideRatio commented 3 years ago

I created an issue for implementing JSONSchema validation of our config as it is a relevant separate task in https://github.com/jupyterhub/the-littlest-jupyterhub/issues/725.

Is it correct that this regards tljh-config reload [hub|proxy], and making sure it doesn't fail without an error is emitted or indicating success on completion?

I think to indicate success, is the same as to ensure we have no errors. So in my mind, the gist of this issue is to validate the outcome of the reload command, or, to clarify that the reload command just did a restart without checking for if it succeeded or not.

The current tljh-config reload logic is defined here.

https://github.com/jupyterhub/the-littlest-jupyterhub/blob/26811a8e8cbb53776eb8cdeee75c89a68a8bc5bb/tljh/config.py#L257-L279

Aha! It seems like this is already resolved. I'll go for a close on this issue!