Watcher should ignore files not in sources before cancelling any running tasks.#2743
Open
trulede wants to merge 1 commit intogo-task:mainfrom
Open
Watcher should ignore files not in sources before cancelling any running tasks.#2743trulede wants to merge 1 commit intogo-task:mainfrom
trulede wants to merge 1 commit intogo-task:mainfrom
Conversation
This was referenced Mar 15, 2026
mkeeler
reviewed
Mar 16, 2026
watch.go
Outdated
| e.Logger.VerboseErrf(logger.Magenta, "task: event skipped for being an ignored dir: %s\n", event.Name) | ||
| continue | ||
| } | ||
| if event.Has(fsnotify.Remove) || event.Has(fsnotify.Rename) { |
There was a problem hiding this comment.
Suggested change
| if event.Has(fsnotify.Remove) || event.Has(fsnotify.Rename) { | |
| if event.Has(fsnotify.Remove) || event.Has(fsnotify.Rename) || event.Has(fsnotify.Write) { |
Without this I think writes to existing files that are not in the sources would still trigger cancellation.
Contributor
Author
There was a problem hiding this comment.
Yes, thanks. I've added that.
|
@trulede Feel free to bring the tests over here if you like. What about the second half to my original PR to fix the task fingerprinting uniqueness issue? Should I refactor my PR to only have that fix within it. |
Contributor
Author
|
@mkeeler I've copied over the watch_tests and will get them running and then update this PR. Yes, refactor your PR to have the fix for the checksums. |
Co-authored-by: Oleg Butuzov <butuzov@made.ua> Co-authored-by: Timothy Rule <34501912+trulede@users.noreply.github.com>
208fe5f to
d65f329
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix several issues with the watcher:
Additional tests are added to cover most normal conditions.
closes #2477
closes #2715
duplicate #2493
duplicate #2742