-
Notifications
You must be signed in to change notification settings - Fork 467
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
File System Watcher #28593
Comments
The watcher sync should probably be Debounced - here is the https://github.com/dotCMS/core/blob/master/dotCMS/src/main/java/com/dotcms/concurrent/Debouncer.java |
### Proposed Changes * We're introducing Watch options in the Push Mixin so they become available to every push subcommand * We're adding a bit of logic in the `DotExecutionStrategy` to be able to handle starting up in watch mode and continue to repeat execution of the command of choice * I'm making `DotPush` a descendant of `DotCommand` to help me select all Push commands and still gain access to the mixins. * Because of the above change I needed to tell the global Push command from the others, so I introduced a new getter with such info. * Symmetry-wise wise I made `DotPull` also a descendant of `DotCommand`. But just for symmetry. All Pull sub commands got modified when I removed the no longer-needed DotCommand interface. But there are no other changes in logic. * A DirectoryWatchService was introduced. this class uses a poll interval to observe and filter events. * The events captured by the service are filtered so, let's say a folder move that in reality creates between 4 and 5 events (FOLDER_MODIFY, FOLDER_DELETE, FOLDER_MODIFY, FOLDER_CREATE), These events are filtered so that we only get the most recent one. This ensures we do not flood the server side with many unneeded changes. * Changes in documentation were made * Tests were introduced for the `DirectoryWatchService`, The Global Push running with the watch mode flag on, and finally another one to cover the changes introduced in the `DotExecutionStrategy`
Internal QA: Passed Tested by @spbolton |
@bryanboza it is not clear what you did here you ran Can you please add that bit of info ? |
@fabrizzio-dotCMS I just made a modification to one of the content-types files to ensure we are triggering the job after any change inside the |
### Proposed Changes 1. When the` files push ` command gets called from the global push, passing an existing folder but outside the files folder an error is thrown 2. This change makes the command default to the workspace root folder and continues processing when the scenario described in the first point occurs
Fixed and tested on the latest CLI version, and now it is working as expected. A new error regarding the exceptions has been opened here: #29629 We can close this one for now. |
Parent Issue
#28378
Task
We need some sort of tool to monitor file systems for changes, and trigger a push when a change is detected.
The idea is to include a new parameter
--watch
to the existing push commands (the global push and the specific ones).After a brainstorming session, we agreed the following:
Proposed Objective
Same as Parent Issue
Proposed Priority
Same as Parent Issue
Acceptance Criteria
Essentially we're aiming for automated deployment capabilities using the CLI.
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered: