GitHub PullRequestReviewCommentEvent at 2014-08-22 10:40:14
Repository: juju
Actor: dimitern
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/16591548","id":16591548,"diff_hunk":"@@ -0,0 +1,60 @@\n+// Copyright 2014 Canonical Ltd.\n+// Licensed under the AGPLv3, see LICENCE file for details.\n+\n+package metricworker_test\n+\n+import (\n+\tstdtesting \"testing\"\n+\t\"time\"\n+\n+\tgc \"launchpad.net/gocheck\"\n+\n+\t\"github.com/juju/juju/juju/testing\"\n+\t\"github.com/juju/juju/state/api/metricsmanager\"\n+\tcoretesting \"github.com/juju/juju/testing\"\n+\t\"github.com/juju/juju/testing/factory\"\n+\t\"github.com/juju/juju/worker/metricworker\"\n+)\n+\n+func TestPackage(t *stdtesting.T) {\n+\tcoretesting.MgoTestPackage(t)\n+}\n+\n+type CleanupSuite struct {\n+\ttesting.JujuConnSuite\n+}\n+\n+var (\n+\t_                = gc.Suite(&CleanupSuite{})","path":"worker/metricworker/cleanup_test.go","position":28,"original_position":28,"commit_id":"4a7bd9c339211bd398ad2414a9ff6c3c37f9cd09","original_commit_id":"4a7bd9c339211bd398ad2414a9ff6c3c37f9cd09","user":{"login":"dimitern","id":619986,"avatar_url":"https://avatars.githubusercontent.com/u/619986?v=2","gravatar_id":"6889e0065cf206ab0e4b3873576b5026","url":"https://api.github.com/users/dimitern","html_url":"https://github.com/dimitern","followers_url":"https://api.github.com/users/dimitern/followers","following_url":"https://api.github.com/users/dimitern/following{/other_user}","gists_url":"https://api.github.com/users/dimitern/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitern/subscriptions","organizations_url":"https://api.github.com/users/dimitern/orgs","repos_url":"https://api.github.com/users/dimitern/repos","events_url":"https://api.github.com/users/dimitern/events{/privacy}","received_events_url":"https://api.github.com/users/dimitern/received_events","type":"User","site_admin":false},"body":"This feels weird to look at, please split it in separate var statements (unnaceptableWait - there are 2 typos in there BTW is a lot longer than _, hence the formatting).","created_at":"2014-08-22T10:40:14Z","updated_at":"2014-08-22T10:40:14Z","html_url":"https://github.com/juju/juju/pull/562#discussion_r16591548","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/562","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/16591548"},"html":{"href":"https://github.com/juju/juju/pull/562#discussion_r16591548"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/562"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/562","id":20055409,"html_url":"https://github.com/juju/juju/pull/562","diff_url":"https://github.com/juju/juju/pull/562.diff","patch_url":"https://github.com/juju/juju/pull/562.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/562","number":562,"state":"open","locked":false,"title":"Implemented a cleanup worker for deleting metrics","user":{"login":"mattyw","id":160718,"avatar_url":"https://avatars.githubusercontent.com/u/160718?v=2","gravatar_id":"d50de8e132b6a611c13b6196e665ba88","url":"https://api.github.com/users/mattyw","html_url":"https://github.com/mattyw","followers_url":"https://api.github.com/users/mattyw/followers","following_url":"https://api.github.com/users/mattyw/following{/other_user}","gists_url":"https://api.github.com/users/mattyw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattyw/subscriptions","organizations_url":"https://api.github.com/users/mattyw/orgs","repos_url":"https://api.github.com/users/mattyw/repos","events_url":"https://api.github.com/users/mattyw/events{/privacy}","received_events_url":"https://api.github.com/users/mattyw/received_events","type":"User","site_admin":false},"body":"There are 3 main changes in this pr:\r\n\r\n1) Added a cleanup metrics and delete functions to state to allow metrics to be deleted\r\n2) Added an API endpoint for calling the CleanupMetrics function\r\n3) Added a worker that will periodically call the cleanupmetric function\r\n\r\nThe worker never gets called - except in tests - that will come in a follow up pr.\r\nThe CleanupMetrics function currently just returns an error. In a follow up it will return a list of the uuids that were deleted.","created_at":"2014-08-20T16:11:16Z","updated_at":"2014-08-22T10:40:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a41ffd0e7c4f4581f65cc8bb869363eb61bcb3fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/562/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/562/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments/{number}","comments_url":"https://api.github.com/repos/juju/juju/issues/562/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/4a7bd9c339211bd398ad2414a9ff6c3c37f9cd09","head":{"label":"mattyw:add-metric-workers","ref":"add-metric-workers","sha":"4a7bd9c339211bd398ad2414a9ff6c3c37f9cd09","user":{"login":"mattyw","id":160718,"avatar_url":"https://avatars.githubusercontent.com/u/160718?v=2","gravatar_id":"d50de8e132b6a611c13b6196e665ba88","url":"https://api.github.com/users/mattyw","html_url":"https://github.com/mattyw","followers_url":"https://api.github.com/users/mattyw/followers","following_url":"https://api.github.com/users/mattyw/following{/other_user}","gists_url":"https://api.github.com/users/mattyw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattyw/subscriptions","organizations_url":"https://api.github.com/users/mattyw/orgs","repos_url":"https://api.github.com/users/mattyw/repos","events_url":"https://api.github.com/users/mattyw/events{/privacy}","received_events_url":"https://api.github.com/users/mattyw/received_events","type":"User","site_admin":false},"repo":{"id":20484517,"name":"juju","full_name":"mattyw/juju","owner":{"login":"mattyw","id":160718,"avatar_url":"https://avatars.githubusercontent.com/u/160718?v=2","gravatar_id":"d50de8e132b6a611c13b6196e665ba88","url":"https://api.github.com/users/mattyw","html_url":"https://github.com/mattyw","followers_url":"https://api.github.com/users/mattyw/followers","following_url":"https://api.github.com/users/mattyw/following{/other_user}","gists_url":"https://api.github.com/users/mattyw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattyw/subscriptions","organizations_url":"https://api.github.com/users/mattyw/orgs","repos_url":"https://api.github.com/users/mattyw/repos","events_url":"https://api.github.com/users/mattyw/events{/privacy}","received_events_url":"https://api.github.com/users/mattyw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattyw/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/mattyw/juju","forks_url":"https://api.github.com/repos/mattyw/juju/forks","keys_url":"https://api.github.com/repos/mattyw/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattyw/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattyw/juju/teams","hooks_url":"https://api.github.com/repos/mattyw/juju/hooks","issue_events_url":"https://api.github.com/repos/mattyw/juju/issues/events{/number}","events_url":"https://api.github.com/repos/mattyw/juju/events","assignees_url":"https://api.github.com/repos/mattyw/juju/assignees{/user}","branches_url":"https://api.github.com/repos/mattyw/juju/branches{/branch}","tags_url":"https://api.github.com/repos/mattyw/juju/tags","blobs_url":"https://api.github.com/repos/mattyw/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattyw/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattyw/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattyw/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattyw/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/mattyw/juju/languages","stargazers_url":"https://api.github.com/repos/mattyw/juju/stargazers","contributors_url":"https://api.github.com/repos/mattyw/juju/contributors","subscribers_url":"https://api.github.com/repos/mattyw/juju/subscribers","subscription_url":"https://api.github.com/repos/mattyw/juju/subscription","commits_url":"https://api.github.com/repos/mattyw/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattyw/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattyw/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattyw/juju/issues/comments/{number}","contents_url":"https://api.github.com/repos/mattyw/juju/contents/{+path}","compare_url":"https://api.github.com/repos/mattyw/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattyw/juju/merges","archive_url":"https://api.github.com/repos/mattyw/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattyw/juju/downloads","issues_url":"https://api.github.com/repos/mattyw/juju/issues{/number}","pulls_url":"https://api.github.com/repos/mattyw/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/mattyw/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/mattyw/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattyw/juju/labels{/name}","releases_url":"https://api.github.com/repos/mattyw/juju/releases{/id}","created_at":"2014-06-04T13:22:27Z","updated_at":"2014-06-20T15:10:05Z","pushed_at":"2014-08-21T17:00:47Z","git_url":"git://github.com/mattyw/juju.git","ssh_url":"git@github.com:mattyw/juju.git","clone_url":"https://github.com/mattyw/juju.git","svn_url":"https://github.com/mattyw/juju","homepage":"juju.ubuntu.com","size":27403,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"8ed40cfaacad616fad5b79a02e653e00fac5859c","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=2","gravatar_id":"b095d1e26e5705abe0ad2de7d87aac2e","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=2","gravatar_id":"b095d1e26e5705abe0ad2de7d87aac2e","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":"2014-08-19T04:47:51Z","pushed_at":"2014-08-22T10:15:20Z","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":40678,"stargazers_count":194,"watchers_count":194,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":50,"mirror_url":null,"open_issues_count":48,"forks":50,"open_issues":48,"watchers":194,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/562"},"html":{"href":"https://github.com/juju/juju/pull/562"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/562"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/562/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/562/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/562/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/4a7bd9c339211bd398ad2414a9ff6c3c37f9cd09"}}}}