ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
200 stars 38 forks source link

Dashboard is using wrong image #63

Closed stefanmeisner closed 3 years ago

stefanmeisner commented 3 years ago

Describe the bug If I insert ideonate/containds-allr-datascience:0.5.6 as second option in my singleuser.profile list, my dashboard will be launched with the wrong image. To Reproduce hub.config.image.name=ideonate/cdsdashboards-jupyter-k8s-hub hub.config.image.tag="0.11.1-0.5.6"

singleuser.profileList:

Screenshots

Configuration Zero to JupyterHub, helm chart jupyterhub/jupyterhub version 0.11.1-n349.he14d686f

danlester commented 3 years ago

Thanks for the issue.

By default the dashboard will be launched using the default profile, so that's what's happening I think. It's not the "wrong image" really - just the image of the first profile.

For easier access to dashboards, I would recommend setting the dashboard profile to the default (default: true I think...). That makes it easier because then no one needs to choose a profile to launch a dashboard.

Or even better if you can just use one profile completely of course, so JupyterLab and dashboards use the same issue.

Anyway, to actually solve the problem and allow you to manually pick a profile when you launch a dashboard, see here:

https://cdsdashboards.readthedocs.io/en/stable/chapters/customization/huboptions.html#spawner-user-options-form

You need to set a config value to prompt the dashboard owner to select a profile when they first launch the dashboard. The downside is that if the dashboard server is not running, only the dashboard owner can start it.

I hope this gives you some ideas anyway - please let me know if the config option works for you!

stefanmeisner commented 3 years ago

Thanks for your quick reply However the suggestions seems a little problematic, since it means that we can only have one image with this very nice feature installed. We are going to host a solution that will be used by users with different requirements to their docker image. As I understand your suggested solution, we will have to force all users that wants to use cds dashboards to use the same docker image. It would be so nice if the dashboard used the same image the user was running when created it, eventually just as a default, that could be overridden in the settings of the dashboard :)

danlester commented 3 years ago

Well, you might be perfectly happy with the solution to set the config value:

c.CDSDashboardsConfig.spawn_default_options = False

This means the dashboard creator can choose the profile when they first launch the dashboard.

As I said, the only problem is if they stop their server - only they can start their own dashboard, but this is fine if you generally keep them running.

Your suggestions are useful but there may be a lot of config in the profile, not just image, some of which the dashboard creator wants to change.

I think the config solution would be even better if it just remembered that profile chosen the first time the dashboard was run.

Please do try out the config change and see what you think.

MarcSkovMadsen commented 3 years ago

Listining in on the discussion @danlester . It's been a while. I'm working together with @stefanmeisner and we would like to try out cdsdashboards to enable users to easily serve their dashboards and small apps. 👍

danlester commented 3 years ago

Hi @MarcSkovMadsen - that's great! I also have some related ideas on methods for longer-term deployment.

Would be a great to have a call with the three of us when you've had a chance to take a look - send me an email when ready :)