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

Fixes a whitelist issue when untarring files in ADD commands. #371

Merged
merged 3 commits into from
Sep 28, 2018

Conversation

dlorenc
Copy link
Collaborator

@dlorenc dlorenc commented Sep 27, 2018

I think this fixes an issue with extracting tar files during ADD commands where those tar files contain whitelisted entries.

@priyawadhwa
Copy link
Collaborator

Looks like kokoro caught something

FAIL: TestRun/test_Dockerfile_test_add (49.00s)
    	integration_test.go:203: diff = [
    		  {
    		    "Image1": "gcr.io/kaniko-test/docker-dockerfile_test_add",
    		    "Image2": "gcr.io/kaniko-test/kaniko-dockerfile_test_add",
    		    "DiffType": "File",
    		    "Diff": {
    		      "Adds": null,
    		      "Dels": [
    		        {
    		          "Name": "/sys/fs",
    		          "Size": 0
    		        },
    		        {
    		          "Name": "/sys/fs/foo",
    		          "Size": 0
    		        }
    		      ],
    		      "Mods": null
    		    }
    		  },
    		  {
    		    "Image1": "gcr.io/kaniko-test/docker-dockerfile_test_add",
    		    "Image2": "gcr.io/kaniko-test/kaniko-dockerfile_test_add",
    		    "DiffType": "Metadata",
    		    "Diff": {
    		      "Adds": [],
    		      "Dels": []
    		    }
    		  }
    		]

@@ -35,4 +35,4 @@ fi
echo "Running integration tests..."
make out/executor
pushd integration
go test -v --bucket "${GCS_BUCKET}" --repo "${IMAGE_REPO}" --timeout 30m
go test -v --bucket "${GCS_BUCKET}" --repo "${IMAGE_REPO}" --timeout 30m -run ^TestRun/Dockerfile_test_add$
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this may be left over from testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

D'oh. Thanks!

@priyawadhwa
Copy link
Collaborator

Cool so kokoro found this:

--- FAIL: TestLayers (276.84s)
    --- FAIL: TestLayers/test_layer_Dockerfile_test_add (14.16s)
    	integration_test.go:237: Difference in number of layers in each image is 11 but should be 10. Image 1: Image: [gcr.io/kaniko-test/docker-dockerfile_test_add] Digest: [a583f57d4c7e97863a73954ab33e2f16dd5065a55ed4c308fc7c99939562f8f8] Number of Layers: [13], Image 2: Image: [gcr.io/kaniko-test/kaniko-dockerfile_test_add] Digest: [9b9f5909da8e19a34c3c93589cea3d45e3acca74e2fcb8dcc5a6ceaf2128a30e] Number of Layers: [2]

This is one of the images we test the --single-snapshot flag on, so we just need to update the expected offset to 11 since a layer was added to the Dockerfile.

@dlorenc
Copy link
Collaborator Author

dlorenc commented Sep 28, 2018

This is one of the images we test the --single-snapshot flag on, so we just need to update the expected offset to 11 since a layer was added to the Dockerfile.

Thanks!

Copy link
Collaborator

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

LGTM!

@dlorenc dlorenc merged commit e1b0f77 into GoogleContainerTools:master Sep 28, 2018
@dlorenc dlorenc deleted the whitelisttar branch September 28, 2018 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants