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
Fix #722: aggregate_coverage.py does not aggregate #723
Fix #722: aggregate_coverage.py does not aggregate #723
Conversation
…e reports of the same tracked lines Accumulate the counters of the same tracked blocks of code from multiple coverage files
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
@cyrilleverrier Would you mind signing the CLA? https://www.elastic.co/contributor-agreement/ Looks like this PR makes @stevepeak life easier :-) |
@cyrilleverrier @stevepeak Could this break the partial coverage as the key is only based on the position? https://codecov.io/github/elastic/beats/filebeat/crawler/prospector.go?ref=be576ad137217d37798da766e8570b858c6d4a57#l-51 Not sure, just came to my mind. |
@ruflin : my company signed a "Corporate CLA" and added my name on it. It has been done today, just before I submitted the patches. |
@ruflin I don't know the internal of https://codecov.io but I guess that their server knows how to aggregate identical blocks of code in the same coverage file. |
I'm glad to see a fix for this. I had looked through various go tools to see if there was an existing solution to accumulate the counters but never found one. I wish that And I also think that codecov.io is already handling this since their code coverage numbers appear correct. I had been relying on codecov instead of LGTM |
Yes, codecov is handling this. I know from @stevepeak that they did some magic here to also handle partial lines. My only worry about the script is if this would break it. |
Strangely the coverage files do not load for me for in #722 and get a 404. I assume it is an issue on the codecov side? I will restart the travis build. |
@cyrilleverrier Thanks for the CLA. I probably have to check it manually :-) |
Fix #722: aggregate_coverage.py does not aggregate
@cyrilleverrier Thanks. CLA looks good. |
Hey @ruflin is it to a late to jump in here? Go partial line coverage is fully implemented in our next major release. We are adding a "layers" to our coverage overlay, basically it will have the full line coverage and the partials together (as well as all the builds) in one UI. |
@stevepeak It's never too late :-) I'm curious if the following line would actually work "agains" the future provided by codecov, as it does already the summing up (per full line): https://github.com/elastic/beats/pull/723/files#diff-b4e51af4fe9718b862bd68526748ba44R42 |
@ruflin In terms of aggregating lines we do merge the lines and append the number of hits. The line mentioned may not be necessary. Is this file used exclusively for Codecov? I'm not sure if its necessary because we handle all this merging server side. Thanks! |
@stevepeak It is also use locally. My main concern was that because codecov already gets the aggregated lines, that we perhaps loose some data. |
I see. Have you seen issues with data lose?
|
@stevepeak Didn't check yet. The only loss I could see is some partial line coverage details. So nothing big to worry about :-) I dragged you initially into the conversation as I thought perhaps you could spot a potential issue. |
Fix #722: aggregate_coverage.py does not aggregate the coverage reports of the same tracked lines
Accumulate the counters of the same tracked blocks of code from multiple coverage files