Fix omnidev restart loop on Linux from non-mutating file access events - #4330
Conversation
Signed-off-by: Lee moon soo <moonsoo.lee@databricks.com>
0d20c81 to
f086811
Compare
|
@Leemoonsoo This PR is a Bug fix, Feature, or UI / frontend change but the Demo section is missing or only contains a placeholder. These change types require a screenshot or screen recording so reviewers can see the new behaviour without checking out the branch. Please update the Demo section with:
Use |
|
Updated Demo video before / after |
dbczumar
left a comment
There was a problem hiding this comment.
LGTM! Thanks @Leemoonsoo :)
|
🏷️ Doc impact: Internal bugfix to the Rust dev file-watcher (omnidev) that ignores non-mutating filesystem events to prevent reload loops; it's a developer tooling change with no user-facing surface or documented behavior affected. Auto-classified on merge. Set the label manually before merging to override. · run |
Related issue
Closes #4328
Summary
omnidev's file watcher treated every filesystem event on a watched.pypath as a source change — including non-mutating access/open events. Python imports at backend startup emit access events, so each freshly started backend immediately re-triggered a reload, producing a continuous restart loop (~every 2.6s) with no actual edits.create/modify/remove) indev/omnidev/src/watcher.rs, via a newis_mutating()helper; non-mutating events are skipped (and logged in debug mode).Test Plan
cargo test -p omnidev(focused binary suite): 38 tests pass, including two new regression tests —mutating_events_trigger_reloadandaccess_events_do_not_trigger_reload.omnidevno longer restarts the backend/host on startup or on file reads; reloads still fire on real edits.Demo
Before
omnidev-before.mov
After
omnidev-after.mov
Type of change
Test coverage
Coverage notes
Added unit tests covering event-kind classification (mutating vs. access). Manually verified on Ubuntu 24.04 that the restart loop is gone and that real edits still trigger a reload.
Changelog
Fix
omnidevrestart loop on Linux caused by non-mutating file access events