Uh oh!
There was an error while loading. Please reload this page.
[SPARK-22269][BUILD] Run Java linter via SBT for Jenkins - #21399
[SPARK-22269][BUILD] Run Java linter via SBT for Jenkins#21399HyukjinKwon wants to merge 11 commits into
Conversation
SparkQA
commented
May 22, 2018
Test build #90973 has started for PR 21399 at commit |
dongjoon-hyun
commented
May 22, 2018
This is the one? Finally, nice! @HyukjinKwon . |
HyukjinKwon
commented
May 22, 2018
Thanks @dongjoon-hyun. BTW, I am pushing some commits to check if it works in Jenkins and show the results. |
SparkQA
commented
May 22, 2018
Test build #90976 has finished for PR 21399 at commit
|
| ) | ||
| } | ||
| object CheckStyle { |
There was a problem hiding this comment.
How about call it as CheckJavaStyle.
CheckStyle seems a broad concept which should include scala style chceck.
And dev/sbt-checkstyle -> dev/sbt-checkjavastyle or similar
There was a problem hiding this comment.
sbt-checkstyle is actually a package name which is consistent in dev scripts.
CheckStyle is also a package name like Unidoc.
There was a problem hiding this comment.
Let me fix CheckStyle to Checkstyle while I am here btw.
There was a problem hiding this comment.
Ah, I see.
Thanks for clarification as it's a bit confusing.
| libraryDependencies += "com.puppycrawl.tools" % "checkstyle" % "8.2" | ||
| // checkstyle uses guava 23.0. | ||
| libraryDependencies += "com.google.guava" % "guava" % "23.0" |
There was a problem hiding this comment.
I'm a little surprised this is not causing other problems... when I was testing this, it was overriding Spark's own Guava import (which is version 14).
But if it works, awesome.
There was a problem hiding this comment.
Yea but it's plugin dependency here. I was a little surprised too because I was stuck here for a while.
Let me push some more commits in main code and test code too to double check. |
SparkQA
commented
May 22, 2018
Test build #90983 has finished for PR 21399 at commit
|
SparkQA
commented
May 22, 2018
Test build #90982 has finished for PR 21399 at commit
|
SparkQA
commented
May 22, 2018
Test build #90980 has finished for PR 21399 at commit
|
SparkQA
commented
May 22, 2018
Test build #90977 has finished for PR 21399 at commit
|
SparkQA
commented
May 22, 2018
Test build #90984 has finished for PR 21399 at commit
|
HyukjinKwon
commented
May 22, 2018
retest this please |
SparkQA
commented
May 23, 2018
Test build #91000 has finished for PR 21399 at commit
|
HyukjinKwon
commented
May 23, 2018
@vanzin, I will leave it to you as I believe you are the most appropriate one to review this - I assume the approach you initially took is the same with this. I feel quite sure on the current change FWIW. |
vanzin
left a comment
There was a problem hiding this comment.
Let me check what things look like after the build is finished, but otherwise this looks good.
| for f in changed_files): | ||
| # run_java_style_checks() | ||
| pass | ||
| run_java_style_checks() |
There was a problem hiding this comment.
This is really minor, but now you'll be running this when building with maven too. That could be avoided by checking that the build is not using maven; and also changing the maven target from package to verify so that these checks run.
You can add [build-maven] to the PR title to try it out (or locally with AMPLAB_JENKINS_BUILD_TOOL=maven).
vanzin
commented
May 23, 2018
Checked locally and looks good. Feel free to merge if you don't want to address the comment above in this PR. |
HyukjinKwon
commented
May 24, 2018
retest this please |
SparkQA
commented
May 24, 2018
Test build #91076 has finished for PR 21399 at commit
|
SparkQA
commented
May 24, 2018
Test build #91084 has finished for PR 21399 at commit
|
HyukjinKwon
commented
May 24, 2018
^ this one was ran with Maven. I am merging this in. |
HyukjinKwon
commented
May 24, 2018
Merged to master. Thanks all, @dongjoon-hyun, @advancedxy, @vanzin and @felixcheung. |
SparkQA
commented
May 24, 2018
Test build #91085 has finished for PR 21399 at commit
|
## 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#22665Closes#22667 from HyukjinKwon/SPARK-25673. Authored-by: hyukjinkwon <gurwls223@apache.org> Signed-off-by: hyukjinkwon <gurwls223@apache.org> (cherry picked from commit 2199224) Signed-off-by: hyukjinkwon <gurwls223@apache.org>
## 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 Closesapache#22665Closesapache#22667 from HyukjinKwon/SPARK-25673. Authored-by: hyukjinkwon <gurwls223@apache.org> Signed-off-by: hyukjinkwon <gurwls223@apache.org>
## 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 Closesapache#22665Closesapache#22667 from HyukjinKwon/SPARK-25673. Authored-by: hyukjinkwon <gurwls223@apache.org> Signed-off-by: hyukjinkwon <gurwls223@apache.org>
What changes were proposed in this pull request?
This PR proposes to check Java lint via SBT for Jenkins. It uses the SBT wrapper for checkstyle.
I manually tested. If we build the codes once, running this script takes 2 mins at maximum in my local:
Test codes:
Main codes:
How was this patch tested?
Manually tested. Jenkins build should test this.