Skip to content

[MINOR][INFRA] Fix coverage badge publish + measure real (e2e) Rust coverage - #62

Closed
HyukjinKwon wants to merge 1 commit into
apache:masterfrom
HyukjinKwon:fix-badge-checkout-collision
Closed

HyukjinKwon wants to merge 1 commit into
apache:masterfrom
HyukjinKwon:fix-badge-checkout-collision

Conversation

@HyukjinKwon

@HyukjinKwon HyukjinKwon commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Two fixes to the coverage workflow:

  1. Stop the badges publish from aborting. The Rust llvm-cov report was
    written to coverage-rust.json, which is also the badge file tracked at the
    root of the badges branch. git checkout badges then refused to overwrite
    the untracked report ("untracked working tree files would be overwritten:
    coverage-rust.json") and the publish failed on master. The report is now
    coverage-rust-llvm.json; the badge committed to the badges branch is still
    coverage-rust.json, so the README endpoint URL is unchanged.

  2. Measure the real Rust coverage. The job ran cargo llvm-cov with no Spark
    server, so the crate's behavioral e2e tests (tests/e2e_*.rs), which self-gate
    on SPARK_REMOTE, were skipped - collapsing the badge to unit-only (~73%)
    though the true line coverage is ~90%. Start a Spark 4.2.0 Connect server
    (JDK 17 + the downloaded dist + Python worker deps, mirroring
    build_python_connect.yml) and run llvm-cov with
    SPARK_REMOTE=sc://localhost:15002 so the e2e suite runs and counts.

Why are the changes needed?

The badges publish step failed on every master push, and the Rust badge
under-reported coverage as ~73% (unit-only) instead of the real ~90%.

Does this PR introduce any user-facing change?

No (CI badge publishing only).

How was this patch tested?

The publish step runs only on a master push (verified on merge). The e2e
coverage path mirrors the parity job's server setup, which is exercised on this
PR's own CI. The 0.0% badge-parser bug was fixed separately (already on master).

This pull request and its description were written by Isaac.

…adges`

The coverage job's "Create/update badges branch" step aborts on master with:

  error: The following untracked working tree files would be overwritten by
  checkout: coverage-rust.json

The Rust llvm-cov report was written to coverage-rust.json in the working tree,
but coverage-rust.json is ALSO the badge file tracked at the root of the badges
branch (the shields.io endpoint the README reads). So when the step does
`git checkout badges`, git refuses to overwrite the untracked report with the
branch's tracked badge, and the publish fails.

Write the raw llvm-cov report to coverage-rust-llvm.json instead (updating the
parser to read it). The badge published to the badges branch is still
coverage-rust.json, so the README endpoint is unchanged; there is simply no
longer a colliding untracked file at checkout time.

Co-authored-by: Isaac <no-reply@databricks.com>
@HyukjinKwon HyukjinKwon changed the title [MINOR][INFRA] Fix coverage badge publish aborting at git checkout badges [MINOR][INFRA] Fix coverage badge publish + measure real (e2e) Rust coverage Aug 27, 2026
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