Skip to content

[INFRA] Recover CODECOV - #756

Closed
pan3793 wants to merge 3 commits into
apache:masterfrom
pan3793:codecov
Closed

[INFRA] Recover CODECOV#756
pan3793 wants to merge 3 commits into
apache:masterfrom
pan3793:codecov

Conversation

@pan3793

@pan3793 pan3793 commented Jul 5, 2021

Copy link
Copy Markdown
Member

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

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #756 (54773af) into master (5c5d43b) will increase coverage by 80.48%.
The diff coverage is n/a.

❗ Current head 54773af differs from pull request most recent head 0fc8a6d. Consider uploading reports for the commit 0fc8a6d to get more accurate results
Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
.../authentication/HadoopThriftAuthBridgeServer.scala 6.18% <0.00%> (+6.18%) ⬆️
...-common/src/main/scala-2.12/scala/util/Using.scala 10.60% <0.00%> (+10.60%) ⬆️
...a/org/apache/kyuubi/operation/OperationState.scala 27.27% <0.00%> (+27.27%) ⬆️
...n/scala/org/apache/kyuubi/service/Serverable.scala 44.44% <0.00%> (+44.44%) ⬆️
.../scala/org/apache/kyuubi/server/KyuubiServer.scala 47.36% <0.00%> (+47.36%) ⬆️
...apache/kyuubi/ctl/ServiceControlCliException.scala 50.00% <0.00%> (+50.00%) ⬆️
...ala/org/apache/kyuubi/session/SessionManager.scala 52.94% <0.00%> (+52.94%) ⬆️
...ache/kyuubi/ha/client/EngineServiceDiscovery.scala 53.84% <0.00%> (+53.84%) ⬆️
...org/apache/kyuubi/ha/client/ServiceDiscovery.scala 55.62% <0.00%> (+55.62%) ⬆️
...mon/src/main/scala/org/apache/kyuubi/Logging.scala 57.14% <0.00%> (+57.14%) ⬆️
... and 106 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c5d43b...0fc8a6d. Read the comment docs.

@pan3793 pan3793 changed the title [WIP] Try recover codecov Recover codecov Jul 5, 2021
@pan3793 pan3793 changed the title Recover codecov Recover CODECOV Jul 5, 2021
@pan3793 pan3793 self-assigned this Jul 5, 2021
@pan3793 pan3793 added the infra label Jul 5, 2021
@pan3793 pan3793 changed the title Recover CODECOV [INFRA] Recover CODECOV Jul 5, 2021
@pan3793 pan3793 added this to the v1.3.0 milestone Jul 5, 2021
@pan3793 pan3793 closed this in a8db49a Jul 5, 2021
@pan3793
pan3793 deleted the codecov branch July 6, 2021 04:42
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.
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants