contrueCT opened a new issue, #3160: URL: https://github.com/apache/hugegraph/issues/3160
### Bug Type CI / coverage reporting ### Background The PD and Store jobs run their test profiles through several independent Maven invocations, but the resulting JaCoCo data is not collected and uploaded through one deterministic aggregation step. This became visible in #3157: `KvClientTest` passed 18/18 tests, while Codecov reported 0% patch coverage for 138 changed lines in `KvClient.java` and `AbstractClient.java`. The mismatch indicates a repository-level coverage collection problem rather than missing tests in that PR. ### Current behavior The PD job currently runs: ```text pd-common-test pd-core-test mvn clean package pd-client-test pd-rest-test upload to Codecov ``` The `clean package` invocation removes the earlier modules' `target` directories, including any execution data and reports produced by the common and core profiles. The later profiles then regenerate reports from the remaining data. The Store job similarly runs these profiles as separate Maven invocations: ```text store-common-test store-client-test store-core-test store-rocksdb-test store-server-test store-raftcore-test upload to Codecov ``` Both test modules bind `jacoco:report-aggregate` to the `test` phase, so an aggregate report is generated repeatedly instead of once after all relevant suites have completed. There is also a report-path mismatch: - PD generates reports under `hugegraph-pd/hg-pd-test/target/site/jacoco/`. - Store generates reports under `hugegraph-store/hg-store-test/target/site/jacoco/`. - The workflow uploads `target/site/jacoco/*.xml` from the repository root for both jobs. If Codecov auto-discovery finds other XML files, the upload can still succeed while containing an incomplete or unintended set of reports. Relevant configuration: - [PD/Store workflow](https://github.com/apache/hugegraph/blob/master/.github/workflows/pd-store-ci.yml) - [PD aggregate report configuration](https://github.com/apache/hugegraph/blob/master/hugegraph-pd/hg-pd-test/pom.xml) - [Store aggregate report configuration](https://github.com/apache/hugegraph/blob/master/hugegraph-store/hg-store-test/pom.xml) - [Observed failure in PR #3157](https://github.com/apache/hugegraph/pull/3157#issuecomment-5308378414) ### Expected behavior Coverage uploaded by the PD and Store jobs should represent the union of all test profiles executed by each job. The result should not depend on profile order, an intermediate `clean`, or Codecov's automatic file discovery. ### Suggested scope - Preserve JaCoCo execution data across all PD and Store test profiles. - Avoid deleting accumulated coverage data before the upload step. - Generate one aggregate XML report after all relevant profiles finish. - Upload the exact PD and Store report paths explicitly. - Fail the job when the expected XML report is missing or does not include expected modules/classes. - Keep the fix independent from business changes in #3157. A possible flow is: ```text all test profiles ↓ preserved execution data ↓ one report-aggregate step ↓ one deterministic XML report ↓ explicit Codecov upload ``` ### Acceptance criteria - [ ] PD coverage includes classes exercised by `pd-common-test`, `pd-core-test`, `pd-client-test`, and `pd-rest-test`. - [ ] Store coverage includes classes exercised by all Store test profiles. - [ ] The workflow produces and uploads the intended XML paths without relying on auto-discovery. - [ ] CI checks that the XML exists and contains representative PD/Store modules. - [ ] A focused PR with covered PD or Store changes no longer reports 0% merely because a later profile ran. - [ ] Base and head commits upload a consistent number of reports for the same workflow configuration. ### Follow-up work Codecov flags/carryforward configuration, `after_n_builds`, the Codecov action upgrade, and the JaCoCo 0.8.4 upgrade can be handled separately so the aggregation fix remains focused. -- 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]
