parroty / excoveralls

Coverage report tool for Elixir with coveralls.io integration.
MIT License
820 stars 178 forks source link

Improve logging for a case with the missing source file #295

Closed thgala closed 1 year ago

thgala commented 1 year ago

I would like to propose more granular logging for the case when module's source file does not exist.

Problem

Recently we faced the issue with our CI sometimes producing wrong reports.

All compiled .beam files store the absolute path to the source of the module (which is accessed via module_info). We use GitLab for our CI and by default it checkout the source code with the following pattern:

{builds_dir}/$RUNNER_TOKEN_KEY/$CONCURRENT_ID/$NAMESPACE/$PROJECT_NAME

From one runner to another the absolute path is different. With caching in place new runner was pointing to the wrong address (which was correct on other machine).

Outline

There is nothing wrong with the library itself but I believe more explicit logging message would've helped us to spot the issue faster.

_Initially, I made a wrong assumption that there is a problem with accessing module_info function (since I saw the source files being in place) and went wrong direction._

Same issue described in here.


Let me know if that make sense or you need more information on the problem itself.

parroty commented 1 year ago

Thanks!