{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/35803303","id":35803303,"diff_hunk":"@@ -35,13 +48,17 @@ func Untar(tarArchive io.Reader, dest string, options *archive.TarOptions) error\n \t\t}\n \t}\n \n-\tdecompressedArchive, err := archive.DecompressStream(tarArchive)\n-\tif err != nil {\n-\t\treturn err\n+\tr := ioutil.NopCloser(tarArchive)","path":"pkg/chrootarchive/archive.go","position":34,"original_position":34,"commit_id":"273f50c741e82a0be3e9f9d4c975cc18801dfe38","original_commit_id":"273f50c741e82a0be3e9f9d4c975cc18801dfe38","user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"body":"I agree with @vbatts. If a method is passed an `io.Reader`, it should not be expected to close the reader, since ownership can be assumed is held by the caller. If an `io.ReadCloser` is passed, the caller passes ownership to the callee, which should always invoke close.\r\n\r\nPlease confirm this convention is followed.","created_at":"2015-07-29T19:48:43Z","updated_at":"2015-07-29T19:48:43Z","html_url":"https://github.com/docker/docker/pull/15040#discussion_r35803303","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/15040","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/35803303"},"html":{"href":"https://github.com/docker/docker/pull/15040#discussion_r35803303"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/15040"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/15040","id":40928572,"html_url":"https://github.com/docker/docker/pull/15040","diff_url":"https://github.com/docker/docker/pull/15040.diff","patch_url":"https://github.com/docker/docker/pull/15040.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/15040","number":15040,"state":"open","locked":false,"title":"archive, graphdriver: double decompress fix","user":{"login":"vbatts","id":67049,"avatar_url":"https://avatars.githubusercontent.com/u/67049?v=3","gravatar_id":"","url":"https://api.github.com/users/vbatts","html_url":"https://github.com/vbatts","followers_url":"https://api.github.com/users/vbatts/followers","following_url":"https://api.github.com/users/vbatts/following{/other_user}","gists_url":"https://api.github.com/users/vbatts/gists{/gist_id}","starred_url":"https://api.github.com/users/vbatts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbatts/subscriptions","organizations_url":"https://api.github.com/users/vbatts/orgs","repos_url":"https://api.github.com/users/vbatts/repos","events_url":"https://api.github.com/users/vbatts/events{/privacy}","received_events_url":"https://api.github.com/users/vbatts/received_events","type":"User","site_admin":false},"body":"the magic DecompressStream is buried through `pkg/archive`, `pkg/chrootarchive` and how `(*daemon/graphdriver.Driver).ApplyDiff()` consume the tar stream. \r\n\r\nThis was causing a double decompression, and when the tar layer is empty results in premature EOF.\r\n\r\nThis adds functions to operate on Uncompressed streams, and set the expectation that `(*graphdriver.Driver).ApplyDiff()` on handles uncompressed streams.\r\n\r\n/cc @tiborvass @icecrime ","created_at":"2015-07-27T17:33:02Z","updated_at":"2015-07-29T19:48:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbcb046be2fd3713775280ea9bff5e05a084a810","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/39","html_url":"https://github.com/docker/docker/milestones/1.8.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/39/labels","id":1151952,"number":39,"title":"1.8.0","description":"","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":69,"state":"open","created_at":"2015-06-05T19:27:06Z","updated_at":"2015-07-29T18:12:15Z","due_on":"2015-08-09T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/docker/pulls/15040/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/15040/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/15040/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/273f50c741e82a0be3e9f9d4c975cc18801dfe38","head":{"label":"vbatts:vbatts-double-decompress-fix","ref":"vbatts-double-decompress-fix","sha":"273f50c741e82a0be3e9f9d4c975cc18801dfe38","user":{"login":"vbatts","id":67049,"avatar_url":"https://avatars.githubusercontent.com/u/67049?v=3","gravatar_id":"","url":"https://api.github.com/users/vbatts","html_url":"https://github.com/vbatts","followers_url":"https://api.github.com/users/vbatts/followers","following_url":"https://api.github.com/users/vbatts/following{/other_user}","gists_url":"https://api.github.com/users/vbatts/gists{/gist_id}","starred_url":"https://api.github.com/users/vbatts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbatts/subscriptions","organizations_url":"https://api.github.com/users/vbatts/orgs","repos_url":"https://api.github.com/users/vbatts/repos","events_url":"https://api.github.com/users/vbatts/events{/privacy}","received_events_url":"https://api.github.com/users/vbatts/received_events","type":"User","site_admin":false},"repo":{"id":14430080,"name":"docker","full_name":"vbatts/docker","owner":{"login":"vbatts","id":67049,"avatar_url":"https://avatars.githubusercontent.com/u/67049?v=3","gravatar_id":"","url":"https://api.github.com/users/vbatts","html_url":"https://github.com/vbatts","followers_url":"https://api.github.com/users/vbatts/followers","following_url":"https://api.github.com/users/vbatts/following{/other_user}","gists_url":"https://api.github.com/users/vbatts/gists{/gist_id}","starred_url":"https://api.github.com/users/vbatts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbatts/subscriptions","organizations_url":"https://api.github.com/users/vbatts/orgs","repos_url":"https://api.github.com/users/vbatts/repos","events_url":"https://api.github.com/users/vbatts/events{/privacy}","received_events_url":"https://api.github.com/users/vbatts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vbatts/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/vbatts/docker","forks_url":"https://api.github.com/repos/vbatts/docker/forks","keys_url":"https://api.github.com/repos/vbatts/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vbatts/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vbatts/docker/teams","hooks_url":"https://api.github.com/repos/vbatts/docker/hooks","issue_events_url":"https://api.github.com/repos/vbatts/docker/issues/events{/number}","events_url":"https://api.github.com/repos/vbatts/docker/events","assignees_url":"https://api.github.com/repos/vbatts/docker/assignees{/user}","branches_url":"https://api.github.com/repos/vbatts/docker/branches{/branch}","tags_url":"https://api.github.com/repos/vbatts/docker/tags","blobs_url":"https://api.github.com/repos/vbatts/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vbatts/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vbatts/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/vbatts/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vbatts/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/vbatts/docker/languages","stargazers_url":"https://api.github.com/repos/vbatts/docker/stargazers","contributors_url":"https://api.github.com/repos/vbatts/docker/contributors","subscribers_url":"https://api.github.com/repos/vbatts/docker/subscribers","subscription_url":"https://api.github.com/repos/vbatts/docker/subscription","commits_url":"https://api.github.com/repos/vbatts/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/vbatts/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/vbatts/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/vbatts/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/vbatts/docker/contents/{+path}","compare_url":"https://api.github.com/repos/vbatts/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vbatts/docker/merges","archive_url":"https://api.github.com/repos/vbatts/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vbatts/docker/downloads","issues_url":"https://api.github.com/repos/vbatts/docker/issues{/number}","pulls_url":"https://api.github.com/repos/vbatts/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/vbatts/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/vbatts/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vbatts/docker/labels{/name}","releases_url":"https://api.github.com/repos/vbatts/docker/releases{/id}","created_at":"2013-11-15T17:00:27Z","updated_at":"2015-04-08T19:38:00Z","pushed_at":"2015-07-28T20:36:49Z","git_url":"git://github.com/vbatts/docker.git","ssh_url":"git@github.com:vbatts/docker.git","clone_url":"https://github.com/vbatts/docker.git","svn_url":"https://github.com/vbatts/docker","homepage":"http://www.docker.io","size":64363,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"bfbac726c774a3a9cf308555aa01b96e7129bf1f","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-07-29T19:17:43Z","pushed_at":"2015-07-29T19:48:03Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":234482,"stargazers_count":23625,"watchers_count":23625,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5940,"mirror_url":null,"open_issues_count":1044,"forks":5940,"open_issues":1044,"watchers":23625,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/15040"},"html":{"href":"https://github.com/docker/docker/pull/15040"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/15040"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/15040/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/15040/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/15040/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/273f50c741e82a0be3e9f9d4c975cc18801dfe38"}}}}