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
[engine] Engine should automatically detect when classes and config are changed and reload the context #6223
Comments
The goal is to allow the developer to modify all code and configuration and the test in Engine without needing to commit or manually execute any APIs. Groovy classes, Engine Config and Spring Config updates all require the developer to act in order for Engine to see their changes.` |
@sumerjabri @russdanner The implementation enables the DirectoryWatcher for |
@phuongnq the Deployer should not rebuild context for Preview targets now that we're doing that in Engine. See if that's possible, please. |
Suggested test cases:
|
@sumerjabri Regarding the Deployer, since we use the Those test cases are tested in Linux. For the pull, since they will have the same modified date, I updated the logic to do just one rebuild instead of multiple rebuilds for each file since one rebuild would be enough. If the modified date are different for multiple files, we will treat it as multiple rebuild requests. We may also want to test the same in MacOS since the library handle watcher differently in the MacOS. |
We're okay with the Deployer template. The main issue is the algorithm. My suggested algorithm is:
Alg:
Let me know your thoughts. I can also meet with you as needed. |
@yacdaniel you may start testing in @phuongnq please port to 4.0 |
Hi @sumerjabri and @phuongnq ! While validating the ticket I noticed the following. Let's say we change the configuration of the new engine watcher to watch paths in general like:
The watcher will follow changes to
Should we consider |
@sumerjabri We can have a list of ignore path patterns such as:
Please let me know if we want to implement this. However, in a normal case, we should only rebuild on the default value including the |
@phuongnq let's build the ignore paths feature and default it to
|
Hi! Fix verified for Crafter v4.0.8 and v.4.1.2. Thank you! Closing this ticket. |
Latest version
Duplicates
Is your enhancement request related to a problem? Please describe.
Today changes to nested groovy classes often require a context rebuild in order to get picked up. Ideally, CrafterCMS could detect a development change that would require a context rebuild and handle that seamlessly for the developer.
Example:
A rest controller imports a class written in groovy and uses it. The user changes the class but not the rest script. The updated class changes are not seen until after a context rebuild (or a change to the rest controller)
Describe the solution you'd like
Engine should automatically detect when classes and config are changed and reload the context.
The text was updated successfully, but these errors were encountered: