kou commented on code in PR #45040:
URL: https://github.com/apache/arrow/pull/45040#discussion_r1889196673


##########
dev/tasks/python-wheels/github.linux.yml:
##########
@@ -141,9 +139,9 @@ jobs:
       {{ 
macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent
 }}
 
       {% if arrow.is_default_branch() %}
-      - name: Push Docker Image
+      - name: Push Docker images
         shell: bash
         run: |
           archery docker push python-wheel-manylinux-{{ manylinux_version }}
-          archery docker push python-wheel-manylinux-test-unittests
+          archery docker push {{ test_unittests_image }}

Review Comment:
   We may want to push `test_unittests_image` too.



##########
dev/tasks/python-wheels/github.linux.yml:
##########
@@ -19,6 +19,16 @@
 
 {{ macros.github_header() }}
 
+# Testing free-threaded wheels uses a different Docker setup
+{% set test_imports_image = (
+    'python-free-threaded-wheel-manylinux-test-imports' if python_abi_tag == 
'cp313t'
+    else 'python-wheel-manylinux-test-imports')
+%}
+{% set test_unittests_image = (
+    'python-free-threaded-wheel-manylinux-test-unittests' if python_abi_tag == 
'cp313t'
+    else 'python-wheel-manylinux-test-unittests')
+%}
+

Review Comment:
   I think that using GitHub Actions features instead of using Jinja2 is easier 
to read/understand:
   
   ```diff
   diff --git a/dev/tasks/python-wheels/github.linux.yml 
b/dev/tasks/python-wheels/github.linux.yml
   index f083b7c0c8..eadb948339 100644
   --- a/dev/tasks/python-wheels/github.linux.yml
   +++ b/dev/tasks/python-wheels/github.linux.yml
   @@ -50,6 +50,15 @@ jobs:
          {{ macros.github_install_archery()|indent }}
          {{ macros.github_login_dockerhub()|indent }}
    
   +      - name: Prepare
   +        run: |
   +          if [ "${PYTHON_ABI_TAG}" = "cp313t" ]; then
   +            test_image_prefix=python-free-threaded
   +          else
   +            test_image_prefix=python
   +          fi
   +          echo "TEST_IMAGE_PREFIX=${test_image_prefix}" >> ${GITHUB_ENV}
   +
          - name: Build wheel
            shell: bash
            env:
   @@ -72,23 +81,11 @@ jobs:
    
          # TODO(kszucs): auditwheel show
          - name: Test wheel
   -        if: |
   -          '{{ python_abi_tag }}' != 'cp313t'
   -        shell: bash
   -        run: |
   -          source arrow/ci/scripts/util_enable_core_dumps.sh
   -          archery docker run python-wheel-manylinux-test-imports
   -          archery docker run python-wheel-manylinux-test-unittests
   -
   -      # Free-threaded wheels need to be tested using a different Docker 
Compose service
   -      - name: Test free-threaded wheel
   -        if: |
   -          '{{ python_abi_tag }}' == 'cp313t'
            shell: bash
            run: |
              source arrow/ci/scripts/util_enable_core_dumps.sh
   -          archery docker run 
python-free-threaded-wheel-manylinux-test-imports
   -          archery docker run 
python-free-threaded-wheel-manylinux-test-unittests
   +          archery docker run 
${TEST_IMAGE_PREFIX}-wheel-manylinux-test-imports
   +          archery docker run 
${TEST_IMAGE_PREFIX}-wheel-manylinux-test-unittests
    
          - name: Test wheel on AlmaLinux 8
            shell: bash
   @@ -145,5 +142,5 @@ jobs:
            shell: bash
            run: |
              archery docker push python-wheel-manylinux-{{ manylinux_version }}
   -          archery docker push python-wheel-manylinux-test-unittests
   +          archery docker push 
${TEST_IMAGE_PREFIX}-wheel-manylinux-test-unittests
          {% endif %}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to