chihsuan opened a new pull request, #10857: URL: https://github.com/apache/ozone/pull/10857
## What changes were proposed in this pull request? **Problem.** CI reports test results as a failure-only, grep-based list of test class names. There is no view of pass/fail/skip counts, no per-test detail beyond the class name, and no indication of which tests recovered on rerun in the flaky split. **Fix.** Add `dev-support/ci/junit_summary.py`, a stdlib-only parser and renderer for surefire XML reports, adapted from Apache Kafka's junit.py (summary format concept) and reworked for Maven Surefire XML. It walks the report tree (deduping the module-level and moved-report directories, skipping iteration subdirectories), parses each report including `<flakyFailure>` elements, and renders a Markdown summary with a counts line plus tables for failed, flaky, and skipped tests. A new "Test summary" step in `.github/workflows/check.yml` appends the output to the GitHub Actions step summary; the `test-flaky` split is additionally labeled as quarantined. The step is guarded twice (the script always exits 0, and the step has `continue-on-error: true`), so it can never turn a green check red; on non-test checks it finds no XML and stays silent. The parser deliberately uses stdlib `xml.etree`: the XML is generated by our own Maven run in the same CI job, so it is trusted input and adding defusedxml would introduce a dependency. The script's unit tests (`dev-support/ci/test_junit_summary.py`) are wrapped in `dev-support/ci/junit_summary.bats` and registered in `hadoop-ozone/dev-support/checks/bats.sh`, so they run under the existing bats check without a new check script. Deliberately out of scope, as follow-ups: a quarantine table derived from `@Flaky`/`@Unhealthy` annotations (v1 labels the `test-flaky` split at the job level only), Kafka-style new-test detection (needs test-catalog infrastructure), cross-split aggregation into a single PR-level report, and enabling `rerunFailingTestsCount` outside the flaky split. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-14072 ## How was this patch tested? - `cd dev-support/ci && python3 -m unittest test_junit_summary -v`: 16 tests, OK. The same suite runs in CI via the bats check. - `rat.sh` and `checkstyle.sh`: exit 0. - Local smoke test on a real surefire run (`mvn -pl :hdds-common test -Dtest=TestOzoneConfiguration`, then `junit_summary.py --path hadoop-hdds/common`): renders 48 tests, all passed. - Full fork CI run, all green: https://github.com/chihsuan/ozone/actions/runs/30066967972 - The "Test summary" step succeeded in every job and stayed silent for non-test checks (rat, checkstyle, docs). - integration (client) rendered "755 tests run in 30m24s (total test time): 755 PASSED, 0 FAILED, 0 FLAKY, 0 SKIPPED" with the artifact download link; integration (container) additionally shows a SKIPPED (49) table. - The flaky split rendered "167 tests run: 162 PASSED, 5 FLAKY" with a FLAKY (5) table (rerun detection via `<flakyFailure>` verified against real rerun data) and a QUARANTINED (167) table. - zizmor (workflow lint) passed on the check.yml change. Generated-by: Claude Code -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
