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

Create link between WrapSpawner and its child spawner traitlets #27

Merged
merged 1 commit into from
Jun 18, 2019

Conversation

cmd-ntrf
Copy link
Contributor

This PR addresses issues #24, #25 and #26.

It uses traitlets.directional_link[1] to make any change done on WrapSpawner's traitlets also done on the child spawner's traitlets for the traitlets that both classes share.

#25 - current_port is not an attribute of WrapSpawner, but I will also submit a patch for BatchSpawner that remove that traitlet in favor of only using port.

[1] https://traitlets.readthedocs.io/en/stable/utils.html#traitlets.directional_link

@mbmilligan
Copy link
Member

@cmd-ntrf or @rkdarst - since we don't have automated testing for Wrapspawner, what I would like to see is confirmation that this works with: a) both Jupyterhub 0.9 and 1.0, and b) with a couple of different spawners, not just Batchspawner.

Basically, I am nervous about the blanket forwarding of like-named traits - that's something I had specifically avoided doing previously. But if this works for those basic cases, I'm happy to accept it and we'll fix any breakage that comes along later.

@rkdarst
Copy link
Contributor

rkdarst commented Jun 14, 2019

  • Combined with Singleuserapp and 1.0 batchspawner#143, and jhub==0.9.0, this works
  • combined with batchspawner=master and jhub==0.9.0, does not work. But that combination doesn't work without this PR either, so...

I don't easily have other spawners to test. Does anyone else?

@mbmilligan
Copy link
Member

Felix said he would try to test it with Dockerspawner.

@cmd-ntrf
Copy link
Contributor Author

After testing, JupyterHub 0.9.6 and 1.0 in combination with the proposed PR work for dockerspawner.SystemUserSpawner and jupyterhub.spawner.LocalProcessSpawner.

This is my Terraform setup for test with JupyterHub 1.0 if someone would like to double check:
https://gist.github.com/cmd-ntrf/95f9843a8dad1684b31a2c16e50dbef5

@mbmilligan
Copy link
Member

Excellent, thanks Felix! Merging now.

@mbmilligan mbmilligan merged commit 2d45cb9 into jupyterhub:master Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants