Skip to content

Restore nbgitpuller, dropped as collateral of the JupyterLab 4 upgrade in #317 - #528

Open
audiodude wants to merge 1 commit into
toolforge:mainfrom
audiodude:restore-nbgitpuller
Open

Restore nbgitpuller, dropped as collateral of the JupyterLab 4 upgrade in #317#528
audiodude wants to merge 1 commit into
toolforge:mainfrom
audiodude:restore-nbgitpuller

Conversation

@audiodude

@audiodude audiodude commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What

Re-adds nbgitpuller>=1.2 to the singleuser image (one requirement line, plus a comment explaining the floor).

Why

nbgitpuller was added in #66 (May 2021) so that /hub/user-redirect/git-pull?repo=...&urlpath=... links could pull a repo into a user's PAWS home and open a notebook in one click — the standard way to put an "open this example on PAWS" link on a wiki page.

Why it was removed

Not for its own sake — it was collateral of the JupyterLab 4 upgrade in #317, which also dropped the notebook pin and left nbgitpuller 1.1.1's notebook>=5.5.0 pulling in notebook 7. Full history, and why removing it was never necessary, in T434973.

Current behavior (verified 2026-08-13): clicking a git-pull link resolves through the hub, then 404s on the user server, e.g.

https://hub-paws.wmcloud.org/user/<name>/git-pull?repo=...  →  404

because nothing in the image registers the git-pull handler. Confirmed absent from images/singleuser/{Dockerfile,requirements.txt,install-extensions} on main.

Compatibility

nbgitpuller 1.2.0 (2023-08-07) dropped the notebook dependency, and 1.3.0 declares only jupyter_server>=1.10.1 and tornado. It ships no JupyterLab prebuilt extension in any version — it is a jupyter_server extension — so there is no JupyterLab version coupling; the image's jupyterlab 4.4.0 pulls jupyter_server>=2.4, well above the floor. The image no longer installs notebook at all (that pin went in #324).

The requirement is written >=1.2 so that no future resolution can land on ≤1.1.1 and reintroduce the notebook dependency that caused the 2023 breakage.

🤖 Generated with Claude Code
Manually reviewed by @audiodude

@audiodude
audiodude force-pushed the restore-nbgitpuller branch from 8bd7794 to b324854 Compare August 15, 2026 09:00
@audiodude

audiodude commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (8ba5cd0, #529) — now at b324854, no conflicts; this PR only touches images/singleuser/requirements.txt and #529 touched the Dockerfile and values.yaml.

The two red checks are unrelated to the change itself, but we want to flag a consequence that needs a maintainer either way.

Both failures are the fork-checkout guard in actions/checkout:

Refusing to check out fork pull request code from a 'pull_request_target'
workflow. ... To opt in, review the risks at
https://gh.io/securely-using-pull_request_target and set
'allow-unsafe-pr-checkout: true' on the actions/checkout step.

update-container-tags.yaml and singleuser.yaml are both pull_request_target, and the former checks out head.repo.full_name explicitly, so neither can run for a PR from a fork. Both fail in ~4s at the checkout step, before building anything. This isn't specific to our branch — it should hit any fork PR touching images/.

The part that matters beyond the red X: update-container-tags is what rewrites

tag: pr-529 # singleuser tag managed by github actions

in paws/values.yaml, and singleuser.yaml is what builds and pushes that image to quay. Since neither runs here, merging this as-is would not deploy nbgitpullervalues.yaml would keep pointing at pr-529, which was built before this commit existed.

Easiest path, if you agree the change is wanted: push the branch inside toolforge/paws and open it from there, so both workflows run in-repo. It's a 4-line addition to images/singleuser/requirements.txt, so cherry-picking b324854 is trivial and we don't mind at all if this PR gets closed in favour of that. Otherwise it needs a manual singleuser tag bump alongside the merge. We'd rather not suggest allow-unsafe-pr-checkout: true, since that's exactly the pwn-request opt-in the guard exists to prevent.

Also, linter and tofu fmt are sitting at action_required pending workflow approval, so those two haven't reported yet.

"We" here is @audiodude@Audiodude on Phabricator — and Claude Code, which assisted with the rebase and CI triage; claims above are drawn from the workflow files and the job logs for b324854.

@audiodude audiodude changed the title Restore nbgitpuller, accidentally dropped in #317 Restore nbgitpuller, dropped as collateral of the JupyterLab 4 upgrade in #317 Aug 15, 2026
@audiodude
audiodude force-pushed the restore-nbgitpuller branch from b324854 to c9f502d Compare August 15, 2026 09:50
nbgitpuller was added in toolforge#66 (May 2021) and dropped in toolforge#317 (Aug 2023), but
not for its own sake. 1b99c87 upgraded JupyterLab 3.4.8 -> 4.0.3 and also
removed the notebook==6.4.12 pin, which left nbgitpuller 1.1.1's
notebook>=5.5.0 as the only requirement on notebook in the image, so pip
resolved it to the newest release: notebook 7.0.1, in a JupyterLab 4 image.
47 minutes later 9d3969d re-pinned notebook==6.5.5 and commented out
nbgitpuller in the same commit, alongside a test matrix noting that Lab 4
worked with notebook 6.5.5 and not with 7.0.1. A cleanup commit before merge
deleted both the matrix and the disabled line, so the squashed result shows
only an unexplained one-line deletion.

Restoring the pin was the fix on its own: pip does not upgrade a package that
is already installed and already satisfies an unpinned requirement. The two
changes went in together and were never separated, so nbgitpuller was removed
alongside the thing that actually fixed it.

It is safe to bring back. nbgitpuller 1.2.0 (2023-08-07) dropped the notebook
dependency; 1.3.0 declares only jupyter_server>=1.10.1 and tornado and ships
no JupyterLab extension, and the image no longer installs notebook at all.
Requiring >=1.2 keeps the 2023 failure mode unreachable.

Bug: T434973

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@audiodude
audiodude force-pushed the restore-nbgitpuller branch from c9f502d to 35045fe Compare August 15, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant