Skip to content

[MINOR][INFRA] Fix Rust coverage badge stuck at 0.0% (wrong llvm-cov JSON key) - #61

Closed
HyukjinKwon wants to merge 1 commit into
apache:masterfrom
HyukjinKwon:fix-coverage-badges
Closed

HyukjinKwon wants to merge 1 commit into
apache:masterfrom
HyukjinKwon:fix-coverage-badges

Conversation

@HyukjinKwon

@HyukjinKwon HyukjinKwon commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Fix the Rust coverage badge, which always showed 0.0% (red) even though the
crate is ~90% covered.

The badge parser read data[0]["line_coverage_percent"] from the
cargo llvm-cov --json output, but that key does not exist. The llvm "export"
format puts the summary under data[0]["totals"]["lines"]["percent"] (and
regions/functions). The lookup missed, fell back to 0, and published
"0.0%". Read totals.lines.percent instead (falling back to regions then
functions).

Why are the changes needed?

The published Rust coverage badge misreported real coverage as 0%. (The Python
badge was unaffected - it already reads totals.percent_covered.)

Does this PR introduce any user-facing change?

No (CI badge only).

How was this patch tested?

Verified against real cargo llvm-cov --json output locally: the parser now
yields the actual line-coverage percentage instead of 0.

This pull request and its description were written by Isaac.

…JSON key)

The Rust coverage badge always showed 0.0% (red) while the crate is actually
~90% covered. The parser read data[0]["line_coverage_percent"] from the
`cargo llvm-cov --json` output, but that key does not exist: the llvm "export"
format puts the summary under data[0]["totals"]["lines"]["percent"] (and
regions/functions). The lookup missed, fell back to 0, and published "0.0%".

Read totals.lines.percent (falling back to regions then functions). Verified
against real `cargo llvm-cov --json` output locally: the parser now yields the
actual line-coverage percentage instead of 0. Python coverage was unaffected.

Co-authored-by: Isaac <no-reply@databricks.com>
@HyukjinKwon HyukjinKwon changed the title [MINOR][INFRA][DOCS] Fix coverage badges (root publish + Rust 0.0% parser) and the UDFs page [MINOR][INFRA] Fix Rust coverage badge stuck at 0.0% (wrong llvm-cov JSON key) Aug 27, 2026
@HyukjinKwon
HyukjinKwon deleted the fix-coverage-badges branch September 7, 2026 22:39
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.

2 participants