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

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


The following commit(s) were added to refs/heads/main by this push:
     new 45bba08f25 GH-48029: [R][CI] R nightly upload workflow failing in 
pruning step (#48030)
45bba08f25 is described below

commit 45bba08f25d225373ff62db862b52f81e85719bd
Author: Nic Crane <[email protected]>
AuthorDate: Wed Nov 5 10:17:30 2025 -0500

    GH-48029: [R][CI] R nightly upload workflow failing in pruning step (#48030)
    
    ### Rationale for this change
    
    Arrow nightlies failing due to error
    
    ### What changes are included in this PR?
    
    Add `|| :` so we don't error on missing dirs
    
    ### Are these changes tested?
    
    They will be after the night time the nightlies run!
    
    ### Are there any user-facing changes?
    
    No
    * GitHub Issue: #48029
    
    Authored-by: Nic Crane <[email protected]>
    Signed-off-by: Nic Crane <[email protected]>
---
 .github/workflows/r_nightly.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/r_nightly.yml b/.github/workflows/r_nightly.yml
index 4f4a111fd9..cbe3beb37a 100644
--- a/.github/workflows/r_nightly.yml
+++ b/.github/workflows/r_nightly.yml
@@ -153,20 +153,22 @@ jobs:
         env:
           KEEP: ${{ github.event.inputs.keep || 14 }}
         run: |
+          set -x
+
           prune() {
             # list files  | retain $KEEP newest files | delete everything else
             ls -t "$@" | tail -n +$((KEEP + 1)) | xargs --no-run-if-empty rm
           }
 
-          # find leaf sub dirs
-          repo_dirs=$(find repo -type d -links 2)
+          # find leaf sub dirs and store in array
+          mapfile -t repo_dirs < <(find repo -type d -links 2)
 
           # Old packages: repo/libarrow/bin/${TARGET}/arrow-${VERSION}.zip
           #
           # We want to retain $keep (14) versions of each pkg/lib so we call
           # prune on each leaf dir and not on repo/.
           for dir in "${repo_dirs[@]}"; do
-            prune $dir/arrow*
+            prune "$dir"/arrow* || :
           done
 
           # New packages: repo/libarrow/${TARGET}-arrow-${VERSION}.zip

Reply via email to