-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check file changes based on content instead of the last_modified metadata #9769
Comments
👍 I like this, definitely worth trying out There's several different ways you could implement this, and you could do the actual hash in either the frontend or in the backend jupyter_server. |
I would be interested in taking a crack at this unless you're particularly gung-ho @skukhtichev |
xref #9777 |
It seems weird that the sync tool updates the last modified timestamp even if no change is made. Do you know why this happens, and if it is possible to avoid it? If possible, that would be a better fix, rather than building some special case workaround into the frontend. |
I agree with @vidartf - it seems that the responsibility lies with the one tool that is updating the timestamp to not update it if the content hasn't changed (i.e., to respect the meaning of "last modified"), rather than every other tool having to check if content actually changed. |
Closing as fixed by #15577 |
Problem
JupyterLab mechanism to detect a file changes is based on last_modified parameter set in the metadata:
jupyterlab/packages/docregistry/src/context.ts
Lines 644 to 649 in b4db7f0
If the file last_modified parameter was changed without changing the content then JupyterLab shows the following message
The issue happens when sync tools are used that updates files last modified timestamp.
Proposed Solution
Using content based check mechanism (e.g. hash) will prevent showing the dialog when the last modified timestamp changed without changing a file content
Additional context
The text was updated successfully, but these errors were encountered: