{"action":"closed","number":57033,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57033","id":157519677,"node_id":"MDExOlB1bGxSZXF1ZXN0MTU3NTE5Njc3","html_url":"https://github.com/kubernetes/kubernetes/pull/57033","diff_url":"https://github.com/kubernetes/kubernetes/pull/57033.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/57033.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57033","number":57033,"state":"closed","locked":false,"title":"Refactor calculate inter pod affinity priority function","user":{"login":"guangxuli","id":17472298,"node_id":"MDQ6VXNlcjE3NDcyMjk4","avatar_url":"https://avatars2.githubusercontent.com/u/17472298?v=4","gravatar_id":"","url":"https://api.github.com/users/guangxuli","html_url":"https://github.com/guangxuli","followers_url":"https://api.github.com/users/guangxuli/followers","following_url":"https://api.github.com/users/guangxuli/following{/other_user}","gists_url":"https://api.github.com/users/guangxuli/gists{/gist_id}","starred_url":"https://api.github.com/users/guangxuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangxuli/subscriptions","organizations_url":"https://api.github.com/users/guangxuli/orgs","repos_url":"https://api.github.com/users/guangxuli/repos","events_url":"https://api.github.com/users/guangxuli/events{/privacy}","received_events_url":"https://api.github.com/users/guangxuli/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\nRef #24246. exactly ref https://github.com/kubernetes/kubernetes/issues/51455, the PR aim to unify priority functions(deprecated) by using map/reduce pattern. \r\nPrevious related PR is https://github.com/kubernetes/kubernetes/pull/51192 (merged)\r\nPrevious related PR is https://github.com/kubernetes/kubernetes/pull/56317 (merged)\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nThis is the last PR to fix  issue #24246 or  #51455\r\n\r\n**Special notes for your reviewer**:\r\n1) use a global/public data place to save the node score since each node not only computes its own score, and after run Reduce function we will cleanup/reinit the global/public data pointer.\r\n2) change `HostPriorityList `from **slice struct** to **slice \\*struct**,  this is  because we can't get the raw correct score for each node  until all nodes finished computing process(Map). exactly at [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/core/generic_scheduler.go#L561)\r\n3. add the filtered node list to priority meta data.\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nNone\r\n\r\n```\r\n\r\n  ","created_at":"2017-12-11T09:59:46Z","updated_at":"2018-07-09T10:32:37Z","closed_at":"2018-07-09T10:32:37Z","merged_at":null,"merge_commit_sha":"c4e8f83dbd3e04d2f9738b9f2d68a32d31065ef8","assignee":{"login":"wojtek-t","id":10743879,"node_id":"MDQ6VXNlcjEwNzQzODc5","avatar_url":"https://avatars3.githubusercontent.com/u/10743879?v=4","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"assignees":[{"login":"wojtek-t","id":10743879,"node_id":"MDQ6VXNlcjEwNzQzODc5","avatar_url":"https://avatars3.githubusercontent.com/u/10743879?v=4","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},{"login":"bsalamat","id":14308438,"node_id":"MDQ6VXNlcjE0MzA4NDM4","avatar_url":"https://avatars3.githubusercontent.com/u/14308438?v=4","gravatar_id":"","url":"https://api.github.com/users/bsalamat","html_url":"https://github.com/bsalamat","followers_url":"https://api.github.com/users/bsalamat/followers","following_url":"https://api.github.com/users/bsalamat/following{/other_user}","gists_url":"https://api.github.com/users/bsalamat/gists{/gist_id}","starred_url":"https://api.github.com/users/bsalamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsalamat/subscriptions","organizations_url":"https://api.github.com/users/bsalamat/orgs","repos_url":"https://api.github.com/users/bsalamat/repos","events_url":"https://api.github.com/users/bsalamat/events{/privacy}","received_events_url":"https://api.github.com/users/bsalamat/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":477397086,"node_id":"MDU6TGFiZWw0NzczOTcwODY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":778118402,"node_id":"MDU6TGFiZWw3NzgxMTg0MDI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lifecycle/rotten","name":"lifecycle/rotten","color":"604460","default":false},{"id":240247879,"node_id":"MDU6TGFiZWwyNDAyNDc4Nzk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD","default":false},{"id":349530249,"node_id":"MDU6TGFiZWwzNDk1MzAyNDk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":125550211,"node_id":"MDU6TGFiZWwxMjU1NTAyMTE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/scheduling","name":"sig/scheduling","color":"d2b48c","default":false},{"id":253451057,"node_id":"MDU6TGFiZWwyNTM0NTEwNTc=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XL","name":"size/XL","color":"ee5500","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57033/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57033/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/57033/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/3e3b9eff5aaa9136a4a1d382e9d12998efee7522","head":{"label":"guangxuli:refactor_CalculateInterPodAffinityPriority","ref":"refactor_CalculateInterPodAffinityPriority","sha":"3e3b9eff5aaa9136a4a1d382e9d12998efee7522","user":{"login":"guangxuli","id":17472298,"node_id":"MDQ6VXNlcjE3NDcyMjk4","avatar_url":"https://avatars2.githubusercontent.com/u/17472298?v=4","gravatar_id":"","url":"https://api.github.com/users/guangxuli","html_url":"https://github.com/guangxuli","followers_url":"https://api.github.com/users/guangxuli/followers","following_url":"https://api.github.com/users/guangxuli/following{/other_user}","gists_url":"https://api.github.com/users/guangxuli/gists{/gist_id}","starred_url":"https://api.github.com/users/guangxuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangxuli/subscriptions","organizations_url":"https://api.github.com/users/guangxuli/orgs","repos_url":"https://api.github.com/users/guangxuli/repos","events_url":"https://api.github.com/users/guangxuli/events{/privacy}","received_events_url":"https://api.github.com/users/guangxuli/received_events","type":"User","site_admin":false},"repo":{"id":64767317,"node_id":"MDEwOlJlcG9zaXRvcnk2NDc2NzMxNw==","name":"kubernetes","full_name":"guangxuli/kubernetes","owner":{"login":"guangxuli","id":17472298,"node_id":"MDQ6VXNlcjE3NDcyMjk4","avatar_url":"https://avatars2.githubusercontent.com/u/17472298?v=4","gravatar_id":"","url":"https://api.github.com/users/guangxuli","html_url":"https://github.com/guangxuli","followers_url":"https://api.github.com/users/guangxuli/followers","following_url":"https://api.github.com/users/guangxuli/following{/other_user}","gists_url":"https://api.github.com/users/guangxuli/gists{/gist_id}","starred_url":"https://api.github.com/users/guangxuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangxuli/subscriptions","organizations_url":"https://api.github.com/users/guangxuli/orgs","repos_url":"https://api.github.com/users/guangxuli/repos","events_url":"https://api.github.com/users/guangxuli/events{/privacy}","received_events_url":"https://api.github.com/users/guangxuli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guangxuli/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/guangxuli/kubernetes","forks_url":"https://api.github.com/repos/guangxuli/kubernetes/forks","keys_url":"https://api.github.com/repos/guangxuli/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guangxuli/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guangxuli/kubernetes/teams","hooks_url":"https://api.github.com/repos/guangxuli/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/guangxuli/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/guangxuli/kubernetes/events","assignees_url":"https://api.github.com/repos/guangxuli/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/guangxuli/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/guangxuli/kubernetes/tags","blobs_url":"https://api.github.com/repos/guangxuli/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guangxuli/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guangxuli/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/guangxuli/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guangxuli/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/guangxuli/kubernetes/languages","stargazers_url":"https://api.github.com/repos/guangxuli/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/guangxuli/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/guangxuli/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/guangxuli/kubernetes/subscription","commits_url":"https://api.github.com/repos/guangxuli/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/guangxuli/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/guangxuli/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/guangxuli/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/guangxuli/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/guangxuli/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guangxuli/kubernetes/merges","archive_url":"https://api.github.com/repos/guangxuli/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guangxuli/kubernetes/downloads","issues_url":"https://api.github.com/repos/guangxuli/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/guangxuli/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/guangxuli/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/guangxuli/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guangxuli/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/guangxuli/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/guangxuli/kubernetes/deployments","created_at":"2016-08-02T15:10:16Z","updated_at":"2016-11-25T00:31:20Z","pushed_at":"2018-03-01T05:51:51Z","git_url":"git://github.com/guangxuli/kubernetes.git","ssh_url":"git@github.com:guangxuli/kubernetes.git","clone_url":"https://github.com/guangxuli/kubernetes.git","svn_url":"https://github.com/guangxuli/kubernetes","homepage":"http://kubernetes.io","size":530556,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"2476aa410b68d10bc49b55ba2dbfe6fde23b8cca","user":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"node_id":"MDEwOlJlcG9zaXRvcnkyMDU4MDQ5OA==","name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2018-07-09T10:29:08Z","pushed_at":"2018-07-09T10:05:10Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":791416,"stargazers_count":38495,"watchers_count":38495,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13466,"mirror_url":null,"archived":false,"open_issues_count":3103,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13466,"open_issues":3103,"watchers":38495,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57033"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/57033"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/57033"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/57033/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57033/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/57033/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/3e3b9eff5aaa9136a4a1d382e9d12998efee7522"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":18,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":386,"deletions":245,"changed_files":35}}
{"actor":{"display_login":"k8s-ci-robot"}}