mozilla / code-coverage

Code Coverage analysis for Mozilla products
https://coverage.moz.tools/
Mozilla Public License 2.0
29 stars 84 forks source link

Check the size of coverage artifact if it was already downloaded #241

Open rhcu opened 6 years ago

rhcu commented 6 years ago

According to this, https://github.com/marco-c/firefox-code-coverage/blob/cc386da20f389fd5159746d56729e149029de6ae/firefox_code_coverage/codecoverage.py#L81, if there is a downloaded artifact, then we don't download a new one. However, there could be a wrong one: for example, because in the previous try there was a bad Internet connection, and the download was not finished but the file exists. Can this be checked too (for example, to check whether the size of those are equal)? Or won't this condition occur because of this: https://github.com/marco-c/firefox-code-coverage/blob/cc386da20f389fd5159746d56729e149029de6ae/firefox_code_coverage/codecoverage.py#L88? I had the same problem, and I have an artifact that weights 147 bytes and has an empty .info file inside, what seems to be wrong.

marco-c commented 6 years ago

It shouldn't happen as the file is supposed to be removed in case of exceptions (like you said). Maybe the artifact belongs to a test machine that somehow failed to generate the coverage report, generating an empty one. What is the name of the artifact? We can check if it is correct or not by checking the logs of the task.

rhcu commented 6 years ago

I cannot give the name of the artifacts since I have removed the folder with them already but there was something weird. Probably, it was what you described.