I have a Modular Monothic Application in which I have around 10 Modules. I Have written ArchTest Cases in one of the module which freezes all the existing violations(across all the existing modules) in a file.(Executed in my local by having all the 10 modules in my intellj)
Now When I am executing that test case in Jenkins by checking out only one module.(We are building parallely all the modules in jenkins).It is giving me the below error
com.tngtech.archunit.library.freeze.StoreUpdateFailedException: Updating frozen violations is disabled (enable by configuration freeze.store.default.allowStoreUpdate=true)
In ArchUnit Tests, If violations are fixed, FreezingArchRule will automatically reduce the known stored violations to prevent any regression.Is there any way to stop this behaviour?
Did I understand correctly that the ArchTest gives fewer violations when building a single module and therefore wants to reduce the violation store, which you don't allow on your Jenkins?
Couldn't you just adapt the
freeze.store.default.allowStoreUpdateproperty to allow store updates? That would be the most pragmatic workaround (assuming that Jenkins has write access to these files).But I would actually recommend using individual violation store files (via an appropriate
freeze.store.default.pathconfiguration, e.g. pointing to a relative path in each module) to avoid any coupling between modules which may or may not be checked out.To answer your question whether it is possible to stop
FreezingArchRuleto automatically reduce the known stored violations: Technically, you could use a custom Violation Store that just does not save violations such asSee the Violation Store documentation how to configure
FreezingArchRuleto use it.