{"action":"created","comment":{"url":"https://api.github.com/repos/alibaba/pouch/pulls/comments/194636495","pull_request_review_id":127843616,"id":194636495,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDYzNjQ5NQ==","diff_hunk":"@@ -689,7 +689,27 @@ func (c *CriManager) ListContainerStats(ctx context.Context, r *runtime.ListCont\n \n // UpdateContainerResources updates ContainerConfig of the container.\n func (c *CriManager) UpdateContainerResources(ctx context.Context, r *runtime.UpdateContainerResourcesRequest) (*runtime.UpdateContainerResourcesResponse, error) {\n-\treturn nil, fmt.Errorf(\"UpdateContainerResources Not Implemented Yet\")\n+\tcontainerID := r.GetContainerId()\n+\tcontainer, err := c.ContainerMgr.Get(ctx, containerID)\n+\tif err != nil {\n+\t\treturn nil, fmt.Errorf(\"failed to get container of %q: %v\", containerID, err)\n+\t}\n+\n+\t// Do not update the container when there is a removal in progress.\n+\tif container.State.Status == apitypes.StatusRemoving {\n+\t\treturn nil, fmt.Errorf(\"container %q is in removing state\", containerID)\n+\t}\n+\n+\tresources, err := resourceToCriResource(r.GetLinux())\n+\tupdateConfig := &apitypes.UpdateConfig{\n+\t\tResources: resources,\n+\t}\n+\tc.ContainerMgr.Update(ctx, containerID, updateConfig)\n+\tif err != nil {","path":"cri/v1alpha1/cri.go","position":21,"original_position":21,"commit_id":"e34916b943a8a2a3e79e7a3478b8bed5c16c0b80","original_commit_id":"e34916b943a8a2a3e79e7a3478b8bed5c16c0b80","user":{"login":"allencloud","id":9465626,"node_id":"MDQ6VXNlcjk0NjU2MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/9465626?v=4","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"body":"Which err this line code is using? From `resources, err := resourceToCriResource(r.GetLinux())` or `c.ContainerMgr.Update(ctx, containerID, updateConfig)`?\r\n\r\nIf it is the latter one, please add more to be `err = c.ContainerMgr.Update(ctx, containerID, updateConfig)`, and in the next line of `fmt.Errorf()` to construct this with the specific error. Thanks a lot.","created_at":"2018-06-12T07:21:06Z","updated_at":"2018-06-12T07:21:06Z","html_url":"https://github.com/alibaba/pouch/pull/1511#discussion_r194636495","pull_request_url":"https://api.github.com/repos/alibaba/pouch/pulls/1511","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/comments/194636495"},"html":{"href":"https://github.com/alibaba/pouch/pull/1511#discussion_r194636495"},"pull_request":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/1511"}}},"pull_request":{"url":"https://api.github.com/repos/alibaba/pouch/pulls/1511","id":194156463,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MTU2NDYz","html_url":"https://github.com/alibaba/pouch/pull/1511","diff_url":"https://github.com/alibaba/pouch/pull/1511.diff","patch_url":"https://github.com/alibaba/pouch/pull/1511.patch","issue_url":"https://api.github.com/repos/alibaba/pouch/issues/1511","number":1511,"state":"open","locked":false,"title":"[WIP] feature: UpdateContainerResources of CRI Manager","user":{"login":"Starnop","id":31209634,"node_id":"MDQ6VXNlcjMxMjA5NjM0","avatar_url":"https://avatars2.githubusercontent.com/u/31209634?v=4","gravatar_id":"","url":"https://api.github.com/users/Starnop","html_url":"https://github.com/Starnop","followers_url":"https://api.github.com/users/Starnop/followers","following_url":"https://api.github.com/users/Starnop/following{/other_user}","gists_url":"https://api.github.com/users/Starnop/gists{/gist_id}","starred_url":"https://api.github.com/users/Starnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Starnop/subscriptions","organizations_url":"https://api.github.com/users/Starnop/orgs","repos_url":"https://api.github.com/users/Starnop/repos","events_url":"https://api.github.com/users/Starnop/events{/privacy}","received_events_url":"https://api.github.com/users/Starnop/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Starnop <starnop@163.com>\r\n\r\n<!-- \r\nPlease make sure you have read and understood the contributing guidelines;\r\nhttps://github.com/alibaba/pouch/blob/master/CONTRIBUTING.md -->\r\n\r\n### Ⅰ. Describe what this PR did\r\nadd feature: UpdateContainerResources of CRI Manager\r\n\r\n### Ⅱ. Does this pull request fix one issue?\r\n<!--If that, add \"fixes #xxxx\" below in the next line, for example, fixes #15. Otherwise, add \"NONE\" -->\r\nNone\r\n\r\n### Ⅲ. Describe how you did it\r\n\r\n\r\n### Ⅳ. Describe how to verify it\r\n\r\n\r\n### Ⅴ. Special notes for reviews\r\n\r\n\r\n","created_at":"2018-06-12T03:23:06Z","updated_at":"2018-06-12T07:21:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a04cf572fed0096e2324ab2b751a883123f8f23","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":722348097,"node_id":"MDU6TGFiZWw3MjIzNDgwOTc=","url":"https://api.github.com/repos/alibaba/pouch/labels/kind/feature","name":"kind/feature","color":"1d76db","default":false},{"id":729586101,"node_id":"MDU6TGFiZWw3Mjk1ODYxMDE=","url":"https://api.github.com/repos/alibaba/pouch/labels/size/M","name":"size/M","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/alibaba/pouch/pulls/1511/commits","review_comments_url":"https://api.github.com/repos/alibaba/pouch/pulls/1511/comments","review_comment_url":"https://api.github.com/repos/alibaba/pouch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alibaba/pouch/issues/1511/comments","statuses_url":"https://api.github.com/repos/alibaba/pouch/statuses/e34916b943a8a2a3e79e7a3478b8bed5c16c0b80","head":{"label":"Starnop:cri-update","ref":"cri-update","sha":"e34916b943a8a2a3e79e7a3478b8bed5c16c0b80","user":{"login":"Starnop","id":31209634,"node_id":"MDQ6VXNlcjMxMjA5NjM0","avatar_url":"https://avatars2.githubusercontent.com/u/31209634?v=4","gravatar_id":"","url":"https://api.github.com/users/Starnop","html_url":"https://github.com/Starnop","followers_url":"https://api.github.com/users/Starnop/followers","following_url":"https://api.github.com/users/Starnop/following{/other_user}","gists_url":"https://api.github.com/users/Starnop/gists{/gist_id}","starred_url":"https://api.github.com/users/Starnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Starnop/subscriptions","organizations_url":"https://api.github.com/users/Starnop/orgs","repos_url":"https://api.github.com/users/Starnop/repos","events_url":"https://api.github.com/users/Starnop/events{/privacy}","received_events_url":"https://api.github.com/users/Starnop/received_events","type":"User","site_admin":false},"repo":{"id":128589385,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg1ODkzODU=","name":"pouch","full_name":"Starnop/pouch","owner":{"login":"Starnop","id":31209634,"node_id":"MDQ6VXNlcjMxMjA5NjM0","avatar_url":"https://avatars2.githubusercontent.com/u/31209634?v=4","gravatar_id":"","url":"https://api.github.com/users/Starnop","html_url":"https://github.com/Starnop","followers_url":"https://api.github.com/users/Starnop/followers","following_url":"https://api.github.com/users/Starnop/following{/other_user}","gists_url":"https://api.github.com/users/Starnop/gists{/gist_id}","starred_url":"https://api.github.com/users/Starnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Starnop/subscriptions","organizations_url":"https://api.github.com/users/Starnop/orgs","repos_url":"https://api.github.com/users/Starnop/repos","events_url":"https://api.github.com/users/Starnop/events{/privacy}","received_events_url":"https://api.github.com/users/Starnop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Starnop/pouch","description":"Pouch is an open-source project created to promote the container technology movement.","fork":true,"url":"https://api.github.com/repos/Starnop/pouch","forks_url":"https://api.github.com/repos/Starnop/pouch/forks","keys_url":"https://api.github.com/repos/Starnop/pouch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Starnop/pouch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Starnop/pouch/teams","hooks_url":"https://api.github.com/repos/Starnop/pouch/hooks","issue_events_url":"https://api.github.com/repos/Starnop/pouch/issues/events{/number}","events_url":"https://api.github.com/repos/Starnop/pouch/events","assignees_url":"https://api.github.com/repos/Starnop/pouch/assignees{/user}","branches_url":"https://api.github.com/repos/Starnop/pouch/branches{/branch}","tags_url":"https://api.github.com/repos/Starnop/pouch/tags","blobs_url":"https://api.github.com/repos/Starnop/pouch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Starnop/pouch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Starnop/pouch/git/refs{/sha}","trees_url":"https://api.github.com/repos/Starnop/pouch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Starnop/pouch/statuses/{sha}","languages_url":"https://api.github.com/repos/Starnop/pouch/languages","stargazers_url":"https://api.github.com/repos/Starnop/pouch/stargazers","contributors_url":"https://api.github.com/repos/Starnop/pouch/contributors","subscribers_url":"https://api.github.com/repos/Starnop/pouch/subscribers","subscription_url":"https://api.github.com/repos/Starnop/pouch/subscription","commits_url":"https://api.github.com/repos/Starnop/pouch/commits{/sha}","git_commits_url":"https://api.github.com/repos/Starnop/pouch/git/commits{/sha}","comments_url":"https://api.github.com/repos/Starnop/pouch/comments{/number}","issue_comment_url":"https://api.github.com/repos/Starnop/pouch/issues/comments{/number}","contents_url":"https://api.github.com/repos/Starnop/pouch/contents/{+path}","compare_url":"https://api.github.com/repos/Starnop/pouch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Starnop/pouch/merges","archive_url":"https://api.github.com/repos/Starnop/pouch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Starnop/pouch/downloads","issues_url":"https://api.github.com/repos/Starnop/pouch/issues{/number}","pulls_url":"https://api.github.com/repos/Starnop/pouch/pulls{/number}","milestones_url":"https://api.github.com/repos/Starnop/pouch/milestones{/number}","notifications_url":"https://api.github.com/repos/Starnop/pouch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Starnop/pouch/labels{/name}","releases_url":"https://api.github.com/repos/Starnop/pouch/releases{/id}","deployments_url":"https://api.github.com/repos/Starnop/pouch/deployments","created_at":"2018-04-08T02:38:51Z","updated_at":"2018-06-12T05:14:13Z","pushed_at":"2018-06-12T05:22:49Z","git_url":"git://github.com/Starnop/pouch.git","ssh_url":"git@github.com:Starnop/pouch.git","clone_url":"https://github.com/Starnop/pouch.git","svn_url":"https://github.com/Starnop/pouch","homepage":"","size":11726,"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":"alibaba:master","ref":"master","sha":"2f74f2249edffd0a24ff90f6bf278e5dac151593","user":{"login":"alibaba","id":1961952,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjE5NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1961952?v=4","gravatar_id":"","url":"https://api.github.com/users/alibaba","html_url":"https://github.com/alibaba","followers_url":"https://api.github.com/users/alibaba/followers","following_url":"https://api.github.com/users/alibaba/following{/other_user}","gists_url":"https://api.github.com/users/alibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/alibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alibaba/subscriptions","organizations_url":"https://api.github.com/users/alibaba/orgs","repos_url":"https://api.github.com/users/alibaba/repos","events_url":"https://api.github.com/users/alibaba/events{/privacy}","received_events_url":"https://api.github.com/users/alibaba/received_events","type":"Organization","site_admin":false},"repo":{"id":102555965,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI1NTU5NjU=","name":"pouch","full_name":"alibaba/pouch","owner":{"login":"alibaba","id":1961952,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjE5NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1961952?v=4","gravatar_id":"","url":"https://api.github.com/users/alibaba","html_url":"https://github.com/alibaba","followers_url":"https://api.github.com/users/alibaba/followers","following_url":"https://api.github.com/users/alibaba/following{/other_user}","gists_url":"https://api.github.com/users/alibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/alibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alibaba/subscriptions","organizations_url":"https://api.github.com/users/alibaba/orgs","repos_url":"https://api.github.com/users/alibaba/repos","events_url":"https://api.github.com/users/alibaba/events{/privacy}","received_events_url":"https://api.github.com/users/alibaba/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alibaba/pouch","description":"Pouch is an open-source project created to promote the container technology movement.","fork":false,"url":"https://api.github.com/repos/alibaba/pouch","forks_url":"https://api.github.com/repos/alibaba/pouch/forks","keys_url":"https://api.github.com/repos/alibaba/pouch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alibaba/pouch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alibaba/pouch/teams","hooks_url":"https://api.github.com/repos/alibaba/pouch/hooks","issue_events_url":"https://api.github.com/repos/alibaba/pouch/issues/events{/number}","events_url":"https://api.github.com/repos/alibaba/pouch/events","assignees_url":"https://api.github.com/repos/alibaba/pouch/assignees{/user}","branches_url":"https://api.github.com/repos/alibaba/pouch/branches{/branch}","tags_url":"https://api.github.com/repos/alibaba/pouch/tags","blobs_url":"https://api.github.com/repos/alibaba/pouch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alibaba/pouch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alibaba/pouch/git/refs{/sha}","trees_url":"https://api.github.com/repos/alibaba/pouch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alibaba/pouch/statuses/{sha}","languages_url":"https://api.github.com/repos/alibaba/pouch/languages","stargazers_url":"https://api.github.com/repos/alibaba/pouch/stargazers","contributors_url":"https://api.github.com/repos/alibaba/pouch/contributors","subscribers_url":"https://api.github.com/repos/alibaba/pouch/subscribers","subscription_url":"https://api.github.com/repos/alibaba/pouch/subscription","commits_url":"https://api.github.com/repos/alibaba/pouch/commits{/sha}","git_commits_url":"https://api.github.com/repos/alibaba/pouch/git/commits{/sha}","comments_url":"https://api.github.com/repos/alibaba/pouch/comments{/number}","issue_comment_url":"https://api.github.com/repos/alibaba/pouch/issues/comments{/number}","contents_url":"https://api.github.com/repos/alibaba/pouch/contents/{+path}","compare_url":"https://api.github.com/repos/alibaba/pouch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alibaba/pouch/merges","archive_url":"https://api.github.com/repos/alibaba/pouch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alibaba/pouch/downloads","issues_url":"https://api.github.com/repos/alibaba/pouch/issues{/number}","pulls_url":"https://api.github.com/repos/alibaba/pouch/pulls{/number}","milestones_url":"https://api.github.com/repos/alibaba/pouch/milestones{/number}","notifications_url":"https://api.github.com/repos/alibaba/pouch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alibaba/pouch/labels{/name}","releases_url":"https://api.github.com/repos/alibaba/pouch/releases{/id}","deployments_url":"https://api.github.com/repos/alibaba/pouch/deployments","created_at":"2017-09-06T03:01:51Z","updated_at":"2018-06-12T05:57:10Z","pushed_at":"2018-06-12T07:15:38Z","git_url":"git://github.com/alibaba/pouch.git","ssh_url":"git@github.com:alibaba/pouch.git","clone_url":"https://github.com/alibaba/pouch.git","svn_url":"https://github.com/alibaba/pouch","homepage":"","size":11606,"stargazers_count":2673,"watchers_count":2673,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":491,"mirror_url":null,"archived":false,"open_issues_count":139,"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":491,"open_issues":139,"watchers":2673,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/1511"},"html":{"href":"https://github.com/alibaba/pouch/pull/1511"},"issue":{"href":"https://api.github.com/repos/alibaba/pouch/issues/1511"},"comments":{"href":"https://api.github.com/repos/alibaba/pouch/issues/1511/comments"},"review_comments":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/1511/comments"},"review_comment":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/1511/commits"},"statuses":{"href":"https://api.github.com/repos/alibaba/pouch/statuses/e34916b943a8a2a3e79e7a3478b8bed5c16c0b80"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"allencloud"}}