From 133a0e818d68ecbb4b8bd4e1e2930d9c8ad63e69 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 10 Jan 2025 18:40:23 +0100 Subject: [PATCH 1/7] fix path --- dev/tasks/python-wheels/github.windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/python-wheels/github.windows.yml b/dev/tasks/python-wheels/github.windows.yml index 36b25e9819f..46cdc02b23c 100644 --- a/dev/tasks/python-wheels/github.windows.yml +++ b/dev/tasks/python-wheels/github.windows.yml @@ -91,7 +91,7 @@ jobs: {{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }} {{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }} - {{ macros.github_upload_wheel_scientific_python("arrow/repaired_wheels/repaired_wheels/*.whl")|indent }} + {{ macros.github_upload_wheel_scientific_python("arrow/repaired_wheels/*.whl")|indent }} {% if arrow.is_default_branch() %} - name: Push Docker image From e670207785922323242a7d1ae18a6d3b9533cc46 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 10 Jan 2025 18:55:07 +0100 Subject: [PATCH 2/7] make upload fail when missing wheels --- dev/tasks/macros.jinja | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index dded9492f0c..1c118b4c4f7 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -186,6 +186,12 @@ env: - name: Upload wheel to Anaconda scientific-python shell: bash run: | + # check if completion actually expands to wheel files + # to prevent empty dirs from failing silently + if ! compgen -G "{{ pattern }}" > /dev/null; then + echo "No wheel files found!" + exit 1 + fi python3 -m pip install git+https://github.com/Anaconda-Platform/anaconda-client.git@1.12.3 anaconda -t ${CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN} upload --force -u scientific-python-nightly-wheels --label main {{ pattern }} env: From bf894ff189b53e2e0b074be89b38741a29795904 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 10 Jan 2025 20:00:51 +0100 Subject: [PATCH 3/7] remove main gate for testing --- dev/tasks/macros.jinja | 2 -- 1 file changed, 2 deletions(-) diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 1c118b4c4f7..7d9326a20d2 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -182,7 +182,6 @@ env: {% endmacro %} {%- macro github_upload_wheel_scientific_python(pattern) -%} - {%- if arrow.is_default_branch() -%} - name: Upload wheel to Anaconda scientific-python shell: bash run: | @@ -196,7 +195,6 @@ env: anaconda -t ${CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN} upload --force -u scientific-python-nightly-wheels --label main {{ pattern }} env: CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN: {{ '${{ secrets.CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN }}' }} - {% endif %} {% endmacro %} {%- macro azure_checkout_arrow() -%} From 46a2b0caa1f2569e8e6a7b7a18a6cc2b1c04c853 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Sat, 11 Jan 2025 00:53:15 +0100 Subject: [PATCH 4/7] use find to check glob --- dev/tasks/macros.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 7d9326a20d2..752047c25ca 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -187,7 +187,7 @@ env: run: | # check if completion actually expands to wheel files # to prevent empty dirs from failing silently - if ! compgen -G "{{ pattern }}" > /dev/null; then + if ! test -n "$(find . -wholename '{{ pattern }}' -print -quit)"; then echo "No wheel files found!" exit 1 fi From 7f3901b27921769d3c766274f835534c9e2e58d8 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Sat, 11 Jan 2025 03:11:39 +0100 Subject: [PATCH 5/7] actually fix the path Co-authored-by: Sutou Kouhei --- dev/tasks/python-wheels/github.windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/python-wheels/github.windows.yml b/dev/tasks/python-wheels/github.windows.yml index 46cdc02b23c..2ac942d5bdb 100644 --- a/dev/tasks/python-wheels/github.windows.yml +++ b/dev/tasks/python-wheels/github.windows.yml @@ -91,7 +91,7 @@ jobs: {{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }} {{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }} - {{ macros.github_upload_wheel_scientific_python("arrow/repaired_wheels/*.whl")|indent }} + {{ macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent }} {% if arrow.is_default_branch() %} - name: Push Docker image From a4047f4db76aaccd868fd00abc280eaf2a82fd21 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Sat, 11 Jan 2025 04:12:47 +0100 Subject: [PATCH 6/7] Revert "use find to check glob" This reverts commit 46a2b0caa1f2569e8e6a7b7a18a6cc2b1c04c853. --- dev/tasks/macros.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 752047c25ca..7d9326a20d2 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -187,7 +187,7 @@ env: run: | # check if completion actually expands to wheel files # to prevent empty dirs from failing silently - if ! test -n "$(find . -wholename '{{ pattern }}' -print -quit)"; then + if ! compgen -G "{{ pattern }}" > /dev/null; then echo "No wheel files found!" exit 1 fi From 3eb9b7f1ef9a520bfb43696fdf42dbb00073d774 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Sat, 11 Jan 2025 23:34:20 +0100 Subject: [PATCH 7/7] Revert "remove main gate for testing" This reverts commit bf894ff189b53e2e0b074be89b38741a29795904. --- dev/tasks/macros.jinja | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 7d9326a20d2..1c118b4c4f7 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -182,6 +182,7 @@ env: {% endmacro %} {%- macro github_upload_wheel_scientific_python(pattern) -%} + {%- if arrow.is_default_branch() -%} - name: Upload wheel to Anaconda scientific-python shell: bash run: | @@ -195,6 +196,7 @@ env: anaconda -t ${CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN} upload --force -u scientific-python-nightly-wheels --label main {{ pattern }} env: CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN: {{ '${{ secrets.CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN }}' }} + {% endif %} {% endmacro %} {%- macro azure_checkout_arrow() -%}