jupyterhub / batchspawner

Custom Spawner for Jupyterhub to start servers in batch scheduled systems
BSD 3-Clause "New" or "Revised" License
190 stars 134 forks source link

Notebook does not start when using wrapspawner and batchspawner #223

Closed basvandervlies closed 2 years ago

basvandervlies commented 3 years ago

See https://github.com/jupyterhub/batchspawner/issues/203. The original author is Jared Baker (@jbaksta)

welcome[bot] commented 3 years ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

stevenstetzler commented 3 years ago

I've run into this issue as well and this is my solution:

Replace

data = self.get_json_body()
for key, value in data.items():
    if hasattr(spawner, key):
        setattr(spawner, key, value)

with

data = self.get_json_body()
for key, value in data.items():
    if hasattr(spawner, "child_spawner"):
        if hasattr(spawner.child_spawner, key):
            setattr(spawner.child_spawner, key, value)
    if hasattr(spawner, key):
        setattr(spawner, key, value)

to propagate updates of properties down to the child_spawner.

phpfs commented 3 years ago

Hi there,

we are also facing this issue and the fix seems to work. Can we get it merged soon pls? :)

Thanks!

mbmilligan commented 2 years ago

We believe this has been resolved by jupyterhub/wrapspawner#51 which is included in the most recent Wrapspawner release.