This is an automated email from the ASF dual-hosted git repository.

laurentgo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-java.git


The following commit(s) were added to refs/heads/main by this push:
     new bc064bb3b GH-1340: [CI][JNI] Always build the vcpkg-jni image and use 
the right cpp-jni base tag (#1341)
bc064bb3b is described below

commit bc064bb3bb2717b2b60b4abc0854f369594747f5
Author: Laurent Goujon <[email protected]>
AuthorDate: Tue Oct 13 23:17:24 2026 -0700

    GH-1340: [CI][JNI] Always build the vcpkg-jni image and use the right 
cpp-jni base tag (#1341)
    
    ## What's Changed
    
    The Linux JNI jobs fail installing Archery with `Python < 3.11 is not
    supported`. `docker compose run vcpkg-jni` pulls a stale published image
    built on an old `apache/arrow` `cpp-jni` base that still had Python 3.10
    first on `PATH`, and nothing rebuilds it because the image tag only
    depends on the `VCPKG` pin.
    
    - Run `docker compose build --pull vcpkg-jni` before `docker compose run
    vcpkg-jni`, so the image is always rebuilt on top of the current base
    image (using the published image as cache), as suggested in review.
    - Use apache/arrow's short architecture name (`ARCH_SHORT`: `amd64` /
    `arm64`) for the `cpp-jni` base image tag. apache/arrow switched its
    tags from `arm64v8-…` to `arm64-…` in apache/arrow#50125 (GH-32994); the
    old `arm64v8-cpp-jni-…` tag is a stale image (Python 3.10, built
    2026-06-02) that was never updated again, so the aarch64 job kept using
    it. `ARCH` is unchanged, so our own tag naming and the `ubuntu` service
    (`${ARCH}/maven`) are not affected.
    
    The `VCPKG` pin is unchanged: it must stay in sync with apache/arrow,
    which only publishes `cpp-jni` images for its own pin (`9b965a1…`).
    
    AI assistance (Claude Code) was used during development; the complete
    diff was reviewed by the author.
    
    Closes #1340.
    
    Co-authored-by: Claude Sonnet 5.5 <[email protected]>
---
 .github/workflows/rc.yml | 5 +++++
 compose.yaml             | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index b3b1a39a3..08d6be6ca 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -89,12 +89,16 @@ jobs:
           - runs_on: ubuntu-latest
             arch: "x86_64"
             archery_arch: "amd64"
+            archery_arch_short: "amd64"
           - runs_on: ubuntu-24.04-arm
             arch: "aarch_64"
             archery_arch: "arm64v8"
+            archery_arch_short: "arm64"
     env:
       # architecture name used for archery build
       ARCH: ${{ matrix.platform.archery_arch }}
+      # architecture name used for the apache/arrow base image tag
+      ARCH_SHORT: ${{ matrix.platform.archery_arch_short }}
       DOCKER_VOLUME_PREFIX: .docker/
     permissions:
       contents: read
@@ -140,6 +144,7 @@ jobs:
           restore-keys: jni-linux-${{ matrix.platform.arch }}-
       - name: Build
         run: |
+          docker compose build --pull vcpkg-jni
           docker compose run vcpkg-jni
       - name: Push Docker image
         if: success() && github.event_name == 'push' && github.repository == 
'apache/arrow-java' && github.ref_name == 'main'
diff --git a/compose.yaml b/compose.yaml
index 4fd825e5a..7dc49b107 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -99,7 +99,7 @@ services:
       cache_from:
         - ${REPO}:${ARCH}-vcpkg-jni-${VCPKG}
       args:
-        base: ${ARROW_REPO}:${ARCH}-cpp-jni-${VCPKG}
+        base: ${ARROW_REPO}:${ARCH_SHORT}-cpp-jni-${VCPKG}
     volumes:
       - .:/arrow-java:delegated
       - ${ARROW_REPO_ROOT}:/arrow:delegated

Reply via email to