Coverage not updated on "merge --ff-only"

Description

When developing our software, we use the common approach of working in a ‘development’ branch, and merging that branch into master once we push for a new release.
We usually merge into master with a ‘fast-forward’ approach, so no new ‘merge’ commit gets created.

However, this creates issues for codecov.
When looking at our CI pipeline, the codecov part says: “remained the same compared to hash-of-commit”.
On the codecov website, the master branch does not get updated either, resulting in a wrong coverage badge…

This is really frustrating, as I do not want to create merge requests etc. for the sole purpose of getting codecov to work! I feel codecov should see that the master branch pointer has moved and use the correct report.

Repository

Hi @0phoff

This should work. Can you share a recent PR number and commit SHA so we can check our logs?

Hey,

If you take a look at my codecov branch page, you will see that the master branch has not been updated for 6 months and is supposedly still on commit c42eff6.
However, my master branch is currently at commit cf704dae, and this link shows the CI job that should have pushed a new coverage report. This link shows the entire CI pipeline for that commit on the master branch.

Thanks a lot for looking into this!

Kind regards

Commit cf704dae9bbc7603a6c8fa41d8591006b39a8212 is showing as branch develop in our database

Even though you clearly uploaded it as branch master. I think this may be an issue where we don’t always update the branch if the same commit is uploaded from different branches.

Is there a chance you uploaded this same commit on develop, prior?

Yes, I push to develop whilst developing the code and once I want to push a new release I checkout master and do:

git merge --ff-only develop
git push

So every commit first comes in the development branch prior to reaching master

Oh, you merge on the command line, not via a PR and a CI process? Do you upload the reports again after merging to master? Otherwise, Codecov has no way of knowing the branch changes for that commit.