opamp-go icon indicating copy to clipboard operation
opamp-go copied to clipboard

[codecov] Reports compare to old base branch

Open andykellr opened this issue 1 year ago • 0 comments

This was first mentioned by @srikanthccv in a comment on https://github.com/open-telemetry/opamp-go/pull/192 and I noticed the issue on my recent PR as well https://github.com/open-telemetry/opamp-go/pull/209.

When looking at the codecov report for #209, it indicates that it is comparing to a BASE that is 29 commits old.

Coverage data is based on HEAD 8c346ad compared to BASE efddaa2 BASE commit is 29 commits behind HEAD on main c1931d7

@srikanthccv submitted this issue to codecov https://github.com/codecov/feedback/issues/123

I tried to dig into this a little more and am creating this issue to add some things I discovered.

I noticed a similar issue in the community boards which mentions how codecov finds the base branch. https://community.codecov.com/t/how-to-prevent-codecov-from-using-a-commit-older-than-the-base-of-the-pr-to-do-comparison/3513

the only way for Codecov to compare against is by the coverage reported from a commits’ parents. If those don’t exist, Codecov will keep going backwards until it hits a commit that has coverage.

I looked into the actions for this repo and noticed that the last run for main uploaded the codecov results for @tigrannajaryan's branch and not this repo even though it was run against main of this repo.

Actions job for most recent merge to main: https://github.com/open-telemetry/opamp-go/actions/runs/6551245736

test-coverage log output:

[2023-10-17T18:20:32.584Z] ['info'] Uploading...
[2023-10-17T18:20:32.740Z] ['info'] {"status":"processing","resultURL":"https://app.codecov.io/github/tigrannajaryan/opamp-go/commit/c1931d7bacc7424e274e5bbdb47ab16829c438de"}
[2023-10-17T18:20:32.740Z] ['verbose'] End of uploader: 966 milliseconds

I suspect this is the source of the problem, but I don't know how to fix it.

andykellr avatar Oct 25 '23 16:10 andykellr