buildah-build icon indicating copy to clipboard operation
buildah-build copied to clipboard

[BUG] building multi-arch should report on missing base image for the platform

Open akostadinov opened this issue 2 years ago • 1 comments

Version

redhat-actions/[email protected]

Describe the bug

First of all documentation is misleading in this part:

The archs and platforms arguments override the Architecture and Platform labels in the output image, respectively. They do not actually affect the architectures and platforms the output image will run on. The image must still be built for the required architecture or platform.

They do actually affect the architectures and platforms the output image will run on. Here comes the actual issue I want to report. They do affect but in case base image does not exist for the desired non-native target architectures, then the build succeeds, labels are fine, just all generated images are for the native platform without any warning or error.

I think it serves users much better to fail when base image for the target platform is missing. This will reduce confusion and make debugging process much quicker.

Steps to reproduce, workflow links, screenshots

Workflow 1 with a base image with all target architectures:

...
STEP 2/3: RUN uname -a && echo && env
time="2022-07-01T09:54:53Z" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
Linux 7db1804db6ae 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP Mon Jun 13 22:51:01 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
...
STEP 2/3: RUN uname -a && echo && env
time="2022-07-01T09:55:02Z" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
Linux c8f0c044e788 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP Mon Jun 13 22:51:01 UTC 2022 s390x s390x s390x GNU/Linux
...
 STEP 2/3: RUN uname -a && echo && env
time="2022-07-01T09:55:12Z" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
Linux 1b0c3fce6405 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP Mon Jun 13 22:51:01 UTC 2022 ppc64le ppc64le ppc64le GNU/Linux
...

Workflow 2 with base image that has only amd64 arch:

...
STEP 2/3: RUN uname -a && echo && env
time="2022-07-01T10:15:54Z" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
Linux 2ebf20e578e0 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP Mon Jun 13 22:51:01 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
...
 STEP 2/3: RUN uname -a && echo && env
time="2022-07-01T10:16:18Z" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
Linux 2ebf20e578e0 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP Mon Jun 13 22:51:01 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
...
 STEP 2/3: RUN uname -a && echo && env
time="2022-07-01T10:16:31Z" level=warning msg="Failed to decode the keys [\"machine\"] from \"/usr/share/containers/containers.conf\"."
Linux 2ebf20e578e0 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP Mon Jun 13 22:51:01 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
...

akostadinov avatar Jul 01 '22 10:07 akostadinov

+1
I ran into the same issue, I was able to reproduce this by directly using buildah. I think this issue belongs to buildah itself rather than this buildah wrapper GitHub Action.

naveenrajm7 avatar Aug 18 '23 01:08 naveenrajm7