Skip to content

Code coverage report not working #23647

Closed

Description

@alamb

Code coverage was enabled in this PR from @buraksenn

However, @Jefffrey noticed a problem that makes the report unusable (it doesn't have a base commit to compare with).

If we can't get a code coverage report that shows the coverage change of a PR, I don't think the coverage tests are very useful

when i open https://app.codecov.io/gh/apache/datafusion it seems to show master as default

image
  • the latest commit shown there seems to be pretty old a9f7cac

i cant seem to find main in the dropdown

image

is this an issue we need to fix? i see a comment on my PR how base (main) doesnt have a coverage report uploaded, is this related?

edit: or maybe its still processing on codecov's end

Originally posted by @Jefffrey in #23336 (comment)

Activity

  1. alamb commented on Jul 16, 2026

    @alamb
    ContributorAuthor

    #23336 (comment) from @Jefffrey (error about token required)

    oh im seeing this log on main:

    info - 2026-07-16 10:36:05,200 -- Found 1 coverage files to report
    info - 2026-07-16 10:36:05,200 -- > /__w/datafusion/datafusion/target/codecov.json
    info - 2026-07-16 10:36:05,651 -- Upload queued for processing complete
    error - 2026-07-16 10:36:05,651 -- Upload queued for processing failed: {"message":"Token required because branch is protected"}
    
  2. buraksenn commented on Jul 16, 2026

    @buraksenn
    Contributor

    It was using CODECOV_TOKEN from repository secrets and since I saw it was working in my branch I did not ping any maintainer about this.

          - name: Upload coverage to codecov.io
            uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac  # v5
            with:
              files: target/codecov.json
              fail_ci_if_error: false
              token: ${{ secrets.CODECOV_TOKEN }}
    

    I think this needs to be checked but I'll take a look in detail

  3. buraksenn commented on Jul 16, 2026

    @buraksenn
    Contributor

    Then an admin needs to change default branch to main in codecov: https://community.codecov.com/t/codecov-default-branch-doesn-t-match-gh-default-branch/4442/2

  4. alamb commented on Jul 16, 2026

    @alamb
    ContributorAuthor

    Ok, I added the CODECOV_TOKEN from the codecov UI to https://github.com/apache/datafusion/settings/secrets/actions

    Image

    Let's see if that fixes the problem

  5. Jefffrey commented on Jul 17, 2026

    @Jefffrey
    Contributor

    looks like comparing against main works now

    #22695 (comment)

    and i can find main on the website: https://app.codecov.io/gh/apache/datafusion/tree/main

    by default it still has master on the homepage; i tried logging in to change it but dont think i have the required access to do so 🤔

  6. alamb commented on Jul 17, 2026

    @alamb
    ContributorAuthor

    by default it still has master on the homepage; i tried logging in to change it but dont think i have the required access to do so 🤔

    I logged in and changed the default branch (I am not sure how I have access -- maybe just by authorizing via github because I have write access to the report)

    Image
  7. Jefffrey commented on Jul 17, 2026

    @Jefffrey
    Contributor

    looks like we're good to close this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    development-processRelated to development process of DataFusion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions