-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add a FAQ entry for 'nbgitpuller link selecting profile options' #322
Conversation
This gets asked a *lot*, and it would be useful to have a central place to point people to!
for more information, see https://pre-commit.ci
Co-authored-by: Sarah Gibson <[email protected]>
The general case to discuss is when I think there are separate things to consider:
Practical direct spawn test via linkSince I think its possible to have jupyterhub directly start a server if needed based on provided choices in a link, I'll trial to mimic this POST request in a hub with an options_form based on To craft a link with query parameters, I first inspect the equivalent form submission to start a server via chrome's inspector's network section. The form looked like this: The POST requests's body looked like this: Knowing that kubespawner in its main branch (used when testing, with jupyterhub/kubespawner#774) accepts being passed only some choices and letting the others be set to the defaults, I tested the following spawn link. https://my-hub.example.com/hub/spawn?profile=small and it worked out to start a server, and clicking it again took me to a started, where changing the profile=small to profile=medium would have no effect once the server was started via the first link-click. Okay, so how can we combine this with a nbgitpuller link? Can I make a link like this be combined with a "start profile=small" choice? Yes, this works by combining the spawn server link ConclusionWe can craft links to "auto-launch if server is started or use the existing server and then git pull", but generating such links require information about the configured Nbgitpuller link generator enhancement proposalIf the link generator is to support this, I think we should make it Spawner agnostic and |
Thanks @consideRatio. The primary problem here is the case (2) outlined in the PR - what happens when there is already a server running, but it was started with a different profile and options? Also, what do you think is the path forward for this particular PR? |
I think we should merge this PR as is for now, and make Erik's comment a new issue for further discussion and planning around completing the required work, including the question around "what if a server is already running". This docs section can be updated when those changes are rolled out. |
docs/faq.md
Outdated
embedded in the nbgitpuller link, so this (often confusing) choice is made | ||
for your students? | ||
|
||
While it would indeed be very nice, this is not currently possible for two |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was inaccurate, but wasn't sure - that promoted the investigation.
I'd like this to be either closed pending work outlined in 2i2c-org/infrastructure#3096, or updated so it doesnt claim its not possible. The claim could instead be that its currently undocumented how to make a launch link specifying user options practically, and that currently with jh 4.0.2 at least, such links would not restart or error etc if a server was already running with either the same or different server options, but instead quickly proceed to the user server and the git pulling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@consideRatio I've updated it to say 'not easy', and then also stated that this would have to be configured at the JupyterHub level, rather than at nbgitpuller level. What do you think now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating on this Yuvi!!
Thanks @consideRatio and @sgibson91! |
This gets asked a lot, and it would be useful to have a central place to point people to!