question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression: Multi-platform builds broken

See original GitHub issue

Troubleshooting

Before submitting a bug report please read the Troubleshooting doc.

Behaviour

Steps to reproduce this issue

  1. Attempt to build for multiple platforms using the platforms directive
  2. Attempt to push the results to ghcr.io

Expected behaviour

Images for multiple platforms will be pushed.

This was the observed behavior until about 24 hours ago, when multi-platform builds broke.

Actual behaviour

All but one of the platforms will fail with an error similar to the following:

#13 ERROR: unexpected status: 401 Unauthorized
------
 > exporting to image:
------
error: failed to solve: unexpected status: 401 Unauthorized
Error: buildx failed with: error: failed to solve: unexpected status: 401 Unauthorized

Replacing the platforms directive with a single platform resolves the issue, regardless of which platform is chosen.

I’m not sure why it’s a 401 error; that may indicate the issue is specific to ghcr.io, but I’m not sure.

Configuration

  • Repository URL (if public): private
  • Build URL (if public): private
name: "Docker"

on:
  push:
    tags:
      - "v*"

jobs:
  push:
    runs-on: "ubuntu-latest"

    steps:
      - uses: "actions/checkout@v2"
      - uses: "docker/setup-qemu-action@v1"
      - uses: "docker/setup-buildx-action@v1"

      - name: "Get docker info"
        run: |
          echo "Actor: ${{ github.actor }}"

      - name: "Log into GitHub Container Registry"
        if: "github.event_name != 'pull_request'"
        uses: "docker/login-action@v1"
        with:
          registry: "ghcr.io"
          username: "${{ github.actor }}"
          password: "${{ secrets.GITHUB_TOKEN }}"

      - name: "Build and push"
        uses: "docker/build-push-action@v2"
        with:
          context: "."
          platforms: "linux/amd64,linux/arm64"
          push: ${{ github.event_name != 'pull_request' }}
          tags: ghcr.io/foo/bar:latest

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
thaJeztahcommented, Aug 17, 2021
1reaction
clambincommented, Aug 18, 2021

seems to be working again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

92356 – REGRESSION(r123715): Breaks compilation on multiple ...
http://trac.webkit.org/changeset/123715 broke the build: Breaks compilation on multiple platforms (Requested by vsevik on #webkit).
Read more >
Docker multi platform builds extremely slow for ARM64 on ...
I'm guessing your pipeline is executing on amd64 hardware and that docker buildx is performing emulation to build the arm64 target.
Read more >
How to Locate GCC Regressions - GNU Project
If one of the test builds fails, try a date or time slightly earlier or later and see if that works. Usually all...
Read more >
A Deep Dive into a Cross-Platform Build Farm - YouTube
In this session, Ardrian Hardjono and Chris Carr talk about the work NaturalMotion's DevOps team has done to ensure developer and QA ...
Read more >
Thread: multi-platform, multi-locale regression tests : Postgres ...
But they could run it if they wanted(and had the prerequisites), and the build farm animals would run them regularly. I'd welcome something...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found