You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "acruise (via GitHub)" <gi...@apache.org> on 2026/08/25 20:08:46 UTC
[PR] [KYUUBI #7659][INFRA] Restore code coverage [kyuubi]
acruise opened a new pull request, #7661:
URL: https://github.com/apache/kyuubi/pull/7661
...by not overriding the test argLine!
Code coverage has reported nothing since 1.8.0. Both maven-surefire-plugin and scalatest-maven-plugin default their `argLine` to the `${argLine}` property, which is resolved when the mojo runs -- late enough to see the value `jacoco:prepare-agent` publishes there. KYUUBI #4849 gave both plugins an explicit `<argLine>${extraJavaTestArgs}</argLine>` to open JDK modules, and plugin configuration is interpolated during model building, long before the agent mojo runs. The agent option is therefore dropped and the forked test JVM runs uninstrumented:
[INFO] --- jacoco:0.8.11:prepare-agent (pre-test) @ kyuubi-util-scala_2.12 ---
[INFO] argLine set to -javaagent:.../org.jacoco.agent-0.8.11-runtime.jar=...
[INFO] --- jacoco:0.8.11:report (report) @ kyuubi-util-scala_2.12 ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
The build stays green and every module reports zero. KYUUBI #756 ("Recover CODECOV") fixed the same thing in 2021 by deleting an `argLine` element.
Move the JDK options into the `argLine` property itself and drop both overrides, so the plugin defaults apply again. `prepare-agent` prepends the agent to the property's existing value rather than replacing it, so `--add-opens` survives:
argLine set to -javaagent:...=destfile=... -XX:+IgnoreUnrecognizedVMOptions ...
Surefire's `@{argLine}` late replacement is not enough on its own here, since scalatest-maven-plugin has no equivalent and that is where most of Kyuubi's tests run.
Verified locally:
- `test -Pcodecov -pl kyuubi-util-scala` (scalatest) analyzes 8 classes and writes target/jacoco.exec, where before it skipped for missing data.
- `test -Pcodecov -pl kyuubi-rest-client` (surefire) analyzes 63 classes.
- `test -pl kyuubi-util-scala` without the profile is green, argLine unchanged.
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/master/contributing/code/index.html
2. If the PR is related to an issue in https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new feature, clarify the use cases.
2. If you fix a bug, you can clarify why it is a bug, and what versions are affected.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
### Was this patch assisted by generative AI tooling?
<!--
If generative AI tooling has assisted in authoring or reviewing this patch, please include
an 'Assisted-by: ' trailer that identifies the agent and/or model.
For example: 'Assisted-by: Claude Opus 4.7' or 'Assisted-by: Claude:claude-opus-4-7'.
If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #7659][INFRA] Restore code coverage [kyuubi]
Posted by "wangzhigang1999 (via GitHub)" <gi...@apache.org>.
wangzhigang1999 commented on PR #7661:
URL: https://github.com/apache/kyuubi/pull/7661#issuecomment-5419716167
Thanks for fixing this. I found one remaining `argLine` override in `externals/kyuubi-data-agent-engine/pom.xml`:
```xml
<argLine>${extraJavaTestArgs}</argLine>
```
It has the same effect on the Data Agent JUnit tests. With the current patch, `TableRefTest` runs 17 tests successfully, but JaCoCo reports zero covered lines for the module. After removing this line, the same tests pass and JaCoCo records 21 covered lines for `TableRef`.
Could you remove this override as part of this PR?
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #7659][INFRA] Restore code coverage [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #7661:
URL: https://github.com/apache/kyuubi/pull/7661#issuecomment-5538809318
**Merge Summary:**
- merged into master https://github.com/apache/kyuubi/commit/a162cde27e43cb19f1df30ed596db743682218e1
- merged into branch-1.12 https://github.com/apache/kyuubi/commit/e959286bfefc70a8dbbceb409cb2225e308a2793
*Posted by `merge_kyuubi_pr.py`*
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #7659][INFRA] Restore code coverage [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #7661: [KYUUBI #7659][INFRA] Restore code coverage
URL: https://github.com/apache/kyuubi/pull/7661
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org