-
Notifications
You must be signed in to change notification settings - Fork 66
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
Misc updates on testing hub server spawing of binderhubs and documentation #4263
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
user_options={ | ||
"token": service_api_token, | ||
"image": "quay.io/2i2c-projectpythia/binderhub-ui-binder-2dexamples-2drequirements-55ab5c:50533eb470ee6c24e872043d30b2fee463d6943f", |
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.
This should be special-cased for hubs not requiring authentication because of where the Spawner expects to find the token:
infrastructure/helm-charts/basehub/values.yaml
Lines 901 to 910 in 6214ce1
if self.auth_enabled: | |
args = super().get_args() | |
else: | |
args = [ | |
"--ip=0.0.0.0", | |
f"--port={self.port}", | |
f"--NotebookApp.base_url={self.server.base_url}", | |
f"--NotebookApp.token={self.user_options['token']}", | |
"--NotebookApp.trust_xheaders=True", | |
] |
cmd: | ||
- python3 | ||
- "-c" | ||
- | | ||
import os | ||
import sys | ||
|
||
try: | ||
import jupyterlab | ||
import jupyterlab.labapp | ||
major = int(jupyterlab.__version__.split(".", 1)[0]) | ||
except Exception as e: | ||
print("Failed to import jupyterlab: {e}", file=sys.stderr) | ||
have_lab = False | ||
else: | ||
have_lab = major >= 3 | ||
|
||
if have_lab: | ||
# technically, we could accept another jupyter-server-based frontend | ||
print("Launching jupyter-lab", file=sys.stderr) | ||
exe = "jupyter-lab" | ||
else: | ||
print("jupyter-lab not found, launching jupyter-notebook", file=sys.stderr) | ||
exe = "jupyter-notebook" | ||
|
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.
This is what binderhub does too. Otherwise, in images that don't have jupyter-lab installed, spawning a server will fail
Based on @yuvipanda's feedback in #4167 I've updated this PR to:
|
🎉🎉🎉🎉 Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/9612884778 |
Fixes #4167
This is currently failing for unauthenticated binderhubs because of some issue with the token being passed to
/user/api/kernelspecs
or dropped. Seeing this in the notebook logs:But in that get request, the token should be passed because it's done under the same session here
https://github.com/Quansight/jhub-client/blob/860dff7365bdccc5208724390529b00b8198ccef/jhub_client/api.py#L226
Which gets called by https://github.com/Quansight/jhub-client/blob/860dff7365bdccc5208724390529b00b8198ccef/jhub_client/execute.py#L87
so not sure what's that about.
Can it be because of aio-libs/aiohttp#5783? I do see a 302 in the logs