-
Notifications
You must be signed in to change notification settings - Fork 218
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
PollWatcher: Ignore IO "file not found" exceptions when accessing entry metadata?🥺 #581
Comments
I think, it would be more appropriate to ignore errors in |
Hey @earshinov, I ran into the same issue. |
@tomako , I agree, let's reopen the ticket and let the developers decide on further actions. |
Background, I think as of #507 the current behaviour is intended — applications using Please can someone who has experienced his error install watchfiles from samuelcolvin/watchfiles#301 and check if it is indeed fixed. |
@samuelcolvin, thank you so much for looking into it! The fix seems to be working nicely for us. Waiting impatiently for the next release 😄 |
For local development, we are running our Django app inside a Linux Docker container, launched from Windows host with help of WSL2, with sources typically mounted from the Windows file system. We are using watchfiles + django_watchfiles instead of Django's built-in reloader. Watchfiles uses
notify
under the hood (source). Thanks to this code in watchfiles, it understands that it is launched from a Windows host and falls back toPollWatcher
(👌).We are facing an issue that
notify
hits an exception (also bringing down the Django app and the Docker container) when we launchmypy
in the same running container:I am mediocre at best in Rust, but I assume that this exception is coming from here:
notify/notify/src/poll.rs
Line 301 in 2511ebc
Could we perhaps have "Not found" errors ignored?
System details
Software
watchfiles 0.21 (latest release)
notify 5.1.0 (source)
I see the same code in latest
notify
here in the repo, so I guess we would have the same problem withwatchfiles
rebuilt with latestnotify
.OS
Host: Windows 11 x64 Version 23H2 (0S Build 22631.3296)
Docker container:
python:3.11-bullseye-slim
What you expected
Errors when accessing metadata of a presumably changed file being silently ignored
What happened
A chain reaction notify ⇒ watchfiles ⇒ Django app ⇒ Docker container 💀
The text was updated successfully, but these errors were encountered: