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

brycemecum pushed a commit to branch maint-18.1.0
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit bc8251f1cc6264404f2ec86305c4301bde307aef
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Oct 18 04:59:55 2024 +0900

    GH-44449: [Release] Retry on HTTP error in binary upload (#44450)
    
    ### Rationale for this change
    
    Artifactory sometimes reports the following 503 HTTP error:
    
    ```text
    BinaryTask::ArtifactoryClient::Error: failed to request: 
https://apache.jfrog.io/artifactory/arrow/debian-rc/pool/bookworm/main/a/apache-arrow/libparquet-glib1800_18.0.0-1_arm64.deb:
 PUT:  503
    {
      "errors" : [ {
        "status" : 503,
        "message" : "503 : Failed during addStream to bucket"
      } ]
    }
    ```
    
    It seems that this is a temporary error. So we can retry on this type error 
for stable upload.
    
    ### What changes are included in this PR?
    
    Retry on HTTP error.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #44449
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 dev/release/binary-task.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev/release/binary-task.rb b/dev/release/binary-task.rb
index b06b1c46b8..4387641741 100644
--- a/dev/release/binary-task.rb
+++ b/dev/release/binary-task.rb
@@ -532,7 +532,8 @@ class BinaryTask
              OpenSSL::OpenSSLError,
              SocketError,
              SystemCallError,
-             Timeout::Error => error
+             Timeout::Error,
+             Error => error
         n_retries += 1
         if n_retries <= max_n_retries
           $stderr.puts

Reply via email to