Open williambrandler opened 1 month ago
@williambrandler Thank you for opening this issue! It seems like a reasonable expectation that auto-save would also automatically create checkpoints. We might need to investigate where the autosave logic lives (in JupyterLab, Jupyter Server, or elsewhere).
ok great, yeah having autosave also checkpoint would be great to match the behavior of using File -> Save Notebook
in the end we were able to recover the user's work via the ipython history, although it does take a bit longer to reconstruct the lost code via the command history as opposed to using a much more recent checkpoint
ipython
IN [1]: %hist -o -g -f ipython_history.md
Description
We have a cloud environment where users can access a jupyterlab machine and write code in notebooks. Occasionally users get connection errors and are then told their
File Changed
and they are asked toCancel / Revert / Overwrite
(see screenshot)A user clicked 'revert' and their notebook reverted back a few days. However, during this time their notebook had been saved many times using the autosave feature. It appears that the autosave is not also checkpointing the notebook, which is why the reversion went back many days to the last time the user explicitly saved the notebook. This means the user lost days of work
In summary:
File -> Save Notebook
, the notebook will save and checkpointI replicated the autosave checkpoint issue on a new machine in our cloud environment (no packages installed) and in classic Jupyter Notebook on my local machine (MacBook)
Is this expected behavior?
Reproduce
File -> Save Notebook
I diagnosed this in the original jupyterlab environment (docker container on a cloud virtual machine) and in Classic Jupyter Notebook on my local machine
Expected behavior
File checkpoints on autosave
Context
Selected Jupyter core packages... IPython : 8.25.0 ipykernel : 6.29.4 ipywidgets : 8.1.3 jupyter_client : 8.6.2 jupyter_core : 5.7.2 jupyter_server : 2.14.1 jupyterlab : 4.2.2 nbclient : 0.10.0 nbconvert : 7.16.4 nbformat : 5.10.4 notebook : 7.2.1 qtconsole : not installed traitlets : 5.14.3
Troubleshoot Output
Command Line Output
Browser Output