Skip to content

Improve coverage failure diagnostics#378

Merged
XuPeng-SH merged 1 commit into
mainfrom
fix/coverage-failure-diagnostics
Jul 3, 2026
Merged

Improve coverage failure diagnostics#378
XuPeng-SH merged 1 commit into
mainfrom
fix/coverage-failure-diagnostics

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Add scripts/summarize_ut_report.py to summarize go test -json reports on UT failure.
  • Run the UT summary only after UT failure, as a best-effort diagnostic step (continue-on-error: true).
  • Append the bounded UT failure summary to GITHUB_STEP_SUMMARY and save it as ut-failure-summary.md.
  • Upload UT-Report.out, ut-failure-summary.md, and ut-report with coverage failure artifacts.
  • Make coverage cleanup tolerant of no running mo-service by using pgrep ... || true.
  • Avoid masking the original UT/BVT failure when raw coverage or BVT covdata is unavailable after an earlier failed/skipped step.

Why

Coverage failures can currently end with low-signal cleanup or artifact-generation errors, while the actionable go test -json failure is only available after manually downloading and parsing large artifacts. This makes failures like Go vet/build failures hard to diagnose from the CI page.

Safety

  • Successful UT output remains unchanged: the go test command still redirects JSON to UT-Report.out, and the summary step does not run.
  • The existing later Checkout for Python file step remains in place for the normal coverage parser path.
  • Diagnostic output is bounded by default:
    • max 10 build failures
    • max 10 failed test/package events
    • max 80 output lines per failure
    • max 20 panic-like samples
  • The summary script scans the report twice and keeps only bounded tails for failed packages/tests, avoiding whole-report output buffering.

Validation

  • Synthetic build-fail report: summary prints the frontend vet failure clearly.
  • Synthetic many-fail report: summary truncates and prints the omitted count.
  • python3 -m py_compile scripts/summarize_ut_report.py
  • YAML parses with PyYAML.
  • actionlint passed after filtering existing custom-runner/existing-expression warnings:
    • custom runner labels: arm64-mo-shanghai-4c8g, amd64-mo-guangzhou-2xlarge16
    • existing needs.setup_mo_test_env expression warnings

@XuPeng-SH XuPeng-SH force-pushed the fix/coverage-failure-diagnostics branch from 950c0ee to ec1c15f Compare July 2, 2026 17:13
@XuPeng-SH XuPeng-SH merged commit 261633e into main Jul 3, 2026
1 check passed
@XuPeng-SH XuPeng-SH deleted the fix/coverage-failure-diagnostics branch July 3, 2026 01:18
@XuPeng-SH XuPeng-SH restored the fix/coverage-failure-diagnostics branch July 3, 2026 01:18
@XuPeng-SH XuPeng-SH deleted the fix/coverage-failure-diagnostics branch July 3, 2026 01:18
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.

1 participant