From 09c97606f16b67bd286d66e55302705925a7fcd5 Mon Sep 17 00:00:00 2001 From: ewezy Date: Fri, 5 Apr 2024 11:45:54 +0800 Subject: [PATCH] Fix incorrect tag name used to check for the existence of built docker images --- api/turing/imagebuilder/imagebuilder.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/turing/imagebuilder/imagebuilder.go b/api/turing/imagebuilder/imagebuilder.go index c84e0c3eb..b2a69bb76 100644 --- a/api/turing/imagebuilder/imagebuilder.go +++ b/api/turing/imagebuilder/imagebuilder.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "net/http" - "strconv" "strings" "time" @@ -122,7 +121,7 @@ func newImageBuilder( func (ib *imageBuilder) BuildImage(request BuildImageRequest) (string, error) { imageName := ib.nameGenerator.generateDockerImageName(request.ProjectName, request.ResourceName) - imageExists, err := ib.checkIfImageExists(imageName, strconv.Itoa(int(request.ResourceID))) + imageExists, err := ib.checkIfImageExists(imageName, request.VersionID) imageRef := fmt.Sprintf("%s:%s", imageName, request.VersionID) if err != nil { log.Errorf("Unable to check existing image ref: %v", err)