buildah icon indicating copy to clipboard operation
buildah copied to clipboard

Error: checking if cached image exists from a previous build: getting top layer info: layer not known

Open vrothberg opened this issue 1 year ago • 6 comments

I have four parallel build jobs running. Each using the same base image. It pretty much builds down to podman build -t test-$iteration . followed by a podman rmi test-$iteration.

Sporadically, I get the error mentioned in the title. I did not check the code but it seems that buildah should consider an image to not exist when the top-layer has been removed.

Cc: @nalind @mheon

vrothberg avatar Jul 02 '24 11:07 vrothberg

I saw this as well, but I was not running parallel builds with the same base image. I was running two separate buildah unshare buildah bud ... commands, but with completely different dockerfiles that share no layers. This was with the podman 5.1.2 image from quay.io with buildah 1.35.1 installed. The job was running in jenkins on k8s and passed on a retry.

nburlett avatar Jul 30 '24 20:07 nburlett

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Aug 30 '24 00:08 github-actions[bot]

oops, I only just noticed this. I'm 99% sure this is the same as #5674. You can work around it by adding --layers=false to all the builds commands.

edsantiago avatar Aug 30 '24 01:08 edsantiago

I've since switched to using --layers --cache-from $privaterepo --cache-to $privaterepo and I'm not seeing any failures.

In #5674 the reported issue is from building the same image twice. In my cases I was seeing an error building two unrelated images which I thought had no layers in common. I don't have the logs any more for the old builds so I can't double check.

nburlett avatar Aug 30 '24 16:08 nburlett

Can we now close this issue?

rhatdan avatar Sep 03 '24 19:09 rhatdan

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Oct 04 '24 00:10 github-actions[bot]