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

Regression: Multi-platform builds broken #437

Closed
Zenexer opened this issue Aug 17, 2021 · 7 comments
Closed

Regression: Multi-platform builds broken #437

Zenexer opened this issue Aug 17, 2021 · 7 comments

Comments

@Zenexer
Copy link

Zenexer commented Aug 17, 2021

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
@thaJeztah
Copy link
Member

related discussion; docker/buildx#734

@Zenexer
Copy link
Author

Zenexer commented Aug 17, 2021

Minimal repro: https://github.com/Zenexer/docker-bug-test/actions Notice that the only difference between the two workflows is that the platforms are split into separate build steps in the working workflow.

@stefanprodan
Copy link

Any workaround for this? All our release pipelines for the https://github.com/fluxcd projects are broken.

@Zenexer
Copy link
Author

Zenexer commented Aug 18, 2021

@stefanprodan Yes, but it's not pretty: docker/buildx#734 (comment)

@stefanprodan
Copy link

stefanprodan commented Aug 18, 2021

@Zenexer I'm not sure how does this work, if I split this https://github.com/fluxcd/kustomize-controller/blob/main/.github/workflows/release.yml#L52-L69 per platform who will push the multi-arch meta layer?

@clambin
Copy link

clambin commented Aug 18, 2021

seems to be working again.

@crazy-max
Copy link
Member

ohthehugemanatee added a commit to ohthehugemanatee/homenet-documentation that referenced this issue Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants