codecov / codecov/codecov-action

codecov action not associating upload with branch when commit already exists v2

Open
#1,733 1 comment 2 reactions 1 assignee View on GitHub

@thomasrockhu-codecov is already working on this.

Since Feb 20, 2025.

[Source] Support Area: Report Upload bug codecov/codecov-action
Dominant language
Python
Stars
1.7k
Forks
260
Avg merge
1d 7h
Merged PRs (30d)
1

Description

Hi,

From https://github.com/codecov/codecov-action/issues/1296

We are seeing a result which matches the earlier report.

Tl;Dr: I know guesses are not always helpful, but my guess as to what's happening is that if CI builds on a specific branch using the exact same commit that was previously built in a pull request, the commit doesn't get associated with the branch, perhaps because create-commit has already been run.

In our repository, the develop branch is fast-forward merged into master. That means both branches have the exact same commit.

If the develop branch is uploaded first, that will be displayed correctly.

Then, codecov shows no information about the master branch, even though its github actions ran.

Presumably because it thinks that commit has already been processed.

It's surprising nobody else is experiencing this same issue. How is that possible? Or, there is something else going on.

If you are already using this github action, to replicate the issue (hopefully) fast-forward merge one branch into another. Are the results posted on codecov, and associated with the new branch?

Example step in the job:

      - name: Upload coverage
        if: matrix.coverage
        uses: codecov/codecov-action@v5
        with:
          disable_search: true
          fail_ci_if_error: true
          files: coverage.info
          name: Github Actions
          override_branch: ${{ steps.coverage_branch.outputs.override_branch }}
          token: ${{secrets.CODECOV_TOKEN}}
          verbose: true

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.