Skip to content

Commit

Permalink
Merge pull request #479 from containerish/dependabot-go_modules-githu…
Browse files Browse the repository at this point in the history
…b.com-aws-aws-sdk-go-v2-service-s3-1.44.0
  • Loading branch information
guacamole authored Nov 24, 2023
2 parents af3a25b + f14ed42 commit 1be80b2
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 27 deletions.
12 changes: 6 additions & 6 deletions dfs/filebase/filebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ func (fb *filebase) UploadPart(
Bucket: &fb.bucket,
ChecksumAlgorithm: s3types.ChecksumAlgorithmSha256,
ChecksumSHA256: aws.String(digest),
ContentLength: contentLength,
ContentLength: &contentLength,
Key: &layerKey,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
UploadId: &uploadId,
}

Expand All @@ -89,7 +89,7 @@ func (fb *filebase) UploadPart(
return s3types.CompletedPart{
ChecksumSHA256: &digest,
ETag: resp.ETag,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
}, nil
}

Expand Down Expand Up @@ -163,7 +163,7 @@ func (fb *filebase) Upload(ctx context.Context, namespace, digest string, conten
Body: bytes.NewBuffer(content),
ChecksumAlgorithm: s3types.ChecksumAlgorithmSha256,
ChecksumSHA256: &digest,
ContentLength: int64(len(content)),
ContentLength: aws.Int64(int64(len(content))),
StorageClass: s3types.StorageClassStandard,
}
if fb.env == config.CI {
Expand Down Expand Up @@ -251,7 +251,7 @@ func (fb *filebase) Metadata(identifier string) (*types.ObjectMetadata, error) {
ContentType: *resp.ContentType,
Etag: *resp.ETag,
DFSLink: cid,
ContentLength: int(resp.ContentLength),
ContentLength: int(*resp.ContentLength),
}, nil
}

Expand All @@ -267,7 +267,7 @@ func (fb *filebase) GetUploadProgress(identifier, uploadID string) (*types.Objec

var uploadedSize int64
for _, p := range partsResp.Parts {
uploadedSize += p.Size
uploadedSize += *p.Size
}

return &types.ObjectMetadata{
Expand Down
3 changes: 2 additions & 1 deletion dfs/mock/mockFileSystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os"
"strings"

"github.com/aws/aws-sdk-go-v2/aws"
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
Expand Down Expand Up @@ -89,7 +90,7 @@ func (ms *fileBasedMockStorage) UploadPart(
return s3types.CompletedPart{
ChecksumCRC32: &digest,
ChecksumCRC32C: &layerKey,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
}, nil
}

Expand Down
3 changes: 2 additions & 1 deletion dfs/mock/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os"
"strings"

"github.com/aws/aws-sdk-go-v2/aws"
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
Expand Down Expand Up @@ -83,7 +84,7 @@ func (ms *memMappedMockStorage) UploadPart(
return s3types.CompletedPart{
ChecksumCRC32: &digest,
ChecksumCRC32C: &layerKey,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
}, nil
}

Expand Down
12 changes: 6 additions & 6 deletions dfs/storj/storj.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ func (sj *storj) UploadPart(
Bucket: &sj.bucket,
ChecksumAlgorithm: s3types.ChecksumAlgorithmSha256,
ChecksumSHA256: aws.String(digest),
ContentLength: contentLength,
ContentLength: &contentLength,
Key: &layerKey,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
UploadId: &uploadId,
}

Expand All @@ -87,7 +87,7 @@ func (sj *storj) UploadPart(
return s3types.CompletedPart{
ChecksumSHA256: &digest,
ETag: resp.ETag,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
}, nil
}

Expand Down Expand Up @@ -142,7 +142,7 @@ func (sj *storj) Upload(ctx context.Context, identifier, digest string, content
Body: bytes.NewBuffer(content),
ChecksumAlgorithm: s3types.ChecksumAlgorithmSha256,
ChecksumSHA256: &digest,
ContentLength: int64(len(content)),
ContentLength: aws.Int64(int64(len(content))),
StorageClass: s3types.StorageClassStandard,
}
if sj.env == config.CI {
Expand Down Expand Up @@ -225,7 +225,7 @@ func (sj *storj) Metadata(identifier string) (*types.ObjectMetadata, error) {
ContentType: *resp.ContentType,
Etag: *resp.ETag,
DFSLink: identifier,
ContentLength: int(resp.ContentLength),
ContentLength: int(*resp.ContentLength),
}, nil
}

Expand All @@ -241,7 +241,7 @@ func (sj *storj) GetUploadProgress(identifier, uploadID string) (*types.ObjectMe

var uploadedSize int64
for _, p := range partsResp.Parts {
uploadedSize += p.Size
uploadedSize += *p.Size
}

return &types.ObjectMetadata{
Expand Down
3 changes: 2 additions & 1 deletion dfs/storj/uplink/uplink.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log"
"time"

"github.com/aws/aws-sdk-go-v2/aws"
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
Expand Down Expand Up @@ -100,7 +101,7 @@ func (u *storjUplink) UploadPart(

return s3types.CompletedPart{
ETag: &digest,
PartNumber: int32(partNumber),
PartNumber: aws.Int32(int32(partNumber)),
}, nil
}

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/aws/aws-sdk-go-v2 v1.23.1
github.com/aws/aws-sdk-go-v2/config v1.25.5
github.com/aws/aws-sdk-go-v2/credentials v1.16.4
github.com/aws/aws-sdk-go-v2/service/s3 v1.42.2
github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0
github.com/axiomhq/axiom-go v0.17.2
github.com/bradleyfalzon/ghinstallation/v2 v2.8.0
github.com/fatih/color v1.16.0
Expand Down Expand Up @@ -132,11 +132,11 @@ require (
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.3 h1:lMwCXiWJlrtZot0NJTjbC8G9zl+V3i68gBTBBvDeEXA=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.3/go.mod h1:5yzAuE9i2RkVAttBl8yxZgQr5OCq4D5yDnG7j9x2L0U=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4/go.mod h1:u77N7eEECzUv7F0xl2gcfK/vzc8wcjWobpy+DcrLJ5E=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.3 h1:xbwRyCy7kXrOj89iIKLB6NfE2WCpP9HoKyk8dMDvnIQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.3/go.mod h1:R+/S1O4TYpcktbVwddeOYg+uwUfLhADP2S/x4QwsCTM=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 h1:6DRKQc+9cChgzL5gplRGusI5dBGeiEod4m/pmGbcX48=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4/go.mod h1:s8ORvrW4g4v7IvYKIAoBg17w3GQ+XuwXDXYrQ5SkzU0=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.3 h1:KV0z2RDc7euMtg8aUT1czv5p29zcLlXALNFsd3jkkEc=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.3/go.mod h1:KZgs2ny8HsxRIRbDwgvJcHHBZPOzQr/+NtGwnP+w2ec=
github.com/aws/aws-sdk-go-v2/service/s3 v1.42.2 h1:NnduxUd9+Fq9DcCDdJK8v6l9lR1xDX4usvog+JuQAno=
github.com/aws/aws-sdk-go-v2/service/s3 v1.42.2/go.mod h1:NXRKkiRF+erX2hnybnVU660cYT5/KChRD4iUgJ97cI8=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 h1:o3DcfCxGDIT20pTbVKVhp3vWXOj/VvgazNJvumWeYW0=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4/go.mod h1:Uy0KVOxuTK2ne+/PKQ+VvEeWmjMMksE17k/2RK/r5oM=
github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0 h1:FJTWR2nP1ddLIbk4n7Glw8wGbeWGHaViUwADPzE/EBo=
github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0/go.mod h1:dqJ5JBL0clzgHriH35Amx3LRFY6wNIPUX7QO/BerSBo=
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54=
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU=
Expand Down

0 comments on commit 1be80b2

Please sign in to comment.