Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: failed in ListObjectVersions with an error "Please try again" when so many buckets are specified #322

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/client/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ func NewS3(client *s3.Client, directoryBucketsMode bool) *S3 {
strings.Contains(err.Error(), "https response error StatusCode: 0") ||
// ex: ERR [resource par-cls-019] operation error S3: DeleteObjects, https response error StatusCode: 0, RequestID: , HostID: , request send failed, Post "https://par-cls-019.s3.us-east-1.amazonaws.com/?delete=": EOF
// but one condition above, it didn't catch on.
strings.Contains(err.Error(), "EOF")
strings.Contains(err.Error(), "EOF") ||
// ex: ERR [resource cls3-test-xxx] operation error S3: ListObjectVersions, https response error StatusCode: 500, RequestID: xxxxxx, HostID: xxxxxx=, api error InternalError: We encountered an internal error. Please try again.
strings.Contains(err.Error(), "Please try again")

return isRetryable
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/client/s3_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ func NewS3Tables(client *s3tables.Client) *S3Tables {
isRetryable :=
strings.Contains(err.Error(), "api error SlowDown") ||
strings.Contains(err.Error(), "An internal error occurred. Try again.") ||
strings.Contains(err.Error(), "StatusCode: 429")
strings.Contains(err.Error(), "StatusCode: 429") ||
// I haven't encountered this error yet, but I got this error on S3, so I'll add it here too, just in case.
strings.Contains(err.Error(), "Please try again")

return isRetryable
}
Expand Down
Loading