{"action":"created","comment":{"url":"https://api.github.com/repos/Metaswitch/calico/pulls/comments/28860601","id":28860601,"diff_hunk":"@@ -149,9 +145,30 @@ def on_tags_update(self, profile_id, tags):\n             None if deleted.\n         \"\"\"\n         _log.info(\"Tags for profile %s updated\", profile_id)\n-        old_tags = self.tags_by_prof_id.get(profile_id, [])\n-        new_tags = tags or []\n-        self._process_tag_updates(profile_id, set(old_tags), set(new_tags))\n+\n+        # General approach is to default to the empty list if the new/old","path":"calico/felix/ipsets.py","position":45,"original_position":45,"commit_id":"19e97729148eb78e0d1a311a8eb155e5119de76a","original_commit_id":"19e97729148eb78e0d1a311a8eb155e5119de76a","user":{"login":"plwhite","id":8448749,"avatar_url":"https://avatars.githubusercontent.com/u/8448749?v=3","gravatar_id":"","url":"https://api.github.com/users/plwhite","html_url":"https://github.com/plwhite","followers_url":"https://api.github.com/users/plwhite/followers","following_url":"https://api.github.com/users/plwhite/following{/other_user}","gists_url":"https://api.github.com/users/plwhite/gists{/gist_id}","starred_url":"https://api.github.com/users/plwhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plwhite/subscriptions","organizations_url":"https://api.github.com/users/plwhite/orgs","repos_url":"https://api.github.com/users/plwhite/repos","events_url":"https://api.github.com/users/plwhite/events{/privacy}","received_events_url":"https://api.github.com/users/plwhite/received_events","type":"User","site_admin":false},"body":"I think the top level comment on this routine should say what the routine does and why - i.e. that it is called when the tags in a profile have changed, and hence the content of the ipset must change.\r\n\r\nThat sounds obvious, but it took me a moment to figure out and an extra one line comment in each method of this type would be helpful here.","created_at":"2015-04-22T10:32:50Z","updated_at":"2015-04-22T10:32:50Z","html_url":"https://github.com/Metaswitch/calico/pull/362#discussion_r28860601","pull_request_url":"https://api.github.com/repos/Metaswitch/calico/pulls/362","_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/calico/pulls/comments/28860601"},"html":{"href":"https://github.com/Metaswitch/calico/pull/362#discussion_r28860601"},"pull_request":{"href":"https://api.github.com/repos/Metaswitch/calico/pulls/362"}}},"pull_request":{"url":"https://api.github.com/repos/Metaswitch/calico/pulls/362","id":33315122,"html_url":"https://github.com/Metaswitch/calico/pull/362","diff_url":"https://github.com/Metaswitch/calico/pull/362.diff","patch_url":"https://github.com/Metaswitch/calico/pull/362.patch","issue_url":"https://api.github.com/repos/Metaswitch/calico/issues/362","number":362,"state":"open","locked":false,"title":"Partial support for anycast, cleanup/comment ipsets code","user":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars.githubusercontent.com/u/469264?v=3","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"body":"Previously, anycast didn't work because the ipsets management code assumed only a single endpoint could have one IP (so it would remove the IP from the ipset when _any_ endpoint with that IP went away).\r\n\r\nI reworked the code to do all the index updates in some utility methods while at the same time changing the index structure to maintain a set of endpoints that share each IP.\r\n\r\nThis is an essential part of the anycast puzzle but we're not yet sure if it does everything that we need.  In particular, we're not sure if we correctly handle multiple routing rules for the same address in all cases.","created_at":"2015-04-15T01:16:35Z","updated_at":"2015-04-22T10:32:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c8a7b755b6d71fc6397d6ff7504d9a6baee8d49","assignee":{"login":"plwhite","id":8448749,"avatar_url":"https://avatars.githubusercontent.com/u/8448749?v=3","gravatar_id":"","url":"https://api.github.com/users/plwhite","html_url":"https://github.com/plwhite","followers_url":"https://api.github.com/users/plwhite/followers","following_url":"https://api.github.com/users/plwhite/following{/other_user}","gists_url":"https://api.github.com/users/plwhite/gists{/gist_id}","starred_url":"https://api.github.com/users/plwhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plwhite/subscriptions","organizations_url":"https://api.github.com/users/plwhite/orgs","repos_url":"https://api.github.com/users/plwhite/repos","events_url":"https://api.github.com/users/plwhite/events{/privacy}","received_events_url":"https://api.github.com/users/plwhite/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Metaswitch/calico/milestones/2","html_url":"https://github.com/Metaswitch/calico/milestones/0.17","labels_url":"https://api.github.com/repos/Metaswitch/calico/milestones/2/labels","id":1071957,"number":2,"title":"0.17","description":"","creator":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":17,"state":"open","created_at":"2015-04-17T09:33:49Z","updated_at":"2015-04-22T03:10:52Z","due_on":"2015-04-26T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Metaswitch/calico/pulls/362/commits","review_comments_url":"https://api.github.com/repos/Metaswitch/calico/pulls/362/comments","review_comment_url":"https://api.github.com/repos/Metaswitch/calico/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Metaswitch/calico/issues/362/comments","statuses_url":"https://api.github.com/repos/Metaswitch/calico/statuses/19e97729148eb78e0d1a311a8eb155e5119de76a","head":{"label":"Metaswitch:smc-support-multiple-ips","ref":"smc-support-multiple-ips","sha":"19e97729148eb78e0d1a311a8eb155e5119de76a","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":21242831,"name":"calico","full_name":"Metaswitch/calico","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/calico","description":"Project Calico core repository.","fork":false,"url":"https://api.github.com/repos/Metaswitch/calico","forks_url":"https://api.github.com/repos/Metaswitch/calico/forks","keys_url":"https://api.github.com/repos/Metaswitch/calico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/calico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/calico/teams","hooks_url":"https://api.github.com/repos/Metaswitch/calico/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/calico/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/calico/events","assignees_url":"https://api.github.com/repos/Metaswitch/calico/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/calico/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/calico/tags","blobs_url":"https://api.github.com/repos/Metaswitch/calico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/calico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/calico/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/calico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/calico/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/calico/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/calico/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/calico/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/calico/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/calico/subscription","commits_url":"https://api.github.com/repos/Metaswitch/calico/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/calico/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/calico/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/calico/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/calico/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/calico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/calico/merges","archive_url":"https://api.github.com/repos/Metaswitch/calico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/calico/downloads","issues_url":"https://api.github.com/repos/Metaswitch/calico/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/calico/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/calico/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/calico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/calico/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/calico/releases{/id}","created_at":"2014-06-26T14:08:43Z","updated_at":"2015-04-21T14:31:27Z","pushed_at":"2015-04-22T01:24:36Z","git_url":"git://github.com/Metaswitch/calico.git","ssh_url":"git@github.com:Metaswitch/calico.git","clone_url":"https://github.com/Metaswitch/calico.git","svn_url":"https://github.com/Metaswitch/calico","homepage":"http://projectcalico.org/","size":10181,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":72,"forks":12,"open_issues":72,"watchers":44,"default_branch":"master"}},"base":{"label":"Metaswitch:master","ref":"master","sha":"6d97b4b2d4b2ab569e1a2f500d299ac0070dce0c","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":21242831,"name":"calico","full_name":"Metaswitch/calico","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/calico","description":"Project Calico core repository.","fork":false,"url":"https://api.github.com/repos/Metaswitch/calico","forks_url":"https://api.github.com/repos/Metaswitch/calico/forks","keys_url":"https://api.github.com/repos/Metaswitch/calico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/calico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/calico/teams","hooks_url":"https://api.github.com/repos/Metaswitch/calico/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/calico/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/calico/events","assignees_url":"https://api.github.com/repos/Metaswitch/calico/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/calico/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/calico/tags","blobs_url":"https://api.github.com/repos/Metaswitch/calico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/calico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/calico/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/calico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/calico/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/calico/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/calico/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/calico/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/calico/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/calico/subscription","commits_url":"https://api.github.com/repos/Metaswitch/calico/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/calico/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/calico/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/calico/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/calico/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/calico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/calico/merges","archive_url":"https://api.github.com/repos/Metaswitch/calico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/calico/downloads","issues_url":"https://api.github.com/repos/Metaswitch/calico/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/calico/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/calico/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/calico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/calico/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/calico/releases{/id}","created_at":"2014-06-26T14:08:43Z","updated_at":"2015-04-21T14:31:27Z","pushed_at":"2015-04-22T01:24:36Z","git_url":"git://github.com/Metaswitch/calico.git","ssh_url":"git@github.com:Metaswitch/calico.git","clone_url":"https://github.com/Metaswitch/calico.git","svn_url":"https://github.com/Metaswitch/calico","homepage":"http://projectcalico.org/","size":10181,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":72,"forks":12,"open_issues":72,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/calico/pulls/362"},"html":{"href":"https://github.com/Metaswitch/calico/pull/362"},"issue":{"href":"https://api.github.com/repos/Metaswitch/calico/issues/362"},"comments":{"href":"https://api.github.com/repos/Metaswitch/calico/issues/362/comments"},"review_comments":{"href":"https://api.github.com/repos/Metaswitch/calico/pulls/362/comments"},"review_comment":{"href":"https://api.github.com/repos/Metaswitch/calico/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Metaswitch/calico/pulls/362/commits"},"statuses":{"href":"https://api.github.com/repos/Metaswitch/calico/statuses/19e97729148eb78e0d1a311a8eb155e5119de76a"}}}}