Description
Coverage for __init__.py
is suddenly being ignored in reports uploaded to codecov. I still get coverage for these files in the locally generated coverage output. It’s only when I view the report online that these files seem be ignored.
This started happening about 6 days ago following this totally innocuous commit on my repo: https://github.com/lexicalunit/spellbot/commit/ff593b818d42d15bce99137b3d5b809ffe8ef2fc
Repository
CI/CD
GitHub Actions
Uploader
Commit SHAs
committed 04:33AM - 02 Aug 20 UTC
Codecov YAML
I don’t have any codecov.yml
file. I do have a .coveragerc
file though if that matters:
[run]
branch = True
source = src/spellbot
omit =
src/spellbot/_version.py
src/spellbot/versions/env.py
[report]
ignore_errors = True
exclude_lines =
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
tom
August 8, 2020, 4:07pm
#2
Hi @lexicalunit , I’m guessing this might be a path fixing issue. Could you try adding something like
fixes:
"::src/spellbot/"
Hey @tom , I don’t see a fixes
configuration property documented here: https://coverage.readthedocs.io/en/latest/config.html
Did you mean that I should put that somewhere else other than .coveragerc
? If so, where?
Ah, I see it’s a setting in codecov.yml
. I don’t actually have that file. Do I just add it to the root of my repository? I guess I can try that.
@tom Ok I added that file with those contents to the root of my repository: https://github.com/lexicalunit/spellbot/commit/0a95520d1422026e91d6bf2b08ab4b7e727556b3
But the report is still ignoring __init__.py
: https://codecov.io/gh/lexicalunit/spellbot/tree/0a95520d1422026e91d6bf2b08ab4b7e727556b3/src/spellbot
Please note that codecov started ignoring this file randomly about 6 days ago after no changes on my part so I’m pretty sure it’s not something I changed. This used to work fine. Something broke or changed on codecov’s side of things for sure.
tom
August 10, 2020, 4:50pm
#6
Hi @lexicalunit , this is my fault, it should read
fixes:
- "::src/spellbot/"
It is quite strange that it stopped working 6 days ago, I don’t see anything in particular that should signal a shift. If that doesn’t work, let me know, and I can dig in a bit deeper.
tom
August 10, 2020, 6:06pm
#8
Posting there here so it won’t get lost.
Some additional info about the issue:
opened 05:54PM - 10 Aug 20 UTC
closed 06:05PM - 10 Aug 20 UTC
Starting a little over a week ago __init__.py files are removed from codecov reporting.
Output from my test suite
Showing that __init__.py is...
tom
August 12, 2020, 6:49pm
#9
Hi @lexicalunit , would you be able to try
fixes:
- "__init__.py::src/spellbot/__init__.py"
1 Like
Uh… weird. I am now getting some weird error on my reports.
https://codecov.io/gh/lexicalunit/spellbot/commit/a932ece8adb1da120116631eda7800e48f17c6b8
The error is: “Unable to find report content in the storage archive”
Not sure why this is suddenly happening or if it’s at all related to this change?