From 04452eb581adffb2615be6439ead0b715776fb06 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 29 Jun 2026 05:16:27 +0000 Subject: [PATCH] labext: pin JupyterLab extension deps; confirm.ps1 /login probe Pin the unsloth-jupyterlab npm deps to exact versions matching the baked jupyterlab==4.6.0 (builder stays 4.5.9, its newest release) instead of floating ^/~ ranges, so the same commit always builds the same labextension bundle. Also probe JupyterLab /login (not /api, which 403s behind a password hash) in the Windows confirmation script. --- docker/docker_confirm.ps1 | 5 ++-- docker/jupyter/unsloth_labext/package.json | 28 +++++++++++----------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docker/docker_confirm.ps1 b/docker/docker_confirm.ps1 index 9ee659726a..f5388772e6 100644 --- a/docker/docker_confirm.ps1 +++ b/docker/docker_confirm.ps1 @@ -206,12 +206,13 @@ if (-not $script:STUDIO_CID) { $okStudio = $false; $okJupyter = $false foreach ($i in 1..60) { if (-not $okStudio) { try { Invoke-WebRequest -UseBasicParsing -Uri "http://localhost:$PORT_STUDIO/api/health" -TimeoutSec 4 | Out-Null; $okStudio = $true } catch {} } - if (-not $okJupyter) { try { Invoke-WebRequest -UseBasicParsing -Uri "http://localhost:$PORT_JUPYTER/api" -TimeoutSec 4 | Out-Null; $okJupyter = $true } catch {} } + # /login, not /api: a password hash is always configured so /api returns 403. + if (-not $okJupyter) { try { Invoke-WebRequest -UseBasicParsing -Uri "http://localhost:$PORT_JUPYTER/login" -TimeoutSec 4 | Out-Null; $okJupyter = $true } catch {} } if ($okStudio -and $okJupyter) { break } Start-Sleep -Seconds 5 } if ($okStudio) { Ok "Studio /api/health healthy" } else { Bad "Studio /api/health never went healthy (docker logs $($script:STUDIO_CID.Substring(0,12)))"; docker logs --tail 15 $script:STUDIO_CID 2>&1 | ForEach-Object { Info $_ } } - if ($okJupyter) { Ok "JupyterLab /api responding" } else { Bad "JupyterLab /api never responded" } + if ($okJupyter) { Ok "JupyterLab /login responding" } else { Bad "JupyterLab /login never responded" } } Hr diff --git a/docker/jupyter/unsloth_labext/package.json b/docker/jupyter/unsloth_labext/package.json index 80284ed2bb..1201680a06 100644 --- a/docker/jupyter/unsloth_labext/package.json +++ b/docker/jupyter/unsloth_labext/package.json @@ -29,22 +29,22 @@ "clean": "rimraf lib tsconfig.tsbuildinfo unsloth-jupyterlab/labextension" }, "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@jupyterlab/application": "^4.5.0", - "@jupyterlab/apputils": "^4.5.0", - "@jupyterlab/cells": "^4.5.0", - "@jupyterlab/codemirror": "^4.5.0", - "@jupyterlab/mainmenu": "^4.5.0", - "@jupyterlab/notebook": "^4.5.0", - "@jupyterlab/theme-dark-extension": "^4.5.0", - "@lumino/disposable": "^2.0.0", - "@lumino/widgets": "^2.0.0" + "@codemirror/state": "6.5.4", + "@codemirror/view": "6.39.14", + "@jupyterlab/application": "4.6.0", + "@jupyterlab/apputils": "4.6.0", + "@jupyterlab/cells": "4.6.0", + "@jupyterlab/codemirror": "4.6.0", + "@jupyterlab/mainmenu": "4.6.0", + "@jupyterlab/notebook": "4.6.0", + "@jupyterlab/theme-dark-extension": "4.6.0", + "@lumino/disposable": "2.1.5", + "@lumino/widgets": "2.8.0" }, "devDependencies": { - "@jupyterlab/builder": "^4.5.0", - "rimraf": "^5.0.0", - "typescript": "~5.5.0" + "@jupyterlab/builder": "4.5.9", + "rimraf": "5.0.10", + "typescript": "5.5.4" }, "jupyterlab": { "extension": true,