Skip to content

Commit

Permalink
[SPARK-20102] Fix nightly packaging and RC packaging scripts w/ two m…
Browse files Browse the repository at this point in the history
…inor build fixes

## What changes were proposed in this pull request?

The master snapshot publisher builds are currently broken due to two minor build issues:

1. For unknown reasons, the LFTP `mkdir -p` command began throwing errors when the remote directory already exists. This change of behavior might have been caused by configuration changes in the ASF's SFTP server, but I'm not entirely sure of that. To work around this problem, this patch updates the script to ignore errors from the `lftp mkdir -p` commands.
2. The PySpark `setup.py` file references a non-existent `pyspark.ml.stat` module, causing Python packaging to fail by complaining about a missing directory. The fix is to simply drop that line from the setup script.

## How was this patch tested?

The LFTP fix was tested by manually running the failing commands on AMPLab Jenkins against the ASF SFTP server. The PySpark fix was tested locally.

Author: Josh Rosen <joshrosen@databricks.com>

Closes #17437 from JoshRosen/spark-20102.
  • Loading branch information
JoshRosen committed Mar 27, 2017
1 parent 0588dc7 commit 314cf51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dev/create-release/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,15 @@ if [[ "$1" == "package" ]]; then
dest_dir="$REMOTE_PARENT_DIR/${DEST_DIR_NAME}-bin"
echo "Copying release tarballs to $dest_dir"
# Put to new directory:
LFTP mkdir -p $dest_dir
LFTP mkdir -p $dest_dir || true
LFTP mput -O $dest_dir 'spark-*'
LFTP mput -O $dest_dir 'pyspark-*'
LFTP mput -O $dest_dir 'SparkR_*'
# Delete /latest directory and rename new upload to /latest
LFTP "rm -r -f $REMOTE_PARENT_DIR/latest || exit 0"
LFTP mv $dest_dir "$REMOTE_PARENT_DIR/latest"
# Re-upload a second time and leave the files in the timestamped upload directory:
LFTP mkdir -p $dest_dir
LFTP mkdir -p $dest_dir || true
LFTP mput -O $dest_dir 'spark-*'
LFTP mput -O $dest_dir 'pyspark-*'
LFTP mput -O $dest_dir 'SparkR_*'
Expand All @@ -271,13 +271,13 @@ if [[ "$1" == "docs" ]]; then
PRODUCTION=1 RELEASE_VERSION="$SPARK_VERSION" jekyll build
echo "Copying release documentation to $dest_dir"
# Put to new directory:
LFTP mkdir -p $dest_dir
LFTP mkdir -p $dest_dir || true
LFTP mirror -R _site $dest_dir
# Delete /latest directory and rename new upload to /latest
LFTP "rm -r -f $REMOTE_PARENT_DIR/latest || exit 0"
LFTP mv $dest_dir "$REMOTE_PARENT_DIR/latest"
# Re-upload a second time and leave the files in the timestamped upload directory:
LFTP mkdir -p $dest_dir
LFTP mkdir -p $dest_dir || true
LFTP mirror -R _site $dest_dir
cd ..
exit 0
Expand Down
1 change: 0 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def _supports_symlinks():
'pyspark.ml',
'pyspark.ml.linalg',
'pyspark.ml.param',
'pyspark.ml.stat',
'pyspark.sql',
'pyspark.streaming',
'pyspark.bin',
Expand Down

0 comments on commit 314cf51

Please sign in to comment.