Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 no longer works: "ERROR: failed to solve: arm64v8/ubuntu:20.04: failed to resolve source metadata" #155

Closed
eed3si9n opened this issue Oct 19, 2024 · 7 comments

Comments

@eed3si9n
Copy link

(I'm aware of #152. This issue is filed partly so it would be indexed in case others may find this useful)

steps

The following setup used to work:

      - name: Build Linux aarch64
        uses: uraimo/run-on-arch-action@v2
        with:
          arch: aarch64
          distro: ubuntu20.04

          # Speeds up builds per the run-on-arch-action README
          githubToken: ${{ github.token }}

problem

Build container phase fails with the following:

#2 [internal] load metadata for docker.io/arm64v8/ubuntu:20.04
  #2 ERROR: no match for platform in manifest: not found
  ------
   > [internal] load metadata for docker.io/arm64v8/ubuntu:20.04:
  ------
  Dockerfile.aarch64.ubuntu20.04:1
  --------------------
     1 | >>> FROM arm[64](https://github.com/sbt/sbtn-dist/actions/runs/11420327751/job/31775899476#step:4:65)v8/ubuntu:20.04
     2 |     
     3 |     COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
  --------------------
  ERROR: failed to solve: arm64v8/ubuntu:20.04: failed to resolve source metadata for docker.io/arm64v8/ubuntu:20.04: no match for platform in manifest: not found
  Error: The process '/home/runner/work/_actions/uraimo/run-on-arch-action/v2/src/run-on-arch.sh' failed with exit code 1

workaround

Following #152 and other PRs linked to 152, the workaround apparently is:

      - name: Build Linux aarch64
        uses: uraimo/run-on-arch-action@v2
        with:
          arch: none
          distro: none
          base_image: '--platform=linux/aarch64 ubuntu:20.04'

expectation

Would it be possible to absorb this in this action, or otherwise, please document this in the README.

dwsteele added a commit to pgbackrest/pgbackrest that referenced this issue Oct 20, 2024
The action suddenly broken and this appears to be the best work around according to uraimo/run-on-arch-action#155.

Unfortunately the tests take almost twice and long to run, probably because the container needs to be built from scratch.
@charliermarsh
Copy link

Any idea what changed to cause these sudden failures?

@eed3si9n
Copy link
Author

I think it's something to do with the build process change in https://github.com/docker-library/official-images. See for example docker-library/python#933:

We've been slowly moving Official Images to a new build process and moved python yesterday, so now the arch-specific namespaces are an image index because they include attached provenance/sbom metedata.

@uraimo
Copy link
Owner

uraimo commented Oct 21, 2024

Any idea what changed to cause these sudden failures?

They started generating the upstream images as they should always have, without including an implicit platform in each dockerfile, but specifying a specific platform is now required when creating the image.

Since I can see reports for some of the major platforms I updated the default dockerfiles to include the workaround and the tests look green now. I will also add a new PLATFORM parameter for those using directly the base_image configuration since as many have pointed out it's now necessary.

In hindsight, providing a set of default "verified" images to make it easier for the users was not a good idea, it introduced a dependency on the upstream images, that the maintainers were able to update at will introducing regressions.

Once the tests are done I will tag a new release.

@uraimo
Copy link
Owner

uraimo commented Oct 21, 2024

Published 2.8.0 with the updated default Dockerfiles.

@konstin
Copy link

konstin commented Oct 21, 2024

In 96c27aa#diff-e1ee779207cb43290a986a3da96826a65bcfa58d723177caca6cc6eaa091f4a8R1 there's a typo, it say FROM --platform=linux/arm64 rm64v8/ubuntu:20.04 (https://github.com/astral-sh/uv/actions/runs/11431169900/job/31813036963)

@uraimo
Copy link
Owner

uraimo commented Oct 21, 2024

In 96c27aa#diff-e1ee779207cb43290a986a3da96826a65bcfa58d723177caca6cc6eaa091f4a8R1 there's a typo, it say FROM --platform=linux/arm64 rm64v8/ubuntu:20.04 (https://github.com/astral-sh/uv/actions/runs/11431169900/job/31813036963)

Thanks for spotting this, 2.8.1.

@eed3si9n
Copy link
Author

I can confirm that the original YAML setup works again with the latest:

      - name: Build Linux aarch64
        uses: uraimo/run-on-arch-action@v2
        with:
          arch: aarch64
          distro: ubuntu20.04

          # Speeds up builds per the run-on-arch-action README
          githubToken: ${{ github.token }}

Thanks @uraimo and others!

ryneeverett added a commit to ryneeverett/bugwarrior that referenced this issue Oct 24, 2024
ryneeverett added a commit to GothenburgBitFactory/bugwarrior that referenced this issue Oct 24, 2024
VishnuSanal added a commit to VishnuSanal/Robyn that referenced this issue Oct 27, 2024
HuijingHei added a commit to HuijingHei/bootupd that referenced this issue Oct 28, 2024
weiji14 added a commit to weiji14/cog3pio that referenced this issue Oct 31, 2024
* ⬆️ Bump geo from 0.28.0 rev 481196b to 0.29.0

Bumps [geo](https://github.com/georust/geo) from 0.28.0 to 0.29.0.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](georust/geo@geo-0.28.0...geo-0.29.0)

* ⬆️ Bump uraimo/run-on-arch-action from 2.7.1 to 2.8.1

Bumps [uraimo/run-on-arch-action](https://github.com/uraimo/run-on-arch-action) from 2.7.1 to 2.8.1.
- [Release notes](https://github.com/uraimo/run-on-arch-action/releases)
- [Commits](uraimo/run-on-arch-action@v2.7.1...v2.8.1)

Xref uraimo/run-on-arch-action#155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants