-
Notifications
You must be signed in to change notification settings - Fork 787
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
bud: layer cache is broken with --build-args #2992
Comments
terceiro
added a commit
to terceiro/buildah
that referenced
this issue
Feb 10, 2021
This fixes a regression introduced in 9b29958. Adding the build args explicitly in getCreatedBy() is enough to force a rebuild when build args change. On the other hand, if you run ib.Run() whenever build args is not empty, you re-run the entire build even when using the same build args as previous builds. Closes containers#2992 Signed-off-by: Antonio Terceiro <[email protected]>
terceiro
added a commit
to terceiro/buildah
that referenced
this issue
Feb 10, 2021
This fixes a regression introduced in 9b29958. Adding the build args explicitly in getCreatedBy() is enough to force a rebuild when build args change. On the other hand, if you run ib.Run() whenever build args is not empty, you re-run the entire build even when using the same build args as previous builds. Closes containers#2992 Signed-off-by: Antonio Terceiro <[email protected]>
terceiro
added a commit
to terceiro/buildah
that referenced
this issue
Feb 10, 2021
This fixes a regression introduced in 9b29958. ib.Run() is only really needed in the ARG step. On all the other steps, it can cause potentially expensive commands to be executed unecessarily. Closes containers#2992 Signed-off-by: Antonio Terceiro <[email protected]> Signed-off-by: Urvashi Mohnani <[email protected]>
rhatdan
pushed a commit
to rhatdan/buildah
that referenced
this issue
Feb 11, 2021
This fixes a regression introduced in 9b29958. ib.Run() is only really needed in the ARG step. On all the other steps, it can cause potentially expensive commands to be executed unecessarily. Closes containers#2992 Signed-off-by: Antonio Terceiro <[email protected]> Signed-off-by: Urvashi Mohnani <[email protected]>
umohnani8
pushed a commit
to umohnani8/buildah
that referenced
this issue
Feb 11, 2021
This fixes a regression introduced in 9b29958. ib.Run() is only really needed in the ARG step. On all the other steps, it can cause potentially expensive commands to be executed unecessarily. Closes containers#2992 Signed-off-by: Antonio Terceiro <[email protected]> Signed-off-by: Urvashi Mohnani <[email protected]>
ghost
mentioned this issue
Oct 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Building images with the same build args does not use the cache. This worked in v0.19.2, and has been broken by 9b29958. #2967 fixes it for builds with no build args, but having build args makes the cache not be used..
Steps to reproduce the issue:
I'm using the following files:
bisect.sh:
Containerfile:
Then from the buildah source tree, I run the bisect script. First, on the master branch from today (0508fba):
Now, against the latest release where this worked (v0.19.2):
(the later run reuses the layers created by the one from master and cached, so even the first build already does not execute the RUN instruction). But if I change the
7
in the script to something else, say 8, it works as intended:cc @umohnani8
The text was updated successfully, but these errors were encountered: