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

Unable to generate backend coverage report #16192

Closed
lkbhitesh07 opened this issue Oct 3, 2022 · 9 comments
Closed

Unable to generate backend coverage report #16192

lkbhitesh07 opened this issue Oct 3, 2022 · 9 comments
Assignees
Labels
bug Label to indicate an issue is a regression

Comments

@lkbhitesh07
Copy link
Member

Describe the bug
When I try to locally generate the backend coverage check, I'm not able to get the results. The script ends with this error Can't combine line data with arc data.

To Reproduce
Steps to reproduce the behavior:

  1. Run any backend test with the flag --generate_coverage_report
  2. See the error

Observed behavior
Receiving the error instead of a coverage report.

Expected behavior
I should be able to see the coverage report.

Screenshots / Videos
Screenshot from 2022-10-03 20-12-17

Desktop (please complete the following information; delete this section if the issue does not arise on desktop):

  • OS: Ubuntu
  • Browser: Chrome
  • Browser-version: [e.g. 22]
@lkbhitesh07 lkbhitesh07 added triage needed bug Label to indicate an issue is a regression labels Oct 3, 2022
@lkbhitesh07
Copy link
Member Author

Hey @IamEzio @U8NWXD, WIll you please take a look at this? I'm kind of blocked on this particular part.
Thanks

@IamEzio
Copy link
Contributor

IamEzio commented Oct 3, 2022

Hi @lkbhitesh07, I too am investigating this issue for a while now. But normally it means that the coverage for the target file is 100% and you can go ahead.

@lkbhitesh07
Copy link
Member Author

lkbhitesh07 commented Oct 3, 2022

Hi @lkbhitesh07, I too am investigating this issue for a while now. But normally it means that the coverage for the target file is 100% and you can go ahead.

Oh! but that is not the case here. I do have some coverage left but I'm not able to see it.
Edit Also can you please tell me a temporary hack to disable the branch coverage?

@U8NWXD
Copy link
Member

U8NWXD commented Oct 4, 2022

@lkbhitesh07 can you try deleting any .coverage.* data files? See https://stackoverflow.com/a/56478984

@U8NWXD U8NWXD assigned lkbhitesh07 and unassigned U8NWXD and IamEzio Oct 4, 2022
@lkbhitesh07
Copy link
Member Author

Thanks, @U8NWXD

@lkbhitesh07
Copy link
Member Author

Hey @U8NWXD, Just wanted to report this one thing. After removing the coverage files as suggested, the previous error was gone but I was introduced to this new error:

Ran 12 tests in 1 test class.
All tests passed.
Combined data file .coverage.lkbhitesh07-HP-Laptop-15-da0077tx.184650.blpaorkmiazuvusa
Traceback (most recent call last):
  File "/home/lkbhitesh07/.pyenv/versions/3.7.10/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/lkbhitesh07/.pyenv/versions/3.7.10/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/lkbhitesh07/Desktop/oppia/oppia/scripts/run_backend_tests.py", line 609, in <module>
    main()
  File "/home/lkbhitesh07/Desktop/oppia/oppia/scripts/run_backend_tests.py", line 536, in main
    report_stdout, coverage = check_coverage(True)
  File "/home/lkbhitesh07/Desktop/oppia/oppia/scripts/run_backend_tests.py", line 603, in check_coverage
    coverage = float(coverage_result.group('total'))
AttributeError: 'NoneType' object has no attribute 'group'

I tried going through the links you provided but I wasn't able to get much info as I'm not much familiar with the internal concepts of coverage part.
Thanks

@lkbhitesh07 lkbhitesh07 assigned U8NWXD and unassigned lkbhitesh07 Oct 5, 2022
@U8NWXD
Copy link
Member

U8NWXD commented Oct 12, 2022

Are there any errors farther up? This message usually means that the coverage report was malformed

@U8NWXD U8NWXD assigned lkbhitesh07 and unassigned U8NWXD Oct 12, 2022
@U8NWXD
Copy link
Member

U8NWXD commented Nov 7, 2022

Closing due to inactivity. @lkbhitesh07 please feel free to reopen if you're still having issues

@U8NWXD U8NWXD closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label to indicate an issue is a regression
Projects
Archived in project
Development

No branches or pull requests

3 participants