{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/28348","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/28348/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/28348/comments","events_url":"https://api.github.com/repos/docker/docker/issues/28348/events","html_url":"https://github.com/docker/docker/pull/28348","id":188947104,"number":28348,"title":"cache partial downloads from docker pull","user":{"login":"vikstrous","id":482425,"avatar_url":"https://avatars.githubusercontent.com/u/482425?v=3","gravatar_id":"","url":"https://api.github.com/users/vikstrous","html_url":"https://github.com/vikstrous","followers_url":"https://api.github.com/users/vikstrous/followers","following_url":"https://api.github.com/users/vikstrous/following{/other_user}","gists_url":"https://api.github.com/users/vikstrous/gists{/gist_id}","starred_url":"https://api.github.com/users/vikstrous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikstrous/subscriptions","organizations_url":"https://api.github.com/users/vikstrous/orgs","repos_url":"https://api.github.com/users/vikstrous/repos","events_url":"https://api.github.com/users/vikstrous/events{/privacy}","received_events_url":"https://api.github.com/users/vikstrous/received_events","type":"User","site_admin":false},"labels":[{"id":175375318,"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-11-13T02:09:58Z","updated_at":"2016-11-28T19:53:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/28348","html_url":"https://github.com/docker/docker/pull/28348","diff_url":"https://github.com/docker/docker/pull/28348.diff","patch_url":"https://github.com/docker/docker/pull/28348.patch"},"body":"I'm much more confident in this PR than the previous one because it's much smaller. It basically worked on the first try since I had all the code and already understood the architecture.\r\n\r\n**- What I did**\r\n* [x] keep partial downloads accross daemon carshes, restarts and pull cancellations\r\n* [x] use the cache dir for v1 pulls too even though they are not resumable\r\n* [x] small refactors\r\n* [x] print more progress info\r\n* [x] make progress bars start half way through if they are resuming an operation\r\n* [x] improve prune mechanism, report freed space\r\n\r\n**- How I did it**\r\nThis is my second attempt. My first attempt in #28106 turned out to be way too complex. Now instead of caching partially downloaded manifests and downloads separately, I'm managing the lifetime of the cache form the layer download manager and giving the descriptors a cache directory to use. I also separated the details of managing the cache directory into a separate package to simplify the logic a bit.\r\n\r\n**- How to verify it**\r\nLots of pulling of big images and ctrl+c-ing, pruning, etc..\r\n\r\n**- Description for the changelog**\r\nKeep partial download caches from failed pulls\r\n\r\n**- A picture of a cute animal (not mandatory but encouraged)**\r\n![](http://www.thinkcats.com/250-wide-images/cat-opening-door-handle.png)"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/263375553","html_url":"https://github.com/docker/docker/pull/28348#issuecomment-263375553","issue_url":"https://api.github.com/repos/docker/docker/issues/28348","id":263375553,"user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T19:53:05Z","updated_at":"2016-11-28T19:53:05Z","body":"I think the design looks good to me.\r\n\r\nping @stevvooe @dmcgowan"}}
{"actor":{"display_login":"aaronlehmann"}}