setup-buildx-action icon indicating copy to clipboard operation
setup-buildx-action copied to clipboard

Failed to restore: getCacheEntry failed: connect ETIMEDOUT during the setup and post job cleanup

Open richierichard opened this issue 6 months ago • 1 comments

Contributing guidelines

I've found a bug, and:

  • [x] The documentation does not mention anything about my problem
  • [x] There are no open or closed issues that are related to my problem

Description

Recently we started facing issue where the docker/setup-buildx-action@v3 while downloading the installer tries to get it from cache which timed out after 4 minutes.

Also the post job cleanup is having similar issues due to which we see increase in the overall job completion time. Usually the jobs used to take 3 minutes to complete but now are taking more than 12 minutes.

Attached the screenshots for reference. I think the Github deprecated the version of cache being used in this action, for reference https://github.com/orgs/community/discussions/160793

Image Image

Expected behaviour

There should be no cache error and the time for the action to setup the installer should be in seconds.

Image Image

Actual behaviour

Currently, it takes more than 5 minutes to setup time installer using the action and the post job cleanup takes another 5 minutes which in total increasing the overall workflow time by 10 minutes.

Repository URL

No response

Workflow run URL

No response

YAML workflow

build-and-push:
    runs-on: k8s-runner-2xl-arm
    permissions:
      contents: read
      packages: write
    environment: ${{ inputs.ENVIRONMENT }}
    steps:
      - name: Checkout the code from Github
        uses: actions/checkout@v4
      - name: Setup NodeJS
        uses: actions/setup-node@v4
        with:
          node-version: ${{ inputs.NODE_VERSION }}
      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v3

Workflow logs

No response

BuildKit logs


Additional info

No response

richierichard avatar Jun 03 '25 09:06 richierichard

See the same issue, setup-buildx action now takes about 5 mins.

Use 0.24.0 version spec cache key for v0.24.0
Warning: Failed to restore: getCacheEntry failed: connect ETIMEDOUT 20.246.192.[124](https://github.com/.../#step:3:128):443
Downloading https://github.com/docker/buildx/releases/download/v0.24.0/buildx-v0.24.0.linux-amd64
Cached to /home/runner/.docker/buildx/.bin/0.24.0/linux-x64/docker-buildx

Kulagin-G avatar Jun 05 '25 10:06 Kulagin-G

Seems to be a flaky network connection. Fyi, the cache backend relies on GitHub infrastructure to cache Buildx binary. Can't do much about it on our side but you can disable cached binary with:

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
        with:
          cache-binary: false

Although I'm a bit confused because it seems you don't specify a Buildx version to download with version input in your workflow so it seems you don't have Buildx installed on this runner. This doesn't seem consistent with GitHub hosted runner that have Buildx already installed: https://github.com/actions/runner-images/blob/810182e2e2c698bcec0cda5018f1fdc6c9a96cce/images/ubuntu/toolsets/toolset-2404.json#L208-L212. In such case it will always download Buildx from GitHub Release. So maybe you should add Buildx in your runner image first if you don't want time wasted downloading the binary or it being cached.

crazy-max avatar Aug 11 '25 14:08 crazy-max