Skip to content

feat: add install_jupyterlab_workbench macros for Posit Workbench images#474

Merged
ianpittwood merged 4 commits intomainfrom
jupyterlab-vuln-path-strip-macros
Apr 23, 2026
Merged

feat: add install_jupyterlab_workbench macros for Posit Workbench images#474
ianpittwood merged 4 commits intomainfrom
jupyterlab-vuln-path-strip-macros

Conversation

@ianpittwood
Copy link
Copy Markdown
Contributor

Summary

  • Adds install_jupyterlab_workbench and run_install_jupyterlab_workbench macros to posit-bakery/posit_bakery/config/templating/macros/python.j2
  • Creates a dedicated venv at /opt/python/{jupyter_venv_name}, installs jupyterlab / notebook / pwb_jupyterlab into it, and symlinks jupyter onto the system PATH
  • Supports configurable jupyter_venv_name, jupyterlab_version_pin, pwb_jupyterlab_version_pin, extra_packages, and strip_tests / strip_staging toggles (to remove the jupyterlab tests dir and staging yarn.lock post-install)
  • Adds tests in test/config/templating/test_macros.py covering defaults, version pins, extra packages, custom venv name, the 4-way strip-toggle matrix, and the RUN wrapper

Test plan

  • just test passes (1329 passed)
  • New macro tests (10) pass — verified one correctly fails when the jupyter_venv_name plumbing is regressed
  • Wire up a downstream consumer in images-workbench (workbench-session) and confirm the rendered Dockerfile builds and jupyter --version works in the resulting image

🤖 Generated with Claude Code

@ianpittwood ianpittwood marked this pull request as ready for review April 21, 2026 19:05
@ianpittwood ianpittwood requested a review from bschwedler as a code owner April 21, 2026 19:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

Test Results

1 375 tests  +10   1 375 ✅ +10   8m 13s ⏱️ -40s
    1 suites ± 0       0 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 209d0f4. ± Comparison against base commit 8e5a705.

♻️ This comment has been updated with latest results.

@ianpittwood ianpittwood force-pushed the jupyterlab-vuln-path-strip-macros branch 3 times, most recently from 9b06243 to ab1b381 Compare April 23, 2026 16:32
ianpittwood and others added 4 commits April 23, 2026 11:06
Adds `install_jupyterlab_workbench` and `run_install_jupyterlab_workbench`
macros to `python.j2` for installing JupyterLab, notebook, and
pwb_jupyterlab into a dedicated virtual environment, symlinking
`jupyter` onto the system PATH, and optionally stripping the JupyterLab
tests directory and staging yarn.lock from the installed venv. Supports
configurable venv name, jupyterlab/pwb_jupyterlab version pins, and
extra packages. Includes tests covering defaults, version pins, extra
packages, custom venv name, strip toggles, and the RUN wrapper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Also update test expectations to match recent macro changes (quoted
jupyterlab/pwb_jupyterlab packages, removal of --break-system-packages,
and bare rm lines in place of bash -O failglob wrappers).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ianpittwood ianpittwood force-pushed the jupyterlab-vuln-path-strip-macros branch from ab1b381 to 209d0f4 Compare April 23, 2026 17:48
@ianpittwood ianpittwood added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 95fed03 Apr 23, 2026
22 checks passed
@ianpittwood ianpittwood deleted the jupyterlab-vuln-path-strip-macros branch April 23, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants