Skip to content

builder-next: relax second cache key requirements for schema1#42371

Merged
thaJeztah merged 1 commit into
moby:masterfrom
tonistiigi:schema1-cache-fix
May 17, 2021
Merged

builder-next: relax second cache key requirements for schema1#42371
thaJeztah merged 1 commit into
moby:masterfrom
tonistiigi:schema1-cache-fix

Conversation

@tonistiigi

@tonistiigi tonistiigi commented May 11, 2021

Copy link
Copy Markdown
Member

fixes moby/buildkit#2033

Schema1 images can not have a config based cache key
before the layers are pulled. Avoid validation and reuse
manifest digest as a second key.

Signed-off-by: Tonis Tiigi [email protected]

@thaJeztah

Copy link
Copy Markdown
Member

Looks like linting is failing;

https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-42371/1/pipeline


[2021-05-11T21:34:24.934Z] builder/builder-next/adapters/containerimage/pull.go:336: File is not `goimports`-ed (goimports)
[2021-05-11T21:34:24.934Z] 	if len(p.config) == 0  && p.desc.MediaType != images.MediaTypeDockerSchema1Manifest {

Schema1 images can not have a config based cache key
before the layers are pulled. Avoid validation and reuse
manifest digest as a second key.

Signed-off-by: Tonis Tiigi <[email protected]>
@tonistiigi
tonistiigi force-pushed the schema1-cache-fix branch from 41b41ca to 85167fc Compare May 13, 2021 05:44

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails when FROM image isn't cached

3 participants