-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[HUDI-587] Fixed generation of jacoco coverage reports. #1298
Conversation
surefire plugin's argLine is moved into a property. This configuration allows jacoco plugin to modify the argLine to insert it's Java Agent's configuration during pre-unit-test stage.
@@ -113,6 +113,7 @@ | |||
<spark.bundle.hive.shade.prefix></spark.bundle.hive.shade.prefix> | |||
<utilities.bundle.hive.scope>provided</utilities.bundle.hive.scope> | |||
<utilities.bundle.hive.shade.prefix></utilities.bundle.hive.shade.prefix> | |||
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine> |
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.
@prashantwason this has a side effect of making the builds run slower. The reason is that when a build is submitted in travis, it needs to wait for resources to be available for the build to get triggered. My understanding is that if we ask for a larger JVM for non-IntegrationTest modules as well, this will make the process slower.
How much more memory is required for the coverage report ?
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 don't think travis has the smarts to grok this and get the resource needs? We just get a VM with some fixed RAM https://docs.travis-ci.com/user/reference/overview/
-Xmx
won't also grab the 1GB right off the bat.. do you see the builds slowing down? would be interesting to understand why..
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 did not add this line. It was already part of the maven-surefire plugin's argLine. I just moved the definition to a property so that jacoco plugin can add its own java-agent config to it and the unit tests can execute with jacococ agent enabled.
This was added in the following commit 3 months ago:
#979
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.
Okay, makes sense.
@vinothchandar I don't see it slowing down, just had a hunch, merging this as this does not seem to have any side-effect.
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.
lgtm
What is the purpose of the pull request
Fix generation of jacococ coverage reports after unit tests are run.
Brief change log
surefire plugin's argLine is moved into a property. This configuration allows jacoco plugin to modify the argLine to insert it's Java Agent's configuration during pre-unit-test stage.
Verify this pull request
This pull request is already covered by existing tests, such as (please describe tests).
Executed unit test and confirmed that coverage report is generated. See these logs:
mvn test -Dtest=TestHoodieActiveTimeline
10:33:33 [INFO] --- jacoco-maven-plugin:0.7.8:prepare-agent (pre-unit-test) @ hudi-common ---
10:33:33 [INFO] argLine set to -javaagent:/home/pwason/.m2/repository/org/jacoco/org.jacoco.agent/0.7.8/org.jacoco.agent-0.7.8-runtime.jar=destfile=/home/pwason/work/java/incubator-hudi/hudi-common/target/coverage-reports/jacoco-ut.exec -Xmx1024m -XX:MaxPermSize=256m
...
...
10:33:41 [INFO] --- jacoco-maven-plugin:0.7.8:report (post-unit-test) @ hudi-common ---
10:33:41 [INFO] Loading execution data file /home/pwason/work/java/incubator-hudi/hudi-common/target/coverage-reports/jacoco-ut.exec
10:33:42 [INFO] Analyzed bundle 'hudi-common' with 273 classes
ls -al hudi-common/target/coverage-reports/jacoco-ut.exec
-rw-rw-r-- 1 pwason pwason 49240 Jan 31 10:33 hudi-common/target/coverage-reports/jacoco-ut.exec
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.