-
Notifications
You must be signed in to change notification settings - Fork 133
IEP-1596 Handle Redundant File Watcher Events for eim_idf.json #1267
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
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
...les/com.espressif.idf.core/src/com/espressif/idf/core/tools/watcher/EimJsonWatchService.java
Outdated
Show resolved
Hide resolved
Removed showEimJsonChangeNotification as changes will be found by EimJsonWatchService anyway
|
In the last commit I've removed the showEimJsonChangeNotification method as changes in the eim will be found by EimJsonWatchService anyway |
|
I've found one use case that can also trigger redundant notifications. When eim_idf.json is created and modified at the same time, it generates two events: CREATE and MODIFY, so Thread.sleep wouldn't help. I've replaced the solution with a debounce interval in the latest commit. |
|
In the last commit, I replaced the debounce solution with comparing file timestamps, as suggested by Kondal. |
|
@sigmaaa hi ! Tested under: redundant notifications issue fixed ✅
|
kolipakakondal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Added a 100ms delay before processing file system events to prevent handling multiple ENTRY_MODIFY events triggered by certain text editors. This helps avoid redundant processing when eim_idf.json is edited rapidly.
I saw this behavior a few times during the migration from 3.5 to 4.0.0, without manually editing the eim_idf.json file. I couldn't reproduce it since then, so I tried editing the file manually and observed similar behavior.
Fixes # (IEP-1596)
Type of change
Please delete options that are not relevant.
How has this been tested?
open the IDE -> edit esp_idf.json file -> should be one notification in the IDE
Test Configuration:
Dependent components impacted by this PR:
Checklist