Skip to content

Run connect-mode integration tests against plain jupyter-server, jupyter-collaboration, and jupyter-server-documents#91

Open
andrii-i wants to merge 4 commits into
jupyter-ai-contrib:mainfrom
andrii-i:ci-connect-mode-matrix
Open

Run connect-mode integration tests against plain jupyter-server, jupyter-collaboration, and jupyter-server-documents#91
andrii-i wants to merge 4 commits into
jupyter-ai-contrib:mainfrom
andrii-i:ci-connect-mode-matrix

Conversation

@andrii-i

@andrii-i andrii-i commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

nb-cli needs to work across different Jupyter Server configurations: vanilla, with jupyter-collaboration, and with jupyter-server-documents. This PR enables connect-mode integration tests and runs them against all three configurations to surface compatibility issues with vanilla Jupyter Server and each collaboration backend.

Changes

Added test-connect job to rust.yml with a 3-value matrix (jupyter-server, no collab, jupyter-collaboration, jupyter-server-documents). Each configuration spins up its own runner, installs the relevant packages, starts a Jupyter Server, and runs integration_connect_mode tests. fail-fast: false so all three run to completion regardless of individual failures.

Modified start_shared_server() in integration_connect_mode.rs to accept an externally-managed Jupyter Server via NB_TEST_SERVER_URL/NB_TEST_SERVER_TOKEN/NB_TEST_SERVER_ROOT environment variables. CI starts the server and passes these to the test binary. When the env vars are not set, the tests fall back to starting their own server locally (no change to local dev workflow).

Simplified test_helpers.rs. The venv helper now just checks if the pre-built venv exists instead of creating it and installing packages. Venv setup is handled by setup_test_env.sh (local dev) or the CI step.

Removed the hardcoded uv pip install jupyter_server jupyter-server-documents from the test code. The CI job controls what's in the venv.

Removed unnecessary unsafe impl Send/Sync for SharedServerInfo (all fields are String/PathBuf).

Renamed CI jobs for consistency: test local, test local (windows), test connect (*).

Initial CI results, merge strategy

Configuration Result Notes
jupyter-server, no collab 7/7 fail #93: no Y.js infrastructure, needs Contents API fallback
jupyter-collaboration 7/7 fail #92: FileID API path mismatch, nb-cli calls wrong endpoint
jupyter-server-documents 2 pass, 2 fail, 1 hang → timeout Pre-existing integration test failures (previously not enabled)

The jupyter-server-documents failures are known issues: the execute hang is tracked in #87 (work in progress fix in #89), and the clear-outputs failures are tracked in #90. These are pre-existing bugs surfaced by the new matrix, not regressions. Let's merge this PR as-is and address in follow-up PRs.

Existing test, lint, and test local (windows) jobs are unchanged and pass.

@andrii-i andrii-i added the enhancement New feature or request label Jun 3, 2026
@andrii-i andrii-i changed the title Run connect-mode integration tests against each of plain jupyter-server, jupyter-collaboration, and jupyter-server-documents Run connect-mode integration tests against plain jupyter-server, jupyter-collaboration, and jupyter-server-documents Jun 3, 2026
@andrii-i andrii-i marked this pull request as ready for review June 3, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant