From 8f573dd29639952463baea99df7cb0a5409a22e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 12 Sep 2024 15:54:36 +0200 Subject: [PATCH 1/3] GH-44085: [CI][R] Update Ubuntu version for R force test --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 92e0e63fb7ea5..f7e661633626b 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -123,7 +123,7 @@ jobs: fail-fast: false matrix: r: ["4.4"] - ubuntu: [20.04] + ubuntu: [24.04] force-tests: ["true"] env: R: ${{ matrix.r }} From 5dfa24784b5da815b567f484c9c8727d1172454b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 12 Sep 2024 17:44:57 +0200 Subject: [PATCH 2/3] Use virtualenvironment instead of system python to avoid failures --- ci/docker/linux-apt-r.dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ci/docker/linux-apt-r.dockerfile b/ci/docker/linux-apt-r.dockerfile index 630b96e1007b9..4be5adf246b88 100644 --- a/ci/docker/linux-apt-r.dockerfile +++ b/ci/docker/linux-apt-r.dockerfile @@ -58,6 +58,7 @@ RUN apt-get update -y && \ locales \ # Need Python to check py-to-r bridge python3 \ + python3-venv \ python3-pip \ python3-dev && \ locale-gen en_US.UTF-8 && \ @@ -81,15 +82,16 @@ RUN cat /arrow/ci/etc/rprofile >> $(R RHOME)/etc/Rprofile.site # Also ensure parallel compilation of C/C++ code RUN echo "MAKEFLAGS=-j$(R -s -e 'cat(parallel::detectCores())')" >> $(R RHOME)/etc/Renviron.site -# Set up Python 3 and its dependencies -RUN ln -s /usr/bin/python3 /usr/local/bin/python && \ - ln -s /usr/bin/pip3 /usr/local/bin/pip - COPY ci/scripts/r_deps.sh /arrow/ci/scripts/ COPY r/DESCRIPTION /arrow/r/ RUN /arrow/ci/scripts/r_deps.sh /arrow -RUN pip install -U pip setuptools wheel +ENV ARROW_PYTHON_VENV /arrow-dev +COPY python/requirements-build.txt /arrow/python/ +RUN python3 -m venv ${ARROW_PYTHON_VENV} && \ + source ${ARROW_PYTHON_VENV}/bin/activate && \ + pip install -U pip setuptools wheel && \ + pip install -r arrow/python/requirements-build.txt COPY ci/scripts/install_minio.sh /arrow/ci/scripts/ RUN /arrow/ci/scripts/install_minio.sh latest /usr/local @@ -97,9 +99,6 @@ RUN /arrow/ci/scripts/install_minio.sh latest /usr/local COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ RUN /arrow/ci/scripts/install_gcs_testbench.sh default -COPY python/requirements-build.txt /arrow/python/ -RUN pip install -r arrow/python/requirements-build.txt - ENV \ ARROW_ACERO=ON \ ARROW_BUILD_STATIC=OFF \ From 1185fe48faf7f51e14db2c9ec066d14da8716beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 12 Sep 2024 18:38:40 +0200 Subject: [PATCH 3/3] Try to activate virtualenv before running r tests --- ci/scripts/r_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh index fe9d18edb8cbb..d5fd78914755e 100755 --- a/ci/scripts/r_test.sh +++ b/ci/scripts/r_test.sh @@ -26,6 +26,10 @@ pushd ${source_dir} printenv +if [ -n "${ARROW_PYTHON_VENV:-}" ]; then + . "${ARROW_PYTHON_VENV}/bin/activate" +fi + # Run the nixlibs.R test suite, which is not included in the installed package ${R_BIN} -e 'setwd("tools"); testthat::test_dir(".", stop_on_warning = TRUE)'