From 105124dd25fd37329cf5dc99e41af3e80538366e Mon Sep 17 00:00:00 2001 From: Jacob Kozol Date: Wed, 8 Apr 2020 23:19:59 +0200 Subject: [PATCH] store: use default size in image build If a user creates a compose with a size of 0, the default image size for the image type should be used. Also, certain image types have requirements for the image size. In order to ensure that the proper image size is stored in the compose object, the compose's ImageBuild object uses ImageType.Size() to get the correct image size for the image type. --- internal/store/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/store/store.go b/internal/store/store.go index a07a4ebb3..66915ee2f 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -538,7 +538,7 @@ func (s *Store) PushCompose(imageType distro.ImageType, bp *blueprint.Blueprint, ImageType: imageTypeCommon, Targets: targets, JobCreated: time.Now(), - Size: size, + Size: imageType.Size(size), }, }, }