Skip to content

Commit

Permalink
fix architectureg
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y committed Oct 31, 2023
1 parent a5f1e37 commit aa0ae86
Showing 1 changed file with 10 additions and 8 deletions.
Expand Up @@ -23,13 +23,15 @@ import (
const (
validationInProgressMsg = "Validating Starlark code and downloading container images - execution will begin shortly"

containerDownloadedImagesMsgHeader = "Container images used in this run:"
containerDownloadedImagesMsgFromLocal = "locally cached"
containerDownloadedImagesMsgFromRemote = "remotely downloaded"
containerDownloadedImagesMsgLineFormat = "> %s - %s - %s"
containerDownloadedImagesMsgHeader = "Container images used in this run:"
containerDownloadedImagesMsgFromLocal = "locally cached"
containerDownloadedImagesMsgFromRemote = "remotely downloaded"
containerDownloadedImagesMsgLineFormat = "> %s - %s"

containerImageArchWarningHeaderFormat = "Container images with different architecture than expected(%s):"
containerImageArchitectureMsgLineFormat = "> %s - %s"
linebreak = "\n"

linebreak = "\n"
)

type StartosisValidator struct {
Expand Down Expand Up @@ -221,12 +223,12 @@ func sendContainerImageSummaryInfoMsg(

architecture := validatedImage.GetArchitecture()

if validatedImage.GetArchitecture() != runtime.GOARCH {
imageWithIncorrectArchLine := fmt.Sprintf(containerImageArchitectureMsgLineFormat, image, validatedImage.GetArchitecture())
if architecture != runtime.GOARCH {
imageWithIncorrectArchLine := fmt.Sprintf(containerImageArchitectureMsgLineFormat, image, architecture)
imagesWithIncorrectArchLines = append(imagesWithIncorrectArchLines, imageWithIncorrectArchLine)
}

imageLine := fmt.Sprintf(containerDownloadedImagesMsgLineFormat, image, pulledFromStr, architecture)
imageLine := fmt.Sprintf(containerDownloadedImagesMsgLineFormat, image, pulledFromStr)
imageLines = append(imageLines, imageLine)
}

Expand Down

0 comments on commit aa0ae86

Please sign in to comment.