diff --git a/ci/docker/integration.dockerfile b/ci/docker/integration.dockerfile index 95940fd75..1fcc73fb2 100644 --- a/ci/docker/integration.dockerfile +++ b/ci/docker/integration.dockerfile @@ -18,7 +18,6 @@ FROM apache/arrow-dev:amd64-conda-integration ENV ARROW_USE_CCACHE=OFF \ - ARROW_CPP_EXE_PATH=/build/cpp/debug \ ARROW_NANOARROW_PATH=/build/nanoarrow \ ARROW_RUST_EXE_PATH=/build/rust/debug \ BUILD_DOCS_CPP=OFF \ @@ -61,8 +60,12 @@ RUN git clone https://github.com/apache/arrow-js.git /arrow-integration/js --dep RUN git clone https://github.com/apache/arrow-rs.git /arrow-integration/rust --depth 1 # Build all the integrations except nanoarrow (since we'll do that ourselves on each run) -RUN ARCHERY_INTEGRATION_WITH_NANOARROW="0" \ - conda run --no-capture-output \ - /arrow-integration/ci/scripts/integration_arrow_build.sh \ - /arrow-integration \ - /build +# Activate conda environment directly instead of using conda run, which has issues with +# environment variables being inherited from base instead of the target environment. +# Also add cargo/bin back to PATH since conda activation may not include it. +SHELL ["/bin/bash", "-c"] +RUN source /opt/conda/etc/profile.d/conda.sh && \ + conda activate arrow && \ + export PATH="/root/.cargo/bin:$PATH" && \ + ARCHERY_INTEGRATION_WITH_NANOARROW="0" \ + /arrow-integration/ci/scripts/integration_arrow_build.sh /arrow-integration /build diff --git a/docker-compose.yml b/docker-compose.yml index eb84c48e8..649e50f2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,10 +56,16 @@ services: environment: ARCHERY_INTEGRATION_TARGET_IMPLEMENTATIONS: "nanoarrow" ARCHERY_INTEGRATION_WITH_RUST: "1" + # Activate conda environment directly instead of using conda run, which has issues with + # environment variables being inherited from base instead of the target environment. + # Also add cargo/bin back to PATH since conda activation may not include it. + entrypoint: ["/bin/bash", "-c"] command: - ["echo '::group::Build nanoarrow' && - conda run --no-capture-output /arrow-integration/ci/scripts/nanoarrow_build.sh /arrow-integration /build && + - | + source /opt/conda/etc/profile.d/conda.sh && conda activate arrow && export PATH=/root/.cargo/bin:$$PATH && + echo '::group::Build nanoarrow' && + /arrow-integration/ci/scripts/nanoarrow_build.sh /arrow-integration /build && echo '::endgroup::' && echo '::group::Run integration tests' && - conda run --no-capture-output /arrow-integration/ci/scripts/integration_arrow.sh /arrow-integration /build && - echo '::endgroup::'"] + /arrow-integration/ci/scripts/integration_arrow.sh /arrow-integration /build && + echo '::endgroup::'