chore(ci): upload integration-test coverage to Codecov#19130
Conversation
The integration-tests job runs the Hudi CLI and integ-test module integration tests but reported no coverage to Codecov: the integration-tests Maven profile wired no JaCoCo agent, and the job had no upload step. Since hudi-cli is excluded from the unit/functional test jobs, its production code was covered only here and never reported. - pom.xml: add a JaCoCo prepare-agent execution to the integration-tests profile, writing exec data under target/jacoco-agent/ so the existing merge script picks it up. Both failsafe (IT) and surefire (integ-test UT) attach the agent via the argLine property. - bot.yml: enable jacoco on the UT integ-test and IT steps (-Djacoco.skip=false) and add the standard merged-report + Codecov upload steps (flag: integration-tests).
hudi-agent
left a comment
There was a problem hiding this comment.
Thanks for working on this! This PR wires a JaCoCo prepare-agent execution into the integration-tests Maven profile and adds the coverage merge/upload steps to CI, closing the hudi-cli coverage blind spot. The approach mirrors the existing unit/functional-test profiles; one interaction with combine.self="override" in this profile's surefire/failsafe config is worth double-checking (see inline comment). Please take a look at any inline comments, and this should be ready for a Hudi committer or PMC member to take it from here.
| <executions> | ||
| <execution> | ||
| <goals> | ||
| <goal>prepare-agent</goal> |
There was a problem hiding this comment.
🤖 One difference from the unit/functional-test profiles worth verifying: those use combine.self="append", so they keep the managed <argLine>@{argLine}</argLine>. Here the surefire (line 2307) and failsafe (line 2315) configs use combine.self="override", which drops that managed <argLine> element — so the agent only reaches the forked JVMs via the implicit property="argLine" fallback rather than the late-bound @{argLine}. Could you confirm the .exec files actually come out non-empty and Codecov shows integration-tests coverage? A silent empty upload would still make the job pass green.
|
Note on scope: this intentionally leaves the Flink jobs ( When Codecov was first wired up (#18230), jacoco was briefly enabled on the Flink jobs and then removed due to a jacoco + Apache Calcite incompatibility. The agent instruments bytecode with synthetic fields/methods, which breaks the reflection-based structural assertions in Calcite's This PR keeps that constraint intact:
The one thing to watch is any non-Flink IT that loads Calcite (e.g. Hive-based paths). Monitoring the |
|
Update: the Note: this is a fork PR, so the upload used Codecov's tokenless path (the |
Describe the issue this Pull Request addresses
The
integration-testsGitHub Actions job runs the Hudi CLI andhudi-integ-testintegration tests, but reported no code coverage to Codecov. Theintegration-testsMaven profile wired no JaCoCo agent (unlike theunit-tests/functional-tests*profiles), so no.execdata was produced, and the job had no coverage upload step. Becausehudi-cliis excluded from the unit/functional test jobs, its production code was exercised only by these integration tests and its coverage was never reported.Summary and Changelog
Report integration-test coverage to Codecov, closing the
hudi-cliblind spot.pom.xml: add a JaCoCoprepare-agentexecution to theintegration-testsprofile, writing exec data undertarget/jacoco-agent/so the existingscripts/jacoco/generate_merged_coverage_report.shpicks it up. The agent is appended to theargLineproperty, which both failsafe (IT) and surefire (integ-test UT) already consume..github/workflows/bot.yml: enable JaCoCo on theUT integ-testandITsteps (-Djacoco.skip=false), and add the standard "Generate merged coverage report" + "Upload coverage to Codecov" steps (flagintegration-tests), mirroring the other test jobs.Scope is limited to the
integration-testsjob; the Flink integration-test jobs are intentionally left out.Impact
CI only; no production code or public API change. The
integration-testsjob now uploads coverage under theintegration-testsflag.Risk Level
low
CI-only change. It reuses the same JaCoCo agent plus merge/upload path already proven by the unit/functional test jobs. Failsafe/surefire memory settings are unchanged, since the agent is appended to the existing
argLineproperty rather than replacing it.Documentation Update
none
Contributor's checklist