Skip to content

Improved overflow support: Overflow auto-handling for file watches - #25

Merged
sungshik merged 6 commits into
improved-overflow-support-mainfrom
improved-overflow-support/overflow-policies-for-file-watches
Mar 7, 2025
Merged

Improved overflow support: Overflow auto-handling for file watches#25
sungshik merged 6 commits into
improved-overflow-support-mainfrom
improved-overflow-support/overflow-policies-for-file-watches

Conversation

@sungshik

@sungshiksungshik commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

This PR addresses this comment: in JDKFileWatch, overflow events should be propagated from the parent directory being "physically" watched to the file being "logically" watched.

The general auto-handling of overflows immediately works as-is, as shown by the tests (added in this PR as well).

@sungshiksungshik mentioned this pull request Mar 5, 2025
7 tasks

@sungshiksungshik left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarifying comment

}
case PATH_ONLY: {
var result = new JDKFileWatch(path, executor, eventHandler);
var result = new JDKFileWatch(path, executor, h);

@sungshiksungshikMar 5, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing context: h is the compound event handler that consists of: (a) the user-defined eventHandler; (b) the overflow auto-handler that generates synthetic events

Base automatically changed from improved-overflow-support/first-overflow-policy to improved-overflow-support-mainMarch 7, 2025 10:17
@sungshik
sungshik marked this pull request as ready for review March 7, 2025 10:23
@codecov

codecovBot commented Mar 7, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.6%. Comparing base (546fbe8) to head (c92d17f).
Report is 7 commits behind head on improved-overflow-support-main.

Additional details and impacted files
@@ Coverage Diff @@## improved-overflow-support-main #25 +/- ##
==================================================================
+ Coverage 79.7% 80.6% +0.9% - Complexity 107 111 +4 
==================================================================
Files 14 14 Lines 483 486 +3 Branches 46 47 +1 ==================================================================
+ Hits 385 392 +7 + Misses 70 67 -3 + Partials 28 27 -1 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DavyLandmanDavyLandman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just 1 improvement for the test I would like to propose

Comment threadsrc/test/java/engineering/swat/watch/SingleFileTests.java Outdated
Comment threadsrc/test/java/engineering/swat/watch/SingleFileTests.java Outdated
Comment threadsrc/test/java/engineering/swat/watch/SingleFileTests.java
@sungshik
sungshik merged commit 2aa7db2 into improved-overflow-support-mainMar 7, 2025
@sungshik
sungshik deleted the improved-overflow-support/overflow-policies-for-file-watches branch March 7, 2025 12:38
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@sungshik@DavyLandman