Croway opened a new pull request, #2021:
URL: https://github.com/apache/camel-spring-boot/pull/2021

   ### Problem
   
   Any PR touching `tests/camel-itest-spring-boot` (e.g. adding the IT for a 
new starter) makes the PR build run all ~400 per-starter integration tests of 
that module, because the incremental build selects whole modules (`install -pl 
<changed modules> -amd`), never individual tests.
   
   On GitHub Actions every one of them fails: each test generates a project 
from the archetype and builds it with a nested `./mvnw`, which has no snapshot 
repository and cannot resolve `camel-spring-boot-bom:4.23.0-SNAPSHOT` (the 
incremental build does not install it). With `rerunFailingTestsCount=2` that is 
~1200 nested Maven runs on 2 forks: the itest module alone took **1h07** in 
#2020 (402 run, 399 errors), and #2015 ran for 1h45 before being cancelled.
   
   ### Change
   
   - `tests/camel-itest-spring-boot/pom.xml`: new `github-ci` profile, 
activated by `ci.env.name=github.com`, restricting failsafe to 
`**/catalog/*IT${itest.changed}`: the catalog coverage check (every starter has 
an IT) plus the ITs passed in `itest.changed`. Jenkins daily and local builds 
are unchanged and still run the whole suite.
   - `pr-build-main.yml`:
     - new step computing `itest.changed` from the `Camel*IT.java` files 
changed by the PR (`gh pr diff --name-only`, since the checkout is shallow) and 
passing it through the action's `maven-extra-args`;
     - new step writing `~/.m2/settings.xml` with the Apache snapshots 
repository, so the nested Maven builds of the selected ITs resolve the BOM and 
starters;
     - drops the `mode` and `artifact-upload-suffix` inputs the 
incremental-build action no longer accepts (`Unexpected input(s)` warning).
   
   ### Verification
   
   Locally:
   - `-Dci.env.name=github.com`: only `CamelCatalogIT` runs.
   - `-Dci.env.name=github.com -Ditest.changed=,CamelOdataIT,CamelOlingo4IT`: 
exactly those 3 ITs run and pass.
   - The selection script on #2020 yields `-Ditest.changed=,CamelOdataIT`; on 
#2018 (no IT changes) nothing.
   - With an empty local repository and only the new settings file, the BOM, 
`camel-spring-boot-starter` and `camel-odata-starter` 4.23.0-SNAPSHOT resolve 
from the Apache snapshots repository.
   
   **Draft:** the last commit (`TEMPORARY - DO NOT MERGE`) adds `CamelOdataIT` 
(also in #2020) to exercise the selection and the nested build on the real 
runner. It will be dropped before this is marked ready.
   
   _Claude Code on behalf of Federico Mariani_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to