voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.42k stars 503 forks source link

Migrating to `jupyter-server` 2, `jupyter_client` 7.x #1308

Closed trungleduc closed 1 year ago

trungleduc commented 1 year ago

This PR is based on https://github.com/voila-dashboards/voila/pull/1283 to make voila works with jupyter_server 2

References

Partially closes https://github.com/voila-dashboards/voila/issues/1304 Closes https://github.com/voila-dashboards/voila/pull/1283

User-facing changes

Users will be redirected to the login page if they are trying to access a token-protected voila app.

voila-server2

Backwards-incompatible changes

python 3.7 is no longer supported. jupyter_client < 7.4.4 is no longer supported.

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a Binder on branch trungleduc/voila/server-2

trungleduc commented 1 year ago

update galata references

trungleduc commented 1 year ago

pre-commit.ci run

trungleduc commented 1 year ago

update galata references

github-actions[bot] commented 1 year ago

Benchmark report

The execution time (in milliseconds) are grouped by test file, test type and browser. For each case, the following values are computed: min <- [1st quartile - median - 3rd quartile] -> max.

Results table | Test file | voila-tree-classic.ipynb | voila-tree-light.ipynb | voila-tree-dark.ipynb | voila-tree-miami.ipynb | basics.ipynb | bqplot.ipynb | dashboard.ipynb | gridspecLayout.ipynb | interactive.ipynb | ipympl.ipynb | mimerenderers.ipynb | bokeh.ipynb | multiple_widgets.ipynb | query-strings.ipynb | reveal.ipynb | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | **Render** | | | | | | | | | | | | | | | | | `chromium` | | | | | | | | | | | | | | | | | actual | 158 <- [182 - 214 - 290] -> 513 | 88 <- [93 - 103 - 121] -> 161 | 75 <- [78 - 86 - 100] -> 117 | 85 <- [90 - 94 - 107] -> 135 | 3078 <- [3110 - 3176 - 3400] -> 5109 | 2717 <- [2757 - 2787 - 2876] -> 3065 | 3141 <- [3144 - 3223 - 3311] -> 3576 | 2903 <- [2919 - 3070 - 3182] -> 3378 | 2352 <- [2384 - 2436 - 2518] -> 2712 | 3866 <- [3979 - 4057 - 4396] -> 4859 | 7023 <- [7050 - 7226 - 7461] -> 7660 | 4091 <- [4162 - 4267 - 4558] -> 4923 | 4551 <- [4553 - 4617 - 4642] -> 4865 | 1956 <- [1959 - 2000 - 2026] -> 2175 | 3491 <- [3580 - 3745 - 4206] -> 5409 | | expected | 3379 <- [3442 - 3517 - 3701] -> 3876 | 2976 <- [3227 - 3321 - 3421] -> 3604 | 3608 <- [3623 - 3709 - 3793] -> 3825 | 4453 <- [4453 - 4523 - 4661] -> 4748 | 2559 <- [2655 - 2656 - 2660] -> 2674 | 3982 <- [4079 - 4213 - 4356] -> 4743 | 12183 <- [18509 - 19553 - 20811] -> 21515 | 15319 <- [15660 - 15796 - 15912] -> 16056 | 1517 <- [1920 - 1997 - 2103] -> 2113 |

:exclamation: Test metadata have changed ```diff --- /dev/fd/63 2023-04-03 10:33:19.864671763 +0000 +++ /dev/fd/62 2023-04-03 10:33:19.868671862 +0000 @@ -4,49 +4,49 @@ "BENCHMARK_REFERENCE": "actual" }, "browsers": { - "chromium": "97.0.4666.0" + "chromium": "94.0.4595.0" }, "systemInformation": { "cpu": { - "brand": "Xeon® Platinum 8171M", + "brand": "Xeon® E5-2673 v3", "cache": { "l1d": 65536, "l1i": 65536, - "l2": 2097152, - "l3": 36700160 + "l2": 524288, + "l3": 31457280 }, "cores": 2, "family": "6", - "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear", + "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear", "governor": "", "manufacturer": "Intel®", - "model": "85", + "model": "63", "physicalCores": 2, "processors": 1, "revision": "", "socket": "", - "speed": 2.6, + "speed": 2.4, "speedMax": null, "speedMin": null, - "stepping": "4", + "stepping": "2", "vendor": "GenuineIntel", "virtualization": false, "voltage": "" }, "mem": { - "total": 7281278976 + "total": 7291699200 }, "osInfo": { "arch": "x64", "build": "", - "codename": "Jammy Jellyfish", + "codename": "Focal Fossa", "codepage": "UTF-8", "distro": "Ubuntu", - "kernel": "5.15.0-1034-azure", + "kernel": "5.8.0-1040-azure", "logofile": "ubuntu", "platform": "linux", - "release": "22.04.2 LTS", - "serial": "83bd42737a0442acb30763087465ae8f", + "release": "20.04.3 LTS", + "serial": "cfc067bfcb844f35865e279a1b0e66c5", "servicepack": "", "uefi": false } ```
jtpio commented 1 year ago

Not sure it's related but the Binder seems to be failing to build:

image

Wanted to double check the switch to Jupyter Server 2 does not cause issues on Binder.

trungleduc commented 1 year ago

Not sure it's related but the Binder seems to be failing to build:

image

Wanted to double check the switch to Jupyter Server 2 does not cause issues on Binder.

It works now

martinRenou commented 1 year ago

🚀 !

martinRenou commented 1 year ago

@trungleduc do you think it would be feasible to backport this to Voila 0.4? Or should this be considered a breaking change?

martinRenou commented 1 year ago

@meeseeksdev please backport to 0.4.x

lumberbot-app[bot] commented 1 year ago

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 0.4.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:

    git cherry-pick -x -m1 e30f6aafacd4cfc7a7d4d3758ca80ecd933ea044
  2. You will likely have some merge/cherry-pick conflict here, fix them and commit:

git commit -am 'Backport PR #1308: Migrating to `jupyter-server` 2, `jupyter_client` 7.x'
  1. Push to a named branch:
git push YOURFORK 0.4.x:auto-backport-of-pr-1308-on-0.4.x
  1. Create a PR against branch 0.4.x, I would have named this PR:

"Backport PR #1308 on branch 0.4.x (Migrating to jupyter-server 2, jupyter_client 7.x)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

trungleduc commented 1 year ago

Since jupyterlab 3.6 can support both jupyter-server 1 and 2 so i think we can do the same for voila.

martinRenou commented 1 year ago

Thanks! I'll give it a try