Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow skipping empty layer detection on cache export #1993

Merged
merged 1 commit into from Feb 24, 2021

Conversation

tonistiigi
Copy link
Member

fix #1992

Moby image exporter does not remove empty layers causing inline cache to go out of sync. This allows behavior to be configured so it can be turned off in moby.

Regression from 85dd12d

There is still an issue that empty layers (ones optimized after differ, not metadata commands) can get out of sync in the history array of the image after cache import. Don't really know what to do about it as there is no information to determine that a RUN command didn't create a layer without running it.

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tiborvass tiborvass merged commit c775aec into moby:master Feb 24, 2021
tiborvass pushed a commit to thaJeztah/docker that referenced this pull request Feb 25, 2021
tiborvass pushed a commit to thaJeztah/docker that referenced this pull request Feb 25, 2021
See moby/buildkit#1993

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9bf93e9)
Signed-off-by: Tibor Vass <tibor@docker.com>
docker-jenkins pushed a commit to docker/docker-ce that referenced this pull request Feb 25, 2021
See moby/buildkit#1993

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9bf93e90fa9ce74b6f7309a22838da8189838b3b
Component: engine
sergioprado pushed a commit to toradex/torizoncore-builder that referenced this pull request Aug 25, 2021
The build of the container sometimes fails with the following error:

failed to compute cache key: failed to walk
/var/lib/docker/overlay2/df6ea.../merged/root/aktualizr/build: lstat
/var/lib/docker/overlay2/df6ea.../merged/root/aktualizr/build: no such file or directory

It seems a cache issue with the sota-builder build stage. For some
reason, using --cache-from with BUILDKIT_INLINE_CACHE does not work
every time.

Indeed, there is a report of this issue in [1] and it is fixed in [2],
but it seems our CI it's not running a Buildkit version that has this
fix.

To workaround this issue, let's disable cached builds for now.

[1] moby/buildkit#1981
[2] moby/buildkit#1993

Related-to: TOR-1671

Signed-off-by: Sergio Prado <sergio.prado@toradex.com>
nosamad pushed a commit to WAGO/docker-engine that referenced this pull request Sep 13, 2021
See moby/buildkit#1993

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9bf93e9)
Signed-off-by: Tibor Vass <tibor@docker.com>
nosamad pushed a commit to WAGO/docker-engine that referenced this pull request Sep 15, 2021
See moby/buildkit#1993

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9bf93e9)
Signed-off-by: Tibor Vass <tibor@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

moby-integration: 20.10 cache layer lost after many imports
2 participants