mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
fix(proto): the size of the repo should be int64, since that is the same type used for the manifest/config/index/digest sizes it sums up. (#2120)
Using int32 may result in negative size values when returned by the graphql API Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user