{"action":"created","comment":{"url":"https://api.github.com/repos/taskgraph/taskgraph/pulls/comments/30760747","id":30760747,"diff_hunk":"@@ -24,17 +24,16 @@ func (t *FullTopology) GetLinkTypes() []string {\n \treturn []string{\"Neighbors\", \"Master\"}\n }\n \n-func (t *FullTopology) GetNeighbors(linkType string, epoch uint64) []uint64 {\n-\tres := make([]uint64, 0)\n-\tswitch {\n-\tcase linkType == \"Neighbors\":\n+func (t *FullTopology) GetNeighbors(linkType string, epoch uint64) (res []uint64) {\n+\tswitch linkType {\n+\tcase \"Neighbors\":\n \t\tres = t.all","path":"example/topo/full_topo.go","position":11,"original_position":11,"commit_id":"0003dc4f3b8a1816d47ca5c7b562d443f3a05392","original_commit_id":"0003dc4f3b8a1816d47ca5c7b562d443f3a05392","user":{"login":"fengjingchao","id":920884,"avatar_url":"https://avatars.githubusercontent.com/u/920884?v=3","gravatar_id":"","url":"https://api.github.com/users/fengjingchao","html_url":"https://github.com/fengjingchao","followers_url":"https://api.github.com/users/fengjingchao/followers","following_url":"https://api.github.com/users/fengjingchao/following{/other_user}","gists_url":"https://api.github.com/users/fengjingchao/gists{/gist_id}","starred_url":"https://api.github.com/users/fengjingchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengjingchao/subscriptions","organizations_url":"https://api.github.com/users/fengjingchao/orgs","repos_url":"https://api.github.com/users/fengjingchao/repos","events_url":"https://api.github.com/users/fengjingchao/events{/privacy}","received_events_url":"https://api.github.com/users/fengjingchao/received_events","type":"User","site_admin":false},"body":"Current implementation takes Task 0 as a worker and master.\r\nIt's Gang's decision.","created_at":"2015-05-20T23:35:47Z","updated_at":"2015-05-20T23:35:47Z","html_url":"https://github.com/taskgraph/taskgraph/pull/121#discussion_r30760747","pull_request_url":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121","_links":{"self":{"href":"https://api.github.com/repos/taskgraph/taskgraph/pulls/comments/30760747"},"html":{"href":"https://github.com/taskgraph/taskgraph/pull/121#discussion_r30760747"},"pull_request":{"href":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121"}}},"pull_request":{"url":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121","id":35879839,"html_url":"https://github.com/taskgraph/taskgraph/pull/121","diff_url":"https://github.com/taskgraph/taskgraph/pull/121.diff","patch_url":"https://github.com/taskgraph/taskgraph/pull/121.patch","issue_url":"https://api.github.com/repos/taskgraph/taskgraph/issues/121","number":121,"state":"open","locked":false,"title":"framework FlagMeta: should obey doc semantics","user":{"login":"fengjingchao","id":920884,"avatar_url":"https://avatars.githubusercontent.com/u/920884?v=3","gravatar_id":"","url":"https://api.github.com/users/fengjingchao","html_url":"https://github.com/fengjingchao","followers_url":"https://api.github.com/users/fengjingchao/followers","following_url":"https://api.github.com/users/fengjingchao/following{/other_user}","gists_url":"https://api.github.com/users/fengjingchao/gists{/gist_id}","starred_url":"https://api.github.com/users/fengjingchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengjingchao/subscriptions","organizations_url":"https://api.github.com/users/fengjingchao/orgs","repos_url":"https://api.github.com/users/fengjingchao/repos","events_url":"https://api.github.com/users/fengjingchao/events{/privacy}","received_events_url":"https://api.github.com/users/fengjingchao/received_events","type":"User","site_admin":false},"body":"When we designed FlagMeta, the behavior in the docs says:\r\n```\r\n\t// Set meta flag to notify meta to all nodes of linkType to this node.\r\n\tFlagMeta(ctx context.Context, linkType, meta string)\r\n```\r\n\r\nHowever, due to the change of linktypes, the topology uses link types as etcd watches. This causes discrepancy and disobeys the intention of topology definition. For example, currently bwmf topo is defined:\r\n```\r\n\tcase linkType == \"Neighbors\":\r\n\t\tres = t.all\r\n\tcase linkType == \"Master\":\r\n\t\tif t.taskID == 0 {\r\n\t\t\tres = t.all\r\n\t\t}\r\n```\r\nThis is because task 0 needs to watch everyone's master flag. But what the definition here should be that everyone's master should be task 0.\r\n\r\nThe PR fixes the semantics of FlagMeta to obey the original design.","created_at":"2015-05-20T21:48:13Z","updated_at":"2015-05-20T23:35:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf02b7686881ebe0b3b580951c3fad8589c01f00","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121/commits","review_comments_url":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121/comments","review_comment_url":"https://api.github.com/repos/taskgraph/taskgraph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskgraph/taskgraph/issues/121/comments","statuses_url":"https://api.github.com/repos/taskgraph/taskgraph/statuses/0003dc4f3b8a1816d47ca5c7b562d443f3a05392","head":{"label":"fengjingchao:master","ref":"master","sha":"0003dc4f3b8a1816d47ca5c7b562d443f3a05392","user":{"login":"fengjingchao","id":920884,"avatar_url":"https://avatars.githubusercontent.com/u/920884?v=3","gravatar_id":"","url":"https://api.github.com/users/fengjingchao","html_url":"https://github.com/fengjingchao","followers_url":"https://api.github.com/users/fengjingchao/followers","following_url":"https://api.github.com/users/fengjingchao/following{/other_user}","gists_url":"https://api.github.com/users/fengjingchao/gists{/gist_id}","starred_url":"https://api.github.com/users/fengjingchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengjingchao/subscriptions","organizations_url":"https://api.github.com/users/fengjingchao/orgs","repos_url":"https://api.github.com/users/fengjingchao/repos","events_url":"https://api.github.com/users/fengjingchao/events{/privacy}","received_events_url":"https://api.github.com/users/fengjingchao/received_events","type":"User","site_admin":false},"repo":{"id":30481726,"name":"taskgraph","full_name":"fengjingchao/taskgraph","owner":{"login":"fengjingchao","id":920884,"avatar_url":"https://avatars.githubusercontent.com/u/920884?v=3","gravatar_id":"","url":"https://api.github.com/users/fengjingchao","html_url":"https://github.com/fengjingchao","followers_url":"https://api.github.com/users/fengjingchao/followers","following_url":"https://api.github.com/users/fengjingchao/following{/other_user}","gists_url":"https://api.github.com/users/fengjingchao/gists{/gist_id}","starred_url":"https://api.github.com/users/fengjingchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengjingchao/subscriptions","organizations_url":"https://api.github.com/users/fengjingchao/orgs","repos_url":"https://api.github.com/users/fengjingchao/repos","events_url":"https://api.github.com/users/fengjingchao/events{/privacy}","received_events_url":"https://api.github.com/users/fengjingchao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fengjingchao/taskgraph","description":"A fault tolerant, distributed task driven framework","fork":true,"url":"https://api.github.com/repos/fengjingchao/taskgraph","forks_url":"https://api.github.com/repos/fengjingchao/taskgraph/forks","keys_url":"https://api.github.com/repos/fengjingchao/taskgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fengjingchao/taskgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fengjingchao/taskgraph/teams","hooks_url":"https://api.github.com/repos/fengjingchao/taskgraph/hooks","issue_events_url":"https://api.github.com/repos/fengjingchao/taskgraph/issues/events{/number}","events_url":"https://api.github.com/repos/fengjingchao/taskgraph/events","assignees_url":"https://api.github.com/repos/fengjingchao/taskgraph/assignees{/user}","branches_url":"https://api.github.com/repos/fengjingchao/taskgraph/branches{/branch}","tags_url":"https://api.github.com/repos/fengjingchao/taskgraph/tags","blobs_url":"https://api.github.com/repos/fengjingchao/taskgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fengjingchao/taskgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fengjingchao/taskgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/fengjingchao/taskgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fengjingchao/taskgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/fengjingchao/taskgraph/languages","stargazers_url":"https://api.github.com/repos/fengjingchao/taskgraph/stargazers","contributors_url":"https://api.github.com/repos/fengjingchao/taskgraph/contributors","subscribers_url":"https://api.github.com/repos/fengjingchao/taskgraph/subscribers","subscription_url":"https://api.github.com/repos/fengjingchao/taskgraph/subscription","commits_url":"https://api.github.com/repos/fengjingchao/taskgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/fengjingchao/taskgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/fengjingchao/taskgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/fengjingchao/taskgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/fengjingchao/taskgraph/contents/{+path}","compare_url":"https://api.github.com/repos/fengjingchao/taskgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fengjingchao/taskgraph/merges","archive_url":"https://api.github.com/repos/fengjingchao/taskgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fengjingchao/taskgraph/downloads","issues_url":"https://api.github.com/repos/fengjingchao/taskgraph/issues{/number}","pulls_url":"https://api.github.com/repos/fengjingchao/taskgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/fengjingchao/taskgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/fengjingchao/taskgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fengjingchao/taskgraph/labels{/name}","releases_url":"https://api.github.com/repos/fengjingchao/taskgraph/releases{/id}","created_at":"2015-02-08T05:18:21Z","updated_at":"2015-05-13T17:15:59Z","pushed_at":"2015-05-20T21:56:02Z","git_url":"git://github.com/fengjingchao/taskgraph.git","ssh_url":"git@github.com:fengjingchao/taskgraph.git","clone_url":"https://github.com/fengjingchao/taskgraph.git","svn_url":"https://github.com/fengjingchao/taskgraph","homepage":"","size":18270,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"taskgraph:master","ref":"master","sha":"4da1564f60485f99198419758e19b0ddd129578a","user":{"login":"taskgraph","id":9723611,"avatar_url":"https://avatars.githubusercontent.com/u/9723611?v=3","gravatar_id":"","url":"https://api.github.com/users/taskgraph","html_url":"https://github.com/taskgraph","followers_url":"https://api.github.com/users/taskgraph/followers","following_url":"https://api.github.com/users/taskgraph/following{/other_user}","gists_url":"https://api.github.com/users/taskgraph/gists{/gist_id}","starred_url":"https://api.github.com/users/taskgraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskgraph/subscriptions","organizations_url":"https://api.github.com/users/taskgraph/orgs","repos_url":"https://api.github.com/users/taskgraph/repos","events_url":"https://api.github.com/users/taskgraph/events{/privacy}","received_events_url":"https://api.github.com/users/taskgraph/received_events","type":"Organization","site_admin":false},"repo":{"id":30477948,"name":"taskgraph","full_name":"taskgraph/taskgraph","owner":{"login":"taskgraph","id":9723611,"avatar_url":"https://avatars.githubusercontent.com/u/9723611?v=3","gravatar_id":"","url":"https://api.github.com/users/taskgraph","html_url":"https://github.com/taskgraph","followers_url":"https://api.github.com/users/taskgraph/followers","following_url":"https://api.github.com/users/taskgraph/following{/other_user}","gists_url":"https://api.github.com/users/taskgraph/gists{/gist_id}","starred_url":"https://api.github.com/users/taskgraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskgraph/subscriptions","organizations_url":"https://api.github.com/users/taskgraph/orgs","repos_url":"https://api.github.com/users/taskgraph/repos","events_url":"https://api.github.com/users/taskgraph/events{/privacy}","received_events_url":"https://api.github.com/users/taskgraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskgraph/taskgraph","description":"A fault tolerant, distributed task driven framework","fork":false,"url":"https://api.github.com/repos/taskgraph/taskgraph","forks_url":"https://api.github.com/repos/taskgraph/taskgraph/forks","keys_url":"https://api.github.com/repos/taskgraph/taskgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskgraph/taskgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskgraph/taskgraph/teams","hooks_url":"https://api.github.com/repos/taskgraph/taskgraph/hooks","issue_events_url":"https://api.github.com/repos/taskgraph/taskgraph/issues/events{/number}","events_url":"https://api.github.com/repos/taskgraph/taskgraph/events","assignees_url":"https://api.github.com/repos/taskgraph/taskgraph/assignees{/user}","branches_url":"https://api.github.com/repos/taskgraph/taskgraph/branches{/branch}","tags_url":"https://api.github.com/repos/taskgraph/taskgraph/tags","blobs_url":"https://api.github.com/repos/taskgraph/taskgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskgraph/taskgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskgraph/taskgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskgraph/taskgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskgraph/taskgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/taskgraph/taskgraph/languages","stargazers_url":"https://api.github.com/repos/taskgraph/taskgraph/stargazers","contributors_url":"https://api.github.com/repos/taskgraph/taskgraph/contributors","subscribers_url":"https://api.github.com/repos/taskgraph/taskgraph/subscribers","subscription_url":"https://api.github.com/repos/taskgraph/taskgraph/subscription","commits_url":"https://api.github.com/repos/taskgraph/taskgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskgraph/taskgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskgraph/taskgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskgraph/taskgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskgraph/taskgraph/contents/{+path}","compare_url":"https://api.github.com/repos/taskgraph/taskgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskgraph/taskgraph/merges","archive_url":"https://api.github.com/repos/taskgraph/taskgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskgraph/taskgraph/downloads","issues_url":"https://api.github.com/repos/taskgraph/taskgraph/issues{/number}","pulls_url":"https://api.github.com/repos/taskgraph/taskgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/taskgraph/taskgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/taskgraph/taskgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskgraph/taskgraph/labels{/name}","releases_url":"https://api.github.com/repos/taskgraph/taskgraph/releases{/id}","created_at":"2015-02-08T02:19:17Z","updated_at":"2015-05-19T07:29:12Z","pushed_at":"2015-05-20T21:56:03Z","git_url":"git://github.com/taskgraph/taskgraph.git","ssh_url":"git@github.com:taskgraph/taskgraph.git","clone_url":"https://github.com/taskgraph/taskgraph.git","svn_url":"https://github.com/taskgraph/taskgraph","homepage":"","size":19699,"stargazers_count":49,"watchers_count":49,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":12,"forks":12,"open_issues":12,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121"},"html":{"href":"https://github.com/taskgraph/taskgraph/pull/121"},"issue":{"href":"https://api.github.com/repos/taskgraph/taskgraph/issues/121"},"comments":{"href":"https://api.github.com/repos/taskgraph/taskgraph/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/taskgraph/taskgraph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskgraph/taskgraph/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/taskgraph/taskgraph/statuses/0003dc4f3b8a1816d47ca5c7b562d443f3a05392"}}}}