{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/69765973","id":69765973,"diff_hunk":"@@ -4145,88 +4034,7 @@ func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) {\n \tsyncAndVerifyPodDir(t, testKubelet, pods, []*api.Pod{apiPod}, false)\n }\n \n-func TestCleanupBandwidthLimits(t *testing.T) {\n-\ttestPod := func(name, ingress string) *api.Pod {\n-\t\tpod := podWithUidNameNs(\"\", name, \"\")\n-\n-\t\tif len(ingress) != 0 {\n-\t\t\tpod.Annotations[\"kubernetes.io/ingress-bandwidth\"] = ingress\n-\t\t}\n-\n-\t\treturn pod\n-\t}\n-\n-\t// TODO(random-liu): We removed the test case for pod status not cached here. We should add a higher\n-\t// layer status getter function and test that function instead.\n-\ttests := []struct {\n-\t\tstatus           *api.PodStatus\n-\t\tpods             []*api.Pod\n-\t\tinputCIDRs       []string\n-\t\texpectResetCIDRs []string\n-\t\tname             string\n-\t}{\n-\t\t{\n-\t\t\tstatus: &api.PodStatus{\n-\t\t\t\tPodIP: \"1.2.3.4\",\n-\t\t\t\tPhase: api.PodRunning,\n-\t\t\t},\n-\t\t\tpods: []*api.Pod{\n-\t\t\t\ttestPod(\"foo\", \"10M\"),\n-\t\t\t\ttestPod(\"bar\", \"\"),\n-\t\t\t},\n-\t\t\tinputCIDRs:       []string{\"1.2.3.4/32\", \"2.3.4.5/32\", \"5.6.7.8/32\"},\n-\t\t\texpectResetCIDRs: []string{\"2.3.4.5/32\", \"5.6.7.8/32\"},\n-\t\t\tname:             \"pod running\",\n-\t\t},\n-\t\t{\n-\t\t\tstatus: &api.PodStatus{\n-\t\t\t\tPodIP: \"1.2.3.4\",\n-\t\t\t\tPhase: api.PodFailed,\n-\t\t\t},\n-\t\t\tpods: []*api.Pod{\n-\t\t\t\ttestPod(\"foo\", \"10M\"),\n-\t\t\t\ttestPod(\"bar\", \"\"),\n-\t\t\t},\n-\t\t\tinputCIDRs:       []string{\"1.2.3.4/32\", \"2.3.4.5/32\", \"5.6.7.8/32\"},\n-\t\t\texpectResetCIDRs: []string{\"1.2.3.4/32\", \"2.3.4.5/32\", \"5.6.7.8/32\"},\n-\t\t\tname:             \"pod not running\",\n-\t\t},\n-\t\t{\n-\t\t\tstatus: &api.PodStatus{\n-\t\t\t\tPodIP: \"1.2.3.4\",\n-\t\t\t\tPhase: api.PodFailed,\n-\t\t\t},\n-\t\t\tpods: []*api.Pod{\n-\t\t\t\ttestPod(\"foo\", \"\"),\n-\t\t\t\ttestPod(\"bar\", \"\"),\n-\t\t\t},\n-\t\t\tinputCIDRs:       []string{\"1.2.3.4/32\", \"2.3.4.5/32\", \"5.6.7.8/32\"},\n-\t\t\texpectResetCIDRs: []string{\"1.2.3.4/32\", \"2.3.4.5/32\", \"5.6.7.8/32\"},\n-\t\t\tname:             \"no bandwidth limits\",\n-\t\t},\n-\t}\n-\tfor _, test := range tests {\n-\t\tshaper := &bandwidth.FakeShaper{\n-\t\t\tCIDRs: test.inputCIDRs,\n-\t\t}\n-\n-\t\ttestKube := newTestKubelet(t, false /* controllerAttachDetachEnabled */)\n-\t\ttestKube.kubelet.shaper = shaper\n-\n-\t\tfor _, pod := range test.pods {\n-\t\t\ttestKube.kubelet.statusManager.SetPodStatus(pod, *test.status)\n-\t\t}\n-\n-\t\terr := testKube.kubelet.cleanupBandwidthLimits(test.pods)\n-\t\tif err != nil {\n-\t\t\tt.Errorf(\"unexpected error: %v (%s)\", test.name, err)\n-\t\t}\n-\t\tif !reflect.DeepEqual(shaper.ResetCIDRs, test.expectResetCIDRs) {\n-\t\t\tt.Errorf(\"[%s]\\nexpected: %v, saw: %v\", test.name, test.expectResetCIDRs, shaper.ResetCIDRs)\n-\t\t}\n-\t}\n-}\n-\n+// TODO: why is this here and not in the bandwidth package?","path":"pkg/kubelet/kubelet_test.go","position":218,"original_position":218,"commit_id":"9d1b4239774a4ebcb62342d25e745020edc9e6d6","original_commit_id":"9d1b4239774a4ebcb62342d25e745020edc9e6d6","user":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"body":"+1 for moving `TestExtractBandwidthResources` to the bandwidth package","created_at":"2016-07-06T16:38:12Z","updated_at":"2016-07-06T16:38:12Z","html_url":"https://github.com/kubernetes/kubernetes/pull/28511#discussion_r69765973","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/69765973"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/28511#discussion_r69765973"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511","id":76348480,"html_url":"https://github.com/kubernetes/kubernetes/pull/28511","diff_url":"https://github.com/kubernetes/kubernetes/pull/28511.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/28511.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/28511","number":28511,"state":"open","locked":false,"title":"Extract kubelet network code into its own file","user":{"login":"pmorie","id":366488,"avatar_url":"https://avatars.githubusercontent.com/u/366488?v=3","gravatar_id":"","url":"https://api.github.com/users/pmorie","html_url":"https://github.com/pmorie","followers_url":"https://api.github.com/users/pmorie/followers","following_url":"https://api.github.com/users/pmorie/following{/other_user}","gists_url":"https://api.github.com/users/pmorie/gists{/gist_id}","starred_url":"https://api.github.com/users/pmorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmorie/subscriptions","organizations_url":"https://api.github.com/users/pmorie/orgs","repos_url":"https://api.github.com/users/pmorie/repos","events_url":"https://api.github.com/users/pmorie/events{/privacy}","received_events_url":"https://api.github.com/users/pmorie/received_events","type":"User","site_admin":false},"body":"Continuing the effort to begin modularizing the kubelet, this PR extracts the networking code into its own file.\r\n\r\n@kubernetes/sig-node cc @kubernetes/sig-network ","created_at":"2016-07-05T21:46:05Z","updated_at":"2016-07-06T16:38:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5858c9609cd27a5b2fcb6c9ff7619a8e95b91f8e","assignee":{"login":"freehan","id":1332699,"avatar_url":"https://avatars.githubusercontent.com/u/1332699?v=3","gravatar_id":"","url":"https://api.github.com/users/freehan","html_url":"https://github.com/freehan","followers_url":"https://api.github.com/users/freehan/followers","following_url":"https://api.github.com/users/freehan/following{/other_user}","gists_url":"https://api.github.com/users/freehan/gists{/gist_id}","starred_url":"https://api.github.com/users/freehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freehan/subscriptions","organizations_url":"https://api.github.com/users/freehan/orgs","repos_url":"https://api.github.com/users/freehan/repos","events_url":"https://api.github.com/users/freehan/events{/privacy}","received_events_url":"https://api.github.com/users/freehan/received_events","type":"User","site_admin":false},"assignees":[{"login":"freehan","id":1332699,"avatar_url":"https://avatars.githubusercontent.com/u/1332699?v=3","gravatar_id":"","url":"https://api.github.com/users/freehan","html_url":"https://github.com/freehan","followers_url":"https://api.github.com/users/freehan/followers","following_url":"https://api.github.com/users/freehan/following{/other_user}","gists_url":"https://api.github.com/users/freehan/gists{/gist_id}","starred_url":"https://api.github.com/users/freehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freehan/subscriptions","organizations_url":"https://api.github.com/users/freehan/orgs","repos_url":"https://api.github.com/users/freehan/repos","events_url":"https://api.github.com/users/freehan/events{/privacy}","received_events_url":"https://api.github.com/users/freehan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/28511/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/9d1b4239774a4ebcb62342d25e745020edc9e6d6","head":{"label":"pmorie:kubelet-move","ref":"kubelet-move","sha":"9d1b4239774a4ebcb62342d25e745020edc9e6d6","user":{"login":"pmorie","id":366488,"avatar_url":"https://avatars.githubusercontent.com/u/366488?v=3","gravatar_id":"","url":"https://api.github.com/users/pmorie","html_url":"https://github.com/pmorie","followers_url":"https://api.github.com/users/pmorie/followers","following_url":"https://api.github.com/users/pmorie/following{/other_user}","gists_url":"https://api.github.com/users/pmorie/gists{/gist_id}","starred_url":"https://api.github.com/users/pmorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmorie/subscriptions","organizations_url":"https://api.github.com/users/pmorie/orgs","repos_url":"https://api.github.com/users/pmorie/repos","events_url":"https://api.github.com/users/pmorie/events{/privacy}","received_events_url":"https://api.github.com/users/pmorie/received_events","type":"User","site_admin":false},"repo":{"id":21654452,"name":"kubernetes","full_name":"pmorie/kubernetes","owner":{"login":"pmorie","id":366488,"avatar_url":"https://avatars.githubusercontent.com/u/366488?v=3","gravatar_id":"","url":"https://api.github.com/users/pmorie","html_url":"https://github.com/pmorie","followers_url":"https://api.github.com/users/pmorie/followers","following_url":"https://api.github.com/users/pmorie/following{/other_user}","gists_url":"https://api.github.com/users/pmorie/gists{/gist_id}","starred_url":"https://api.github.com/users/pmorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmorie/subscriptions","organizations_url":"https://api.github.com/users/pmorie/orgs","repos_url":"https://api.github.com/users/pmorie/repos","events_url":"https://api.github.com/users/pmorie/events{/privacy}","received_events_url":"https://api.github.com/users/pmorie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pmorie/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/pmorie/kubernetes","forks_url":"https://api.github.com/repos/pmorie/kubernetes/forks","keys_url":"https://api.github.com/repos/pmorie/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmorie/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmorie/kubernetes/teams","hooks_url":"https://api.github.com/repos/pmorie/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/pmorie/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/pmorie/kubernetes/events","assignees_url":"https://api.github.com/repos/pmorie/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/pmorie/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/pmorie/kubernetes/tags","blobs_url":"https://api.github.com/repos/pmorie/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmorie/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmorie/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmorie/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmorie/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/pmorie/kubernetes/languages","stargazers_url":"https://api.github.com/repos/pmorie/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/pmorie/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/pmorie/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/pmorie/kubernetes/subscription","commits_url":"https://api.github.com/repos/pmorie/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmorie/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmorie/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmorie/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmorie/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/pmorie/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmorie/kubernetes/merges","archive_url":"https://api.github.com/repos/pmorie/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmorie/kubernetes/downloads","issues_url":"https://api.github.com/repos/pmorie/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/pmorie/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/pmorie/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/pmorie/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmorie/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/pmorie/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/pmorie/kubernetes/deployments","created_at":"2014-07-09T14:06:25Z","updated_at":"2016-01-13T15:26:09Z","pushed_at":"2016-07-05T21:44:16Z","git_url":"git://github.com/pmorie/kubernetes.git","ssh_url":"git@github.com:pmorie/kubernetes.git","clone_url":"https://github.com/pmorie/kubernetes.git","svn_url":"https://github.com/pmorie/kubernetes","homepage":null,"size":272763,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"5e7c309b29280bef441800953a33a6468a0dc0c4","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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":"2016-07-06T16:31:57Z","pushed_at":"2016-07-06T16:34:58Z","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":487602,"stargazers_count":15339,"watchers_count":15339,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4788,"mirror_url":null,"open_issues_count":3841,"forks":4788,"open_issues":3841,"watchers":15339,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/28511"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/28511"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/28511/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/28511/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/9d1b4239774a4ebcb62342d25e745020edc9e6d6"}}}}
{"actor":{"display_login":"yujuhong"}}