-
Notifications
You must be signed in to change notification settings - Fork 788
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
Re-Add file check to cacheing algorithm #1925
Re-Add file check to cacheing algorithm #1925
Conversation
a14ea45
to
baf8007
Compare
@TomSweeneyRedHat Tests are not happy. |
Ugh, I swear I spend more time making the tests work in the CI than I do the actual code changes sometimes. This worked fine in my sandbox, but it looks like an environment variable resolution issue in the CI. I'll go hard code it, thanks for the heads up @rhatdan |
baf8007
to
2d7aa9d
Compare
I take the variable bit back, it looks like a git hiccup, it's not seeing my new bud/change-archive directory. Gotta dig. |
Add back the file checking mechanisms that were removed as part of the reworking of the cache in containers#1792. If we have a 'COPY mytar.tar.xz' command in the Containerfile and the tar file was regenerated after an intial build, secondary 'buildah bud' commands would use the cache from the first build for the tar file instead of regenerating it. The historyMatches() function (https://github.com/containers/buildah/blob/master/imagebuildah/executor.go#L287) does not seem to pick up this type of change and I wasn't able to quickly rework that to do so. We may want to revert back to this check for now, then tweak the historyMatches to work properly in a follow up PR. Regardless, I've added a test as part of this PR to catch this issue going forward. Fixes: containers#1906 Signed-off-by: TomSweeneyRedHat <[email protected]>
2d7aa9d
to
600c658
Compare
OMG, second day in a row with a corrupted sandbox. Will have to spin up a new PR for this. |
Try 2 after I accidentally nuked my sandbox for containers#1925 Add back the file checking mechanisms that were removed as part of the reworking of the cache in containers#1792. If we have a 'COPY mytar.tar.xz' command in the Containerfile and the tar file was regenerated after an intial build, secondary 'buildah bud' commands would use the cache from the first build for the tar file instead of regenerating it. The historyMatches() function (https://github.com/containers/buildah/blob/master/imagebuildah/executor.go#L287) does not seem to pick up this type of change and I wasn't able to quickly rework that to do so. We may want to revert back to this check for now, then tweak the historyMatches to work properly in a follow up PR. Regardless, I've added a test as part of this PR to catch this issue going forward. FWIW, with the exception of the test code, all of the code is a reversion to pre-existing code. Fixes: containers#1906 Signed-off-by: TomSweeneyRedHat <[email protected]>
Add back the file checking mechanisms that were removed as part of the
reworking of the cache in #1792. If we have a 'COPY mytar.tar.xz' command
in the Containerfile and the tar file was regenerated after an intial build,
secondary 'buildah bud' commands would use the cache from the first build
for the tar file instead of regenerating it.
The historyMatches() function (https://github.com/containers/buildah/blob/master/imagebuildah/executor.go#L287)
does not seem to pick up this type of change and I wasn't able to quickly
rework that to do so. We may want to revert back to this check for now,
then tweak the historyMatches to work properly in a follow up PR.
Regardless, I've added a test as part of this PR to catch this issue
going forward.
FWIW, with the exception of the test code, all of the code is a reversion to pre-existing code.
Fixes: #1906
Signed-off-by: TomSweeneyRedHat [email protected]