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

GH-44085: [CI][R] Update Ubuntu version for R force test #44087

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
15 changes: 7 additions & 8 deletions ci/docker/linux-apt-r.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -81,25 +82,23 @@ 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
Comment on lines +89 to +94
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I reading this correctly that this ends up being effectively the same thing as 100-102 below, just into a venv?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the system Python on Ubuntu 24.04 forces you to pip install into a virtual env. That's why it fails without this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it. Ok cool. If the tests pass (which they look like they do, this is good to go!)


COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
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 \
Expand Down
4 changes: 4 additions & 0 deletions ci/scripts/r_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)'

Expand Down
Loading