Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

manually detect tar compression before attempting to unpack #95

Merged
merged 2 commits into from
Sep 20, 2017

Conversation

nkubala
Copy link
Contributor

@nkubala nkubala commented Sep 20, 2017

also, fix the remove() method, and fix the test.sh file.

cc @dlorenc

@@ -87,13 +87,23 @@ func getFileSystemFromReference(ref types.ImageReference, imageName string) (str
for _, b := range img.LayerInfos() {
bi, _, err := imgSrc.GetBlob(b)
if err != nil {
glog.Errorf("Failed to pull image layer with error: %s", err)
glog.Errorf("Failed to pull image layer: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably return here right? This will continue. I realize it was like this before, but we should clean it up while you're changing the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah, don't think it makes sense to keep going here cause this totally screws up the image representation. Fixed

Copy link
Contributor

@dlorenc dlorenc left a comment

Choose a reason for hiding this comment

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

Since this was broken before, could you also add a test case for this to e2e?

@nkubala
Copy link
Contributor Author

nkubala commented Sep 20, 2017

Since this was broken before, could you also add a test case for this to e2e?

Turns out this actually wasn't broken before, because the local images were using the docker client to do a docker save, which was in line with the compression being used. In a following PR I'll change this to use the containers/image library instead of the docker client, and I'll add appropriate e2e tests.

@nkubala nkubala merged commit 46ffad9 into GoogleContainerTools:master Sep 20, 2017
@nkubala nkubala deleted the compression branch September 20, 2017 16:47
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