Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Panel preview is blank #2722

Open
pavithraes opened this issue Sep 17, 2024 · 13 comments
Open

[BUG] - Panel preview is blank #2722

pavithraes opened this issue Sep 17, 2024 · 13 comments
Labels
needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working

Comments

@pavithraes
Copy link
Member

pavithraes commented Sep 17, 2024

Describe the bug

The Panel preview in JupyterLab does not display plots and widgets.

It was recently worked on in #2580. The template elements seem to render, but the widgets and plots in the main and sidebar are not displayed. In a layout without a template, the preview is blank.

Screenshot 2024-09-17 at 12 43 45 PM

Expected behavior

All elements of the Panel dashboard should be rendered in the preview.

OS and architecture in which you are running Nebari

GCP (demo.nebari.dev)

How to Reproduce the problem?

Use the env & code in https://jhub-apps.nebari.dev/docs/create-apps/panel-app, with the specific versions mentioned below

Command output

No response

Versions and dependencies used.

Panel - 1.5.0
Bokeh - 3.5.2

Compute environment

GCP

Integrations

No response

Anything else?

No response

@pavithraes pavithraes added type: bug 🐛 Something isn't working needs: triage 🚦 Someone needs to have a look at this issue and triage needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug and removed needs: triage 🚦 Someone needs to have a look at this issue and triage labels Sep 17, 2024
@pavithraes
Copy link
Member Author

@krassowski - Do you have thoughts on what might be happening here?

@krassowski
Copy link
Member

@pavithraes, yes:

Since there was not even a pre-release of the new nebari yet, this would not work unless you are running manually built dockere images of the main branch of nebari-docker-images repo.

@krassowski
Copy link
Member

So I think this is a duplicate of #2580. The fix requires the dependencies on both sides (client conda environment AND the base docker image) to be updated; if you updated the dependencies in your environment only you would get a partial fix as described in your issue, so I think this is likely what happened, but let me know if you were running of the latest docker image from main :)

@pavithraes
Copy link
Member Author

pavithraes commented Sep 17, 2024

I thought @marcelovilla updated the demo.nebari.dev instance to use docker images from the main, i.e., including your PR. I'll let him chime in and then close if this issue is a duplicate. :)

@krassowski
Copy link
Member

If I can get an account on that instance I can investigate :)

@krassowski
Copy link
Member

The default environment has an old version of bokeh (but the correct version of pyviz-comms):

image

We need bokeh >=3.5.2 as specified in nebari-dev/nebari-docker-images#178. Also, the panel version is older in the image than what you have in your environment (but I think that should not matter).

@pavithraes
Copy link
Member Author

Thanks for investigating!

@krassowski
Copy link
Member

krassowski commented Sep 17, 2024

@marcelovilla double checked that the image is right. It appears that this is an issue with the image.

In logs I see that it gets installed correctly from conda:

#27 41.77   + bokeh                                   3.5.2  pyhd8ed1ab_0         conda-forge/noarch         5MB

but then overwritten with pip install of jhub-apps

#27 160.7 Collecting bokeh (from jhub-apps==2024.8.1->-r /opt/jupyterlab/condaenv.xipmi690.requirements.txt (line 4))
#27 160.7   Downloading bokeh-3.4.3-py3-none-any.whl.metadata (12 kB)

which directly related to:

Since there is no pin for bokeh in jhub-apps pyproject.toml file (but it is listed as a dependency) we suspect it might be an indirect dependency causing pip solver to use an older version.

As discussed also with @aktech and @viniciusdc adding a second pin in the pip section might solve it (or break the install if pip solver gets unhappy).

@krassowski
Copy link
Member

krassowski commented Sep 17, 2024

It looks like the fix is to simply rebuild the image. The only pin that I see is in panel which requires:

Because panel gets installed in pip group as a dependency of jhub-aps and because panel 1.5.0 was only released yesterday, the bokeh version was overwritten in the old builds. If someone is going to cut an RC version of images it would likely "fix itself".

That said, we need to solve nebari-dev/nebari-docker-images#173 which I think needs to be done by publishing jhub-apps to conda-forge (and adding pip check otherwise). Thoughts?

@marcelovilla
Copy link
Member

Thanks for looking into this @krassowski! I cut an RC of the docker images and updated the demo deployment with them. I'm on board with publishing jhub-apps to conda-forge and adding pip check to our GHA workflows.

@pavithraes can you let me know if it works now? Looking through the logs, it seems the correct bokeh version gets installed by conda and then pip does not try to install it as the requirement is satisfied.

@krassowski
Copy link
Member

For what's it worth, it looks good to me now:

image

I used the reproducer from @kcpevey's post here: https://discourse.holoviz.org/t/widget-updates-appear-blocked-by-python-until-process-in-complete-in-deployed-app/7103

@krassowski
Copy link
Member

Refresh button does not work though. Closing and reopening the preview works.

@marcelovilla
Copy link
Member

@pavithraes can we close this issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working
Projects
Status: New 🚦
Development

No branches or pull requests

3 participants