Skip to content

Fix Prefect, Data Contract Editor and VS Code launcher on JupyterHub - #165

Merged
tmetzl merged 3 commits into
devfrom
fix/prefect-inside-hub
Nov 17, 2026
Merged

tmetzl merged 3 commits into
devfrom
fix/prefect-inside-hub

Conversation

@tmetzl

@tmetzl tmetzl commented Nov 17, 2026

Copy link
Copy Markdown
Member

Fix Prefect, Data Contract Editor and VS Code launcher on JupyterHub

Fixes for tools that worked locally but broke when running behind JupyterHub.

Changes

  • prefect-notebook / start-prefect: Prefect copies its UI into a writable
    directory at startup. Set PREFECT_UI_STATIC_DIRECTORY to /tmp/prefect-ui,
    because the default directory in site-packages isn't writable for the notebook user.
  • prefect-notebook / start-prefect, start-datacontract-editor: Print only the
    proxy path instead of a http://localhost:8888/... URL. The container doesn't know
    the hub's public host, so the old URL was wrong on the hub.
  • datascience-notebook-code: Fix the missing "New → VS Code" entry in nbclassic.
    jupyter-server-proxy's nbextension loaded the menu entries with a plain $.get,
    which sends no X-XSRFToken header. JupyterHub 4.1+ redirects such requests to
    login (302). The Dockerfile now patches the call to nbclassic's utils.ajax, which
    adds the header. The build fails if the patched line changes upstream.

Testing

  • Tested on the hub: "New → VS Code" appears in nbclassic.

@tmetzl tmetzl added bug Something isn't working notebook image labels Nov 17, 2026
@tmetzl
tmetzl merged commit 70f82a8 into dev Nov 17, 2026
48 checks passed
@tmetzl
tmetzl deleted the fix/prefect-inside-hub branch November 17, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working image notebook

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant