{"action":"closed","number":805,"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/805","id":72624882,"html_url":"https://github.com/docker/swarmkit/pull/805","diff_url":"https://github.com/docker/swarmkit/pull/805.diff","patch_url":"https://github.com/docker/swarmkit/pull/805.patch","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/805","number":805,"state":"closed","locked":false,"title":"[WIP] agent: refactor and simplify agent code","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":"This PR works towards the following:\r\n\r\n- Separate the worker component\r\n- Reduce overall complexity of the agent\r\n- Store task state on disk\r\n\r\ncommit 3d1ca10b4df6a3ed2f7b0cc6a61a21f4308f2a8d\r\nAuthor: Stephen J Day <stephen.day@docker.com>\r\nDate:   Sun Jun 5 02:22:31 2016 -0700\r\n\r\n    agent: simplify task manager\r\n    \r\n    Previously, the task manager handled removal. With the addition of the\r\n    worker, we are going to a secondary reaper that will take care of\r\n    container cleanup. This has allowed use to revise the task manager\r\n    response loop to simply handled outstanding operations and updates,\r\n    making the behavior much less reliable.\r\n    \r\n    We've also greatly increased the unit test coverage, albeit the tests\r\n    are minimal and non-exhaustive.\r\n    \r\n    Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\ncommit 95acbdc2a644016b14c73b6dce727609cf8db0a8\r\nAuthor: Stephen J Day <stephen.day@docker.com>\r\nDate:   Sun Jun 5 00:10:36 2016 -0700\r\n\r\n    agent/exec: adjust controller handing\r\n    \r\n    We no longer have the concept of dead tasks and tasks can no longer\r\n    proceed past their terminal state (phew!). Add a few checks to handle\r\n    this case.\r\n    \r\n    Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\ncommit b98b306cf7bc0e54d9d0e2d84bae0b99fa3f3cbd\r\nAuthor: Stephen J Day <stephen.day@docker.com>\r\nDate:   Wed Jun 1 22:01:37 2016 -0700\r\n\r\n    agent: add permanent task storage helpers\r\n    \r\n    Provide helpers to maintain task, status and assignment in bolt DB\r\n    database. Tests are included to ensure correct round trips.\r\n    \r\n    Storage is broken down to have a bucket per use case.\r\n    \r\n    Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\ncommit c41fff8f279bfc24b22aee927d44766abe145289\r\nAuthor: Stephen J Day <stephen.day@docker.com>\r\nDate:   Fri May 27 17:34:06 2016 -0700\r\n\r\n    agent: make a component to report task status\r\n    \r\n    This component now handles all task status reporting, ensuring that the\r\n    latest statuses are being reported. The statusReporter will be used to\r\n    remove much of the status reporting complexity from the core agent code.\r\n    \r\n    Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\ncommit 80154db7b8e8293c4c05ff257704147dae29167e\r\nAuthor: Stephen J Day <stephen.day@docker.com>\r\nDate:   Mon May 23 21:47:15 2016 -0700\r\n\r\n    agent: define the concept of a taskManager\r\n    \r\n    A task manager controls the and reporting of a single task. In the past,\r\n    this has been managed directly in the agent, leading to complex and\r\n    fragile code. With this component, the actions surrounding a task are\r\n    well-separated from other concerns. We bring back a reporter-style\r\n    interface, but it is limited to just the agent package, rather than\r\n    being an integration in the exec package.\r\n    \r\n    We also introduce the concept of a \"modifier\" to manage the\r\n    serialization of state mutations. Modification requests are sent over a\r\n    channel, with a response channel. The operation is then consumed by an\r\n    internal select loop, where it has free access to any state variables\r\n    present. Once the operation proceeds, the error is passed back over the\r\n    channel.\r\n    \r\n    Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\ncommit 3920c03dd66b2a8367b8db63c576ef12d0042a7a\r\nAuthor: Stephen J Day <stephen.day@docker.com>\r\nDate:   Mon May 23 21:45:16 2016 -0700\r\n\r\n    agent/exec: cleanup of Do and controller tests\r\n    \r\n    We now deprecate the exec.Run function and remove all of the associated\r\n    tests. Several tweaks are included in exec.Do to ensure that the caller\r\n    can choose the correct operation on the next call. The interfaces around\r\n    exit errors have also been cleaned up.\r\n    \r\n    Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\n","created_at":"2016-06-05T09:30:17Z","updated_at":"2016-06-08T02:28:10Z","closed_at":"2016-06-08T02:28:10Z","merged_at":null,"merge_commit_sha":"ed89e3342a914e906b60eab78005c9781c9f958c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarmkit/pulls/805/commits","review_comments_url":"https://api.github.com/repos/docker/swarmkit/pulls/805/comments","review_comment_url":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/805/comments","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/2e33d47c7b9279083a49beeb42b042f005656301","head":{"label":"stevvooe:agent-refactor","ref":"agent-refactor","sha":"2e33d47c7b9279083a49beeb42b042f005656301","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},"repo":{"id":52310946,"name":"swarmkit-pre-release","full_name":"stevvooe/swarmkit-pre-release","owner":{"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},"private":true,"html_url":"https://github.com/stevvooe/swarmkit-pre-release","description":"Cluster orchestration for Docker","fork":false,"url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release","forks_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/forks","keys_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/teams","hooks_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/hooks","issue_events_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/issues/events{/number}","events_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/events","assignees_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/assignees{/user}","branches_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/branches{/branch}","tags_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/tags","blobs_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/statuses/{sha}","languages_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/languages","stargazers_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/stargazers","contributors_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/contributors","subscribers_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/subscribers","subscription_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/subscription","commits_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/contents/{+path}","compare_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/merges","archive_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/downloads","issues_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/issues{/number}","pulls_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/pulls{/number}","milestones_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/milestones{/number}","notifications_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/labels{/name}","releases_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/releases{/id}","deployments_url":"https://api.github.com/repos/stevvooe/swarmkit-pre-release/deployments","created_at":"2016-02-22T22:29:41Z","updated_at":"2016-06-08T02:23:13Z","pushed_at":"2016-06-07T06:05:33Z","git_url":"git://github.com/stevvooe/swarmkit-pre-release.git","ssh_url":"git@github.com:stevvooe/swarmkit-pre-release.git","clone_url":"https://github.com/stevvooe/swarmkit-pre-release.git","svn_url":"https://github.com/stevvooe/swarmkit-pre-release","homepage":null,"size":7053,"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":"9d7afac235d454ad6ae3b0a3382862452663107c","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":51556828,"name":"swarmkit","full_name":"docker/swarmkit","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/swarmkit","description":"A toolkit for embedding orchestration and cluster management capabilities in your application","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":"2016-06-08T02:26:09Z","pushed_at":"2016-06-08T02:26:08Z","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":16837,"stargazers_count":22,"watchers_count":22,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":114,"forks":14,"open_issues":114,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/805"},"html":{"href":"https://github.com/docker/swarmkit/pull/805"},"issue":{"href":"https://api.github.com/repos/docker/swarmkit/issues/805"},"comments":{"href":"https://api.github.com/repos/docker/swarmkit/issues/805/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/805/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/805/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarmkit/statuses/2e33d47c7b9279083a49beeb42b042f005656301"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":12,"commits":17,"additions":7607,"deletions":904,"changed_files":50}}
{"actor":{"display_login":"stevvooe"}}