Skip to content
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

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

Closed
wants to merge 5 commits into from

Conversation

holdenk
Copy link
Contributor

@holdenk holdenk commented Sep 21, 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)

@holdenk
Copy link
Contributor Author

holdenk commented Sep 21, 2017

cc @JoshRosen

@SparkQA
Copy link

SparkQA commented Sep 21, 2017

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
Member

retest this please

@SparkQA
Copy link

SparkQA commented Sep 22, 2017

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.

@@ -95,6 +95,28 @@ if [ -z "$SPARK_VERSION" ]; then
| grep -v INFO | grep -v WARNING | grep -v Download)
fi

# Verify we have the right java version set
java_version=$("${JAVA_HOME}"/bin/javac -version 2>&1 | cut -d " " -f 2)
Copy link
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" ]; then
  echo "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
Contributor Author

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.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

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>
@asfgit asfgit closed this in 8f130ad Sep 22, 2017
@SparkQA
Copy link

SparkQA commented Sep 22, 2017

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
Contributor Author

holdenk commented Sep 22, 2017

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>

Closes apache#19312 from holdenk/improve-release-scripts-r2.

(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <holden@us.ibm.com>
Sign up for free to 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