{"action":"created","comment":{"url":"https://api.github.com/repos/moby/moby/pulls/comments/120277690","pull_request_review_id":42224341,"id":120277690,"diff_hunk":"@@ -48,7 +49,19 @@ func GetHTTPErrorStatusCode(err error) int {\n \t\t// there are errors falling back into this logic.\n \t\t// If we need to differentiate between different possible error types,\n \t\t// we should create appropriate error types that implement the httpStatusError interface.\n+\n \t\terrStr := strings.ToLower(errMsg)\n+\t\t// if the error has a type of grpc.rpcError, the error message should\n+\t\t// contain a sub string of \"rpc error: code = \"\n+\t\tif strings.Contains(errStr, \"rpc error: code = \") {","path":"api/server/httputils/errors.go","position":null,"original_position":16,"commit_id":"f257f77c6c13ee851d3b899f8d51628a5dec92db","original_commit_id":"3b5d5c40f505f290a5d55d847bdf9b5b1b23ce68","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars0.githubusercontent.com/u/9465626?v=3","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":"Thanks for your feedback. @cpuguy83   I think what you said is reasonable. Thanks a lot.\r\nWhile I think CI fails according to accident. Can you re-trigger that? @thaJeztah  ","created_at":"2017-06-06T06:57:21Z","updated_at":"2017-06-06T06:57:21Z","html_url":"https://github.com/moby/moby/pull/32122#discussion_r120277690","pull_request_url":"https://api.github.com/repos/moby/moby/pulls/32122","_links":{"self":{"href":"https://api.github.com/repos/moby/moby/pulls/comments/120277690"},"html":{"href":"https://github.com/moby/moby/pull/32122#discussion_r120277690"},"pull_request":{"href":"https://api.github.com/repos/moby/moby/pulls/32122"}}},"pull_request":{"url":"https://api.github.com/repos/moby/moby/pulls/32122","id":112670441,"html_url":"https://github.com/moby/moby/pull/32122","diff_url":"https://github.com/moby/moby/pull/32122.diff","patch_url":"https://github.com/moby/moby/pull/32122.patch","issue_url":"https://api.github.com/repos/moby/moby/issues/32122","number":32122,"state":"open","locked":false,"title":"choose rpc code to determine status code","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars0.githubusercontent.com/u/9465626?v=3","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":"Signed-off-by: allencloud <allen.sun@daocloud.io>\r\n\r\nSince docker daemon use gRPC to communicate with swarmkit, so when docker daemon accepts http request and transfers to swarmkit side, the at last, swarmkit will return a gRPC code to docker daemon. For the user's request, we definitely need to return a response with an HTTP status code. This PR hopes to determine the http status code from the gRPC code.\r\n\r\nthis fixes https://github.com/docker/docker/issues/31909\r\n\r\n**- What I did**\r\n1. choose rpc code to determine status code\r\n2. make secret operation use the correct status code. currently I only change the secret side.\r\n3. add two test cases for issue https://github.com/docker/docker/issues/31909\r\n4. update  docker-py to the version 2.3.0 in Dockerfiles\r\n \r\n\r\n**- How I did it**\r\n\r\n**- How to verify it**\r\n\r\n**- Description for the changelog**\r\n<!--\r\nWrite a short (one line) summary that describes the changes in this\r\npull request for inclusion in the changelog:\r\n-->\r\n\r\n\r\n**- A picture of a cute animal (not mandatory but encouraged)**\r\n\r\n","created_at":"2017-03-27T05:15:27Z","updated_at":"2017-06-06T06:57:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80fdbc219d3b19e72ade86f3d01ad456d9e68f01","assignee":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars1.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"assignees":[{"login":"LK4D4","id":101445,"avatar_url":"https://avatars1.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/moby/moby/milestones/69","html_url":"https://github.com/moby/moby/milestone/69","labels_url":"https://api.github.com/repos/moby/moby/milestones/69/labels","id":2444280,"number":69,"title":"17.06.0","description":"","creator":{"login":"vieux","id":1032519,"avatar_url":"https://avatars3.githubusercontent.com/u/1032519?v=3","gravatar_id":"","url":"https://api.github.com/users/vieux","html_url":"https://github.com/vieux","followers_url":"https://api.github.com/users/vieux/followers","following_url":"https://api.github.com/users/vieux/following{/other_user}","gists_url":"https://api.github.com/users/vieux/gists{/gist_id}","starred_url":"https://api.github.com/users/vieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vieux/subscriptions","organizations_url":"https://api.github.com/users/vieux/orgs","repos_url":"https://api.github.com/users/vieux/repos","events_url":"https://api.github.com/users/vieux/events{/privacy}","received_events_url":"https://api.github.com/users/vieux/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":290,"state":"open","created_at":"2017-04-07T23:27:32Z","updated_at":"2017-06-05T22:54:04Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/moby/moby/pulls/32122/commits","review_comments_url":"https://api.github.com/repos/moby/moby/pulls/32122/comments","review_comment_url":"https://api.github.com/repos/moby/moby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moby/moby/issues/32122/comments","statuses_url":"https://api.github.com/repos/moby/moby/statuses/f257f77c6c13ee851d3b899f8d51628a5dec92db","head":{"label":"allencloud:choose-rpc-code-to-determine-status-code","ref":"choose-rpc-code-to-determine-status-code","sha":"f257f77c6c13ee851d3b899f8d51628a5dec92db","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars0.githubusercontent.com/u/9465626?v=3","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},"repo":{"id":52540894,"name":"docker","full_name":"allencloud/docker","owner":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars0.githubusercontent.com/u/9465626?v=3","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},"private":false,"html_url":"https://github.com/allencloud/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/allencloud/docker","forks_url":"https://api.github.com/repos/allencloud/docker/forks","keys_url":"https://api.github.com/repos/allencloud/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allencloud/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allencloud/docker/teams","hooks_url":"https://api.github.com/repos/allencloud/docker/hooks","issue_events_url":"https://api.github.com/repos/allencloud/docker/issues/events{/number}","events_url":"https://api.github.com/repos/allencloud/docker/events","assignees_url":"https://api.github.com/repos/allencloud/docker/assignees{/user}","branches_url":"https://api.github.com/repos/allencloud/docker/branches{/branch}","tags_url":"https://api.github.com/repos/allencloud/docker/tags","blobs_url":"https://api.github.com/repos/allencloud/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allencloud/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allencloud/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/allencloud/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allencloud/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/allencloud/docker/languages","stargazers_url":"https://api.github.com/repos/allencloud/docker/stargazers","contributors_url":"https://api.github.com/repos/allencloud/docker/contributors","subscribers_url":"https://api.github.com/repos/allencloud/docker/subscribers","subscription_url":"https://api.github.com/repos/allencloud/docker/subscription","commits_url":"https://api.github.com/repos/allencloud/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/allencloud/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/allencloud/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/allencloud/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/allencloud/docker/contents/{+path}","compare_url":"https://api.github.com/repos/allencloud/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allencloud/docker/merges","archive_url":"https://api.github.com/repos/allencloud/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allencloud/docker/downloads","issues_url":"https://api.github.com/repos/allencloud/docker/issues{/number}","pulls_url":"https://api.github.com/repos/allencloud/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/allencloud/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/allencloud/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allencloud/docker/labels{/name}","releases_url":"https://api.github.com/repos/allencloud/docker/releases{/id}","deployments_url":"https://api.github.com/repos/allencloud/docker/deployments","created_at":"2016-02-25T16:46:58Z","updated_at":"2016-12-17T08:41:43Z","pushed_at":"2017-06-06T02:09:36Z","git_url":"git://github.com/allencloud/docker.git","ssh_url":"git@github.com:allencloud/docker.git","clone_url":"https://github.com/allencloud/docker.git","svn_url":"https://github.com/allencloud/docker","homepage":"http://www.docker.com","size":127462,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_projects":true,"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":2,"default_branch":"master"}},"base":{"label":"moby:master","ref":"master","sha":"c8141a1fb1ff33b2bfab85a40e5da9a282f36cdc","user":{"login":"moby","id":27259197,"avatar_url":"https://avatars2.githubusercontent.com/u/27259197?v=3","gravatar_id":"","url":"https://api.github.com/users/moby","html_url":"https://github.com/moby","followers_url":"https://api.github.com/users/moby/followers","following_url":"https://api.github.com/users/moby/following{/other_user}","gists_url":"https://api.github.com/users/moby/gists{/gist_id}","starred_url":"https://api.github.com/users/moby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moby/subscriptions","organizations_url":"https://api.github.com/users/moby/orgs","repos_url":"https://api.github.com/users/moby/repos","events_url":"https://api.github.com/users/moby/events{/privacy}","received_events_url":"https://api.github.com/users/moby/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"moby","full_name":"moby/moby","owner":{"login":"moby","id":27259197,"avatar_url":"https://avatars2.githubusercontent.com/u/27259197?v=3","gravatar_id":"","url":"https://api.github.com/users/moby","html_url":"https://github.com/moby","followers_url":"https://api.github.com/users/moby/followers","following_url":"https://api.github.com/users/moby/following{/other_user}","gists_url":"https://api.github.com/users/moby/gists{/gist_id}","starred_url":"https://api.github.com/users/moby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moby/subscriptions","organizations_url":"https://api.github.com/users/moby/orgs","repos_url":"https://api.github.com/users/moby/repos","events_url":"https://api.github.com/users/moby/events{/privacy}","received_events_url":"https://api.github.com/users/moby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moby/moby","description":"Moby Project - a collaborative project for the container ecosystem to assemble container-based systems","fork":false,"url":"https://api.github.com/repos/moby/moby","forks_url":"https://api.github.com/repos/moby/moby/forks","keys_url":"https://api.github.com/repos/moby/moby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moby/moby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moby/moby/teams","hooks_url":"https://api.github.com/repos/moby/moby/hooks","issue_events_url":"https://api.github.com/repos/moby/moby/issues/events{/number}","events_url":"https://api.github.com/repos/moby/moby/events","assignees_url":"https://api.github.com/repos/moby/moby/assignees{/user}","branches_url":"https://api.github.com/repos/moby/moby/branches{/branch}","tags_url":"https://api.github.com/repos/moby/moby/tags","blobs_url":"https://api.github.com/repos/moby/moby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moby/moby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moby/moby/git/refs{/sha}","trees_url":"https://api.github.com/repos/moby/moby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moby/moby/statuses/{sha}","languages_url":"https://api.github.com/repos/moby/moby/languages","stargazers_url":"https://api.github.com/repos/moby/moby/stargazers","contributors_url":"https://api.github.com/repos/moby/moby/contributors","subscribers_url":"https://api.github.com/repos/moby/moby/subscribers","subscription_url":"https://api.github.com/repos/moby/moby/subscription","commits_url":"https://api.github.com/repos/moby/moby/commits{/sha}","git_commits_url":"https://api.github.com/repos/moby/moby/git/commits{/sha}","comments_url":"https://api.github.com/repos/moby/moby/comments{/number}","issue_comment_url":"https://api.github.com/repos/moby/moby/issues/comments{/number}","contents_url":"https://api.github.com/repos/moby/moby/contents/{+path}","compare_url":"https://api.github.com/repos/moby/moby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moby/moby/merges","archive_url":"https://api.github.com/repos/moby/moby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moby/moby/downloads","issues_url":"https://api.github.com/repos/moby/moby/issues{/number}","pulls_url":"https://api.github.com/repos/moby/moby/pulls{/number}","milestones_url":"https://api.github.com/repos/moby/moby/milestones{/number}","notifications_url":"https://api.github.com/repos/moby/moby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moby/moby/labels{/name}","releases_url":"https://api.github.com/repos/moby/moby/releases{/id}","deployments_url":"https://api.github.com/repos/moby/moby/deployments","created_at":"2013-01-18T18:10:57Z","updated_at":"2017-06-06T06:56:48Z","pushed_at":"2017-06-06T02:19:38Z","git_url":"git://github.com/moby/moby.git","ssh_url":"git@github.com:moby/moby.git","clone_url":"https://github.com/moby/moby.git","svn_url":"https://github.com/moby/moby","homepage":"https://mobyproject.org/","size":130283,"stargazers_count":43966,"watchers_count":43966,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13052,"mirror_url":null,"open_issues_count":2683,"forks":13052,"open_issues":2683,"watchers":43966,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moby/moby/pulls/32122"},"html":{"href":"https://github.com/moby/moby/pull/32122"},"issue":{"href":"https://api.github.com/repos/moby/moby/issues/32122"},"comments":{"href":"https://api.github.com/repos/moby/moby/issues/32122/comments"},"review_comments":{"href":"https://api.github.com/repos/moby/moby/pulls/32122/comments"},"review_comment":{"href":"https://api.github.com/repos/moby/moby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moby/moby/pulls/32122/commits"},"statuses":{"href":"https://api.github.com/repos/moby/moby/statuses/f257f77c6c13ee851d3b899f8d51628a5dec92db"}}}}
{"actor":{"display_login":"allencloud"}}