{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/111459330","pull_request_review_id":32709099,"id":111459330,"diff_hunk":"@@ -3,8 +3,11 @@ package daemon\n import (\n \t\"fmt\"\n \t\"regexp\"\n+\t\"sync/atomic\"\n \t\"time\"\n \n+\t\"golang.org/x/net/context\"\n+","path":"daemon/prune.go","position":8,"original_position":8,"commit_id":"108527298781d39b984defe3f8ba4e0543464146","original_commit_id":"108527298781d39b984defe3f8ba4e0543464146","user":{"login":"mlaventure","id":16065150,"avatar_url":"https://avatars2.githubusercontent.com/u/16065150?v=3","gravatar_id":"","url":"https://api.github.com/users/mlaventure","html_url":"https://github.com/mlaventure","followers_url":"https://api.github.com/users/mlaventure/followers","following_url":"https://api.github.com/users/mlaventure/following{/other_user}","gists_url":"https://api.github.com/users/mlaventure/gists{/gist_id}","starred_url":"https://api.github.com/users/mlaventure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlaventure/subscriptions","organizations_url":"https://api.github.com/users/mlaventure/orgs","repos_url":"https://api.github.com/users/mlaventure/repos","events_url":"https://api.github.com/users/mlaventure/events{/privacy}","received_events_url":"https://api.github.com/users/mlaventure/received_events","type":"User","site_admin":false},"body":"It's on purpose :)","created_at":"2017-04-13T18:43:45Z","updated_at":"2017-04-13T18:43:45Z","html_url":"https://github.com/docker/docker/pull/32574#discussion_r111459330","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/32574","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/111459330"},"html":{"href":"https://github.com/docker/docker/pull/32574#discussion_r111459330"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/32574"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/32574","id":115640982,"html_url":"https://github.com/docker/docker/pull/32574","diff_url":"https://github.com/docker/docker/pull/32574.diff","patch_url":"https://github.com/docker/docker/pull/32574.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/32574","number":32574,"state":"open","locked":false,"title":"Add ctx to df and prune","user":{"login":"mlaventure","id":16065150,"avatar_url":"https://avatars2.githubusercontent.com/u/16065150?v=3","gravatar_id":"","url":"https://api.github.com/users/mlaventure","html_url":"https://github.com/mlaventure","followers_url":"https://api.github.com/users/mlaventure/followers","following_url":"https://api.github.com/users/mlaventure/following{/other_user}","gists_url":"https://api.github.com/users/mlaventure/gists{/gist_id}","starred_url":"https://api.github.com/users/mlaventure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlaventure/subscriptions","organizations_url":"https://api.github.com/users/mlaventure/orgs","repos_url":"https://api.github.com/users/mlaventure/repos","events_url":"https://api.github.com/users/mlaventure/events{/privacy}","received_events_url":"https://api.github.com/users/mlaventure/received_events","type":"User","site_admin":false},"body":"**- What I did**\r\n- Prohibit calling the DiskUsage routine several times in parallel\r\n- Prohibit calling the Prune routines several times in parallel\r\n- Honor context when calling the DiskUsage and Prune routines\r\n\r\n**- How I did it**\r\n- Added an atomic variable for each concerned routine\r\n- Passed down the request context to the backend callbacks\r\n\r\n**- How to verify it**\r\n\r\nHave a large amount of containers/images and run 2 prunes in parallel\r\nHave a large amount of containers/images and hit `^C`\r\n\r\n**- Description for the changelog**\r\n- Prevent parallel execution of `system df` \r\n- Prevent parallel execution of `prune` commands \r\n- Honor context cancellation for `prune` and `df` commands\r\n\r\n**- A picture of a cute animal (not mandatory but encouraged)**\r\n\r\n![](https://s-media-cache-ak0.pinimg.com/564x/fe/5b/f2/fe5bf2a8f2fafeb4e112a30e70e0ada4.jpg)","created_at":"2017-04-12T21:35:18Z","updated_at":"2017-04-13T18:43:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3de5be1847c8ee36825ef06aa33e4d50b1ef7954","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/32574/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/32574/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/32574/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/108527298781d39b984defe3f8ba4e0543464146","head":{"label":"mlaventure:add-ctx-to-df-prune","ref":"add-ctx-to-df-prune","sha":"108527298781d39b984defe3f8ba4e0543464146","user":{"login":"mlaventure","id":16065150,"avatar_url":"https://avatars2.githubusercontent.com/u/16065150?v=3","gravatar_id":"","url":"https://api.github.com/users/mlaventure","html_url":"https://github.com/mlaventure","followers_url":"https://api.github.com/users/mlaventure/followers","following_url":"https://api.github.com/users/mlaventure/following{/other_user}","gists_url":"https://api.github.com/users/mlaventure/gists{/gist_id}","starred_url":"https://api.github.com/users/mlaventure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlaventure/subscriptions","organizations_url":"https://api.github.com/users/mlaventure/orgs","repos_url":"https://api.github.com/users/mlaventure/repos","events_url":"https://api.github.com/users/mlaventure/events{/privacy}","received_events_url":"https://api.github.com/users/mlaventure/received_events","type":"User","site_admin":false},"repo":{"id":48391432,"name":"docker","full_name":"mlaventure/docker","owner":{"login":"mlaventure","id":16065150,"avatar_url":"https://avatars2.githubusercontent.com/u/16065150?v=3","gravatar_id":"","url":"https://api.github.com/users/mlaventure","html_url":"https://github.com/mlaventure","followers_url":"https://api.github.com/users/mlaventure/followers","following_url":"https://api.github.com/users/mlaventure/following{/other_user}","gists_url":"https://api.github.com/users/mlaventure/gists{/gist_id}","starred_url":"https://api.github.com/users/mlaventure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlaventure/subscriptions","organizations_url":"https://api.github.com/users/mlaventure/orgs","repos_url":"https://api.github.com/users/mlaventure/repos","events_url":"https://api.github.com/users/mlaventure/events{/privacy}","received_events_url":"https://api.github.com/users/mlaventure/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlaventure/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/mlaventure/docker","forks_url":"https://api.github.com/repos/mlaventure/docker/forks","keys_url":"https://api.github.com/repos/mlaventure/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlaventure/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlaventure/docker/teams","hooks_url":"https://api.github.com/repos/mlaventure/docker/hooks","issue_events_url":"https://api.github.com/repos/mlaventure/docker/issues/events{/number}","events_url":"https://api.github.com/repos/mlaventure/docker/events","assignees_url":"https://api.github.com/repos/mlaventure/docker/assignees{/user}","branches_url":"https://api.github.com/repos/mlaventure/docker/branches{/branch}","tags_url":"https://api.github.com/repos/mlaventure/docker/tags","blobs_url":"https://api.github.com/repos/mlaventure/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlaventure/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlaventure/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlaventure/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlaventure/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/mlaventure/docker/languages","stargazers_url":"https://api.github.com/repos/mlaventure/docker/stargazers","contributors_url":"https://api.github.com/repos/mlaventure/docker/contributors","subscribers_url":"https://api.github.com/repos/mlaventure/docker/subscribers","subscription_url":"https://api.github.com/repos/mlaventure/docker/subscription","commits_url":"https://api.github.com/repos/mlaventure/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlaventure/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlaventure/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlaventure/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlaventure/docker/contents/{+path}","compare_url":"https://api.github.com/repos/mlaventure/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlaventure/docker/merges","archive_url":"https://api.github.com/repos/mlaventure/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlaventure/docker/downloads","issues_url":"https://api.github.com/repos/mlaventure/docker/issues{/number}","pulls_url":"https://api.github.com/repos/mlaventure/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/mlaventure/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/mlaventure/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlaventure/docker/labels{/name}","releases_url":"https://api.github.com/repos/mlaventure/docker/releases{/id}","deployments_url":"https://api.github.com/repos/mlaventure/docker/deployments","created_at":"2015-12-21T20:00:27Z","updated_at":"2015-12-21T20:00:37Z","pushed_at":"2017-04-13T14:52:03Z","git_url":"git://github.com/mlaventure/docker.git","ssh_url":"git@github.com:mlaventure/docker.git","clone_url":"https://github.com/mlaventure/docker.git","svn_url":"https://github.com/mlaventure/docker","homepage":"http://www.docker.com","size":127032,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"df3c4254072d110ecfcefeda94279c25e6a9f334","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars2.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://avatars2.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}","deployments_url":"https://api.github.com/repos/docker/docker/deployments","created_at":"2013-01-18T18:10:57Z","updated_at":"2017-04-13T17:26:33Z","pushed_at":"2017-04-13T18:41:21Z","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":"https://www.docker.com","size":128547,"stargazers_count":41741,"watchers_count":41741,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12617,"mirror_url":null,"open_issues_count":2475,"forks":12617,"open_issues":2475,"watchers":41741,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/32574"},"html":{"href":"https://github.com/docker/docker/pull/32574"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/32574"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/32574/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/32574/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/32574/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/108527298781d39b984defe3f8ba4e0543464146"}}}}
{"actor":{"display_login":"mlaventure"}}