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

Properly check for created coverage files #838

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

Swatinem
Copy link
Contributor

An empty ReportFile is boolean-coerced to False, so we always need to explicitly compare it to None.

This primarily fixes the JetBrainsXML parser always emitting empty Reports. Also fixes cobertura failing on empty filenames, and other smaller fixes.


Fixes codecov/feedback#532
Fixes WORKER-P9A

An empty `ReportFile` is boolean-coerced to `False`, so we always need to explicitly compare it to `None`.

This primarily fixes the `JetBrainsXML` parser always emitting empty `Report`s.
Also fixes cobertura failing on empty filenames, and other smaller fixes.
@Swatinem Swatinem requested a review from a team October 31, 2024 11:22
@Swatinem Swatinem self-assigned this Oct 31, 2024
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.04%. Comparing base (f153619) to head (cea8c11).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/tests/unit/test_process.py 20.00% 8 Missing ⚠️
services/report/languages/mono.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/tests/unit/test_process.py 20.00% 8 Missing ⚠️
services/report/languages/mono.py 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@codecov-qa
Copy link

codecov-qa bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.04%. Comparing base (f153619) to head (cea8c11).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/tests/unit/test_process.py 20.00% 8 Missing ⚠️
services/report/languages/mono.py 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

Copy link

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.04%. Comparing base (f153619) to head (cea8c11).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@Swatinem Swatinem added this pull request to the merge queue Oct 31, 2024
Merged via the queue into main with commit d4909ff Oct 31, 2024
24 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/fix/falsy-file branch October 31, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codecov Fails to Process dotCover DetailedXML Reports
2 participants