build: Use normalized platform spec for ARG expansion#66
build: Use normalized platform spec for ARG expansion#66slimreaper35 wants to merge 1 commit intokonflux-ci:mainfrom
Conversation
The ARG variables for multi-platform builds should use a normalized platform spec. This ensures consistent formatting across different platform string representations, particularly for edge cases like architecture normalization. -- https://github.com/containers/buildah/blob/c97d402ccd8dbc5442c3b9fd952fece3f22fbce4/internal/util/util.go#L44 https://github.com/containers/common/blob/a5ccdae846b629b5ceaefa6ffd5c6511409c3487/libimage/platform/platform.go#L20 Signed-off-by: Michal Šoltis <msoltis@redhat.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
chmeliik
left a comment
There was a problem hiding this comment.
Isn't DefaultSpec() always normalized? I think Normalize() is more for user input.
I didn't find the normalization anywhere. I encountered this while running integration tests, and the platform variant was part of the TARGETPLATFORM/BUILDPLATFORM string: Test Failure: image label: BUILDPLATFORM=linux/arm64; containerfile label: BUILDPLATFORM=linux/arm64/v8So the normalization removes the |
Ah, interesting. In that case yeah, normalization makes sense. Could you also submit a similar patch to https://github.com/konflux-ci/dockerfile-json/ (the dev branch)?
I think the condition will have to be more specific and also expect empty for arm64 v8. Because the variant label should apparently be empty on arm64 v8 but not any other arm variant |
No description provided.