-
Notifications
You must be signed in to change notification settings - Fork 2.5k
chore(ci): modernize Codecov config for the coverage initiative #19138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,4 +107,36 @@ Published Artifacts | |
| - `merge_jacoco_exec_files.sh`: merges multiple JaCoCo execution data files in multiple modules. | ||
| - `merge_jacoco_job_files.sh`: merges multiple JaCoCo execution data files from multiple Azure pipeline jobs. | ||
| - `generate_jacoco_coverage_report.sh`: generates the JaCoCo code coverage report by taking the execution data file, | ||
| source files and class files. | ||
| source files and class files. | ||
|
|
||
| ## Per-PR coverage on Codecov | ||
|
|
||
| In addition to the aggregated Azure report described above, coverage is uploaded to | ||
| [Codecov](https://app.codecov.io/gh/apache/hudi) on every pull request and every commit to master. | ||
| This is the canonical per-PR view. | ||
|
|
||
| - Each test job in `.github/workflows/bot.yml` runs with the JaCoCo agent, builds a merged report | ||
| via `scripts/jacoco/generate_merged_coverage_report.sh`, and uploads `jacoco-report.xml` to | ||
| Codecov under a flag (`spark-java-tests`, `spark-scala-tests`, `utilities`, | ||
| `common-and-other-modules`, `spark-client-hadoop-common`, `hadoop-mr-java-client`, | ||
| `integration-tests`). | ||
| - `.codecov.yml` configures reporting: `ignore` drops non-production code (examples, packaging, | ||
| the integration-test harness, an incubating module); `component_management` reports coverage per | ||
| ownership area (hudi-common, hudi-client, hudi-spark-datasource, hudi-flink, ...); and | ||
| `flag_management` carries a flag's coverage forward when its job is skipped by the path filter, | ||
| so a partial run does not report a false drop. | ||
| - Generated code (Avro, Thrift, Protobuf, ANTLR) has no source committed to git, so it never | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 This states generated code "needs no exclusion," but
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: the doc now says generated code (Thrift/Protobuf/ANTLR) needs no exclusion, and notes the one committed generated path (Avro model classes) is still ignored defensively, so the doc and config agree. |
||
| appears in the Codecov report and needs no exclusion. | ||
| - Codecov posts a summary comment on each PR with the project, per-component, and per-patch | ||
| coverage delta. Statuses are informational (they do not fail the build); to gate a component | ||
| against regression later, remove `informational` and set a `target`/`threshold` for it. | ||
|
|
||
| To read coverage for a single module locally, run its tests with the JaCoCo agent and open the | ||
| generated `target/site/jacoco*/index.html`, for example: | ||
|
|
||
| ```bash | ||
| mvn test -pl hudi-common -Punit-tests -Djacoco.skip=false | ||
| ``` | ||
|
|
||
| Instruction coverage is the headline metric; branch coverage (also in the report) shows whether | ||
| both sides of each conditional are exercised, which is what catches untested error and config paths. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 This flag list doesn't match what
.github/workflows/bot.ymlactually uploads. The workflow uploads aspark-core-testsflag (bot.yml line 1027) which is missing here, and there is nointegration-testsflag uploaded anywhere in bot.yml. The full set uploaded today is:spark-client-hadoop-common,utilities,common-and-other-modules,spark-java-tests,spark-scala-tests,hadoop-mr-java-client,spark-core-tests. Could you update the list to match (dropintegration-tests, addspark-core-tests)? Note the same discrepancy exists in theflag_managementcomment in.codecov.yml(lines 71-73), so it'd be worth fixing both together.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked against current apache/master
.github/workflows/bot.yml: the uploaded flags arespark-client-hadoop-common,utilities,common-and-other-modules,spark-java-tests,spark-scala-tests,hadoop-mr-java-client, andintegration-tests(the last at bot.yml line 1432). There is nospark-core-testsflag in bot.yml. The list here matches, so leaving it as-is.