Failed to restore: getCacheEntry failed: connect ETIMEDOUT during the setup and post job cleanup
Contributing guidelines
- [x] I've read the contributing guidelines and wholeheartedly agree
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
Expected behaviour
There should be no cache error and the time for the action to setup the installer should be in seconds.
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
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
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.