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

Cannot find buildx v0.9.1 release #190

Closed
AlanMendicutti opened this issue Jan 27, 2023 · 19 comments · Fixed by #191
Closed

Cannot find buildx v0.9.1 release #190

AlanMendicutti opened this issue Jan 27, 2023 · 19 comments · Fixed by #191

Comments

@AlanMendicutti
Copy link

Behaviour

Running this action is returning the next message: "Cannot find buildx v0.9.1 release"

This is the step:

name: Set up Docker Buildx
        id: buildx
        uses: docker/[email protected]
        with:
          version: v0.9.1

And this is what RUN returns:

 with:
    version: v0.9.1
    driver: docker-container
    buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
    install: false
    use: true

I've been using this version since a few weeks.
Then all of the sudden this error shows up.

Does anyone knows what's going on?
Thanks in advance

@farvour
Copy link

farvour commented Jan 27, 2023

We're having this problem with any release tag, including latest. It suddenly cropped up in the last 30 minutes or so.

@crazy-max
Copy link
Member

@AlanMendicutti Please post the logs of the action thanks.

@farvour
Copy link

farvour commented Jan 27, 2023

@AlanMendicutti Please post the logs of the action thanks.

@crazy-max I got one for you if this helps:

  with:
    version: latest
    endpoint: github-selfhosted-context
    driver: docker-container
    buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
    install: false
    use: true
  env:
    AWS_DEFAULT_REGION: us-gov-west-1
    AWS_REGION: us-gov-west-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***
Docker info
  /usr/local/bin/docker version
  Client:
   Version:           20.10.21
   API version:       1.41
   Go version:        go1.18.7
   Git commit:        baeda1f
   Built:             Tue Oct 25 17:56:30 2022
   OS/Arch:           linux/amd64
   Context:           default
   Experimental:      true
  
  Server: Docker Engine - Community
   Engine:
    Version:          20.10.21
    API version:      1.41 (minimum version 1.12)
    Go version:       go1.18.7
    Git commit:       3056208
    Built:            Tue Oct 25 18:02:03 2022
    OS/Arch:          linux/amd64
    Experimental:     false
   containerd:
    Version:          v1.6.9
    GitCommit:        1c90a442489720eec95342e1789ee8a5e1b9536f
   runc:
    Version:          1.1.4
    GitCommit:        v1.1.4-0-g5fd4c4d1
   docker-init:
    Version:          0.19.0
    GitCommit:        de40ad0
  /usr/local/bin/docker info
  Client:
   Context:    default
   Debug Mode: false
  
  Server:
   Containers: 0
    Running: 0
    Paused: 0
    Stopped: 0
   Images: 1
   Server Version: 20.10.21
   Storage Driver: overlay2
    Backing Filesystem: xfs
    Supports d_type: true
    Native Overlay Diff: true
    userxattr: false
   Logging Driver: json-file
   Cgroup Driver: cgroupfs
   Cgroup Version: 1
   Plugins:
    Volume: local
    Network: bridge host ipvlan macvlan null overlay
    Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
   Swarm: inactive
   Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
   Default Runtime: runc
   Init Binary: docker-init
   containerd version: 1c90a442489720eec95342e1789ee8a5e1b9536f
   runc version: v1.1.4-0-g5fd4c4d1
   init version: de40ad0
   Security Options:
    seccomp
     Profile: default
   Kernel Version: 5.4.226-129.415.amzn2.x86_64
   Operating System: Alpine Linux v3.17 (containerized)
   OSType: linux
   Architecture: x86_64
   CPUs: 8
   Total Memory: 30.91GiB
   Name: <redacted>
   ID: O4OL:EM3H:RPFW:KTSM:INYY:OLMB:EN7P:DJF5:FTOP:JKDI:FAKN:VKFM
   Docker Root Dir: /var/lib/docker
   Debug Mode: false
   Username: <redacted>
   Registry: https://index.docker.io/v1/
   Labels:
   Experimental: false
   Insecure Registries:
    127.0.0.0/8
   Live Restore Enabled: false
   Product License: Community Engine
  
Download and install buildx
  Error: Cannot find buildx latest release

@quidquid
Copy link

Same, just started a few minutes ago. Here's the step:

      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v1
        with:
          driver-opts: network=host
          endpoint: builders

And the output:

Download and install buildx
  Error: Cannot find buildx latest release

@AlanMendicutti
Copy link
Author

Sure @farvour


Run docker/[email protected]
with:
    version: v0.9.1
    driver: docker-container
    buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
    install: false
    use: true
Docker info
  /usr/bin/docker version
  Client:
   Version:           20.10.22+azure-1
   API version:       1.41
   Go version:        go1.1[8](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:9).[9](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:10)
   Git commit:        3a2c30b63ab20acfcc3f3550ea756a0561655a77
   Built:             Thu Dec 15 15:37:38 UTC 2022
   OS/Arch:           linux/amd64
   Context:           default
   Experimental:      true
  
  Server:
   Engine:
    Version:          20.[10](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:11).22+azure-1
    API version:      1.41 (minimum version 1.[12](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:13))
    Go version:       go1.18.9
    Git commit:       42c8b314993e5eb3cc2776da0bbe41d5eb4b707b
    Built:            Thu Dec 15 22:17:04 2022
    OS/Arch:          linux/amd64
    Experimental:     false
   containerd:
    Version:          1.5.16+azure-1
    GitCommit:        2e3140a0e09d288a9086474752b4478aa0964e7c
   runc:
    Version:          1.1.4
    GitCommit:        5fd4c4d144[13](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:14)7e991c4acebb2[14](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:15)6ab1483a97925
   docker-init:
    Version:          0.19.0
    GitCommit:        
  /usr/bin/docker info
  Client:
   Context:    default
   Debug Mode: false
   Plugins:
    buildx: Docker Buildx (Docker Inc., 0.10.0+azure-1)
    compose: Docker Compose (Docker Inc., 2.[15](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:16).1+azure-1)
  
  Server:
   Containers: 0
    Running: 0
    Paused: 0
    Stopped: 0
   Images: [17](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:18)
   Server Version: [20](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:21).10.22+azure-1
   Storage Driver: overlay2
    Backing Filesystem: extfs
    Supports d_type: true
    Native Overlay Diff: false
    userxattr: false
   Logging Driver: json-file
   Cgroup Driver: cgroupfs
   Cgroup Version: 2
   Plugins:
    Volume: local
    Network: bridge host ipvlan macvlan null overlay
    Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
   Swarm: inactive
   Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
   Default Runtime: runc
   Init Binary: docker-init
   containerd version: 2e3140a0e09d288a9086474752b4478aa0964e7c
   runc version: 5fd4c4d144137e991c4acebb[21](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:22)46ab1483a97925
   init version: 
   Security Options:
    apparmor
    seccomp
     Profile: default
    cgroupns
   Kernel Version: 5.15.0-1031-azure
   Operating System: Ubuntu [22](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:23).04.1 LTS
   OSType: linux
   Architecture: x86_64
   CPUs: 2
   Total Memory: 6.781GiB
   Name: fv-az477-60
   ID: B3LS:HTBT:QLFC:TC55:XOC5:4QPB:22M5:2ZMH:ZJ2K:3KJE:GNNK:ALZO
   Docker Root Dir: /var/lib/docker
   Debug Mode: false
   Username: githubactions
   Registry: https://index.docker.io/v1/
   Labels:
   Experimental: false
   Insecure Registries:
    1[27](https://github.com/company/example/actions/runs/4028785047/jobs/6926099368#step:8:28).0.0.0/8
   Live Restore Enabled: false
  
Download and install buildx
  Error: Cannot find buildx v0.9.1 release

@crazy-max
Copy link
Member

Error: Cannot find buildx latest release

This comes from

throw new Error(`Cannot find buildx ${inputVersion} release`);

Which relies on the GitHub API to download the binary from https://github.com/docker/buildx/releases. Best guess is GitHub has some issues.

@farvour
Copy link

farvour commented Jan 27, 2023

@crazy-max does the httpm client support 302 redirects? I did a curl of the latest and it gives me a 200, but not after giving me a 302.

HTTP/2 302
server: GitHub.com
date: Fri, 27 Jan 2023 23:14:32 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With
location: https://github.com/docker/buildx/releases/tag/v0.10.1
server: GitHub.com
date: Fri, 27 Jan 2023 23:14:33 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With
etag: W/"7ccfe8aa9eb232f0b1179273d29fb2f3"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny

Am also noticing the content type isn't JSON at all, but just plain HTML.. is GitHub not respecting an Accept header?

actions/http-client#62

Also appears that this project is archived/defunct?

@evbu
Copy link

evbu commented Jan 27, 2023

Am also noticing the content type isn't JSON at all, but just plain HTML.. is GitHub not respecting an Accept header?

@farvour Looks like that might be the case. Making a request directly to the endpoint with Accept: application/json results in the following:

$ curl --request GET \
  --url https://api.github.com/docker/buildx/releases/latest \
  --header 'Accept: application/json'

{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest"
}

EDIT: I just realized I was requesting against api.github.com and not github.com 🤦 Ignore me!

@crazy-max
Copy link
Member

@farvour I'm not sure, we are just using the GitHub Actions Toolkit: https://github.com/actions/toolkit/tree/main/packages/http-client

I guess many actions could be broken atm 😟

https://github.com/actions/toolkit/blob/1589a5c066fbe34ed1c828e9b81b9f206f9a3a40/packages/http-client/src/index.ts#L231-L249

* Be aware that not found returns a null.  Other errors (4xx, 5xx) reject the promise

cc @thboop @brcrista

@farvour
Copy link

farvour commented Jan 27, 2023

Yeah even with curl -L -H "Accept: application/vnd.github+json" https://github.com/docker/buildx/releases/tag/v0.10.1

I don't get back JSON as I would expect...

I bet this is going to become a systemic issue - I wonder if GitHub is already aware but I don't know where their central status/reporting is for the API at the moment.. perhaps it'll correct itself then.

@cep21
Copy link

cep21 commented Jan 28, 2023

Are there any workarounds or a central ticket people can follow where we get some feedback from github: is it temporary, or do actions need to change?

@crazy-max
Copy link
Member

@cep21 You can just unset version input and it will take the one available on the GitHub Runner.

@crazy-max
Copy link
Member

@farvour I made some tests and using the Octokit client seems to work so far.

@crazy-max
Copy link
Member

crazy-max commented Jan 28, 2023

#191 should solve this issue.

Can someone try with crazy-max/docker-setup-buildx-action@fix-dl-release?

@rustielin
Copy link

@crazy-max
Copy link
Member

Should be fixed with docker/setup-buildx-action@v2 or docker/[email protected]

@crazy-max
Copy link
Member

Looks like GitHub fixed the issue with the endpoint we were using before 🙈:

image

@lediur
Copy link

lediur commented Jan 30, 2023

Yep, confirmed that setup-buildx-action@v1 has started working again (the GitHub action step passed as of 5 mins ago)

@crazy-max
Copy link
Member

crazy-max commented Jan 30, 2023

@lediur https://github.com/docker/setup-buildx-action/releases/tag/v2.4.0 should fix the issue once and for all so we don't rely on this endpoint anymore. Neither the GitHub API.

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

Successfully merging a pull request may close this issue.

8 participants