-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-15207][BUILD] Use Travis CI for Java Linter and JDK7/8 compilation test #12980
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 CI passed. It took less than 25 minutes. |
|
Hi, @rxin and @andrewor14 . |
|
Test build #58080 has finished for PR 12980 at commit
|
|
Definitely, the failure is not related to this PR since this PR just adds |
|
I don't think this hurts, except that it adds yet another place to look for test results. (PS you want to add "test-compile" as a target too). What is the reason it's disabled for Jenkins, just time? Is it really that resource intensive to check lint? |
|
Thank you for review, @srowen . Right, I'll add 'test-compile`, too. I'm not sure the root cause of that. According to the github log, it was created, disabled (HOTFIX) by @rxin , re-enabled by @rxin and reverted by @zsxwing historically. I've heard that from @andrewor14 that it was resource intensive, too. Anyway, two weeks ago, when I tried to re-enable that according to @rxin 's request during in the following PR, there was a functional problem on java linter on AMP clusters. [SPARK-14868][BUILD] Enable NewLineAtEofChecker in checkstyle and fix lint-java errors So, I fixed that in the following PR. Now I think that Java Linter works now in AMP cluster without any problems. [SPARK-14867][BUILD] Remove However, in this PR, I propose to use Travis CI more actively for simple code analysis and compilation for the following main reasons. (I know that Spark uses Travis CI historically and Travis CI cannot supports Spark full testing.)
|
|
Hi, @srowen . I added https://travis-ci.org/dongjoon-hyun/spark/builds/128708372 For your concern about As you know, pull requesters do not read carefully |
|
Test build #58110 has finished for PR 12980 at commit
|
|
I don't think it's a bad thing to have some kind of Travis build running in parallel as long as people understand what it is. Maybe some extra comments in the .travis.yml file to explain its purpose? So it sounds like we could actually re-enable lint in the main build, but the concern is speed? but the Java lint checks themselves seem to take just a few seconds: Almost all the time in that Travis run is downloading stuff, compiling, and running the other lint checks. |
|
Yep, I did the same question before. All CI suffers the same issue, but it's the purpose of CI. |
|
Yeah but the Jenkins builds already have to download all that stuff to run everything else like the main build right? the additional cost of running lint-java is small? or did I misunderstand the problem? |
FYI. This is not correct. The problem is |
|
A solution is always running |
|
You're right. I maybe didn't remember the exact phrase I've read before. By the way, 'this wastes a lot time for sbt building' is effectively different from 'lack of resource'? Time/CPU/Network are all the resource. |
|
Hi, @zsxwing . |
|
Travic CI was finished with JDK7 (30min) and JDK8 (31min) in parallel 30 minutes ago. |
|
Test build #58190 has finished for PR 12980 at commit
|
|
Hi, @srowen . |
|
@srowen |
|
Test build #58204 has finished for PR 12980 at commit
|
|
Test build #58208 has finished for PR 12980 at commit
|
.travis.yml
Outdated
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Travis CI Guide |
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.
The only other change I'd suggest here is clearly explaining the purpose of this test harness -- it exists just to run lint-java. A pointer to the discussions here would be more useful than general Travis pointers.
|
@srowen , I updated the comments by explaining the purpose of this test harness clearly. I didn't described about the Jenkins-related stuff because that's not the main purpose of this PR or this test harness. As you said, the main purpose is to help contributors run lint-java during their preparing PR. I also described about Scalascala since Scalastyle is executed by |
|
Test build #58243 has finished for PR 12980 at commit
|
|
OK, seems reasonable to give this a shot in master and see how it goes. |
|
Merged in master |
|
@dongjoon-hyun - What's the intended workflow here? Is the intention that contributors will manually open Travis to check the build results? Because last time we asked, Apache would not grant us permission to set commit status on GitHub. (This gives the green checkmark next to each commit after the build passes.) That's why we currently have Jenkins post comments in the PR body. |
|
Thank you, @srowen ! |
|
Hi, @nchammas . Thank you so much for fast attention! First of all, I'm not sure about the history well. But, maybe, Apache policy seems to be changed now. In addition, there are many tools to check the your Travis CI status. For mac, the simplest tool is CCMenu. You don't need to open web browser absolutely. If you are a Mac user, could you try CCMenu and share your thought again? Also, I think you want to see the green marks on Spark PR, right? |
|
Yeah I don't think this will cause Travis to post those nice build messages. Right now it won't even email us. It does let anyone who cares go look to see if the lint tests have been failing. Right now there's not really a way to notice it other than trying it manually. If it's just not useful we can disable it, or can have it send build failure emails, or whatever. I think it's worth just test driving EDIT: Don't make an infra JIRA. We know the answer to that question already, don't raise it again please. |
|
@dongjoon-hyun - Here's the previous discussion: https://issues.apache.org/jira/browse/INFRA-7367 It looks like Apache Infra has always supported posting build status from the Apache-owned Travis account to GitHub. That may be all we need. Otherwise, my concern is that without build status being communicated directly on the PR somehow, people are unlikely to use and benefit from this new piece of testing. As @srowen said, if we want to do this anyway as a trial that's totally fine of course. I think for it to make a real impact, though, we need to connect that final piece of reporting status back to the PR. |
|
Yep. Thank you for giving test drive chance, @srowen and for understanding that, @nchammas . |
|
@nchammas . I see what you mean now. For INFRA-7367 , Jenkins wanted to use Travis CI API. Yes, it's not possible as you said. We're able to see just |
|
Hi, All. Since this PR was committed a week ago, I've been monitoring Travis CI on my forked master branch (with updating every 30 minutes). It had worked fine without failure until 3 hours ago. Currently, after the commit, [SPARK-14906][ML] Copy linalg in PySpark to new ML package, I'm going to investigate this further for a few days. |
## What changes were proposed in this pull request? #12980 added Travis CI file mainly for linter because we disabled Java lint check in Jenkins. It's enabled as of #21399 and now SBT runs it. Looks we can now remove the file added before. ## How was this patch tested? N/A Closes #22665 Closes #22667 from HyukjinKwon/SPARK-25673. Authored-by: hyukjinkwon <[email protected]> Signed-off-by: hyukjinkwon <[email protected]> (cherry picked from commit 2199224) Signed-off-by: hyukjinkwon <[email protected]>
## What changes were proposed in this pull request? apache#12980 added Travis CI file mainly for linter because we disabled Java lint check in Jenkins. It's enabled as of apache#21399 and now SBT runs it. Looks we can now remove the file added before. ## How was this patch tested? N/A Closes apache#22665 Closes apache#22667 from HyukjinKwon/SPARK-25673. Authored-by: hyukjinkwon <[email protected]> Signed-off-by: hyukjinkwon <[email protected]>
## What changes were proposed in this pull request? apache#12980 added Travis CI file mainly for linter because we disabled Java lint check in Jenkins. It's enabled as of apache#21399 and now SBT runs it. Looks we can now remove the file added before. ## How was this patch tested? N/A Closes apache#22665 Closes apache#22667 from HyukjinKwon/SPARK-25673. Authored-by: hyukjinkwon <[email protected]> Signed-off-by: hyukjinkwon <[email protected]>
What changes were proposed in this pull request?
Currently, Java Linter is disabled in Jenkins tests.
https://github.com/apache/spark/blob/master/dev/run-tests.py#L554
However, as of today, Spark has 721 java files with 97362 code (without blank/comments). It's about 1/3 of Scala.
This PR aims to take advantage of Travis CI to handle the following static analysis by adding a single file,
.travis.ymlwithout any additional burden on the existing servers.Note that this PR does not propose to remove some of the above work items from the Jenkins. It's possible, but we need to observe the Travis CI stability for a while. The main goal of this issue is to remove committer's overhead on linter-related PRs (the original PR and the fixation PR).
How was this patch tested?
Pass the Travis CI tests. Please see the following link.
https://travis-ci.org/dongjoon-hyun/spark/builds/128595350
https://travis-ci.org/dongjoon-hyun/spark/builds/128708372