Skip to content

Commit

Permalink
ARROW-7733: [Developer] Download new enough Go locally in release ver…
Browse files Browse the repository at this point in the history
…ification script

Some developers have failed to run the Go part of the verification script because the version of Go required is newer than what is installed by some Linux package managers, such as Ubuntu 18.04

This also fixes the pesky need to write `TEST_DEFAULT=0 TEST_SOURCE=1 ... source $VERSION $RC_NUM` when `TEST_SOURCE=1` is redundant with the `source` mode. Additionally miniconda is only installed when it is needed by one of the verification steps

Closes #6710 from wesm/ARROW-7733

Authored-by: Wes McKinney <wesm+git@apache.org>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
wesm committed Mar 25, 2020
1 parent 28bd4da commit 04d7da8
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,31 @@ test_ruby() {
}

test_go() {
local VERSION=1.14.1
local ARCH=amd64

if [ "$(uname)" == "Darwin" ]; then
local OS=darwin
else
local OS=linux
fi

local GO_ARCHIVE=go$VERSION.$OS-$ARCH.tar.gz
wget https://dl.google.com/go/$GO_ARCHIVE

mkdir -p local-go
tar -xzf $GO_ARCHIVE -C local-go
rm -f $GO_ARCHIVE

export GOROOT=`pwd`/local-go/go
export GOPATH=`pwd`/local-go/gopath
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH

pushd go/arrow

go get -v ./...
go test ./...
go clean -modcache

popd
}
Expand Down Expand Up @@ -705,8 +726,11 @@ test_wheels() {
# By default test all functionalities.
# To deactivate one test, deactivate the test and all of its dependents
# To explicitly select one test, set TEST_DEFAULT=0 TEST_X=1
if [ "${ARTIFACT}" == "source" ]; then
TEST_SOURCE=1
fi

: ${TEST_DEFAULT:=1}
: ${TEST_SOURCE:=${TEST_DEFAULT}}
: ${TEST_JAVA:=${TEST_DEFAULT}}
: ${TEST_CPP:=${TEST_DEFAULT}}
: ${TEST_CSHARP:=${TEST_DEFAULT}}
Expand Down Expand Up @@ -735,6 +759,14 @@ TEST_JS=$((${TEST_JS} + ${TEST_INTEGRATION_JS}))
TEST_GO=$((${TEST_GO} + ${TEST_INTEGRATION_GO}))
TEST_INTEGRATION=$((${TEST_INTEGRATION} + ${TEST_INTEGRATION_CPP} + ${TEST_INTEGRATION_JAVA} + ${TEST_INTEGRATION_JS} + ${TEST_INTEGRATION_GO}))

if [ "${ARTIFACT}" == "wheels" ]; then
TEST_WHEELS=1
else
TEST_WHEELS=0
fi

NEED_MINICONDA=$((${TEST_CPP} + ${TEST_WHEELS} + ${TEST_INTEGRATION}))

: ${TEST_ARCHIVE:=apache-arrow-${VERSION}.tar.gz}
case "${TEST_ARCHIVE}" in
/*)
Expand All @@ -750,8 +782,10 @@ setup_tempdir "arrow-${VERSION}"
echo "Working in sandbox ${TMPDIR}"
cd ${TMPDIR}

setup_miniconda
echo "Using miniconda environment ${MINICONDA}"
if [ ${NEED_MINICONDA} -gt 0 ]; then
setup_miniconda
echo "Using miniconda environment ${MINICONDA}"
fi

if [ "${ARTIFACT}" == "source" ]; then
dist_name="apache-arrow-${VERSION}"
Expand All @@ -762,7 +796,7 @@ if [ "${ARTIFACT}" == "source" ]; then
else
mkdir -p ${dist_name}
if [ ! -f ${TEST_ARCHIVE} ]; then
echo "${TEST_ARCHIVE} not found, did you mean to pass TEST_SOURCE=1?"
echo "${TEST_ARCHIVE} not found"
exit 1
fi
tar xf ${TEST_ARCHIVE} -C ${dist_name} --strip-components=1
Expand Down

0 comments on commit 04d7da8

Please sign in to comment.