{"action":"created","comment":{"url":"https://api.github.com/repos/square/p2/pulls/comments/168169050","pull_request_review_id":96490798,"id":168169050,"diff_hunk":"@@ -41,28 +69,37 @@ type healthStore interface {\n \tGetServiceHealth(service string) (map[string]consul.WatchResult, error)\n }\n \n-type healthKV interface {\n-\tList(prefix string, opts *api.QueryOptions) (api.KVPairs, *api.QueryMeta, error)\n+type ReplicationControllerStore interface {\n+\tGet(id rcfields.ID) (rcfields.RC, error)\n }\n \n-type consulHealthChecker struct {\n-\tclient      consulutil.ConsulClient\n-\tkv          healthKV\n-\tconsulStore healthStore\n+type LabelReader interface {\n+\tGetMatches(klabels.Selector, labels.Type) ([]labels.Labeled, error)\n }\n-type consulHealth interface {\n-\tNode(types.NodeName, *api.QueryOptions) ([]*api.HealthCheck, *api.QueryMeta, error)\n+\n+type healthChecker struct {\n+\thealthClient   HealthClient\n+\tresourceClient ResourceClient\n+\tconsulClient   consulutil.ConsulClient\n+\tkv             healthKV\n+\tconsulStore    healthStore\n+\trcStore        ReplicationControllerStore\n+\tlabelReader    LabelReader\n }\n \n-func NewConsulHealthChecker(client consulutil.ConsulClient) ConsulHealthChecker {\n-\treturn consulHealthChecker{\n-\t\tclient:      client,\n-\t\tkv:          client.KV(),\n-\t\tconsulStore: consul.NewConsulStore(client),\n+func NewHealthChecker(hClient HealthClient, resourceClient ResourceClient, cClient consulutil.ConsulClient, rcStore ReplicationControllerStore, labelReader LabelReader) HealthChecker {","path":"pkg/health/checker/checker.go","position":100,"original_position":100,"commit_id":"900dff46246a5ae571f4449cdb687231c5df0a71","original_commit_id":"8fba5f738b38aaaf41e5301b2e4d6f51b2a9aa11","user":{"login":"mpuncel","id":1444855,"avatar_url":"https://avatars3.githubusercontent.com/u/1444855?v=4","gravatar_id":"","url":"https://api.github.com/users/mpuncel","html_url":"https://github.com/mpuncel","followers_url":"https://api.github.com/users/mpuncel/followers","following_url":"https://api.github.com/users/mpuncel/following{/other_user}","gists_url":"https://api.github.com/users/mpuncel/gists{/gist_id}","starred_url":"https://api.github.com/users/mpuncel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpuncel/subscriptions","organizations_url":"https://api.github.com/users/mpuncel/orgs","repos_url":"https://api.github.com/users/mpuncel/repos","events_url":"https://api.github.com/users/mpuncel/events{/privacy}","received_events_url":"https://api.github.com/users/mpuncel/received_events","type":"User","site_admin":false},"body":"\"shadowing\" traffic is the technique of duplicating all of the traffic going to destination A and sending it also to destination B. Usually this is done to see if destination B can handle the load that destination A can, and it's done when you are evaluating replacing A with B.\r\n\r\nThat's basically what we're doing here, we want to see if the health service can handle being accessed every time we used to be looking in consul","created_at":"2018-02-14T13:13:03Z","updated_at":"2018-02-14T13:13:03Z","html_url":"https://github.com/square/p2/pull/1011#discussion_r168169050","pull_request_url":"https://api.github.com/repos/square/p2/pulls/1011","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/square/p2/pulls/comments/168169050"},"html":{"href":"https://github.com/square/p2/pull/1011#discussion_r168169050"},"pull_request":{"href":"https://api.github.com/repos/square/p2/pulls/1011"}},"in_reply_to_id":166792802},"pull_request":{"url":"https://api.github.com/repos/square/p2/pulls/1011","id":165844731,"html_url":"https://github.com/square/p2/pull/1011","diff_url":"https://github.com/square/p2/pull/1011.diff","patch_url":"https://github.com/square/p2/pull/1011.patch","issue_url":"https://api.github.com/repos/square/p2/issues/1011","number":1011,"state":"open","locked":false,"title":"use new health service with rolling updates","user":{"login":"esuen","id":343604,"avatar_url":"https://avatars1.githubusercontent.com/u/343604?v=4","gravatar_id":"","url":"https://api.github.com/users/esuen","html_url":"https://github.com/esuen","followers_url":"https://api.github.com/users/esuen/followers","following_url":"https://api.github.com/users/esuen/following{/other_user}","gists_url":"https://api.github.com/users/esuen/gists{/gist_id}","starred_url":"https://api.github.com/users/esuen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esuen/subscriptions","organizations_url":"https://api.github.com/users/esuen/orgs","repos_url":"https://api.github.com/users/esuen/repos","events_url":"https://api.github.com/users/esuen/events{/privacy}","received_events_url":"https://api.github.com/users/esuen/received_events","type":"User","site_admin":false},"body":"WIP. Don't do extensive review, but if you see something that could be done in a better way please let me know.","created_at":"2018-01-29T23:13:46Z","updated_at":"2018-02-14T13:13:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c035239979dc27cdf3e707ec162c7868f1c8f8db","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mpuncel","id":1444855,"avatar_url":"https://avatars3.githubusercontent.com/u/1444855?v=4","gravatar_id":"","url":"https://api.github.com/users/mpuncel","html_url":"https://github.com/mpuncel","followers_url":"https://api.github.com/users/mpuncel/followers","following_url":"https://api.github.com/users/mpuncel/following{/other_user}","gists_url":"https://api.github.com/users/mpuncel/gists{/gist_id}","starred_url":"https://api.github.com/users/mpuncel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpuncel/subscriptions","organizations_url":"https://api.github.com/users/mpuncel/orgs","repos_url":"https://api.github.com/users/mpuncel/repos","events_url":"https://api.github.com/users/mpuncel/events{/privacy}","received_events_url":"https://api.github.com/users/mpuncel/received_events","type":"User","site_admin":false},{"login":"spenceral","id":10701033,"avatar_url":"https://avatars2.githubusercontent.com/u/10701033?v=4","gravatar_id":"","url":"https://api.github.com/users/spenceral","html_url":"https://github.com/spenceral","followers_url":"https://api.github.com/users/spenceral/followers","following_url":"https://api.github.com/users/spenceral/following{/other_user}","gists_url":"https://api.github.com/users/spenceral/gists{/gist_id}","starred_url":"https://api.github.com/users/spenceral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spenceral/subscriptions","organizations_url":"https://api.github.com/users/spenceral/orgs","repos_url":"https://api.github.com/users/spenceral/repos","events_url":"https://api.github.com/users/spenceral/events{/privacy}","received_events_url":"https://api.github.com/users/spenceral/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/square/p2/pulls/1011/commits","review_comments_url":"https://api.github.com/repos/square/p2/pulls/1011/comments","review_comment_url":"https://api.github.com/repos/square/p2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/p2/issues/1011/comments","statuses_url":"https://api.github.com/repos/square/p2/statuses/900dff46246a5ae571f4449cdb687231c5df0a71","head":{"label":"esuen:health-service-into-rolling-updates","ref":"health-service-into-rolling-updates","sha":"900dff46246a5ae571f4449cdb687231c5df0a71","user":{"login":"esuen","id":343604,"avatar_url":"https://avatars1.githubusercontent.com/u/343604?v=4","gravatar_id":"","url":"https://api.github.com/users/esuen","html_url":"https://github.com/esuen","followers_url":"https://api.github.com/users/esuen/followers","following_url":"https://api.github.com/users/esuen/following{/other_user}","gists_url":"https://api.github.com/users/esuen/gists{/gist_id}","starred_url":"https://api.github.com/users/esuen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esuen/subscriptions","organizations_url":"https://api.github.com/users/esuen/orgs","repos_url":"https://api.github.com/users/esuen/repos","events_url":"https://api.github.com/users/esuen/events{/privacy}","received_events_url":"https://api.github.com/users/esuen/received_events","type":"User","site_admin":false},"repo":{"id":113511065,"name":"p2","full_name":"esuen/p2","owner":{"login":"esuen","id":343604,"avatar_url":"https://avatars1.githubusercontent.com/u/343604?v=4","gravatar_id":"","url":"https://api.github.com/users/esuen","html_url":"https://github.com/esuen","followers_url":"https://api.github.com/users/esuen/followers","following_url":"https://api.github.com/users/esuen/following{/other_user}","gists_url":"https://api.github.com/users/esuen/gists{/gist_id}","starred_url":"https://api.github.com/users/esuen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esuen/subscriptions","organizations_url":"https://api.github.com/users/esuen/orgs","repos_url":"https://api.github.com/users/esuen/repos","events_url":"https://api.github.com/users/esuen/events{/privacy}","received_events_url":"https://api.github.com/users/esuen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esuen/p2","description":"Platypus Platform: Tools for Scalable Deployment","fork":true,"url":"https://api.github.com/repos/esuen/p2","forks_url":"https://api.github.com/repos/esuen/p2/forks","keys_url":"https://api.github.com/repos/esuen/p2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esuen/p2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esuen/p2/teams","hooks_url":"https://api.github.com/repos/esuen/p2/hooks","issue_events_url":"https://api.github.com/repos/esuen/p2/issues/events{/number}","events_url":"https://api.github.com/repos/esuen/p2/events","assignees_url":"https://api.github.com/repos/esuen/p2/assignees{/user}","branches_url":"https://api.github.com/repos/esuen/p2/branches{/branch}","tags_url":"https://api.github.com/repos/esuen/p2/tags","blobs_url":"https://api.github.com/repos/esuen/p2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esuen/p2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esuen/p2/git/refs{/sha}","trees_url":"https://api.github.com/repos/esuen/p2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esuen/p2/statuses/{sha}","languages_url":"https://api.github.com/repos/esuen/p2/languages","stargazers_url":"https://api.github.com/repos/esuen/p2/stargazers","contributors_url":"https://api.github.com/repos/esuen/p2/contributors","subscribers_url":"https://api.github.com/repos/esuen/p2/subscribers","subscription_url":"https://api.github.com/repos/esuen/p2/subscription","commits_url":"https://api.github.com/repos/esuen/p2/commits{/sha}","git_commits_url":"https://api.github.com/repos/esuen/p2/git/commits{/sha}","comments_url":"https://api.github.com/repos/esuen/p2/comments{/number}","issue_comment_url":"https://api.github.com/repos/esuen/p2/issues/comments{/number}","contents_url":"https://api.github.com/repos/esuen/p2/contents/{+path}","compare_url":"https://api.github.com/repos/esuen/p2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esuen/p2/merges","archive_url":"https://api.github.com/repos/esuen/p2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esuen/p2/downloads","issues_url":"https://api.github.com/repos/esuen/p2/issues{/number}","pulls_url":"https://api.github.com/repos/esuen/p2/pulls{/number}","milestones_url":"https://api.github.com/repos/esuen/p2/milestones{/number}","notifications_url":"https://api.github.com/repos/esuen/p2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esuen/p2/labels{/name}","releases_url":"https://api.github.com/repos/esuen/p2/releases{/id}","deployments_url":"https://api.github.com/repos/esuen/p2/deployments","created_at":"2017-12-08T00:04:54Z","updated_at":"2017-12-08T00:04:57Z","pushed_at":"2018-02-12T19:46:25Z","git_url":"git://github.com/esuen/p2.git","ssh_url":"git@github.com:esuen/p2.git","clone_url":"https://github.com/esuen/p2.git","svn_url":"https://github.com/esuen/p2","homepage":"","size":50544,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"6eec3d652711e24df95e17ede42c8ba3e5569284","user":{"login":"square","id":82592,"avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":25320424,"name":"p2","full_name":"square/p2","owner":{"login":"square","id":82592,"avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/p2","description":"Platypus Platform: Tools for Scalable Deployment","fork":false,"url":"https://api.github.com/repos/square/p2","forks_url":"https://api.github.com/repos/square/p2/forks","keys_url":"https://api.github.com/repos/square/p2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/p2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/p2/teams","hooks_url":"https://api.github.com/repos/square/p2/hooks","issue_events_url":"https://api.github.com/repos/square/p2/issues/events{/number}","events_url":"https://api.github.com/repos/square/p2/events","assignees_url":"https://api.github.com/repos/square/p2/assignees{/user}","branches_url":"https://api.github.com/repos/square/p2/branches{/branch}","tags_url":"https://api.github.com/repos/square/p2/tags","blobs_url":"https://api.github.com/repos/square/p2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/p2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/p2/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/p2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/p2/statuses/{sha}","languages_url":"https://api.github.com/repos/square/p2/languages","stargazers_url":"https://api.github.com/repos/square/p2/stargazers","contributors_url":"https://api.github.com/repos/square/p2/contributors","subscribers_url":"https://api.github.com/repos/square/p2/subscribers","subscription_url":"https://api.github.com/repos/square/p2/subscription","commits_url":"https://api.github.com/repos/square/p2/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/p2/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/p2/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/p2/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/p2/contents/{+path}","compare_url":"https://api.github.com/repos/square/p2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/p2/merges","archive_url":"https://api.github.com/repos/square/p2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/p2/downloads","issues_url":"https://api.github.com/repos/square/p2/issues{/number}","pulls_url":"https://api.github.com/repos/square/p2/pulls{/number}","milestones_url":"https://api.github.com/repos/square/p2/milestones{/number}","notifications_url":"https://api.github.com/repos/square/p2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/p2/labels{/name}","releases_url":"https://api.github.com/repos/square/p2/releases{/id}","deployments_url":"https://api.github.com/repos/square/p2/deployments","created_at":"2014-10-16T20:31:12Z","updated_at":"2018-02-13T01:08:09Z","pushed_at":"2018-02-14T02:54:08Z","git_url":"git://github.com/square/p2.git","ssh_url":"git@github.com:square/p2.git","clone_url":"https://github.com/square/p2.git","svn_url":"https://github.com/square/p2","homepage":"","size":50537,"stargazers_count":170,"watchers_count":170,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":40,"open_issues":10,"watchers":170,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/p2/pulls/1011"},"html":{"href":"https://github.com/square/p2/pull/1011"},"issue":{"href":"https://api.github.com/repos/square/p2/issues/1011"},"comments":{"href":"https://api.github.com/repos/square/p2/issues/1011/comments"},"review_comments":{"href":"https://api.github.com/repos/square/p2/pulls/1011/comments"},"review_comment":{"href":"https://api.github.com/repos/square/p2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/p2/pulls/1011/commits"},"statuses":{"href":"https://api.github.com/repos/square/p2/statuses/900dff46246a5ae571f4449cdb687231c5df0a71"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mpuncel"}}