Skip to content
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
bobcatfish:layer_failure
Jul 31, 2018
Merged

Add a bit more context to layer offset failures#264
bobcatfish merged 1 commit intoGoogleContainerTools:masterfrom
bobcatfish:layer_failure

Conversation

@bobcatfish
Copy link
Copy Markdown
Contributor

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 and
kaniko-dockerfile_test_copy are built.

Comment thread integration/integration_test.go Outdated
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)
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IT IS DONE

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)
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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?)

@bobcatfish
Copy link
Copy Markdown
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.
@bobcatfish bobcatfish merged commit 5604820 into GoogleContainerTools:master Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants