{"action":"opened","number":2941,"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/2941","id":41919767,"html_url":"https://github.com/juju/juju/pull/2941","diff_url":"https://github.com/juju/juju/pull/2941.diff","patch_url":"https://github.com/juju/juju/pull/2941.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/2941","number":2941,"state":"open","locked":false,"title":"WIP: Unit agent dependency engine","user":{"login":"fwereade","id":372078,"avatar_url":"https://avatars.githubusercontent.com/u/372078?v=3","gravatar_id":"","url":"https://api.github.com/users/fwereade","html_url":"https://github.com/fwereade","followers_url":"https://api.github.com/users/fwereade/followers","following_url":"https://api.github.com/users/fwereade/following{/other_user}","gists_url":"https://api.github.com/users/fwereade/gists{/gist_id}","starred_url":"https://api.github.com/users/fwereade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwereade/subscriptions","organizations_url":"https://api.github.com/users/fwereade/orgs","repos_url":"https://api.github.com/users/fwereade/repos","events_url":"https://api.github.com/users/fwereade/events{/privacy}","received_events_url":"https://api.github.com/users/fwereade/received_events","type":"User","site_admin":false},"body":"Most important thing: `UnitAgent.APIWorkers` has been *greatly* simplified, by dint of representing the dependencies between workers as a `dependency.Manifolds` in the (new) `cmd/jujud/agent/unit` package. Look first at:\r\n\r\n  * `cmd/jujud/agent/unit.go`\r\n  * `cmd/jujud/agent/unit/manifolds.go`\r\n\r\n...which are designed to make you feel good about everything else. Problems here should definitely be complained about. Then the complications start...\r\n\r\nTo resolve an import cycle, we move `OpenAPIState` and `OpenAPIStateUsingInfo` from `cmd/jujud/agent` into `worker/apicaller`. That's fine -- just a bunch of lines from `agent/agent.go` moved into `apicaller/open.go`. But then the first few tests move as well; and the exports of `checkProvisionedStrategy` and `openAPIForAgent` alongside the pre-existing `openConnection` start to smell. \r\n\r\nThen you try to move the rest of the OpenAPIState tests, that are deeply mired in the already-scary agent fixtures, and things become complicated, so you give up and leave them in place, pleading \"barely worse-tested than when we started, and we gate on the full unit test suite anyway\". This is obviously questionable, and could be addressed by introducing an `api.Connection` interface (that just exposed most of `*api.State`'s methods, at least to begin with) and thus making the OpenAPIState sanely mockable -- but it's arguably out of scope here.\r\n\r\nAlso needed to add manifolds for `worker/logsender` and `worker/uniter`; and to tweak the patching of `NewRsyslogConfigUpdater` to keep the agent tests passing; otherwise, s/Api/API/ in a few field names.","created_at":"2015-08-07T18:28:04Z","updated_at":"2015-08-07T18:28:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/2941/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/2941/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/2941/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/0da7ffb742bdf8a6108635e2fd8c80fe63582cf6","head":{"label":"fwereade:uniter-dependency-engine-necro","ref":"uniter-dependency-engine-necro","sha":"0da7ffb742bdf8a6108635e2fd8c80fe63582cf6","user":{"login":"fwereade","id":372078,"avatar_url":"https://avatars.githubusercontent.com/u/372078?v=3","gravatar_id":"","url":"https://api.github.com/users/fwereade","html_url":"https://github.com/fwereade","followers_url":"https://api.github.com/users/fwereade/followers","following_url":"https://api.github.com/users/fwereade/following{/other_user}","gists_url":"https://api.github.com/users/fwereade/gists{/gist_id}","starred_url":"https://api.github.com/users/fwereade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwereade/subscriptions","organizations_url":"https://api.github.com/users/fwereade/orgs","repos_url":"https://api.github.com/users/fwereade/repos","events_url":"https://api.github.com/users/fwereade/events{/privacy}","received_events_url":"https://api.github.com/users/fwereade/received_events","type":"User","site_admin":false},"repo":{"id":22044674,"name":"juju","full_name":"fwereade/juju","owner":{"login":"fwereade","id":372078,"avatar_url":"https://avatars.githubusercontent.com/u/372078?v=3","gravatar_id":"","url":"https://api.github.com/users/fwereade","html_url":"https://github.com/fwereade","followers_url":"https://api.github.com/users/fwereade/followers","following_url":"https://api.github.com/users/fwereade/following{/other_user}","gists_url":"https://api.github.com/users/fwereade/gists{/gist_id}","starred_url":"https://api.github.com/users/fwereade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwereade/subscriptions","organizations_url":"https://api.github.com/users/fwereade/orgs","repos_url":"https://api.github.com/users/fwereade/repos","events_url":"https://api.github.com/users/fwereade/events{/privacy}","received_events_url":"https://api.github.com/users/fwereade/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fwereade/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/fwereade/juju","forks_url":"https://api.github.com/repos/fwereade/juju/forks","keys_url":"https://api.github.com/repos/fwereade/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fwereade/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fwereade/juju/teams","hooks_url":"https://api.github.com/repos/fwereade/juju/hooks","issue_events_url":"https://api.github.com/repos/fwereade/juju/issues/events{/number}","events_url":"https://api.github.com/repos/fwereade/juju/events","assignees_url":"https://api.github.com/repos/fwereade/juju/assignees{/user}","branches_url":"https://api.github.com/repos/fwereade/juju/branches{/branch}","tags_url":"https://api.github.com/repos/fwereade/juju/tags","blobs_url":"https://api.github.com/repos/fwereade/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fwereade/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fwereade/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/fwereade/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fwereade/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/fwereade/juju/languages","stargazers_url":"https://api.github.com/repos/fwereade/juju/stargazers","contributors_url":"https://api.github.com/repos/fwereade/juju/contributors","subscribers_url":"https://api.github.com/repos/fwereade/juju/subscribers","subscription_url":"https://api.github.com/repos/fwereade/juju/subscription","commits_url":"https://api.github.com/repos/fwereade/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/fwereade/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/fwereade/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/fwereade/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/fwereade/juju/contents/{+path}","compare_url":"https://api.github.com/repos/fwereade/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fwereade/juju/merges","archive_url":"https://api.github.com/repos/fwereade/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fwereade/juju/downloads","issues_url":"https://api.github.com/repos/fwereade/juju/issues{/number}","pulls_url":"https://api.github.com/repos/fwereade/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/fwereade/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/fwereade/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fwereade/juju/labels{/name}","releases_url":"https://api.github.com/repos/fwereade/juju/releases{/id}","created_at":"2014-07-20T22:14:05Z","updated_at":"2015-04-21T08:32:03Z","pushed_at":"2015-08-07T17:18:39Z","git_url":"git://github.com/fwereade/juju.git","ssh_url":"git@github.com:fwereade/juju.git","clone_url":"https://github.com/fwereade/juju.git","svn_url":"https://github.com/fwereade/juju","homepage":"juju.ubuntu.com","size":54581,"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":"juju:master","ref":"master","sha":"fd91fc6b58bf17e7a93a61d7f810e4f394cf6f4d","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","created_at":"2014-06-03T14:28:10Z","updated_at":"2015-08-02T15:14:33Z","pushed_at":"2015-08-07T17:35:10Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":89820,"stargazers_count":305,"watchers_count":305,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":80,"forks":103,"open_issues":80,"watchers":305,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/2941"},"html":{"href":"https://github.com/juju/juju/pull/2941"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/2941"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/2941/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/2941/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/2941/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/0da7ffb742bdf8a6108635e2fd8c80fe63582cf6"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":813,"deletions":456,"changed_files":25}}