Contributing guidelines
I've found a bug, and:
Description
Description:
When using setup-qemu-action in a matrix build with multiple platforms, parallel jobs within the same workflow run all try to save the binfmt image to GitHub Actions cache using the same cache key simultaneously. This causes a warning on all jobs except the first one that wins the race.
Warning:
Failed to save: Unable to reserve cache with key
docker.io--tonistiigi--binfmt-latest-linux-x64,
another job may be creating this cache.
Root Cause:
The cache key is built from the image name + tag + runner OS/arch: docker.io--tonistiigi--binfmt-latest-linux-x64
Since all platform matrix jobs (including linux/arm64, linux/arm/v7, etc.) run on the same ubuntu-latest runner (x64), they all produce the identical cache key and compete to write it in parallel.
The issue is in @docker/actions-toolkit's Docker.pull() — it always attempts to save to cache after a successful pull, even when multiple jobs are running concurrently.
Expected behaviour
No warning while using matrix multi platform.
Actual behaviour
All jobs except one print the warning. Build still succeeds (warning is non-fatal), but it's noisy and confusing.
Repository URL
https://github.com/rosen-bridge/guard-service
Workflow run URL
https://github.com/rosen-bridge/guard-service/actions/runs/27794152893
YAML workflow
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
- linux/arm/v7
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# cache-image defaults to true
Workflow logs
BuildKit logs
Additional info
No response
Contributing guidelines
I've found a bug, and:
Description
Description:
When using
setup-qemu-actionin a matrix build with multiple platforms, parallel jobs within the same workflow run all try to save the binfmt image to GitHub Actions cache using the same cache key simultaneously. This causes a warning on all jobs except the first one that wins the race.Warning:
Root Cause:
The cache key is built from the image name + tag + runner OS/arch:
docker.io--tonistiigi--binfmt-latest-linux-x64Since all platform matrix jobs (including
linux/arm64,linux/arm/v7, etc.) run on the sameubuntu-latestrunner (x64), they all produce the identical cache key and compete to write it in parallel.The issue is in
@docker/actions-toolkit'sDocker.pull()— it always attempts to save to cache after a successful pull, even when multiple jobs are running concurrently.Expected behaviour
No warning while using matrix multi platform.
Actual behaviour
All jobs except one print the warning. Build still succeeds (warning is non-fatal), but it's noisy and confusing.
Repository URL
https://github.com/rosen-bridge/guard-service
Workflow run URL
https://github.com/rosen-bridge/guard-service/actions/runs/27794152893
YAML workflow
Workflow logs
BuildKit logs
Additional info
No response