-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add a bit more context to layer offset failures #264
Add a bit more context to layer offset failures #264
Conversation
integration/integration_test.go
Outdated
@@ -225,7 +225,7 @@ func checkLayers(image1, image2 string, offset int) error { | |||
} | |||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How tough would it be to dump the full image digest as part of this? That way we could debug later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IT IS DONE
2f4ac08
to
f7b659d
Compare
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one of these should be a daemon.Image, right? The other is remote?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dlorenc the kaniko image is pulled right before this executes (maybe that should be made more clear somehow?)
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
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_reproducible
andkaniko-dockerfile_test_copy
are built.