-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-30534][INFRA] Use mvn in dev/scalastyle
#27242
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,18 +17,10 @@ | |||||||||||||||||||||||||||||
# limitations under the License. | ||||||||||||||||||||||||||||||
# | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive"} | ||||||||||||||||||||||||||||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
# NOTE: echo "q" is needed because SBT prompts the user for input on encountering a build file | ||||||||||||||||||||||||||||||
# with failure (either resolution or compilation); the "q" makes SBT quit. | ||||||||||||||||||||||||||||||
ERRORS=$(echo -e "q\n" \ | ||||||||||||||||||||||||||||||
| build/sbt \ | ||||||||||||||||||||||||||||||
${SPARK_PROFILES} \ | ||||||||||||||||||||||||||||||
-Pdocker-integration-tests \ | ||||||||||||||||||||||||||||||
-Pkubernetes-integration-tests \ | ||||||||||||||||||||||||||||||
scalastyle test:scalastyle \ | ||||||||||||||||||||||||||||||
| awk '{if($1~/error/)print}' \ | ||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||
SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive -Pdocker-integration-tests -Pkubernetes-integration-tests"} | ||||||||||||||||||||||||||||||
ERRORS=$($SCRIPT_DIR/../build/mvn $SPARK_PROFILES scalastyle:check | grep "^error file") | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, I guess this is a temp fix and we should fix SBT build to use HTTPs correctly .. am I correct? If this was a non-temp fix, we should rather have another script like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? This is a permanent fix for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is it affects PR builder: Lines 182 to 187 in 32af700
and switching to Maven wasn't encouraged in PR builder; so I had to add such script to use SBT There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to make a fix for SBT but wasn't able to reproduce. I removed all If I am not wrong SBT uses HTTPs: spark/project/SparkBuild.scala Line 227 in a3357df
https://www.scala-sbt.org/0.13/docs/Resolvers.html So, I was wondering how to reproduce. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't we simply copy this new file as And, Github Actions calls FYI, currently Jenkins PR builder directly calls Lines 190 to 196 in 32af700
lint-java for similar reason.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm +1 for any suggestion if you make a PR and pass all system (including GitHub Action). :) BTW, did you try to checkout one of older commits than this, @HyukjinKwon ? If it works in your environment even in that case, it sounds weird to me because of the following. As you can see on the mailing list, this was reported by @tgravescs and I confirmed the situation. Then, I made this PR at that time. Also, GitHub Action log still shows the whole situation (the failures before this commit and the successes after this commit). For now, I don't have any clue about the difference (code side? or Maven server side? or your environment?). In any way, you can move forward whiling keeping our system green. We had better discuss on your PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked this with dca8380 again. It still fails before this commit. Please try to checkout old commit in your environment, @HyukjinKwon .
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for pointer, @dongjoon-hyun! |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
if test ! -z "$ERRORS"; then | ||||||||||||||||||||||||||||||
echo -e "Scalastyle checks failed at following occurrences:\n$ERRORS" | ||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
This came from
lint-java
.