Exported build cache randomly missing some platforms
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, github-actions, go
- Domain
- build-system, ci-cd, infrastructure
Research direction
Start with the linked .github/workflows/docker-release.yml and Dockerfile, then rerun the two referenced GitHub Actions builds using the documented registry cache settings. Compare cache export and import results for linux/amd64, linux/arm/v7, and linux/arm64, including the alternative gha cache case. Done means the cause of the missing platform caches is identified and repeated runs reliably restore all three platforms.
Written by the indexing model from the issue text.
Description
TL;DR
https://github.com/moby/buildkit/issues/2822#issuecomment-1113920626
In https://github.com/moby/buildkit/issues/2758#issuecomment-1088288408, @tonistiigi said that If someone has something similar with a single node then create a separate issue with a reproducer so here it is.
I am facing almost the same issue but what I use is GitHub Actions which should only have a single-node builder.
In my case, I need to build for 3 platforms (linux/amd64, linux/arm/v7, linux/arm64). Each time, there are randomly 1 or 2 platforms entirely unable to fetch their cache and must start over.
Build settings
- name: Build and push Docker image (ordinary version)
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta-ordinary.outputs.tags }}
labels: ${{ steps.meta-ordinary.outputs.labels }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:buildcache,mode=max
/usr/bin/docker buildx build
--cache-from type=registry,ref=***/rsshub:buildcache
--cache-to type=registry,ref=***/rsshub:buildcache,mode=max
--iidfile /tmp/docker-build-push-AxluK5/iidfile
--label org.opencontainers.image.title=RSSHub
--label org.opencontainers.image.description=🍰 Everything is RSSible
--label org.opencontainers.image.url=https://github.com/Rongronggg9/RSSHub
--label org.opencontainers.image.source=https://github.com/Rongronggg9/RSSHub
--label org.opencontainers.image.version=latest
--label org.opencontainers.image.created=2022-04-24T03:45:12.333Z
--label org.opencontainers.image.revision=16de07893dacaaf7382fc985ccd43f3f5e587646
--label org.opencontainers.image.licenses=MIT
--platform linux/amd64,linux/arm/v7,linux/arm64
--tag ***/rsshub:latest
--tag ***/rsshub:2022-04-24
--metadata-file /tmp/docker-build-push-AxluK5/metadata-file
--push .
(I added linebreaks to make it readable.)
The node
Name: builder-798d7bea-6cd7-454f-baa6-32276a2b4c26
Driver: docker-container
Nodes:
Name: builder-798d7bea-6cd7-454f-baa6-32276a2b4c260
Endpoint: unix:///var/run/docker.sock
Status: running
Flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
Platforms: linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
{
"name": "builder-798d7bea-6cd7-454f-baa6-32276a2b4c26",
"driver": "docker-container",
"node_name": "builder-798d7bea-6cd7-454f-baa6-32276a2b4c260",
"node_endpoint": "unix:///var/run/docker.sock",
"node_status": "running",
"node_flags": "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
"node_platforms": "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6"
}
How to reproduce
- Delete all relevant build caches on Docker Hub to avoid potential interference. (optional)
- Trigger action run attempt #1, which should have the build caches of all 3 platforms pushed to the registry.
- Wait until finished, then re-run the job, trigger action run attempt #2, which should have all 3 platforms get cache hits, but only
linux/amd64got.
FYI
This issue seems to exist when the cache type is gha, but I am not so sure if this is because of the cache size limit of GitHub Actions.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moby/buildkit
-
status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
area/dockerfile
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100