{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/229777625","pull_request_review_id":170358748,"id":229777625,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTc3NzYyNQ==","diff_hunk":"@@ -30,26 +30,22 @@ import (\n func BuildArgumentListFromMap(baseArguments map[string]string, overrideArguments map[string]string) []string {\n \tvar command []string\n \tvar keys []string\n-\tfor k := range overrideArguments {\n-\t\tkeys = append(keys, k)\n-\t}\n-\tsort.Strings(keys)\n-\tfor _, k := range keys {\n-\t\tv := overrideArguments[k]\n-\t\t// values of \"\" are allowed as well\n-\t\tcommand = append(command, fmt.Sprintf(\"--%s=%s\", k, v))\n+\n+\tfor k, v := range baseArguments {\n+\t\tif _, overrideExists := overrideArguments[k]; !overrideExists {\n+\t\t\toverrideArguments[k] = v","path":"cmd/kubeadm/app/util/arguments.go","position":15,"original_position":15,"commit_id":"67cb7fef558fa70de2ee18f1b03cf832b18f0e6b","original_commit_id":"67cb7fef558fa70de2ee18f1b03cf832b18f0e6b","user":{"login":"kad","id":41858,"node_id":"MDQ6VXNlcjQxODU4","avatar_url":"https://avatars1.githubusercontent.com/u/41858?v=4","gravatar_id":"","url":"https://api.github.com/users/kad","html_url":"https://github.com/kad","followers_url":"https://api.github.com/users/kad/followers","following_url":"https://api.github.com/users/kad/following{/other_user}","gists_url":"https://api.github.com/users/kad/gists{/gist_id}","starred_url":"https://api.github.com/users/kad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kad/subscriptions","organizations_url":"https://api.github.com/users/kad/orgs","repos_url":"https://api.github.com/users/kad/repos","events_url":"https://api.github.com/users/kad/events{/privacy}","received_events_url":"https://api.github.com/users/kad/received_events","type":"User","site_admin":false},"body":"this still has the issue that was reported before: content of arguments in outer scope of that function will be changed if we do assignment to `baseArguments` or `overrideArguments`","created_at":"2018-10-31T16:46:09Z","updated_at":"2018-10-31T16:46:09Z","html_url":"https://github.com/kubernetes/kubernetes/pull/67360#discussion_r229777625","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/229777625"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/67360#discussion_r229777625"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360","id":208156589,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MTU2NTg5","html_url":"https://github.com/kubernetes/kubernetes/pull/67360","diff_url":"https://github.com/kubernetes/kubernetes/pull/67360.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/67360.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67360","number":67360,"state":"open","locked":false,"title":"simplify logic for func BuildArgumentListFromMap","user":{"login":"jiaxuanzhou","id":7779565,"node_id":"MDQ6VXNlcjc3Nzk1NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/7779565?v=4","gravatar_id":"","url":"https://api.github.com/users/jiaxuanzhou","html_url":"https://github.com/jiaxuanzhou","followers_url":"https://api.github.com/users/jiaxuanzhou/followers","following_url":"https://api.github.com/users/jiaxuanzhou/following{/other_user}","gists_url":"https://api.github.com/users/jiaxuanzhou/gists{/gist_id}","starred_url":"https://api.github.com/users/jiaxuanzhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiaxuanzhou/subscriptions","organizations_url":"https://api.github.com/users/jiaxuanzhou/orgs","repos_url":"https://api.github.com/users/jiaxuanzhou/repos","events_url":"https://api.github.com/users/jiaxuanzhou/events{/privacy}","received_events_url":"https://api.github.com/users/jiaxuanzhou/received_events","type":"User","site_admin":false},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/guide#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md\r\n4. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\nsimplify the logic to merge two map, we just need only one sort to build the command and make the code more readable.\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\nFixes #\r\n\r\n**Special notes for your reviewer**:\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","created_at":"2018-08-14T03:01:30Z","updated_at":"2018-10-31T16:46:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6833a0d25829ebfc1023872aa37785d6bb6fd7aa","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dixudx","id":5449021,"node_id":"MDQ6VXNlcjU0NDkwMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/5449021?v=4","gravatar_id":"","url":"https://api.github.com/users/dixudx","html_url":"https://github.com/dixudx","followers_url":"https://api.github.com/users/dixudx/followers","following_url":"https://api.github.com/users/dixudx/following{/other_user}","gists_url":"https://api.github.com/users/dixudx/gists{/gist_id}","starred_url":"https://api.github.com/users/dixudx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dixudx/subscriptions","organizations_url":"https://api.github.com/users/dixudx/orgs","repos_url":"https://api.github.com/users/dixudx/repos","events_url":"https://api.github.com/users/dixudx/events{/privacy}","received_events_url":"https://api.github.com/users/dixudx/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":451459590,"node_id":"MDU6TGFiZWw0NTE0NTk1OTA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/kubeadm","name":"area/kubeadm","color":"0052cc","default":false},{"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":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":173494222,"node_id":"MDU6TGFiZWwxNzM0OTQyMjI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cluster-lifecycle","name":"sig/cluster-lifecycle","color":"d2b48c","default":false},{"id":253450895,"node_id":"MDU6TGFiZWwyNTM0NTA4OTU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/S","name":"size/S","color":"77bb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67360/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/67cb7fef558fa70de2ee18f1b03cf832b18f0e6b","head":{"label":"jiaxuanzhou:1.11","ref":"1.11","sha":"67cb7fef558fa70de2ee18f1b03cf832b18f0e6b","user":{"login":"jiaxuanzhou","id":7779565,"node_id":"MDQ6VXNlcjc3Nzk1NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/7779565?v=4","gravatar_id":"","url":"https://api.github.com/users/jiaxuanzhou","html_url":"https://github.com/jiaxuanzhou","followers_url":"https://api.github.com/users/jiaxuanzhou/followers","following_url":"https://api.github.com/users/jiaxuanzhou/following{/other_user}","gists_url":"https://api.github.com/users/jiaxuanzhou/gists{/gist_id}","starred_url":"https://api.github.com/users/jiaxuanzhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiaxuanzhou/subscriptions","organizations_url":"https://api.github.com/users/jiaxuanzhou/orgs","repos_url":"https://api.github.com/users/jiaxuanzhou/repos","events_url":"https://api.github.com/users/jiaxuanzhou/events{/privacy}","received_events_url":"https://api.github.com/users/jiaxuanzhou/received_events","type":"User","site_admin":false},"repo":{"id":53458022,"node_id":"MDEwOlJlcG9zaXRvcnk1MzQ1ODAyMg==","name":"kubernetes","full_name":"jiaxuanzhou/kubernetes","private":false,"owner":{"login":"jiaxuanzhou","id":7779565,"node_id":"MDQ6VXNlcjc3Nzk1NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/7779565?v=4","gravatar_id":"","url":"https://api.github.com/users/jiaxuanzhou","html_url":"https://github.com/jiaxuanzhou","followers_url":"https://api.github.com/users/jiaxuanzhou/followers","following_url":"https://api.github.com/users/jiaxuanzhou/following{/other_user}","gists_url":"https://api.github.com/users/jiaxuanzhou/gists{/gist_id}","starred_url":"https://api.github.com/users/jiaxuanzhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiaxuanzhou/subscriptions","organizations_url":"https://api.github.com/users/jiaxuanzhou/orgs","repos_url":"https://api.github.com/users/jiaxuanzhou/repos","events_url":"https://api.github.com/users/jiaxuanzhou/events{/privacy}","received_events_url":"https://api.github.com/users/jiaxuanzhou/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jiaxuanzhou/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/jiaxuanzhou/kubernetes","forks_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/forks","keys_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/teams","hooks_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/events","assignees_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/tags","blobs_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/languages","stargazers_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/subscription","commits_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/merges","archive_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/downloads","issues_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/jiaxuanzhou/kubernetes/deployments","created_at":"2016-03-09T01:25:11Z","updated_at":"2016-03-09T01:25:23Z","pushed_at":"2018-10-30T16:01:03Z","git_url":"git://github.com/jiaxuanzhou/kubernetes.git","ssh_url":"git@github.com:jiaxuanzhou/kubernetes.git","clone_url":"https://github.com/jiaxuanzhou/kubernetes.git","svn_url":"https://github.com/jiaxuanzhou/kubernetes","homepage":"http://kubernetes.io","size":566918,"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":"76234a31b0491134b6c08f65b7eeda376dcaf61f","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","private":false,"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},"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-10-31T15:57:14Z","pushed_at":"2018-10-31T16:23:49Z","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":"https://kubernetes.io","size":810282,"stargazers_count":43226,"watchers_count":43226,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15047,"mirror_url":null,"archived":false,"open_issues_count":3181,"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":15047,"open_issues":3181,"watchers":43226,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/67360"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/67360"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/67360/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67360/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/67cb7fef558fa70de2ee18f1b03cf832b18f0e6b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kad"}}