Incremental testing on the CI
See original GitHub issueI am considering to use GIB https://github.com/vackosar/gitflow-incremental-builder to implement the $subj.
A quick dump of things that are necessary for it to work:
No “hidden” deps
“Hidden” dependencies of Maven module M are such dependencies, that are required by the module M at build time, but they are not present in the transitive closure of M’s dependencies as seen by stock Maven.
The problem occurs e.g. in our integration tests, which explicitly depend only on runtime extension modules, but at build time, they also require their -deployment
counterparts.
Hidden deps are not a problem for common sequential Maven builds, because the ordering is co-defined by the order of <module>
elements in the parent-child hierarchy. However, this is an issue for parallel builds using either stock Maven or mvnd
.
For mvnd
, we are solving it with mvnd
specific <mvnd.builder.rule>
. Clearly, that’s not sufficient for GIB, that uses stock maven dependency tree builder. I learned recently, there is trick how to make hidden dependencies explicit using stock Maven model: one can use a Maven dependency with <type>pom</type>
, <scope>test</scope>
that excludes all its transitives via
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
It is much more XML, but would serve our needs.
Bonus: we will be able to use ‘mvn -T1C’ both on the CI and locally.
Check whether GIB handles some corner cases properly:
- Changes of a dependency version in parent (consumed via BoM import) should trigger re-build only of the modules consuming that dependency. GIB will probably not be able to select the optimal set to re-build. If it re-builds all, it is not ideal, but at least, it will not lead to any false positive CI runs.
- Changes of a maven plugin hosted inside the source tree should trigger re-building all modules using the plugin.
Any opnions?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
@ppalaga FYI, GIB 3.12.0 is out: https://github.com/vackosar/gitflow-incremental-builder/releases/tag/version%2F3.12.0
Edit: Oops, wrong issue. Sorry!
https://github.com/vackosar/gitflow-incremental-builder/issues/241#issuecomment-684069633