Closed mahendrapaipuri closed 8 months ago
@minrk are you able to help review this?
Note that batchspawner is in main branch currently requires jupyterhub 1.5.1+, up from the latest release that required jupyterhub 0.9+.
Updated the handling a tiny bit. JUPYTERHUB_SERVICE_URL is added in JupyterHub 2.0, so it's only 1.5.1 that needs the --port
Congrats on your first merged pull request in this project! :tada: Thank you for contributing, we are very proud of you! :heart:
jupyterhub-singleuser
is a subclass ofExtensionApp
and after a brief discussion with @minrk at JupyterCon, he told me that the new implementation ofjupyterhub-singleuser
does not expect any CLI args. If we usebatchspawner
with JupyterHub 4, we end up getting an error as follows:The
JUPYTERHUB_SERVICE_URL
env var is set tohttp(s)://0.0.0.0:0/user/<user>/servers/<server>
at the spawn time inbatchspawner
and due to this code here, depending on the HTTP scheme, the server will be either launched on 80/443 ports.This PR replaces the port in
JUPYTERHUB_SERVICE_URL
with free port that we find and updates the env var. Consequently, CLI arg--port
is removed as it is not used anymore.