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

s3store: Fix downloads from some S3-compatible stores #1071

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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/s3store/s3store.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,9 @@ func (upload s3Upload) fetchInfo(ctx context.Context) (info handler.FileInfo, pa
// The AWS Go SDK v2 has a bug where types.NoSuchUpload is not returned,
// so we also need to check the error code itself.
// See https://github.com/aws/aws-sdk-go-v2/issues/1635
if isAwsError[*types.NoSuchUpload](err) || isAwsErrorCode(err, "NoSuchUpload") || isAwsError[*types.NoSuchKey](err) {
// In addition, S3-compatible storages, like DigitalOcean Spaces, might cause
// types.NoSuchKey to not be returned as well.
if isAwsError[*types.NoSuchUpload](err) || isAwsErrorCode(err, "NoSuchUpload") || isAwsError[*types.NoSuchKey](err) || isAwsErrorCode(err, "NoSuchKey") {
info.Offset = info.Size
err = nil
}
Expand Down