GitHub PullRequestReviewCommentEvent at 2014-06-20 04:02:54
Repository: kubernetes
Actor: brendandburns
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/14006354","id":14006354,"diff_hunk":"@@ -643,3 +650,46 @@ func (kl *Kubelet) GetContainerInfo(name string) (string, error) {\n \tdata, err := json.Marshal(info)\n \treturn string(data), err\n }\n+\n+func (kl *Kubelet) GetContainerStats(name string) (*api.ContainerStats, error) {\n+\tif kl.CadvisorClient == nil {\n+\t\treturn nil, nil\n+\t}\n+\tid, found, err := kl.GetContainerID(name)\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\tif !found {\n+\t\treturn nil, nil\n+\t}\n+\n+\tpath := fmt.Sprintf(\"/docker/%v\", id)\n+\tinfo, err := kl.CadvisorClient.ContainerInfo(path)\n+\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\tif info.StatsPercentiles == nil {","path":"pkg/kubelet/kubelet.go","position":49,"original_position":49,"commit_id":"865ba190fff1278cc5e1f63488adf5924d98fd9a","original_commit_id":"865ba190fff1278cc5e1f63488adf5924d98fd9a","user":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?","gravatar_id":"c2ff012ca59db545fb777ea41917504c","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"body":"comment explaining what this means?  (I assume no data?)","created_at":"2014-06-20T04:02:54Z","updated_at":"2014-06-20T04:02:54Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/174#discussion_r14006354","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/14006354"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/174#discussion_r14006354"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174","id":17375157,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/174","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/174.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/174.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/174","number":174,"state":"open","title":"Letting kubelet retrieve container stats from cAdvisor","user":{"login":"monnand","id":379562,"avatar_url":"https://avatars.githubusercontent.com/u/379562?","gravatar_id":"1f261a013b6a32e6d80a3c3d7cae1586","url":"https://api.github.com/users/monnand","html_url":"https://github.com/monnand","followers_url":"https://api.github.com/users/monnand/followers","following_url":"https://api.github.com/users/monnand/following{/other_user}","gists_url":"https://api.github.com/users/monnand/gists{/gist_id}","starred_url":"https://api.github.com/users/monnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monnand/subscriptions","organizations_url":"https://api.github.com/users/monnand/orgs","repos_url":"https://api.github.com/users/monnand/repos","events_url":"https://api.github.com/users/monnand/events{/privacy}","received_events_url":"https://api.github.com/users/monnand/received_events","type":"User","site_admin":false},"body":"This PR adds a new API into the Kubelet server which could return statistical information about a container. Such information is retrieved through cAdvisor REST API.\r\n\r\nThis PR introduced the following third party dependencies:\r\n\r\n- [cAdvisor](http://github.com/google/cadvisor) because we need to use some data structure there and its client library.\r\n- [testify](https://github.com/stretchr/testify) for its mock library\r\n- [objx](https://github.com/stretchr/objx) because testify depends on it.\r\n\r\nThe test coverage now for ``pkg/kubelet`` is improved from 58.1% to 59.9%\r\n\r\nThe current code is not wired with kubelet now. Will add it in another PR.","created_at":"2014-06-19T20:49:18Z","updated_at":"2014-06-20T04:02:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0ca4b4f125fecb9ee510358606f0ac8974c32b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/174/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/865ba190fff1278cc5e1f63488adf5924d98fd9a","head":{"label":"monnand:kubelet-cadvisor","ref":"kubelet-cadvisor","sha":"865ba190fff1278cc5e1f63488adf5924d98fd9a","user":{"login":"monnand","id":379562,"avatar_url":"https://avatars.githubusercontent.com/u/379562?","gravatar_id":"1f261a013b6a32e6d80a3c3d7cae1586","url":"https://api.github.com/users/monnand","html_url":"https://github.com/monnand","followers_url":"https://api.github.com/users/monnand/followers","following_url":"https://api.github.com/users/monnand/following{/other_user}","gists_url":"https://api.github.com/users/monnand/gists{/gist_id}","starred_url":"https://api.github.com/users/monnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monnand/subscriptions","organizations_url":"https://api.github.com/users/monnand/orgs","repos_url":"https://api.github.com/users/monnand/repos","events_url":"https://api.github.com/users/monnand/events{/privacy}","received_events_url":"https://api.github.com/users/monnand/received_events","type":"User","site_admin":false},"repo":{"id":20695122,"name":"kubernetes","full_name":"monnand/kubernetes","owner":{"login":"monnand","id":379562,"avatar_url":"https://avatars.githubusercontent.com/u/379562?","gravatar_id":"1f261a013b6a32e6d80a3c3d7cae1586","url":"https://api.github.com/users/monnand","html_url":"https://github.com/monnand","followers_url":"https://api.github.com/users/monnand/followers","following_url":"https://api.github.com/users/monnand/following{/other_user}","gists_url":"https://api.github.com/users/monnand/gists{/gist_id}","starred_url":"https://api.github.com/users/monnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monnand/subscriptions","organizations_url":"https://api.github.com/users/monnand/orgs","repos_url":"https://api.github.com/users/monnand/repos","events_url":"https://api.github.com/users/monnand/events{/privacy}","received_events_url":"https://api.github.com/users/monnand/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/monnand/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/monnand/kubernetes","forks_url":"https://api.github.com/repos/monnand/kubernetes/forks","keys_url":"https://api.github.com/repos/monnand/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monnand/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monnand/kubernetes/teams","hooks_url":"https://api.github.com/repos/monnand/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/monnand/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/monnand/kubernetes/events","assignees_url":"https://api.github.com/repos/monnand/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/monnand/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/monnand/kubernetes/tags","blobs_url":"https://api.github.com/repos/monnand/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monnand/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monnand/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/monnand/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monnand/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/monnand/kubernetes/languages","stargazers_url":"https://api.github.com/repos/monnand/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/monnand/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/monnand/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/monnand/kubernetes/subscription","commits_url":"https://api.github.com/repos/monnand/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/monnand/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/monnand/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/monnand/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/monnand/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/monnand/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monnand/kubernetes/merges","archive_url":"https://api.github.com/repos/monnand/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monnand/kubernetes/downloads","issues_url":"https://api.github.com/repos/monnand/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/monnand/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/monnand/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/monnand/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monnand/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/monnand/kubernetes/releases{/id}","created_at":"2014-06-10T17:41:28Z","updated_at":"2014-06-19T22:29:02Z","pushed_at":"2014-06-19T22:29:01Z","git_url":"git://github.com/monnand/kubernetes.git","ssh_url":"git@github.com:monnand/kubernetes.git","clone_url":"https://github.com/monnand/kubernetes.git","svn_url":"https://github.com/monnand/kubernetes","homepage":null,"size":5010,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":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":"936ce13862de22ad7141dfc9850c887a39eb498e","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?","gravatar_id":"3db02c6238c8b1fb844871330744ec5d","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?","gravatar_id":"3db02c6238c8b1fb844871330744ec5d","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","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":"2014-06-20T03:57:16Z","pushed_at":"2014-06-20T03:30:43Z","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":null,"size":6818,"stargazers_count":1502,"watchers_count":1502,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":157,"mirror_url":null,"open_issues_count":42,"forks":157,"open_issues":42,"watchers":1502,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/174"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/174"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/174/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/174/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/865ba190fff1278cc5e1f63488adf5924d98fd9a"}}}}