microsoft/vscode-jupyter

Viewing a Jupyter Notebook deletes notebook metadata when using a remote Jupyter Server kernel

micahyoung opened this issue · 1 comments

Type: Bug

  1. Start a Jupyter Server from the command line (ex: jupyter notebook --NotebookApp.token='FooBar123')
  2. Create Notebook (ex: Create: New Jupyter Notebook)
  3. Run the notebook with the CLI Jupyter Server (ex: Click Run All, pick Existing Jupyter Server..., Enter http://localhost:8888?token=FooBar123)
  4. Save the Notebook to disk
  5. Add the notebook to git to see future changes
  6. Close the notebook
  7. Reopen the notebook
  8. Bug: See there are unsaved changes in the just-opened notebook tab (Circle in top-right)
  9. Save the unexpected changes (Cmd + S)
  10. Bug: See metadata is deleted like below
diff --git a/Untitled-1.ipynb b/Untitled-1.ipynb
index ae73e8d..ca3bb30 100644
--- a/Untitled-1.ipynb
+++ b/Untitled-1.ipynb
@@ -13,18 +13,6 @@
    "display_name": "Python 3 (ipykernel)",
    "language": "python",
    "name": "python3"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 3
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.10.13"
   }
  },
  "nbformat": 4,

VS Code version: Code - Insiders 1.95.0-insider (Universal) (8965e51174c237ba2a7c4f7be991ffa0526892cb, 2024-10-16T05:04:09.933Z)
OS version: Darwin arm64 23.6.0
Modes:

System Info
Item Value
CPUs Apple M1 Max (10 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 5, 5, 5
Memory (System) 64.00GB (1.60GB free)
Process Argv --crash-reporter-id 9e8154df-c5d9-4b9a-bdee-61c35a37ba74
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
copilot Git 1.239.0
copilot-chat Git 0.16.1
debugpy ms- 2024.12.0
python ms- 2024.17.2024101501
vscode-pylance ms- 2024.10.1
jupyter ms- 2024.10.2024101501
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.19
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
vsaa593:30376534
py29gd2263:31024238
c4g48928:30535728
2i9eh265:30646982
962ge761:30841072
pythongtdpath:30726887
pythonnoceb:30776497
asynctok:30898717
dsvsc014:30777825
dsvsc015:30821418
pythonmypyd1:30859725
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
cppperfnew:30980852
pythonait:30973460
da93g388:31013173
dvdeprecation:31040973
dwnewjupyter:31046869
nb_pkg_only:31057982
nativerepl1:31134653
refactort:31084545
pythonrstrctxt:31093868
wkspc-onlycs-t:31132770
nativeloc1:31118317
wkspc-ranged-t:31151552
cf971741:31144450
e80f6927:31120813
defaultse:31146405
i21gd607:31141543
iacca1:31150324
notype1:31143044
showchatpanel:31139797
f8igb616:31140137
dwcopilot:31158714
g7688163:31155431
iconenabled:31158249

Thank you for filing this issue, I can replicate this at my end.