pan3793 commented on PR #8606:
URL: https://github.com/apache/hadoop/pull/8606#issuecomment-5118190752
Two issues, both in `hadoop-bos`. It appears to have been missed while its
sibling `hadoop-tos` was handled correctly.
## Bug 1 (build-breaking): `hadoop-bos` missing from the coverage aggregate
`hadoop-bos` is a test-bearing jar module (`<packaging>jar</packaging>` +
`src/test/java/`), but it is listed in neither `hadoop-coverage/pom.xml`'s
`<dependencies>` (the cloud-storage section lists `hadoop-cos`, `hadoop-gcp`,
`hadoop-huaweicloud`, `hadoop-tos`, but not `hadoop-bos`) nor
`coverage-modules-allowlist.txt`.
Running this PR's own `check-coverage-modules.sh` against the current tree
fails at `hadoop-coverage`'s `validate` phase:
```
check-coverage-modules: FAILED
The following test-bearing modules are missing from the coverage aggregate:
- hadoop-bos
```
So the documented command (`mvn verify -Djacoco.skip=false ...`) fails at
`hadoop-coverage` before `report-aggregate` ever runs, until `hadoop-bos` is
added as a `<dependency>` in `hadoop-coverage/pom.xml`.
## Bug 2 (silent coverage gap): `hadoop-bos` surefire argLine missing
`@{argLine}`
Even after Bug 1 is fixed,
`hadoop-cloud-storage-project/hadoop-bos/pom.xml:265` overrides surefire's
`<argLine>` without `@{argLine}`:
```xml
<argLine>${maven-surefire-plugin.argLine}</argLine>
```
A module-level `<argLine>` fully replaces the parent's, so the `@{argLine}`
token that `jacoco:prepare-agent` substitutes to inject the agent is dropped.
The forked test JVMs for `hadoop-bos` run without the JaCoCo agent, producing
no exec data, so its coverage shows as empty in the aggregate report, silently.
The guard script can't catch this; it only checks deps/allowlist presence.
Of the 21 surefire/failsafe `<argLine>` overrides in the repo, this PR
patched 20; `hadoop-bos` is the only one missed.
Fix for both:
```xml
<argLine>${maven-surefire-plugin.argLine} @{argLine}</argLine>
```
plus a `hadoop-bos` `<dependency>` entry in `hadoop-coverage/pom.xml`.
## Minor
The reorder of `maven-resources-plugin` after `exec-maven-plugin` in
`pluginManagement` (`hadoop-project/pom.xml`) is cosmetic only;
`pluginManagement` order has no effect in Maven.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]