Skip to content

Commit

Permalink
apacheGH-44449: [Release] Retry on HTTP error in binary upload (apach…
Browse files Browse the repository at this point in the history
…e#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: apache#44449

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored Oct 17, 2024
1 parent 3657c94 commit 0c32067
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev/release/binary-task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ def with_retry(max_n_retries, target)
OpenSSL::OpenSSLError,
SocketError,
SystemCallError,
Timeout::Error => error
Timeout::Error,
Error => error
n_retries += 1
if n_retries <= max_n_retries
$stderr.puts
Expand Down

0 comments on commit 0c32067

Please sign in to comment.