[ci] Maven Shade Plugin occasionally fails with NullPointerException during parallel builds
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 625
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 97
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
### Fluss version
0.9.0 (latest release)
### Please describe the bug 🐞
The Maven Shade Plugin occasionally fails during the parallel CI build.
Latest failure:
https://github.com/apache/fluss/actions/runs/30992170895/job/92260618471
The failure occurred in the `Java 11 / flink2` Build step, which runs:
```text
mvn -T 1C -B clean install -DskipTests
```
Maven failed while shading `fluss-spark-3.5_2.12`:
```text
[INFO] Dependency-reduced POM written at: .../fluss-spark-3.5/dependency-reduced-pom.xml
...
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-shade-plugin:3.4.1:shade
(shade-fluss) on project fluss-spark-3.5_2.12:
Error creating shaded jar: null: NullPointerException
```
The other matrix jobs in the same CI run completed the Build step successfully.
The related PR only changed server retention code and tests, without modifying
Spark modules or Maven build configuration. This therefore appears to be a
nondeterministic build failure rather than a failure caused by the PR.
Fluss currently uses `maven-shade-plugin` 3.4.1 with
`createDependencyReducedPom=true`, while CI builds the Maven reactor in
parallel using `-T 1C`.
This may be related to
[MSHADE-467](https://github.com/apache/maven-shade-plugin/issues/721), which
affects versions 3.4.1 through 3.5.1 and describes Maven session state leaking
between concurrent Shade Mojo executions. Its fix was released in version
3.5.2.
The CI output does not contain the full exception stack trace, so the exact
source of this NullPointerException is not yet confirmed.
### Solution
No confirmed fix yet.
A possible solution is to upgrade `maven-shade-plugin` to a version containing
the MSHADE-467 fix. Apache Flink currently uses version 3.6.1.
If the failure recurs, running Maven with `-e` would help identify the exact
source of the NullPointerException.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Maven build configuration that sets maven-shade-plugin 3.4.1 and createDependencyReducedPom. Reproduce the parallel command, mvn -T 1C -B clean install -DskipTests, and use -e if it fails; done means the shaded Spark module builds reliably with the plugin version containing the MSHADE-467 fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100