[INFRA] Recover CODECOV - #756
Closed
pan3793 wants to merge 3 commits into
Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #756 +/- ##
===========================================
+ Coverage 0.00% 80.48% +80.48%
===========================================
Files 122 122
Lines 4749 4749
Branches 576 576
===========================================
+ Hits 0 3822 +3822
+ Misses 4749 606 -4143
- Partials 0 321 +321
Continue to review full report at Codecov.
|
yaooqinn
approved these changes
Jul 5, 2021
acruise
added a commit
to acruise/kyuubi
that referenced
this pull request
Aug 25, 2026
…t 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 apache#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 apache#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.
This was referenced Aug 25, 2026
acruise
added a commit
to acruise/kyuubi
that referenced
this pull request
Aug 25, 2026
…he 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 apache#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 apache#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.
Assisted-by: Claude Opus 5
pan3793
added a commit
that referenced
this pull request
Sep 4, 2026
...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.
### Was this patch assisted by generative AI tooling?
Yes, Claude Opus 5
Closes #7661 from acruise/kyuubi-7659-codecov-argline.
Closes #7659
1b211e0 [Cheng Pan] [KYUUBI #7659][INFRA] Drop redundant argLine override in data-agent-engine
a9b8cd0 [Alex Cruise] [KYUUBI #7659][INFRA] Restore code coverage by not overriding the test argLine
Lead-authored-by: Alex Cruise <alex@cluonflux.com>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793
added a commit
that referenced
this pull request
Sep 4, 2026
...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.
### Was this patch assisted by generative AI tooling?
Yes, Claude Opus 5
Closes #7661 from acruise/kyuubi-7659-codecov-argline.
Closes #7659
1b211e0 [Cheng Pan] [KYUUBI #7659][INFRA] Drop redundant argLine override in data-agent-engine
a9b8cd0 [Alex Cruise] [KYUUBI #7659][INFRA] Restore code coverage by not overriding the test argLine
Lead-authored-by: Alex Cruise <alex@cluonflux.com>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit a162cde)
Signed-off-by: Cheng Pan <chengpan@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why are the changes needed?
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request