Skip to content

Commit 0945a02

Browse files
wesmkszucs
andcommitted
ARROW-7760: [Release] Fix verify-release-candidate.sh since pip3 seems to no longer be in miniconda, install miniconda unconditionally
This change was necessary for me to get the script to finish to completion. Closes #6348 from wesm/pip3-to-pip and squashes the following commits: fcf3ae6 <Wes McKinney> conda environment must be activated for other steps to work if C++ is disabled. Fix selective disabling of integration test components in archery 26da759 <Krisztián Szűcs> always set up miniconda 490ceac <Wes McKinney> pip3 no longer in miniconda Lead-authored-by: Wes McKinney <wesm+git@apache.org> Co-authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com> Signed-off-by: Wes McKinney <wesm+git@apache.org>
1 parent 6aaa9b3 commit 0945a02

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

dev/archery/archery/integration/runner.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,23 +227,23 @@ def get_static_json_files():
227227
]
228228

229229

230-
def run_all_tests(enable_cpp=True, enable_java=True, enable_js=True,
231-
enable_go=True, run_flight=False,
230+
def run_all_tests(with_cpp=True, with_java=True, with_js=True,
231+
with_go=True, run_flight=False,
232232
tempdir=None, **kwargs):
233233
tempdir = tempdir or tempfile.mkdtemp()
234234

235235
testers = []
236236

237-
if enable_cpp:
237+
if with_cpp:
238238
testers.append(CPPTester(kwargs))
239239

240-
if enable_java:
240+
if with_java:
241241
testers.append(JavaTester(kwargs))
242242

243-
if enable_js:
243+
if with_js:
244244
testers.append(JSTester(kwargs))
245245

246-
if enable_go:
246+
if with_go:
247247
testers.append(GoTester(kwargs))
248248

249249
static_json_files = get_static_json_files()

dev/release/verify-release-candidate.sh

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
# LD_LIBRARY_PATH.
3131
#
3232
# To reuse build artifacts between runs set TMPDIR environment variable to
33-
# a directory where the temporary files should be placed to.
33+
# a directory where the temporary files should be placed to, note that this
34+
# directory is not cleaned up automatically.
3435

3536
case $# in
3637
3) ARTIFACT="$1"
@@ -126,7 +127,7 @@ test_binary() {
126127
local download_dir=binaries
127128
mkdir -p ${download_dir}
128129

129-
python3 $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER --dest=${download_dir}
130+
python $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER --dest=${download_dir}
130131
verify_dir_artifact_signatures ${download_dir}
131132
}
132133

@@ -207,11 +208,13 @@ setup_tempdir() {
207208
echo "Failed to verify release candidate. See ${TMPDIR} for details."
208209
fi
209210
}
210-
trap cleanup EXIT
211211

212212
if [ -z "${TMPDIR}" ]; then
213+
# clean up automatically if TMPDIR is not defined
213214
TMPDIR=$(mktemp -d -t "$1.XXXXX")
215+
trap cleanup EXIT
214216
else
217+
# don't clean up automatically
215218
mkdir -p "${TMPDIR}"
216219
fi
217220
}
@@ -235,6 +238,15 @@ setup_miniconda() {
235238
fi
236239

237240
. $MINICONDA/etc/profile.d/conda.sh
241+
242+
conda create -n arrow-test -y -q -c conda-forge \
243+
python=3.6 \
244+
nomkl \
245+
numpy \
246+
pandas \
247+
six \
248+
cython
249+
conda activate arrow-test
238250
}
239251

240252
# Build and test Java (Requires newer Maven -- I used 3.3.9)
@@ -251,15 +263,6 @@ test_package_java() {
251263
# Build and test C++
252264

253265
test_and_install_cpp() {
254-
conda create -n arrow-test -y -q -c conda-forge \
255-
python=3.6 \
256-
nomkl \
257-
numpy \
258-
pandas \
259-
six \
260-
cython
261-
conda activate arrow-test
262-
263266
mkdir -p cpp/build
264267
pushd cpp/build
265268

@@ -503,7 +506,7 @@ test_integration() {
503506
export ARROW_JAVA_INTEGRATION_JAR=$JAVA_DIR/tools/target/arrow-tools-$VERSION-jar-with-dependencies.jar
504507
export ARROW_CPP_EXE_PATH=$CPP_BUILD_DIR/release
505508

506-
pip3 install -e dev/archery
509+
pip install -e dev/archery
507510

508511
INTEGRATION_TEST_ARGS=""
509512

@@ -552,7 +555,6 @@ test_source_distribution() {
552555
test_package_java
553556
fi
554557
if [ ${TEST_CPP} -gt 0 ]; then
555-
setup_miniconda
556558
test_and_install_cpp
557559
fi
558560
if [ ${TEST_CSHARP} -gt 0 ]; then
@@ -686,9 +688,9 @@ test_wheels() {
686688
conda create -yq -n py3-base python=3.7
687689
conda activate py3-base
688690

689-
python3 $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER \
690-
--regex=${filter_regex} \
691-
--dest=${download_dir}
691+
python $SOURCE_DIR/download_rc_binaries.py $VERSION $RC_NUMBER \
692+
--regex=${filter_regex} \
693+
--dest=${download_dir}
692694

693695
verify_dir_artifact_signatures ${download_dir}
694696

@@ -751,6 +753,9 @@ setup_tempdir "arrow-${VERSION}"
751753
echo "Working in sandbox ${TMPDIR}"
752754
cd ${TMPDIR}
753755

756+
setup_miniconda
757+
echo "Using miniconda environment ${MINICONDA}"
758+
754759
if [ "${ARTIFACT}" == "source" ]; then
755760
dist_name="apache-arrow-${VERSION}"
756761
if [ ${TEST_SOURCE} -gt 0 ]; then
@@ -759,14 +764,17 @@ if [ "${ARTIFACT}" == "source" ]; then
759764
tar xf ${dist_name}.tar.gz
760765
else
761766
mkdir -p ${dist_name}
767+
if [ ! -f ${TEST_ARCHIVE} ]; then
768+
echo "${TEST_ARCHIVE} not found, did you mean to pass TEST_SOURCE=1?"
769+
exit 1
770+
fi
762771
tar xf ${TEST_ARCHIVE} -C ${dist_name} --strip-components=1
763772
fi
764773
pushd ${dist_name}
765774
test_source_distribution
766775
popd
767776
elif [ "${ARTIFACT}" == "wheels" ]; then
768777
import_gpg_keys
769-
setup_miniconda
770778
test_wheels
771779
else
772780
import_gpg_keys

0 commit comments

Comments
 (0)