-
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
Use content digests in ADD/COPY history entries #1792
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a DryRun flag to AddAndCopyOptions, so that we can "copy" content to digest it. Signed-off-by: Nalin Dahyabhai <[email protected]>
nalind
force-pushed
the
hashes-in-history
branch
2 times, most recently
from
August 14, 2019 20:32
ad3ede0
to
b377385
Compare
Use digests of the added content in history entries that we create for ADD and COPY instructions, tightening up cache checking just a little bit more. Signed-off-by: Nalin Dahyabhai <[email protected]>
nalind
force-pushed
the
hashes-in-history
branch
from
August 14, 2019 23:36
b377385
to
0f44e6b
Compare
LGTM |
LGTM and passes baseline tests |
📌 Commit 0f44e6b has been approved by |
rh-atomic-bot
pushed a commit
that referenced
this pull request
Aug 16, 2019
Use digests of the added content in history entries that we create for ADD and COPY instructions, tightening up cache checking just a little bit more. Signed-off-by: Nalin Dahyabhai <[email protected]> Closes: #1792 Approved by: TomSweeneyRedHat
☀️ Test successful - status-papr, status-travis |
This was referenced Sep 6, 2019
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/buildah
that referenced
this pull request
Oct 16, 2019
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]>
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/buildah
that referenced
this pull request
Oct 16, 2019
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]>
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/buildah
that referenced
this pull request
Oct 16, 2019
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]>
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/buildah
that referenced
this pull request
Oct 16, 2019
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]>
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/buildah
that referenced
this pull request
Oct 16, 2019
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]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use digests of the added content in history entries that we create for ADD and COPY instructions, tightening up cache checking just a little bit more. This should fix #1780.