-
Notifications
You must be signed in to change notification settings - Fork 956
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
Zola 0.19 does not detect changes anymore #2536
Comments
Similar but not exactly the same problem here. Change detected @ 2024-06-21 14:40:34
-> Content changed /home/XXX/site/content/bla/file.md
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 31 pages (0 orphan) and 5 sections
Done in 101ms. But Firefox (Snap Ubuntu 22.04 127.0) gives |
Thanks for reporting this! I'm not saying my commit is not at fault, but unfortunately I cannot reproduce this on macOS. I see you're both on Linux. I'll try that next. Regarding macOS: Environment: macOS 14.4.1, Apple Silicon, Firefox 126.0.
Modifications to the configuration, posts, and other pages are observed and reflected. I also installed the latest release and ran the same tests ( I'm not sure if you folks are using the release or are building from source, but if you could by chance reproduce your issues using the test sites included in zola ( |
Using the release here. Will try to give a go at |
Just tried on Ubuntu 20.04, Firefox 126.0, zola built from source as in my comment above and also the official Zola release downloadable from this repo. Unfortunately I was unable to reproduce. Changes are observed and reflected. Again, not saying my commits aren't at fault, but I'll need a reproduction to go deeper.
I suspect this could happen if you apply a large number of changes across various content (themes, configuration, content) at once in the update debounce window, which is ~1 second if memory serves. I'll be out this weekend unfortunately but can help more later if need be. |
Content changes only. I can live with that small glitch for now, no hurry. Thanks a lot for your responsiveness 👍 |
I can't reproduce it either on Mac |
@apiraino , may I ask which Ubuntu [EDIT: or Debian, perhaps] version you're using? Iwandrebeck is on 22.04 while I'm on 20.04. |
I was able to reproduce this:
If I use Zola 0.18.0 instead then it detects the changes fine. |
I can also reproduce this on Debian:
|
@iamorphen thanks for the feedback and I agree no hurry to look into this. I use Debian/testing x86_64. If you want to reproduce using a Docker container I think you can build Zola from the master branch using the Dockerfile included in this repo (it uses Debian):
Now, if I edit and save the file (example) hope this helps! |
Thanks all for your confirmations. @apiraino , sorry to have you repeat yourself; I didn't realize Debian/testing was a version name! Thank you for the MRE. I just built the image locally, compiled a debug build, and did some testing. Sadly, even in the container on my end, zola is observing and reacting to the changes. I made a simple oversight: When I have time a couple days from now, I'll see about spinning up a VM or maybe just finally upgrading my Linux host to be able to reproduce on my end. |
I also ran into this on Kubuntu 22.04 using zola 0.19.0 from snap after it autoupdated. 0.18 detected changes correctly. To clarify, I don't see any "Change detected" messages so this is the same behavior as the original bug report, not the same as the other comment using snap. |
Thanks for that confirmation. I had a little time to set up some reproduction environments today. I have been trying to install Debian Test 2024-06-17 in a VM, but I think something is wrong with the current release artifacts, at least on my end. I've tried multiple ISOs (verified shas) and poked around for common and known issues but couldn't turn up anything related to my problem (bundled installer failing to find some of its own scripts), so maybe it's just me. Test is a weekly release, so the next should come out in 1 or 2 days. I'll give the next release a shot. In the meantime I was able to install Ubuntu 24.04 and also Debian Stable 12.5.0 in VMs and was not able to reproduce. I'll give Kubuntu 22.04 a shot while waiting for the next Debian Testing release. |
Strange, I have a clean install of Kubuntu 22.04 in a VM but am unable to reproduce the issue using snap-installed zola. Zola observes and reacts to changes (config, |
I'm also able to reproduce this on Fedora 39 with zola 0.19.0. 0.18.0 works.
One additional observation: zola I'll also note that the file's metadata (i.e., that shown by The following GIF shows this. |
Some additional debugging information. I've cloned this repo and made the following dbg log
Now, the events I actually see are as follows. For the
For the
And for the
Notably, if I move the |
By just poking around those conditions, I see that this event is being filtered by the first condition let simple_kind = get_relevant_event_kind(&event.event.kind);
dbg!(&event, &simple_kind);
if simple_kind.is_none() {
continue;
} I see
These seems to confirm it is some sort of bug, but likely not related to @iamorphen's PR. |
For unknown reasons, it seems some environments emit a `Close` even, rather than a modification, in some cases where a file is edited. [src/fs_utils.rs:71:9] &event = DebouncedEvent { event: Event { kind: Access( Close( Write, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78269, tv_nsec: 133499794, }, } Consequently, because this isn't treated my Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating `Close` events, where the file was accessed `Write` mode as a modification. Closes: getzola#2536
Given this, I've just opened a simple PR to treat any |
For unknown reasons, it seems some environments emit a `Close` event, rather than a `Modify`, when a file is edited. As an example: [src/fs_utils.rs:71:9] &event = DebouncedEvent { event: Event { kind: Access( Close( Write, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78269, tv_nsec: 133499794, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating `Close` events, where the file was accessed `Write` mode, as a modification. Closes: getzola#2536
For unknown reasons, it seems some environments emit a `Close` event, rather than a `Modify`, when a file is edited. As an example: [src/fs_utils.rs:71:9] &event = DebouncedEvent { event: Event { kind: Access( Close( Write, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78269, tv_nsec: 133499794, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating `Close` events, where the file was accessed `Write` mode, as a modification. Closes: getzola#2536
For unknown reasons, it seems some environments emit a `DataChange::Any` event, rather than specifying content or size, when a file is edited. As an example: [src/fs_utils.rs:72:9] &event = DebouncedEvent { event: Event { kind: Modify( Data( Any, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78544, tv_nsec: 936740729, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating any data modification events as a modification. Closes: getzola#2536
For unknown reasons, it seems some environments emit a `DataChange::Any` event, rather than specifying content or size, when a file is edited. As an example: [src/fs_utils.rs:72:9] &event = DebouncedEvent { event: Event { kind: Modify( Data( Any, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78544, tv_nsec: 936740729, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating any data modification events as a modification. Closes: getzola#2536
For unknown reasons, it seems some environments emit a `DataChange::Any` event, rather than specifying content or size, when a file is edited. As an example: [src/fs_utils.rs:72:9] &event = DebouncedEvent { event: Event { kind: Modify( Data( Any, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78544, tv_nsec: 936740729, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating any data modification events as a modification. Closes: getzola#2536
For unknown reasons, it seems some environments emit a `DataChange::Any` event, rather than specifying content or size, when a file is edited. As an example: [src/fs_utils.rs:72:9] &event = DebouncedEvent { event: Event { kind: Modify( Data( Any, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78544, tv_nsec: 936740729, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating any data modification events as a modification. Closes: getzola#2536
Thanks so much! I did add the filtering logic, so I probably just missed a permutation. Notify v5/6 have much more fine-grained events than notify v4. In their own words
We're definitely experiencing the platform-specific part hah. I'll take a look at the MR. |
For unknown reasons, it seems some environments emit a `DataChange::Any` event, rather than specifying content or size, when a file is edited. As an example: [src/fs_utils.rs:72:9] &event = DebouncedEvent { event: Event { kind: Modify( Data( Any, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78544, tv_nsec: 936740729, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating any data modification events as a modification. Closes: #2536
For unknown reasons, it seems some environments emit a `DataChange::Any` event, rather than specifying content or size, when a file is edited. As an example: [src/fs_utils.rs:72:9] &event = DebouncedEvent { event: Event { kind: Modify( Data( Any, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78544, tv_nsec: 936740729, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating any data modification events as a modification. Closes: getzola#2536
Environment
Zola version: 0.19, Debian/testing on Linux x86_64
Expected Behavior
When I save changes to a blog post the website should be rebuilt and the browser should refresh automatically
Current Behavior
Zola does not detect changes anymore (I don't see "Change detected @ ..." in the stdout). I need to restart zola.
Step to reproduce
Edit and save changes in a blog post in
./content
Unsure which changes impacted this, maybe #2498 ? cc @iamorphen
The text was updated successfully, but these errors were encountered: