Skip to content

Gate Kernels on Install Status #155

Description

@pmeier

Summary

When the nebi server adopts the explicit-install model (see nebari-dev/nebi#438), workspaces default to locked-but-not-installed. nb_nebi_kernels must stop discovering kernels from uninstalled workspaces. One change: pass --installed to the local nebi workspace list call. No other touchpoints in this chart are affected.

Goals

  • nb_nebi_kernels only discovers kernels from workspaces that are installed on disk (.pixi/envs/ present).
  • The nb_nebi_kernels version pin in the jupyterlab image is bumped to the release containing the fix.

Non-Goals

  • Changes to the jhub-apps environment selector (03-nebi-envs.py). It lists workspaces from the nebi server API for use in app pods. App pods always install into a fresh directory regardless of the server's install status, so filtering is unnecessary.
  • Changes to the nebi serve configuration (images/nebi/jupyter_server_config.py). The nebi binary handles install status internally.
  • Changes to workspace PVC setup. The binary discovers install status from disk via the existing PVC mount.

Background / Motivation

The nebi server is changing from implicit install (run pixi install on every workspace creation/update) to explicit install (pixi lock only; install is a user action). After this change:

  • nebi workspace list --json returns all workspaces regardless of install status. A --installed flag filters to installed-only.
  • Workspaces without .pixi/envs/ are locked but not runnable.

nb_nebi_kernels calls nebi workspace list --json without --installed, creating kernel specs for every locally-tracked workspace. Launching a kernel against an uninstalled workspace would trigger an implicit pixi install with no progress indication — the exact UX problem the nebi change was designed to eliminate.

The main JupyterLab pod gets workspaces through the persistent workspace PVC at /var/lib/nebi/workspaces. nb_nebi_kernels discovers kernels from these local workspaces and must only surface installed ones.

Design

1. Kernel discovery: pass --installed to nebi workspace list

Repo: nebari-dev/nb-nebi-kernels
File: src/nb_nebi_kernels/discovery.py

Change the subprocess call in discover_workspaces():

# Before
["nebi", "workspace", "list", "--json"]

# After
["nebi", "workspace", "list", "--json", "--installed"]

No other changes to nb_nebi_kernels. The --installed flag is part of the nebi CLI change in the same nebi release.

2. Version bump

File: images/jupyterlab/pixi.toml

Bump nb_nebi_kernels from ==0.1 to the release containing the --installed fix (e.g., ==0.2). The exact version depends on the release tag chosen for the nb_nebi_kernels change.

Tradeoffs & Risks

Tradeoff Mitigation
The local nebi binary is part of this chart (copied via init container from nebi.image). The nebi workspace list --installed flag must exist in that image. The nebi image tag is pinned in values.yaml. When bumped to include the --installed feature, the local CLI and nb_nebi_kernels change ship atomically.
The nb_nebi_kernels change is in a separate repo, creating a two-repo release dependency. Both repos are under project control. The nb_nebi_kernels release must land before the data-science-pack version bump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Size

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions