Closed kewegner closed 5 years ago
@neeraj-laad @kylegc In the fix I am working on, it will ignore the directory events as we discussed. Changing to full path regex would not have totally eliminated the issue Ozzie had initially. There is a separate issue for addressing regex of full path vs. file-name/directory name.
Currently the controller limits the number of events it gets back to 1 per watch cycle. This was originally done to cut down on the number of ON_CHANGE actions performed per cycle. Unfortunately, this can cause some events which the stack does not consider "ON_CHANGE" events to be processed, and others which would be ON_CHANGE actions to be skipped.
Most of the stacks have APPSODY_REGEX expressions which effectively exclude directory events, so the limit of one event causes only file events of interest to be reported back. So the limit of 1 works to a fair degree in those scenarios.
Currently the REGEX is used to match against the filename or the leaf directory name.
The java-spring-boot2 stack has a REGEX that match on almost everything, and thus the directory events are not filtered out. The other stacks filter out the directory events for the normal/majority of case(s), because their REGEX requires the name to end with a file extension.
Update:
We believe the one event limit is valid as long as all the events are valid events. Therefore we do not want the controller to do any post processing of events, all matching of events needs to happen in the watcher.
The solution is this:
As part of the work above, we can make two improvements: