Skip to content
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 --single-snapshot flag to snapshot once after the build #204

Merged
merged 5 commits into from
Jun 22, 2018

Conversation

priyawadhwa
Copy link
Collaborator

Fixes #203

@@ -106,6 +106,12 @@ func TestRun(t *testing.T) {
"Dockerfile_test_multistage": {"file=/foo2"},
}

// Map for additional flags
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the test somewhere it would be good to make sure there is only one additional layer. Any ideas?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a test to make sure docker built and kaniko built images have the same number of layers (except for specified offsets for the --single-snapshot ones)

But it looks like it found errors in some of the other tests so I'll try and find those bugs as well

@dlorenc
Copy link
Collaborator

dlorenc commented Jun 21, 2018

--- FAIL: TestLayers (96.89s)
    --- FAIL: TestLayers/test_layer_dockerfiles/Dockerfile_test_user_run (1.70s)
    	integration_test.go:232: Error response from daemon: reference does not exist
    --- FAIL: TestLayers/test_layer_dockerfiles/Dockerfile_test_volume (9.76s)
    	integration_test.go:232: incorrect offset between layers of gcr.io/kaniko-test/docker-dockerfile_test_volume and gcr.io/kaniko-test/kaniko-dockerfile_test_volume: expected 0 but got 2
    --- FAIL: TestLayers/test_layer_dockerfiles/Dockerfile_test_workdir (9.78s)
    	integration_test.go:232: incorrect offset between layers of gcr.io/kaniko-test/docker-dockerfile_test_workdir and gcr.io/kaniko-test/kaniko-dockerfile_test_workdir: expected 0 but got 1

Does this need a rebase to pass?

@priyawadhwa
Copy link
Collaborator Author

So these tests are failing because the number of layers is actually incorrect, but I found a bug for the workdir one which I'm going to submit a PR for now

@priyawadhwa priyawadhwa force-pushed the snapshot branch 2 times, most recently from b1d2d99 to 77a4848 Compare June 21, 2018 22:26
@priyawadhwa priyawadhwa merged commit 4198901 into GoogleContainerTools:master Jun 22, 2018
@priyawadhwa priyawadhwa deleted the snapshot branch June 22, 2018 00:28
@priyawadhwa priyawadhwa self-assigned this Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants