{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/26185981","id":26185981,"diff_hunk":"@@ -463,28 +464,29 @@ func (proxier *Proxier) OnUpdate(services []api.Service) {\n \tglog.V(4).Infof(\"Received update notice: %+v\", services)\n \tactiveServices := util.StringSet{}\n \tfor _, service := range services {\n-\t\tactiveServices.Insert(service.Name)\n-\t\tinfo, exists := proxier.getServiceInfo(service.Name)\n+\t\tcachekey := types.NewNamespacedName(service.Namespace, service.Name).CacheKey()","path":"pkg/proxy/proxier.go","position":126,"original_position":126,"commit_id":"acc600658867491989d7ddf6daa8b07d6e425fed","original_commit_id":"5eeac3b7b7f89fc2b38d31f1cd36dce3c279a68b","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"body":"You'r right that \"New\" typically means pointer, but not always.  I prefer to think of it as returning a useful and safe-to-copy value.  Given the raison d'etre of this type, the \"reasonable value\" is a value, not a pointer.\r\n\r\nC++ has a convention of \"New\" meaning pointer and \"Make\" meaning value.  I would be ok with that, but I don't think it is necessary.\r\n\r\nI think that using the object as key is A+, and I think CacheKey() serves no purpose.  Just return a value.  But also read my response to the \"public fields\" point.","created_at":"2015-03-11T03:05:45Z","updated_at":"2015-03-11T03:05:45Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5192#discussion_r26185981","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/26185981"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5192#discussion_r26185981"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192","id":30791505,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5192","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5192.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5192.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5192","number":5192,"state":"open","locked":false,"title":"Fix service namespace clash","user":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"body":"This PR addresses comments in, and replaces PR #5031, after some git mistakes and cleanups on my part.  Please see that PR for comments.","created_at":"2015-03-09T19:26:24Z","updated_at":"2015-03-11T03:05:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d4ad8cb52e91e286450e14ace09cf6008ed4ffe","assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5192/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/acc600658867491989d7ddf6daa8b07d6e425fed","head":{"label":"quinton-hoole:2015-03-06-service-namespace-clash","ref":"2015-03-06-service-namespace-clash","sha":"acc600658867491989d7ddf6daa8b07d6e425fed","user":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"repo":{"id":29155350,"name":"kubernetes","full_name":"quinton-hoole/kubernetes","owner":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quinton-hoole/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/quinton-hoole/kubernetes","forks_url":"https://api.github.com/repos/quinton-hoole/kubernetes/forks","keys_url":"https://api.github.com/repos/quinton-hoole/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quinton-hoole/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quinton-hoole/kubernetes/teams","hooks_url":"https://api.github.com/repos/quinton-hoole/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/quinton-hoole/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/quinton-hoole/kubernetes/events","assignees_url":"https://api.github.com/repos/quinton-hoole/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/quinton-hoole/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/quinton-hoole/kubernetes/tags","blobs_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quinton-hoole/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/quinton-hoole/kubernetes/languages","stargazers_url":"https://api.github.com/repos/quinton-hoole/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/quinton-hoole/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/quinton-hoole/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/quinton-hoole/kubernetes/subscription","commits_url":"https://api.github.com/repos/quinton-hoole/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/quinton-hoole/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/quinton-hoole/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/quinton-hoole/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/quinton-hoole/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/quinton-hoole/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quinton-hoole/kubernetes/merges","archive_url":"https://api.github.com/repos/quinton-hoole/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quinton-hoole/kubernetes/downloads","issues_url":"https://api.github.com/repos/quinton-hoole/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/quinton-hoole/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/quinton-hoole/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/quinton-hoole/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quinton-hoole/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/quinton-hoole/kubernetes/releases{/id}","created_at":"2015-01-12T20:28:39Z","updated_at":"2015-03-04T17:03:44Z","pushed_at":"2015-03-10T23:07:15Z","git_url":"git://github.com/quinton-hoole/kubernetes.git","ssh_url":"git@github.com:quinton-hoole/kubernetes.git","clone_url":"https://github.com/quinton-hoole/kubernetes.git","svn_url":"https://github.com/quinton-hoole/kubernetes","homepage":null,"size":33330,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"2a7be5619a54afddfb729b83eebe3aa498a45689","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-03-11T01:52:47Z","pushed_at":"2015-03-11T00:00:28Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":98400,"stargazers_count":6529,"watchers_count":6529,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1181,"mirror_url":null,"open_issues_count":764,"forks":1181,"open_issues":764,"watchers":6529,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/5192"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5192"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5192/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/5192/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/acc600658867491989d7ddf6daa8b07d6e425fed"}}}}