This is an automated email from the ASF dual-hosted git repository.

HyukjinKwon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-connect-rust.git


The following commit(s) were added to refs/heads/master by this push:
     new 87434bc  [MINOR][INFRA] Fix coverage badge publish aborting at `git 
checkout badges`
87434bc is described below

commit 87434bc711fce5dcf7d47bd71dfb210719508433
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Thu Aug 27 10:16:24 2026 +0900

    [MINOR][INFRA] Fix coverage badge publish aborting at `git checkout badges`
    
    ### What changes were proposed in this pull request?
    
    Write the Rust llvm-cov report to `coverage-rust-llvm.json` (was
    `coverage-rust.json`), and read that name in the badge parser.
    
    ### Why are the changes needed?
    
    The coverage job's "Create/update badges branch" step fails on master:
    
    ```
    error: The following untracked working tree files would be overwritten by 
checkout:
            coverage-rust.json
    Please move or remove them before you switch branches.
    Aborting
    ```
    
    `coverage-rust.json` is the badge file tracked at the root of the `badges`
    branch (the shields.io endpoint the README reads). The Rust coverage report 
was
    written to that same path in the working tree, so `git checkout badges` 
refused
    to overwrite the untracked report with the branch's tracked badge, and the
    publish aborted.
    
    Renaming the raw report removes the name clash. The badge committed to the
    `badges` branch is still `coverage-rust.json`, so the README endpoint URL is
    unchanged.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No (CI badge publishing only).
    
    ### How was this patch tested?
    
    The remaining `coverage-rust.json` references are only the badge copied 
onto the
    `badges` branch; the report and parser now use `coverage-rust-llvm.json`, 
so no
    untracked file collides with the badges branch at checkout. (The publish 
step
    runs only on a master push, so it is verified on merge.)
    
    This pull request and its description were written by Isaac.
    
    Closes #62 from HyukjinKwon/fix-badge-checkout-collision.
    
    Authored-by: Hyukjin Kwon <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .github/workflows/coverage.yml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 9115b19..83b327f 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -70,7 +70,7 @@ jobs:
       - name: Generate Rust coverage report
         run: |
           cargo llvm-cov --no-cfg-coverage -p apache-spark-connect \
-            --json --output-path coverage-rust.json
+            --json --output-path coverage-rust-llvm.json
 
       - name: Parse Rust coverage and create badge JSON
         # Extract line coverage % from llvm-cov JSON output and convert to 
shields.io
@@ -80,8 +80,12 @@ jobs:
           python3 << 'PYTHON_EOF'
           import json
 
-          # Read the llvm-cov output
-          with open("coverage-rust.json", "r") as f:
+          # Read the llvm-cov output. NB: this report is named 
coverage-rust-llvm.json,
+          # NOT coverage-rust.json - the latter is the badge file published at 
the root of
+          # the `badges` branch, and an untracked working-tree 
coverage-rust.json here
+          # makes the later `git checkout badges` abort ("untracked working 
tree files
+          # would be overwritten"). Keeping the raw report under a distinct 
name avoids it.
+          with open("coverage-rust-llvm.json", "r") as f:
               data = json.load(f)
 
           # cargo-llvm-cov emits the llvm "export" format: the summary lives 
under


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to