This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Add a bit more context to layer offset failures#264
Merged
bobcatfish merged 1 commit intoGoogleContainerTools:masterfrom Jul 31, 2018
Merged
Add a bit more context to layer offset failures#264bobcatfish merged 1 commit intoGoogleContainerTools:masterfrom
bobcatfish merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
dlorenc
reviewed
Jul 31, 2018
| actualOffset := int(math.Abs(float64(lenImage1 - lenImage2))) | ||
| if actualOffset != offset { | ||
| return fmt.Errorf("incorrect offset between layers of %s and %s: expected %d but got %d", image1, image2, offset, actualOffset) | ||
| return fmt.Errorf("Difference in number of layers in each image is %d but should be %d. %s has %d layers and %s has %d layers", actualOffset, offset, image1, lenImage1, image2, lenImage2) |
Contributor
There was a problem hiding this comment.
How tough would it be to dump the full image digest as part of this? That way we could debug later.
2f4ac08 to
f7b659d
Compare
dlorenc
reviewed
Jul 31, 2018
| return 0, fmt.Errorf("Couldn't parse referance to image %s: %s", image, err) | ||
| return nil, fmt.Errorf("Couldn't parse referance to image %s: %s", image, err) | ||
| } | ||
| imgRef, err := daemon.Image(ref) |
Contributor
There was a problem hiding this comment.
Only one of these should be a daemon.Image, right? The other is remote?
Contributor
Author
There was a problem hiding this comment.
@dlorenc the kaniko image is pulled right before this executes (maybe that should be made more clear somehow?)
Contributor
Author
|
Latest kokoro failure is a test timeout, very odd 🤔 |
In GoogleContainerTools#251 we are investigating test flakes due to layer offsets not matching, this change will give us a bit more context so we can be sure which image has which number of layers, and it will also include the digest of the image, since kaniko always pushes images to a remote repo, so if the test fails we can pull the digest and see what is up. Also updated reproducible Dockerfile to be built with reproducible flag, which I think was the original intent (without this change, there is no difference between how `kaniko-dockerfile_test_copy_reproducible` and `kaniko-dockerfile_test_copy` are built.
f7b659d to
57b1159
Compare
This file contains hidden or 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
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.
In #251 we are investigating test flakes due to layer offsets not
matching, this change will give us a bit more context so we can be sure
which image has which number of layers.
Also updated reproducible Dockerfile to be built with reproducible flag,
which I think was the original intent (without this change, there is no
difference between how
kaniko-dockerfile_test_copy_reproducibleandkaniko-dockerfile_test_copyare built.