Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate why code coverage badge in README shows such a low number #5099

Closed
yurishkuro opened this issue Jan 14, 2024 · 6 comments
Closed
Labels
bug good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@yurishkuro
Copy link
Member

Badge

image

Codecov

image

Pull request

Meanwhile, in the pull requests

image
@yurishkuro yurishkuro added bug help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Jan 14, 2024
@yurishkuro
Copy link
Member Author

Possible explanation:

image

this points to a commit f313486 which is not even on the main branch, but a work in progress commit in another branch:

image

@Pushkarm029
Copy link
Member

Pushkarm029 commented Jan 15, 2024

Yes, we see low code coverage due to a work-in-progress branch because there are a lot of indirect changes that significantly drops the codecov percentage.

Possible solution:

  • instead of showing the main branch codecov, we show a release branch(eg: v1.52.0) coverage in the readme.
  • & then write a GH Action to change the old release to the new release in the readme when a release comes.

main -> release

@yurishkuro
Copy link
Member Author

instead of showing the main branch codecov, we show a release branch

But why are changes from unrelated branch showing up in the badge if the badge is supposed to explicitly track the main branch? We do not merge random stuff into main, and we do not keep release branches, so the HEAD of main is the golden source, and its coverage is supposed to show as 95%.

@chirag-ghosh
Copy link
Contributor

The badge now shows correct output:
image

Did anything change?

@Pushkarm029
Copy link
Member

@chirag-ghosh, This is showing correctly now because the latest commit has 95% code coverage. It will break again if you make some significant code changes in an unrelated branch.

The primary purpose of this ticket is to investigate why codecov includes unrelated branch commits in the main. You can research more about it here.

@jkowall
Copy link
Contributor

jkowall commented Jun 8, 2024

This seems to be resolved now, as the trends on https://app.codecov.io/gh/jaegertracing/jaeger look healthy.

@jkowall jkowall closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

No branches or pull requests

4 participants