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

coverage reporting broken? #642

Closed
sbidoul opened this issue Mar 3, 2020 · 10 comments · Fixed by #648
Closed

coverage reporting broken? #642

sbidoul opened this issue Mar 3, 2020 · 10 comments · Fixed by #648

Comments

@sbidoul
Copy link
Member

sbidoul commented Mar 3, 2020

See for example: https://travis-ci.com/OCA/brand/jobs/293455206#L1189-L1199

I have not had time to investigate yet.

@sbidoul
Copy link
Member Author

sbidoul commented Mar 3, 2020

cc/ @sbejaoui

@pedrobaeza
Copy link
Member

Traceback (most recent call last):
  File "/home/travis/maintainer-quality-tools/travis/travis_after_tests_success", line 6, in <module>
    from coveralls import cli as coveralls_cli
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/__init__.py", line 2, in <module>
    from .api import Coveralls
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/api.py", line 13, in <module>
    from .reporter import CoverallReporter
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/reporter.py", line 10, in <module>
    from coverage.report import Reporter
ImportError: cannot import name 'Reporter'

I see the error. @moylop260 any clue?

@moylop260
Copy link
Contributor

Maybe the issue is that pip is ignoring the pinned versions:

ERROR: coveralls 1.8.2 has requirement coverage<5.0,>=3.6,
but you'll have coverage 5.0.3 which is incompatible.

Actually, it is not compatible. hehe

Maybe, a bump version of coverage >=5 and make MQT script compatibles with new version could fix it

@sbidoul
Copy link
Member Author

sbidoul commented Mar 4, 2020 via email

@moylop260
Copy link
Contributor

In fact, the issue is not a pinned version, the issue is because of it is ignoring the pinned version where the script is compatible.

An bump/unpinned version requires a migration of the script in order to be compatible.

But answering the pinned version comes after a issue using a new one:

Reported here:

And fixed here:

IMHO Since that MQT is used for all OCA (and other orgs) projects is better using a pinned version in order to avoid errors for all projects.

@rvalyi
Copy link
Member

rvalyi commented Mar 12, 2020

Hello the coverage is still broken in all OCA repos I could look at.

SHORT VERSION:
here is a .travis.yml patch that will make your coverage work again in your repo:

  - git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
  - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}	  - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
  - travis_install_nightly	  - travis_install_nightly
+  - pip install -q coverage==4.5.4
+  - pip install -q QUnitSuite codecov coveralls

 script:	script:
  - travis_run_tests	  - travis_run_tests

Now Let me see if I understood well and explain:

  1. Basically you guys started pinning codecov==2.0.15 coveralls==1.8. just to get rid of this error in the maintainer-quality-tools tests itself: https://travis-ci.org/github/OCA/maintainer-quality-tools/jobs/637822769#L669 That's what you meant @moylop260 ?? And this is what got the coverage broken in all other OCA repo we made maintainer-quality-tools to watch?? Like we broke all test suites to get the testing tool get its own test run, seriously??
  2. As of today, after my own tests, it seems that even if you brute force install the unpinned codecov and coveralls packages in .travis.yml just before running the tests, it will this fail and this is because we get this error in the travis_after_tests_success script:
Traceback (most recent call last):
  File "/home/travis/maintainer-quality-tools/travis/travis_after_tests_success", line 6, in <module>
    from coveralls import cli as coveralls_cli
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/__init__.py", line 2, in <module>
    from .api import Coveralls
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/api.py", line 13, in <module>
    from .reporter import CoverallReporter
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/reporter.py", line 10, in <module>
    from coverage.report import Reporter
ImportError: cannot import name 'Reporter'

Some googling led me to "coveralls is not working for python 3.5 or 3.8":
creare-com/podpac#347

So then I tried pinning pip install coverage==4.5.4 in .travis.yml and suddenly it started working again:
proof:
Travis: https://travis-ci.org/github/akretion/l10n-brazil/jobs/661524702#L2386
Codecov.io https://codecov.io/gh/akretion/l10n-brazil/commit/e3349639a6a5b1e837a2bdc7fdaa16d767a76b4f/graphs/sunburst

Now the question is how do we fix this for real in the maintainer-quality-tools?
cc @sbidoul @moylop260 @pedrobaeza

@legalsylvain
Copy link

Thanks a lot raphael for the explanation.

@pedrobaeza
Copy link
Member

The diff doesn't seem correct. We are not using anymore coveralls.

@rvalyi
Copy link
Member

rvalyi commented Mar 12, 2020

The diff doesn't seem correct. We are not using anymore coveralls.

@pedrobaeza Well it seems we still use coveralls: https://github.com/OCA/maintainer-quality-tools/blob/master/travis/travis_after_tests_success#L6

@pedrobaeza
Copy link
Member

But not effectively. That's only old code. Codecov is the one valid. If the issue is solved removing coveralls, then that cleaning should be done instead.

sbidoul added a commit to acsone/maintainer-quality-tools that referenced this issue Mar 14, 2020
sbidoul added a commit to acsone/maintainer-quality-tools that referenced this issue Mar 14, 2020
sbidoul added a commit to acsone/maintainer-quality-tools that referenced this issue Mar 14, 2020
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 a pull request may close this issue.

5 participants