leocook opened a new issue, #18220:
URL: https://github.com/apache/dolphinscheduler/issues/18220

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   After #18213 (`[Chore] Unit-Test performance optimize`), the CI unit test 
for `dolphinscheduler-spi` fails intermittently with:
   
   ```
   NoClassDefFoundError: com/fasterxml/jackson/core/type/TypeReference
   ```
   
   in `PluginParamsTransferTest`.
   
   Affected CI runs:
   - https://github.com/apache/dolphinscheduler/actions/runs/25480568356
   - Introduced by commit 5c85e15a8b (#18213)
   
   ### What you expected to happen
   
   The `dolphinscheduler-spi` unit tests should pass consistently in CI.
   
   ### How to reproduce
   
   ```bash
   # Clean local repo cache for dolphinscheduler, then:
   ./mvnw install -pl dolphinscheduler-spi -am -Dmaven.test.skip=true
   ./mvnw verify -pl dolphinscheduler-spi
   # PluginParamsTransferTest fails with NoClassDefFoundError
   ```
   
   ### Anything else
   
   After analyzing the code and CI history, I found the root cause:
   
   #18213 split the CI test step into two phases:
   
   1. `mvnw install -pl "$module" -am -Dmaven.test.skip=true` — install 
dependencies
   2. `mvnw verify -pl "$module"` (without `-am`) — run tests
   
   `dolphinscheduler-spi` declares `dolphinscheduler-common` with 
`<scope>provided</scope>`. Without `-am` in the verify step, Maven does not 
include `provided`-scoped transitive dependencies (jackson, etc.) on the test 
classpath. This causes `NoClassDefFoundError` at test time.
   
   The failure is intermittent because it depends on the Maven local repository 
cache state on the CI runner.
   
   **Suggested fix:**
   
   Either:
   - Add `jackson-core` / `jackson-databind` as `<scope>test</scope>` 
dependencies in `dolphinscheduler-spi/pom.xml`, or
   - Restore `-am` for modules that have `provided`-scoped internal 
dependencies in the CI verify step
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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