jupyterhub / wrapspawner

Mechanism for runtime configuration of spawners for JupyterHub
BSD 3-Clause "New" or "Revised" License
60 stars 57 forks source link

Fix named servers with `KubeSpawner` #61

Closed Ph0tonic closed 3 months ago

Ph0tonic commented 6 months ago

Named servers is not working with WrapSpawner and KubeSpawner.

In the __init__ of KubeSpawner, the following code is executed to compute the pvc name:

https://github.com/jupyterhub/kubespawner/blob/a4b9b190f0335406c33c6de11b5d1b687842dd89/kubespawner/spawner.py#L195

However, the parameter self.name provided comes from the computed property defined here:

https://github.com/jupyterhub/jupyterhub/blob/cc9d9e435ad1e0aa639afd37120d0d6cca2eca92/jupyterhub/spawner.py#L264

Which relies on orm_spawner which should normally be provided in the constructor:

https://github.com/jupyterhub/jupyterhub/blob/cc9d9e435ad1e0aa639afd37120d0d6cca2eca92/jupyterhub/spawner.py#L160

However, as orm_spawner is not provided in the constructor then the pvc name is not valid. To fix this issue, we need to forward this additional variable in the constructor.

\cc @mbmilligan

Fixes #26

Ph0tonic commented 4 months ago

Hi, just willing to bump this up @mbmilligan 👍

Ph0tonic commented 3 months ago

Hello, any feedback on this issue ? \cc @minrk

minrk commented 3 months ago

Thank you for the patches and patience!