-
Notifications
You must be signed in to change notification settings - Fork 707
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
Enable Codecoverage Upload (Jacoco/Codecov) #1981
Conversation
TST_EXIT_CODE=$? | ||
|
||
echo "Running mima checks ... " | ||
echo "time ./sbt ++$TRAVIS_SCALA_VERSION $(withCmd mimaReportBinaryIssues)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have the bash flags that print out commands before they are run so this isn't really needed
COMPILE_DOC_EXIT_CODE=$? | ||
|
||
echo "all done" | ||
|
||
exit $(( $TST_EXIT_CODE || $MIMA_EXIT_CODE || $COMPILE_DOC_EXIT_CODE )) | ||
echo "all test checks done" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have bash flags to fail-fast so we don't explicitly need to collect exit codes
Codecov Report
@@ Coverage Diff @@
## develop #1981 +/- ##
==========================================
Coverage ? 40.49%
Complexity ? 1353
==========================================
Files ? 356
Lines ? 26221
Branches ? 4579
==========================================
Hits ? 10617
Misses ? 13938
Partials ? 1666 Continue to review full report at Codecov.
|
Coverage seems quite low. Are we sure it is aggregating all the projects correctly? Many subprojects wind up testing the others. |
there's currently one part in the CI that is failing. It should be a bit higher because of it. I'm not 100% sure why it's failing just get a "step failed" in cascading. I suspect it's due to very high memory usage due to coverage. I can currently reproduce the failure locally when switching coverage on/off before running the test. I'm playing with memory settings but currently not much success. See scoverage/sbt-scoverage#50 |
edit: I though I had coverage enabled for above but I did not so I still have no resolution for sbt-scoverage |
huh: https://github.com/twitter/scalding/runs/5664208563?check_suite_focus=true#step:7:1367 seems one of the jobs fails (in both 2.11 and 2.12) with coverage... I wonder if somehow the instrumentation is making something non-serializable... |
that's completely possible. I've tested https://www.scala-sbt.org/sbt-jacoco/index.html as an alternative on the failing test and it seems to work. I'm going to try it in CI. The downside of jacoco is that it knows nothing about scala (targets bytecode) so it might be slightly less accurate. |
another miscopy typo typo in dirname feed cobertura.xml into codecov instead of scoverage.xml specify files due to autodetect failure use coverageAggregate instead of coverageReport load default codecov behaviour into codecov.yml typo draft impl
autodetect on codecov uploader seems to work new bash features not supported on CI try using jacoco
3b12057
to
dd8e9a6
Compare
export JVM_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:ReservedCodeCacheSize=96m -XX:+TieredCompilation -XX:MaxPermSize=256m -Xms256m -Xmx512m -Xss2m" | ||
|
||
|
||
INNER_JAVA_OPTS="set javaOptions += \"-Dlog4j.configuration=file://$TRAVIS_BUILD_DIR/project/travis-log4j.properties\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no references to this variable while searching through the codebase. I don't think it's used anymore
@johnynek does 40% sound reasonable? It's recording 0% for maple (there is no test folder) and 0% for scalding-avro (no test folder) and 0% for scalding-thrift-macros (there are some tests but maybe it can't trace macros well). I think this is similar to what scoverage was reporting. Report is here: https://codecov.io/gh/twitter/scalding/tree/5db2df2a50b4a92c0fbf934a5dc13b06229624e9 the reference from 2 years ago was 68%: https://codecov.io/gh/twitter/scalding/tree/f1e9670175047724bf23727ab17f807303281150 |
I don't see how it could have fallen so much, but maybe. I was looking through, it marks a lot of lines as partially covered, e.g.: are those being counted? Anyway, this is an improvement, and we can iterate. Thanks for spending the time on this. We can later see if we can find examples of tests that definitely exercise code, but it doesn't see and add an issue at that time. |
@@ -1,7 +1,7 @@ | |||
# Scalding | |||
|
|||
[![Build status](https://github.com/twitter/scalding/actions/workflows/CI.yml/badge.svg?branch=develop)](https://github.com/twitter/scalding/actions) | |||
[![Coverage Status](https://coveralls.io/repos/twitter/scalding/badge.png?branch=develop)](https://coveralls.io/r/twitter/scalding?branch=develop) | |||
[![Coverage Status](https://img.shields.io/codecov/c/github/twitter/scalding/develop.svg?maxAge=3600)](https://codecov.io/github/twitter/scalding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max age is 1h? seems like maybe that should be longer no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with whatever. Although github also does their own caching so it's probably a bit irrelevant
my guess would be that the partial lines are the ones that can throw exceptions. Ie. they are being executed but not all paths covered |
Thanks! |
basically moving changes over from #1922 based on #1977