{"action":"created","comment":{"url":"https://api.github.com/repos/control-center/serviced/pulls/comments/80104693","id":80104693,"diff_hunk":"@@ -33,27 +33,23 @@ var (\n \tErrTestNoAttach = errors.New(\"could not attach to container\")\n )\n \n+const (\n+\tservicePath string = \"/services/serviceid\"\n+\thostPath    string = \"/hosts/hostid\"\n+\thostId      string = \"hostid\"\n+\tserviceId   string = \"serviceid\"\n+\tserviceName string = \"serviceA\"\n+\timageId     string = \"imageid\"\n+\tcontainerId string = \"containerid\"\n+)\n+","path":"zzk/service/hoststate_test.go","position":13,"original_position":13,"commit_id":"e290a689473e028c9e78d7b06e6dc5d81f5e717f","original_commit_id":"d9dc568e17abd53cd501310d77dd7b00e69a0f33","user":{"login":"morr-zenoss","id":7365929,"avatar_url":"https://avatars.githubusercontent.com/u/7365929?v=3","gravatar_id":"","url":"https://api.github.com/users/morr-zenoss","html_url":"https://github.com/morr-zenoss","followers_url":"https://api.github.com/users/morr-zenoss/followers","following_url":"https://api.github.com/users/morr-zenoss/following{/other_user}","gists_url":"https://api.github.com/users/morr-zenoss/gists{/gist_id}","starred_url":"https://api.github.com/users/morr-zenoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morr-zenoss/subscriptions","organizations_url":"https://api.github.com/users/morr-zenoss/orgs","repos_url":"https://api.github.com/users/morr-zenoss/repos","events_url":"https://api.github.com/users/morr-zenoss/events{/privacy}","received_events_url":"https://api.github.com/users/morr-zenoss/received_events","type":"User","site_admin":false},"body":"I disagree. Glenn actually recommended putting the strings in constants, and I agree with his recommendation. There's already one test case that requires a different value, and I just used a different constant there. Using constants makes it clear where values are supposed to be the same (rather than just coincidentally agreeing), and prevents weird failures due to typos. Also, if we want to change the test values for some reason, we can simply change the value in one place, rather than having to pick through the source code deciding whether each instance of a string should be changed or not.","created_at":"2016-09-22T18:23:03Z","updated_at":"2016-09-22T18:23:03Z","html_url":"https://github.com/control-center/serviced/pull/2971#discussion_r80104693","pull_request_url":"https://api.github.com/repos/control-center/serviced/pulls/2971","_links":{"self":{"href":"https://api.github.com/repos/control-center/serviced/pulls/comments/80104693"},"html":{"href":"https://github.com/control-center/serviced/pull/2971#discussion_r80104693"},"pull_request":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2971"}}},"pull_request":{"url":"https://api.github.com/repos/control-center/serviced/pulls/2971","id":85420139,"html_url":"https://github.com/control-center/serviced/pull/2971","diff_url":"https://github.com/control-center/serviced/pull/2971.diff","patch_url":"https://github.com/control-center/serviced/pull/2971.patch","issue_url":"https://api.github.com/repos/control-center/serviced/issues/2971","number":2971,"state":"open","locked":false,"title":"Feature/cc 2590","user":{"login":"morr-zenoss","id":7365929,"avatar_url":"https://avatars.githubusercontent.com/u/7365929?v=3","gravatar_id":"","url":"https://api.github.com/users/morr-zenoss","html_url":"https://github.com/morr-zenoss","followers_url":"https://api.github.com/users/morr-zenoss/followers","following_url":"https://api.github.com/users/morr-zenoss/following{/other_user}","gists_url":"https://api.github.com/users/morr-zenoss/gists{/gist_id}","starred_url":"https://api.github.com/users/morr-zenoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morr-zenoss/subscriptions","organizations_url":"https://api.github.com/users/morr-zenoss/orgs","repos_url":"https://api.github.com/users/morr-zenoss/repos","events_url":"https://api.github.com/users/morr-zenoss/events{/privacy}","received_events_url":"https://api.github.com/users/morr-zenoss/received_events","type":"User","site_admin":false},"body":"This is for CC-2590 - Store only the data we need for a service in ZK\r\n\r\nThe interesting changes are in:\r\n* node/agent.go\r\n* node/container.go\r\n* node/agent_test.go\r\n* commons/docker/test/mockEventMonitor.go\r\n* zzk/service/hoststate.go\r\n* zzk/service/lock.go\r\n* zzk/service/service.go\r\n* zzk/service/servicestate.go\r\n* zzk/service/hostregistry_test.go\r\n* zzk/service/hoststate_test.go\r\n* zzk/service/mocks/HostStateHandler.go\r\n* zzk/service/servicestate_test.go\r\nThe rest of the files are formatting changes due to intelliJ running gofmt on save. ","created_at":"2016-09-15T14:56:01Z","updated_at":"2016-09-22T18:23:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7b6f6a6eef8686f57f38e53487a391d7fdd99ee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/control-center/serviced/pulls/2971/commits","review_comments_url":"https://api.github.com/repos/control-center/serviced/pulls/2971/comments","review_comment_url":"https://api.github.com/repos/control-center/serviced/pulls/comments{/number}","comments_url":"https://api.github.com/repos/control-center/serviced/issues/2971/comments","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/e290a689473e028c9e78d7b06e6dc5d81f5e717f","head":{"label":"control-center:feature/CC-2590","ref":"feature/CC-2590","sha":"e290a689473e028c9e78d7b06e6dc5d81f5e717f","user":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"repo":{"id":11929217,"name":"serviced","full_name":"control-center/serviced","owner":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/control-center/serviced","description":"Serviced is a PaaS runtime. It allows users to create, manage and scale services in a uniform way.","fork":false,"url":"https://api.github.com/repos/control-center/serviced","forks_url":"https://api.github.com/repos/control-center/serviced/forks","keys_url":"https://api.github.com/repos/control-center/serviced/keys{/key_id}","collaborators_url":"https://api.github.com/repos/control-center/serviced/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/control-center/serviced/teams","hooks_url":"https://api.github.com/repos/control-center/serviced/hooks","issue_events_url":"https://api.github.com/repos/control-center/serviced/issues/events{/number}","events_url":"https://api.github.com/repos/control-center/serviced/events","assignees_url":"https://api.github.com/repos/control-center/serviced/assignees{/user}","branches_url":"https://api.github.com/repos/control-center/serviced/branches{/branch}","tags_url":"https://api.github.com/repos/control-center/serviced/tags","blobs_url":"https://api.github.com/repos/control-center/serviced/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/control-center/serviced/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/control-center/serviced/git/refs{/sha}","trees_url":"https://api.github.com/repos/control-center/serviced/git/trees{/sha}","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/{sha}","languages_url":"https://api.github.com/repos/control-center/serviced/languages","stargazers_url":"https://api.github.com/repos/control-center/serviced/stargazers","contributors_url":"https://api.github.com/repos/control-center/serviced/contributors","subscribers_url":"https://api.github.com/repos/control-center/serviced/subscribers","subscription_url":"https://api.github.com/repos/control-center/serviced/subscription","commits_url":"https://api.github.com/repos/control-center/serviced/commits{/sha}","git_commits_url":"https://api.github.com/repos/control-center/serviced/git/commits{/sha}","comments_url":"https://api.github.com/repos/control-center/serviced/comments{/number}","issue_comment_url":"https://api.github.com/repos/control-center/serviced/issues/comments{/number}","contents_url":"https://api.github.com/repos/control-center/serviced/contents/{+path}","compare_url":"https://api.github.com/repos/control-center/serviced/compare/{base}...{head}","merges_url":"https://api.github.com/repos/control-center/serviced/merges","archive_url":"https://api.github.com/repos/control-center/serviced/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/control-center/serviced/downloads","issues_url":"https://api.github.com/repos/control-center/serviced/issues{/number}","pulls_url":"https://api.github.com/repos/control-center/serviced/pulls{/number}","milestones_url":"https://api.github.com/repos/control-center/serviced/milestones{/number}","notifications_url":"https://api.github.com/repos/control-center/serviced/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/control-center/serviced/labels{/name}","releases_url":"https://api.github.com/repos/control-center/serviced/releases{/id}","deployments_url":"https://api.github.com/repos/control-center/serviced/deployments","created_at":"2013-08-06T16:45:00Z","updated_at":"2016-09-01T22:28:08Z","pushed_at":"2016-09-22T18:03:01Z","git_url":"git://github.com/control-center/serviced.git","ssh_url":"git@github.com:control-center/serviced.git","clone_url":"https://github.com/control-center/serviced.git","svn_url":"https://github.com/control-center/serviced","homepage":null,"size":88238,"stargazers_count":94,"watchers_count":94,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":13,"forks":13,"open_issues":13,"watchers":94,"default_branch":"develop"}},"base":{"label":"control-center:develop","ref":"develop","sha":"055c11742be27f8610667ce8fdf2b6cd3b18b14f","user":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"repo":{"id":11929217,"name":"serviced","full_name":"control-center/serviced","owner":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/control-center/serviced","description":"Serviced is a PaaS runtime. It allows users to create, manage and scale services in a uniform way.","fork":false,"url":"https://api.github.com/repos/control-center/serviced","forks_url":"https://api.github.com/repos/control-center/serviced/forks","keys_url":"https://api.github.com/repos/control-center/serviced/keys{/key_id}","collaborators_url":"https://api.github.com/repos/control-center/serviced/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/control-center/serviced/teams","hooks_url":"https://api.github.com/repos/control-center/serviced/hooks","issue_events_url":"https://api.github.com/repos/control-center/serviced/issues/events{/number}","events_url":"https://api.github.com/repos/control-center/serviced/events","assignees_url":"https://api.github.com/repos/control-center/serviced/assignees{/user}","branches_url":"https://api.github.com/repos/control-center/serviced/branches{/branch}","tags_url":"https://api.github.com/repos/control-center/serviced/tags","blobs_url":"https://api.github.com/repos/control-center/serviced/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/control-center/serviced/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/control-center/serviced/git/refs{/sha}","trees_url":"https://api.github.com/repos/control-center/serviced/git/trees{/sha}","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/{sha}","languages_url":"https://api.github.com/repos/control-center/serviced/languages","stargazers_url":"https://api.github.com/repos/control-center/serviced/stargazers","contributors_url":"https://api.github.com/repos/control-center/serviced/contributors","subscribers_url":"https://api.github.com/repos/control-center/serviced/subscribers","subscription_url":"https://api.github.com/repos/control-center/serviced/subscription","commits_url":"https://api.github.com/repos/control-center/serviced/commits{/sha}","git_commits_url":"https://api.github.com/repos/control-center/serviced/git/commits{/sha}","comments_url":"https://api.github.com/repos/control-center/serviced/comments{/number}","issue_comment_url":"https://api.github.com/repos/control-center/serviced/issues/comments{/number}","contents_url":"https://api.github.com/repos/control-center/serviced/contents/{+path}","compare_url":"https://api.github.com/repos/control-center/serviced/compare/{base}...{head}","merges_url":"https://api.github.com/repos/control-center/serviced/merges","archive_url":"https://api.github.com/repos/control-center/serviced/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/control-center/serviced/downloads","issues_url":"https://api.github.com/repos/control-center/serviced/issues{/number}","pulls_url":"https://api.github.com/repos/control-center/serviced/pulls{/number}","milestones_url":"https://api.github.com/repos/control-center/serviced/milestones{/number}","notifications_url":"https://api.github.com/repos/control-center/serviced/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/control-center/serviced/labels{/name}","releases_url":"https://api.github.com/repos/control-center/serviced/releases{/id}","deployments_url":"https://api.github.com/repos/control-center/serviced/deployments","created_at":"2013-08-06T16:45:00Z","updated_at":"2016-09-01T22:28:08Z","pushed_at":"2016-09-22T18:03:01Z","git_url":"git://github.com/control-center/serviced.git","ssh_url":"git@github.com:control-center/serviced.git","clone_url":"https://github.com/control-center/serviced.git","svn_url":"https://github.com/control-center/serviced","homepage":null,"size":88238,"stargazers_count":94,"watchers_count":94,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":13,"forks":13,"open_issues":13,"watchers":94,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2971"},"html":{"href":"https://github.com/control-center/serviced/pull/2971"},"issue":{"href":"https://api.github.com/repos/control-center/serviced/issues/2971"},"comments":{"href":"https://api.github.com/repos/control-center/serviced/issues/2971/comments"},"review_comments":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2971/comments"},"review_comment":{"href":"https://api.github.com/repos/control-center/serviced/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2971/commits"},"statuses":{"href":"https://api.github.com/repos/control-center/serviced/statuses/e290a689473e028c9e78d7b06e6dc5d81f5e717f"}}}}
{"actor":{"display_login":"morr-zenoss"}}