diff --git a/pkg/meta/common/common.go b/pkg/meta/common/common.go index 28bed31cf..2f85e2b2d 100644 --- a/pkg/meta/common/common.go +++ b/pkg/meta/common/common.go @@ -262,7 +262,7 @@ func AddImageMetaToRepoMeta(repoMeta *proto_go.RepoMeta, repoBlobs *proto_go.Rep size, platforms, vendors := recalculateAggregateFields(repoMeta, repoBlobs) repoMeta.Vendors = vendors repoMeta.Platforms = platforms - repoMeta.Size = int32(size) + repoMeta.Size = size imageBlobInfo := repoBlobs.Blobs[imageMeta.Digest.String()] repoMeta.LastUpdatedImage = mConvert.GetProtoEarlierUpdatedImage(repoMeta.LastUpdatedImage, @@ -316,7 +316,7 @@ func RemoveImageFromRepoMeta(repoMeta *proto_go.RepoMeta, repoBlobs *proto_go.Re } } - repoMeta.Size = int32(updatedSize) + repoMeta.Size = updatedSize repoMeta.Vendors = updatedVendors repoMeta.Platforms = updatedPlatforms repoMeta.LastUpdatedImage = updatedLastImage diff --git a/pkg/meta/convert/convert.go b/pkg/meta/convert/convert.go index 297e81857..e22144f77 100644 --- a/pkg/meta/convert/convert.go +++ b/pkg/meta/convert/convert.go @@ -445,7 +445,7 @@ func GetRepoMeta(protoRepoMeta *proto_go.RepoMeta) mTypes.RepoMeta { Name: protoRepoMeta.Name, Tags: GetTags(protoRepoMeta.Tags), Rank: int(protoRepoMeta.Rank), - Size: int64(protoRepoMeta.Size), + Size: protoRepoMeta.Size, Platforms: GetPlatforms(protoRepoMeta.Platforms), Vendors: protoRepoMeta.Vendors, IsStarred: protoRepoMeta.IsStarred, diff --git a/pkg/meta/convert/convert_proto.go b/pkg/meta/convert/convert_proto.go index 9eea3c89b..b01ebcf4d 100644 --- a/pkg/meta/convert/convert_proto.go +++ b/pkg/meta/convert/convert_proto.go @@ -19,7 +19,7 @@ func GetProtoRepoMeta(repo mTypes.RepoMeta) *proto_go.RepoMeta { Statistics: GetProtoStatistics(repo.Statistics), Signatures: GetProtoSignatures(repo.Signatures), Referrers: GetProtoReferrers(repo.Referrers), - Size: int32(repo.Size), + Size: repo.Size, Vendors: repo.Vendors, Platforms: GetProtoPlatforms(repo.Platforms), LastUpdatedImage: GetProtoLastUpdatedImage(repo.LastUpdatedImage), diff --git a/pkg/meta/proto/gen/meta.pb.go b/pkg/meta/proto/gen/meta.pb.go index 56500f390..4c7b1eca1 100644 --- a/pkg/meta/proto/gen/meta.pb.go +++ b/pkg/meta/proto/gen/meta.pb.go @@ -358,7 +358,7 @@ type RepoMeta struct { IsBookmarked bool `protobuf:"varint,7,opt,name=IsBookmarked,proto3" json:"IsBookmarked,omitempty"` Rank int32 `protobuf:"varint,8,opt,name=Rank,proto3" json:"Rank,omitempty"` Stars int32 `protobuf:"varint,9,opt,name=Stars,proto3" json:"Stars,omitempty"` - Size int32 `protobuf:"varint,10,opt,name=Size,proto3" json:"Size,omitempty"` + Size int64 `protobuf:"varint,10,opt,name=Size,proto3" json:"Size,omitempty"` Vendors []string `protobuf:"bytes,11,rep,name=Vendors,proto3" json:"Vendors,omitempty"` Platforms []*Platform `protobuf:"bytes,12,rep,name=Platforms,proto3" json:"Platforms,omitempty"` LastUpdatedImage *RepoLastUpdatedImage `protobuf:"bytes,13,opt,name=LastUpdatedImage,proto3,oneof" json:"LastUpdatedImage,omitempty"` @@ -460,7 +460,7 @@ func (x *RepoMeta) GetStars() int32 { return 0 } -func (x *RepoMeta) GetSize() int32 { +func (x *RepoMeta) GetSize() int64 { if x != nil { return x.Size } @@ -1140,7 +1140,7 @@ var file_meta_meta_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x6e, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x63, 0x69, 0x5f, 0x76, 0x31, 0x2e, diff --git a/pkg/meta/proto/meta/meta.proto b/pkg/meta/proto/meta/meta.proto index 31f90c63c..de0621baa 100644 --- a/pkg/meta/proto/meta/meta.proto +++ b/pkg/meta/proto/meta/meta.proto @@ -52,7 +52,7 @@ message RepoMeta { int32 Stars = 9; - int32 Size = 10; + int64 Size = 10; repeated string Vendors = 11; repeated oci_v1.Platform Platforms = 12; optional RepoLastUpdatedImage LastUpdatedImage = 13;