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

Set threshold for Coveralls failure #7455

Open
dlech opened this issue Jun 24, 2021 · 5 comments
Open

Set threshold for Coveralls failure #7455

dlech opened this issue Jun 24, 2021 · 5 comments

Comments

@dlech
Copy link
Sponsor Contributor

dlech commented Jun 24, 2021

Since MicroPython coverage tests have non-deterministic behavior, many lines of code are executed a different number of times in each CI run. Coveralls takes this number into account when calculating the coverage, so often we get "failures" due to variance between runs even though nothing actually changed. Coveralls provides a threshold setting for what constitutes failure. This could be set (or increased if it is already set) to reduce the number of nuisance "failures".

image

@dpgeorge
Copy link
Member

Since MicroPython coverage tests have non-deterministic behavior,

I don't think its non-deterministic, I think it's just that Coveralls does not work properly. Eg:
coveralls

How can line 192 not be executed if line 193 is? And how can line 202 be executed if lines 198 and 200 are not?

Coveralls provides a threshold setting for what constitutes failure.

It's set to quite a small number so that it catches a single line that is now uncovered by a new PR. This actually used to work in the past, it alerted me a few times when the coverage decreased by 1 or 2 lines.

So:

  1. coveralls seems broken
  2. setting the threshold too high effectively renders the test useless because it can just gradually get less and less coverage over time (if tests are not written)

Given that, we should probably just remove the coveralls check. Would be great to replace with something that is part of GitHub workflows/actions, and I don't think that is too difficult. Eg I'm already generating this page using lcov daily: https://micropython.org/resources/code-coverage/

@dlech
Copy link
Sponsor Contributor Author

dlech commented Jun 25, 2021

Codecov might be an alternative too. I've never used it.

@dpgeorge
Copy link
Member

Codecov might be an alternative too.

Thanks for the hint! See #7457.

dpgeorge added a commit to dpgeorge/micropython that referenced this issue Jun 25, 2021
As discussed in micropython#7455, Coveralls doesn't work properly anymore, it has
many spurious errors with reduced coverage.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge
Copy link
Member

Switched to Codecov in c940597. Let's see if it's any better. Can easily revert back to Coveralls if needed.

@dpgeorge dpgeorge reopened this Jun 25, 2021
@dpgeorge
Copy link
Member

Looks like Codecov has the same issues as Coveralls. So that means there's something wrong with the data generated by lcov as part of the coverage build.

tannewt pushed a commit to tannewt/circuitpython that referenced this issue Jan 17, 2023
…socket

espressif: always make new client sockets be non-blocking
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

No branches or pull requests

2 participants