Incorrect code coverage due to wrong base commit and recent commits to main missing from Codecov dashboard

Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.
I have verified that my repository is using the Codecov GitHub app, if using GitHub
I have validated my codecov.yaml configuration file.
I have filled out the below sections to the best of my ability.


Description of the issue
We recently reenabled codecov after the security incident with the old uploader. When reenabling with the new uploader, Codecov chooses an old commit from back when Codecov was enabled (over a year ago) to compare to instead of a newer branch. Furthermore, the commits to main aren’t even updating on Codecov. I know that Codecov picks the most recent commit with passing coverage as a base, but the commits to main from the last year aren’t even showing up on our dashboard.


Please provide a link to the CI/CD run.
Codecov (Is this what you’re looking for?)

Codecov Output

Please provide the full output of running the uploader on your CI/CD. This will typically have the Codecov logo as ASCII.

     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2022-12-01T18:47:57.225Z] ['info'] => Project root located at: /Users/distiller/project
[2022-12-01T18:47:57.232Z] ['info'] -> No token specified or token is empty
[2022-12-01T18:47:57.259Z] ['info'] Searching for coverage files...
[2022-12-01T18:47:57.393Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-12-01T18:47:57.393Z] ['info'] If Codecov did not locate your files, please review
[2022-12-01T18:47:57.393Z] ['info'] => Found 1 possible coverage files:
[2022-12-01T18:47:57.393Z] ['info'] Processing /Users/distiller/project/coverage.lcov...
[2022-12-01T18:47:57.423Z] ['info'] Detected CircleCI as the CI provider.
[2022-12-01T18:47:57.425Z] ['info'] Pinging Codecov:*******&branch=jill%2Ffix-codecov&build=97673&
[2022-12-01T18:47:58.074Z] ['info']
[2022-12-01T18:47:58.075Z] ['info'] Uploading...
[2022-12-01T18:47:58.378Z] ['info'] {"status":"success","resultURL":""}
CircleCI received exit code 0

Expected Results

Please provide what you expect to have happened (e.g. a file that has missing coverage on a particular line).
It’s expected that codecov would pick a recent passing commit from main to compare coverage to, not a stale (year old) commit. As a result, the diff coverage is N/A and somehow, our coverage decreased by over 20%. It is also expected behavior that the Codecov dashboard shows the recent commits to main, regardless of coverage status. Codecov displays the recent pull requests but not recent commits. It’s strange.

Actual Results

Please provide what actually happened.
Codecov chose a base commit from when codecov was last enabled (a year ago), and the diff coverage is available. Codecov also displays recent commits to main.

Additional Information

Any additional information, configuration, or data that might be necessary to reproduce the issue.

Hi @jcard, thanks for trusting us and re-enabling Codecov.

The old commit is the first commit on main that has coverage. We use main as it’s the default branch, which you can change in the Codecov settings. It is also possible that we use main since the PR is for the main branch.

You mentioned that you have more recent commits passing coverage on main. Do you have commit SHAs for them?