-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Set MAVEN_OPTS for Travis-CI #75
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
Conversation
Travis builds occasionally fail with Java heap space error. This commit sets higher limits to fix the issue mentioned above.
6c921b0 to
fec9e40
Compare
|
We actually recommend the following setup: Do you think we should enable the tests after we have fixed our flaky tests? |
|
@liorze : thank you for the comment! I actually copied it from my local environment. That's what I have been using. Regarding the tests: yes, that's what I think. |
|
I'll update the DEVNOTES as part of FLUME-2945, thanks. Re/ tests, I think we have a few more tests to fix, it looks doable. Let's give it a try and go with plan b if it takes to much time to fix. |
|
@liorze : thank you for offering to fix the DEVNOTES. (Although, I'm not sure how this is related to switching to Java 8) Do you have any other review comments for this change? |
|
It's related because the No, LGTM. |
|
I think, if we have MAVEN_OPTS = "..." mvn, then we need to have MAVEN_SKIP_RC = 1. If we are going to use multiple mvn ... commands, then I think it's easier to set it up in one place. (before_install) The caching is to speed up the builds. ( https://docs.travis-ci.com/user/caching/#Arbitrary-directories ) |
Thanks for helping me understand. Maybe add a comment about this for people new to Travis?
Why? I don't understand the reason
We aren't doing that yet, right? Would we ever do that? Personally I like to avoid putting stuff in default locations for build scripts in order to avoid unintended side effects either in other concurrent builds or in future builds. I just don't like to "pollute" the environment. However, I'm guessing Travis uses a Docker image or something like that and wipes out the home dir before each build so you can leave cruft in $HOME and it will never affect future builds. Is that right? |
I did not notice huge speedups, so I'm just going to remove it for now.
According to http://stackoverflow.com/a/35755762/5323166 , if there are any defaults (mavenrc, etc.) set in the FS, Afaik, all Travis-CI build environments are "disposable" (the Docker stuff you have mentioned), so it should be fine to "pollute" the environment, but we can go YAGNI and change it later. |
.travis.yml
Outdated
| - $HOME/.m2 | ||
| before_install: | ||
| - echo "MAVEN_OPTS='-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m'" > ~/.mavenrc | ||
| - export MAVEN_SKIP_RC="true" |
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.
Do you have evidence that this line is required? If so, can you please add a comment about it?
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.
When I remove the MAVEN_SKIP_RC setting, the build fails.
I think, that line is required. I'll include a comment about this.
I wasn't asking to remove it, just for a comment to be added to the yaml file, but either way is OK with me. |
fc4339f to
da6275b
Compare
mpercy
left a comment
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.
+1 looks good, thanks!
|
Thank you, @mpercy I'm about to commit this |
Travis builds occasionally fail with Java heap space error. This commit sets higher limits to fix the issue mentioned above. Reviewers: Lior Zeno, Mike Percy This closes apache#75 Change-Id: I4f4a275833ef513eb7aa56ec9660cf29e9212086
Travis builds occasionally fail with Java heap space error.
This commit sets higher limits to fix the issue mentioned above.