Skip to content

Commit

Permalink
fix: retry S3 on RequestError. Fixes #9914 (#12191)
Browse files Browse the repository at this point in the history
Signed-off-by: Helge Willum Thingvad <1019305+tachylatus@users.noreply.github.com>
  • Loading branch information
tachylatus authored Nov 13, 2023
1 parent 6805c91 commit f95a5fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/artifacts/s3/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// s3TransientErrorCodes is a list of S3 error codes that are transient (retryable)
// Reference: https://github.com/minio/minio-go/blob/92fe50d14294782d96402deb861d442992038109/retry.go#L90-L102
var s3TransientErrorCodes = []string{
"InternalError",
"RequestError",
"RequestTimeout",
"Throttling",
"ThrottlingException",
Expand Down
3 changes: 3 additions & 0 deletions workflow/artifacts/s3/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ func TestIsTransientOSSErr(t *testing.T) {

nonOSSErr := errors.New("UnseenError")
assert.False(t, isTransientS3Err(nonOSSErr))

requestErr := minio.ErrorResponse{Code: "RequestError"}
assert.True(t, isTransientS3Err(requestErr))
}

0 comments on commit f95a5fc

Please sign in to comment.