chore: Fix CI reactor miss, causing cached .m2 snapshots to be used #17760
+36
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the issue this Pull Request addresses
The CI workflow fails during various test stages with invalid compilation errors, even though the preceding "Build Project" stage completes successfully.
The issue:
Across several test jobs in
bot.yml, the module list (-pl) is restricted to specific target modules (e.g., Spark or Flink modules), but the-am(also-make) flag is omitted. Consequently, Maven excludes core upstream modules likehudi-commonfrom the active Reactor and instead resolves them as external dependencies from the local~/.m2/repository.Because GitHub Actions restores a cached version of the
.m2directory (IIRC, from the last successful run) at the start of the job, the test stage links against "stale" or incompatible JARs from a previous run rather than the fresh classes compiled in the current job's build stage.Example Error from Logs
job-logs_1.txt
The above CI log is from:
https://github.com/apache/hudi/actions/runs/20611603231/job/59197291805?pr=17599
PR: #17599
Summary and Changelog
This PR adds the
-amflag tomvn testandmvn verifycommands throughout the CI workflow to ensure all project dependencies are consistently included in the Maven Reactor.mvn test ... -pl "$SPARK_COMMON_MODULES,$SPARK_MODULES"mvn test ... -am -pl "$SPARK_COMMON_MODULES,$SPARK_MODULES"Key Changes:
.github/workflows/bot.ymlto include-amin test steps.target/folders over cached artifacts in~/.m2/repository.hudi-commonsince classes are already up to date from the previous build step.Impact
CI reliability fix. Prevents phantom compilation failures caused by stale caches. No impact on public APIs or user-facing features.
Risk Level
None. This is a CI configuration change ensuring correct project dependency resolution.
Documentation Update
None
Contributor's checklist