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

Consider contents when choosing between v1/legacy ReportParser #630

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

Swatinem
Copy link
Contributor

We are capturing a couple internal errors where the VersionOneReportParser tries to json-parse something that is not JSON.

In particular, this event shows that the reportfile contents look rather like a Legacy format: https://codecov.sentry.io/issues/5258384165/events/1c65937e66614ec5b5f56743c3d42132/

To make this more bulletproof, this will now check that the format "looks like" JSON when choosing the parser, before it actually tries to fully json-parse the contents.

Fixes WORKER-MMH

@Swatinem Swatinem requested a review from a team August 16, 2024 12:33
@Swatinem Swatinem self-assigned this Aug 16, 2024
@codecov-staging
Copy link

codecov-staging bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #630   +/-   ##
=======================================
  Coverage   98.13%   98.14%           
=======================================
  Files         438      438           
  Lines       36565    36572    +7     
=======================================
+ Hits        35884    35892    +8     
+ Misses        681      680    -1     
Flag Coverage Δ
integration 98.14% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.14% <100.00%> (+<0.01%) ⬆️
unit 98.14% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.12% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/report/__init__.py 97.39% <100.00%> (ø)
services/report/parser/__init__.py 100.00% <100.00%> (ø)
services/report/parser/tests/unit/test_parsers.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@codecov-qa
Copy link

codecov-qa bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.14%. Comparing base (201323d) to head (c08ee10).
Report is 13 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #630   +/-   ##
=======================================
  Coverage   98.13%   98.14%           
=======================================
  Files         438      438           
  Lines       36565    36572    +7     
=======================================
+ Hits        35884    35892    +8     
+ Misses        681      680    -1     
Flag Coverage Δ
integration 98.14% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.14% <100.00%> (+<0.01%) ⬆️
unit 98.14% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.12% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/report/__init__.py 97.39% <100.00%> (ø)
services/report/parser/__init__.py 100.00% <100.00%> (ø)
services/report/parser/tests/unit/test_parsers.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

codecov-public-qa bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.14%. Comparing base (201323d) to head (c08ee10).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #630   +/-   ##
=======================================
  Coverage   98.13%   98.14%           
=======================================
  Files         438      438           
  Lines       36565    36572    +7     
=======================================
+ Hits        35884    35892    +8     
+ Misses        681      680    -1     
Flag Coverage Δ
integration 98.14% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.14% <100.00%> (+<0.01%) ⬆️
unit 98.14% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.12% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/report/__init__.py 97.39% <100.00%> (ø)
services/report/parser/__init__.py 100.00% <100.00%> (ø)
services/report/parser/tests/unit/test_parsers.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (201323d) to head (c08ee10).
Report is 13 commits behind head on main.

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #630   +/-   ##
=======================================
  Coverage   98.15%   98.16%           
=======================================
  Files         473      473           
  Lines       37770    37777    +7     
=======================================
+ Hits        37075    37083    +8     
+ Misses        695      694    -1     
Flag Coverage Δ
integration 98.14% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.14% <100.00%> (+<0.01%) ⬆️
unit 98.14% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.15% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/report/__init__.py Critical 97.39% <100.00%> (ø)
services/report/parser/__init__.py 100.00% <100.00%> (ø)
services/report/parser/tests/unit/test_parsers.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Related Entrypoints
run/app.tasks.upload.UploadProcessor

@Swatinem Swatinem force-pushed the swatinem/v1-report-mismatch branch from afdef97 to c08ee10 Compare August 16, 2024 12:54
@Swatinem Swatinem added this pull request to the merge queue Aug 27, 2024
Merged via the queue into main with commit 02183f5 Aug 27, 2024
25 of 26 checks passed
@Swatinem Swatinem deleted the swatinem/v1-report-mismatch branch August 27, 2024 08:32
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.

2 participants