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.01k stars 341 forks source link

tests: fix to catch test failure earlier when they really happen #975

Closed consideRatio closed 3 months ago

consideRatio commented 3 months ago

Just something observed when trying to resolve #974, which is fixed by jupyterhub 4.1.5 release and work in #962 by @jrdnbradford.

consideRatio commented 3 months ago

@minrk I've concluded that when we upgrade from 0.2.0, the user environment will be old in general, and our tests with jupyterhub 4.1+ fails when hubtraf tries to start a kernel with a request to /user/someuser/api/kernels and passing headers that include X-XSRFToken thanks to earlier starting the server.

The version in the user env for server components are notebook==6.5.6 and jupyter_server==1.24.0, which are the latest notebook 6 and jupyter_server 1 versions - is this failure expected?

minrk commented 3 months ago

Not expected, but since hubtraf is emulating a browser, it might not be doing everything browsers do (in particular, the valid XSRF token changes over time, and it may be caching an old value). Does it only happen with the oldest versions, not newer ones?

Having a look now.

minrk commented 3 months ago

Found it: https://github.com/jupyterhub/jupyterhub/pull/4771

I can make 4.1.5

consideRatio commented 3 months ago

Wieeeee nice @minrk!!

minrk commented 3 months ago

testing here with the 4.x branch, then I'll release 4.1.5: https://github.com/jupyterhub/jupyterhub/pull/4773

consideRatio commented 3 months ago

Unrelated other failure - success i think!

consideRatio commented 3 months ago

The previously broken 0.2.0 upgrade tests is no longer broken - thank you @minrk!!