Skip to content

[SPARK-22072][SPARK-22071][BUILD]Improve release build scripts - #19312

Closed
holdenk wants to merge 5 commits into
apache:masterfrom
holdenk:improve-release-scripts-r2
Closed

[SPARK-22072][SPARK-22071][BUILD]Improve release build scripts#19312
holdenk wants to merge 5 commits into
apache:masterfrom
holdenk:improve-release-scripts-r2

Conversation

@holdenk

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Check JDK version (with javac) and use SPARK_VERSION for publish-release

How was this patch tested?

Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)

@holdenk

Copy link
Copy Markdown
ContributorAuthor

cc @JoshRosen

@SparkQA

Copy link
Copy Markdown

Test build #82048 has finished for PR 19312 at commit aa4cbf6.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon

Copy link
Copy Markdown
Member

retest this please

@SparkQA

Copy link
Copy Markdown

Test build #82056 has finished for PR 19312 at commit aa4cbf6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

fi

# Verify we have the right java version set
java_version=$("${JAVA_HOME}"/bin/javac -version 2>&1 | cut -d " " -f 2)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@holdenk, should we maybe catch the case when JAVA_HOME is missing too?

If so, I think we could do something like ...

if [ -z"$JAVA_HOME" ];thenecho"Please set JAVA_HOME."exit 1
fi
...

Or maybe...

if [[ -x"$JAVA_HOME/bin/javac" ]];then
javac_cmd="$JAVA_HOME/bin/javac"else
javac_cmd=javac
fi
java_version=$("$javac_cmd" -version 2>&1| cut -d "" -f 2)
...

I tested both in my local.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The logic we use in make-distribution to resolve JAVA_HOME when not set is a bit more complicated, but I think for the release script its reasonable (and probably a good practice) to explicitly require a JAVA_HOME to be set so I'll go with the first of the 2.

@HyukjinKwonHyukjinKwon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment

asfgit pushed a commit that referenced this pull request Sep 22, 2017
## What changes were proposed in this pull request?
Check JDK version (with javac) and use SPARK_VERSION for publish-release
## How was this patch tested?
Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)
Author: Holden Karau <holden@us.ibm.com>
Closes#19312 from holdenk/improve-release-scripts-r2.
(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <holden@us.ibm.com>
asfgit pushed a commit that referenced this pull request Sep 22, 2017
## What changes were proposed in this pull request?
Check JDK version (with javac) and use SPARK_VERSION for publish-release
## How was this patch tested?
Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)
Author: Holden Karau <holden@us.ibm.com>
Closes#19312 from holdenk/improve-release-scripts-r2.
(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <holden@us.ibm.com>
@SparkQA

Copy link
Copy Markdown

Test build #82071 has finished for PR 19312 at commit 94d7659.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@holdenk

Copy link
Copy Markdown
ContributorAuthor

Merged to master, branch-2.2, and branch-2.1.

MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
## What changes were proposed in this pull request?
Check JDK version (with javac) and use SPARK_VERSION for publish-release
## How was this patch tested?
Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)
Author: Holden Karau <holden@us.ibm.com>
Closesapache#19312 from holdenk/improve-release-scripts-r2.
(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <holden@us.ibm.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@holdenk@SparkQA@HyukjinKwon@srowen