{"action":"closed","number":2677,"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/2677","id":197861969,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3ODYxOTY5","html_url":"https://github.com/docker/swarmkit/pull/2677","diff_url":"https://github.com/docker/swarmkit/pull/2677.diff","patch_url":"https://github.com/docker/swarmkit/pull/2677.patch","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/2677","number":2677,"state":"closed","locked":false,"title":"[manager/orchestrator/reaper] Fix the condition used for skipping over running tasks","user":{"login":"anshulpundir","id":13551457,"node_id":"MDQ6VXNlcjEzNTUxNDU3","avatar_url":"https://avatars3.githubusercontent.com/u/13551457?v=4","gravatar_id":"","url":"https://api.github.com/users/anshulpundir","html_url":"https://github.com/anshulpundir","followers_url":"https://api.github.com/users/anshulpundir/followers","following_url":"https://api.github.com/users/anshulpundir/following{/other_user}","gists_url":"https://api.github.com/users/anshulpundir/gists{/gist_id}","starred_url":"https://api.github.com/users/anshulpundir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshulpundir/subscriptions","organizations_url":"https://api.github.com/users/anshulpundir/orgs","repos_url":"https://api.github.com/users/anshulpundir/repos","events_url":"https://api.github.com/users/anshulpundir/events{/privacy}","received_events_url":"https://api.github.com/users/anshulpundir/received_events","type":"User","site_admin":false},"body":"Addresses the following from https://github.com/docker/swarmkit/issues/2672#issuecomment-399598738:\r\n\r\nThe previous logic for skipping over running tasks in tick() was:\r\n\r\nif desired=running AND state <= running then don't delete else delete\r\n\r\nFor example, if a task is (desired=complete, state=running) then this code will delete it from SwarmKit, causing SwarmKit to believe that its resources are no longer in use, which is not correct.\r\n\r\nThis fixes the logic to ignore tasks which are running (including tasks which are desired to be shutdown), or which are desired to be running (desired state running). ","created_at":"2018-06-27T21:43:42Z","updated_at":"2018-08-01T07:01:17Z","closed_at":"2018-08-01T07:01:17Z","merged_at":"2018-08-01T07:01:17Z","merge_commit_sha":"9f35cb52186112eebaeef619111567eab2921928","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MagnusS","id":1076486,"node_id":"MDQ6VXNlcjEwNzY0ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/1076486?v=4","gravatar_id":"","url":"https://api.github.com/users/MagnusS","html_url":"https://github.com/MagnusS","followers_url":"https://api.github.com/users/MagnusS/followers","following_url":"https://api.github.com/users/MagnusS/following{/other_user}","gists_url":"https://api.github.com/users/MagnusS/gists{/gist_id}","starred_url":"https://api.github.com/users/MagnusS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MagnusS/subscriptions","organizations_url":"https://api.github.com/users/MagnusS/orgs","repos_url":"https://api.github.com/users/MagnusS/repos","events_url":"https://api.github.com/users/MagnusS/events{/privacy}","received_events_url":"https://api.github.com/users/MagnusS/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarmkit/pulls/2677/commits","review_comments_url":"https://api.github.com/repos/docker/swarmkit/pulls/2677/comments","review_comment_url":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/2677/comments","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/8c5d35342591be0f095678b71446867cd131ca98","head":{"label":"anshulpundir:reaper","ref":"reaper","sha":"8c5d35342591be0f095678b71446867cd131ca98","user":{"login":"anshulpundir","id":13551457,"node_id":"MDQ6VXNlcjEzNTUxNDU3","avatar_url":"https://avatars3.githubusercontent.com/u/13551457?v=4","gravatar_id":"","url":"https://api.github.com/users/anshulpundir","html_url":"https://github.com/anshulpundir","followers_url":"https://api.github.com/users/anshulpundir/followers","following_url":"https://api.github.com/users/anshulpundir/following{/other_user}","gists_url":"https://api.github.com/users/anshulpundir/gists{/gist_id}","starred_url":"https://api.github.com/users/anshulpundir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshulpundir/subscriptions","organizations_url":"https://api.github.com/users/anshulpundir/orgs","repos_url":"https://api.github.com/users/anshulpundir/repos","events_url":"https://api.github.com/users/anshulpundir/events{/privacy}","received_events_url":"https://api.github.com/users/anshulpundir/received_events","type":"User","site_admin":false},"repo":{"id":99972997,"node_id":"MDEwOlJlcG9zaXRvcnk5OTk3Mjk5Nw==","name":"swarmkit","full_name":"anshulpundir/swarmkit","owner":{"login":"anshulpundir","id":13551457,"node_id":"MDQ6VXNlcjEzNTUxNDU3","avatar_url":"https://avatars3.githubusercontent.com/u/13551457?v=4","gravatar_id":"","url":"https://api.github.com/users/anshulpundir","html_url":"https://github.com/anshulpundir","followers_url":"https://api.github.com/users/anshulpundir/followers","following_url":"https://api.github.com/users/anshulpundir/following{/other_user}","gists_url":"https://api.github.com/users/anshulpundir/gists{/gist_id}","starred_url":"https://api.github.com/users/anshulpundir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshulpundir/subscriptions","organizations_url":"https://api.github.com/users/anshulpundir/orgs","repos_url":"https://api.github.com/users/anshulpundir/repos","events_url":"https://api.github.com/users/anshulpundir/events{/privacy}","received_events_url":"https://api.github.com/users/anshulpundir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anshulpundir/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":true,"url":"https://api.github.com/repos/anshulpundir/swarmkit","forks_url":"https://api.github.com/repos/anshulpundir/swarmkit/forks","keys_url":"https://api.github.com/repos/anshulpundir/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anshulpundir/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anshulpundir/swarmkit/teams","hooks_url":"https://api.github.com/repos/anshulpundir/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/anshulpundir/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/anshulpundir/swarmkit/events","assignees_url":"https://api.github.com/repos/anshulpundir/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/anshulpundir/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/anshulpundir/swarmkit/tags","blobs_url":"https://api.github.com/repos/anshulpundir/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anshulpundir/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anshulpundir/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/anshulpundir/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anshulpundir/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/anshulpundir/swarmkit/languages","stargazers_url":"https://api.github.com/repos/anshulpundir/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/anshulpundir/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/anshulpundir/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/anshulpundir/swarmkit/subscription","commits_url":"https://api.github.com/repos/anshulpundir/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/anshulpundir/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/anshulpundir/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/anshulpundir/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/anshulpundir/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/anshulpundir/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anshulpundir/swarmkit/merges","archive_url":"https://api.github.com/repos/anshulpundir/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anshulpundir/swarmkit/downloads","issues_url":"https://api.github.com/repos/anshulpundir/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/anshulpundir/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/anshulpundir/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/anshulpundir/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anshulpundir/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/anshulpundir/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/anshulpundir/swarmkit/deployments","created_at":"2017-08-10T23:33:59Z","updated_at":"2017-11-22T18:38:39Z","pushed_at":"2018-07-31T23:40:35Z","git_url":"git://github.com/anshulpundir/swarmkit.git","ssh_url":"git@github.com:anshulpundir/swarmkit.git","clone_url":"https://github.com/anshulpundir/swarmkit.git","svn_url":"https://github.com/anshulpundir/swarmkit","homepage":"","size":20200,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"7567d47988d82a78b052c4b9ba1e61399e0e7897","user":{"login":"docker","id":5429470,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5429470?v=4","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":51556828,"node_id":"MDEwOlJlcG9zaXRvcnk1MTU1NjgyOA==","name":"swarmkit","full_name":"docker/swarmkit","owner":{"login":"docker","id":5429470,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5429470?v=4","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/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":false,"url":"https://api.github.com/repos/docker/swarmkit","forks_url":"https://api.github.com/repos/docker/swarmkit/forks","keys_url":"https://api.github.com/repos/docker/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarmkit/teams","hooks_url":"https://api.github.com/repos/docker/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/docker/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarmkit/events","assignees_url":"https://api.github.com/repos/docker/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarmkit/tags","blobs_url":"https://api.github.com/repos/docker/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarmkit/languages","stargazers_url":"https://api.github.com/repos/docker/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/docker/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/docker/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/docker/swarmkit/subscription","commits_url":"https://api.github.com/repos/docker/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarmkit/merges","archive_url":"https://api.github.com/repos/docker/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarmkit/downloads","issues_url":"https://api.github.com/repos/docker/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/docker/swarmkit/deployments","created_at":"2016-02-12T00:02:15Z","updated_at":"2018-08-01T06:44:26Z","pushed_at":"2018-08-01T07:01:17Z","git_url":"git://github.com/docker/swarmkit.git","ssh_url":"git@github.com:docker/swarmkit.git","clone_url":"https://github.com/docker/swarmkit.git","svn_url":"https://github.com/docker/swarmkit","homepage":"","size":21390,"stargazers_count":1775,"watchers_count":1775,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":402,"mirror_url":null,"archived":false,"open_issues_count":252,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":402,"open_issues":252,"watchers":1775,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2677"},"html":{"href":"https://github.com/docker/swarmkit/pull/2677"},"issue":{"href":"https://api.github.com/repos/docker/swarmkit/issues/2677"},"comments":{"href":"https://api.github.com/repos/docker/swarmkit/issues/2677/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2677/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2677/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarmkit/statuses/8c5d35342591be0f095678b71446867cd131ca98"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"cyli","id":223200,"node_id":"MDQ6VXNlcjIyMzIwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/223200?v=4","gravatar_id":"","url":"https://api.github.com/users/cyli","html_url":"https://github.com/cyli","followers_url":"https://api.github.com/users/cyli/followers","following_url":"https://api.github.com/users/cyli/following{/other_user}","gists_url":"https://api.github.com/users/cyli/gists{/gist_id}","starred_url":"https://api.github.com/users/cyli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyli/subscriptions","organizations_url":"https://api.github.com/users/cyli/orgs","repos_url":"https://api.github.com/users/cyli/repos","events_url":"https://api.github.com/users/cyli/events{/privacy}","received_events_url":"https://api.github.com/users/cyli/received_events","type":"User","site_admin":false},"comments":2,"review_comments":13,"maintainer_can_modify":false,"commits":1,"additions":163,"deletions":32,"changed_files":2}}
{"actor":{"display_login":"cyli"}}