{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/67588359","id":67588359,"diff_hunk":"@@ -183,61 +183,67 @@ func mergeService(spec *swarm.ServiceSpec, flags *pflag.FlagSet) error {\n \t\tif spec.EndpointSpec == nil {\n \t\t\tspec.EndpointSpec = &swarm.EndpointSpec{}\n \t\t}\n-\t\tmergePorts(flags, &spec.EndpointSpec.Ports)\n+\t\tupdatePorts(flags, &spec.EndpointSpec.Ports)\n \t}\n \treturn nil\n }\n \n-func mergeLabels(flags *pflag.FlagSet, field *map[string]string) {\n+func updateLabels(flags *pflag.FlagSet, field *map[string]string) {\n \tif !flags.Changed(flagLabel) {\n \t\treturn\n \t}\n \n \tif *field == nil {\n \t\t*field = make(map[string]string)\n \t}","path":"api/client/service/update.go","position":177,"original_position":177,"commit_id":"6d4c3d4a4f09d6c39aa78849fee28d4e2b0968df","original_commit_id":"6d4c3d4a4f09d6c39aa78849fee28d4e2b0968df","user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"body":"This initialization is no longer necessary (but needs to be done for `localLabels` instead).","created_at":"2016-06-17T23:34:51Z","updated_at":"2016-06-17T23:34:51Z","html_url":"https://github.com/docker/docker/pull/23701#discussion_r67588359","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/23701","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/67588359"},"html":{"href":"https://github.com/docker/docker/pull/23701#discussion_r67588359"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/23701"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/23701","id":74318238,"html_url":"https://github.com/docker/docker/pull/23701","diff_url":"https://github.com/docker/docker/pull/23701.diff","patch_url":"https://github.com/docker/docker/pull/23701.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/23701","number":23701,"state":"open","locked":false,"title":"Change `docker service update` semantics","user":{"login":"icecrime","id":1564054,"avatar_url":"https://avatars.githubusercontent.com/u/1564054?v=3","gravatar_id":"","url":"https://api.github.com/users/icecrime","html_url":"https://github.com/icecrime","followers_url":"https://api.github.com/users/icecrime/followers","following_url":"https://api.github.com/users/icecrime/following{/other_user}","gists_url":"https://api.github.com/users/icecrime/gists{/gist_id}","starred_url":"https://api.github.com/users/icecrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icecrime/subscriptions","organizations_url":"https://api.github.com/users/icecrime/orgs","repos_url":"https://api.github.com/users/icecrime/repos","events_url":"https://api.github.com/users/icecrime/events{/privacy}","received_events_url":"https://api.github.com/users/icecrime/received_events","type":"User","site_admin":false},"body":"Change `docker service update` to replace attributes of the target service rather than augment them. One particular occurrence where the previous behavior proved problematic is when trying to update a port mapping: the merge semantics provided no way of removing published ports, but strictly of adding more.\r\n\r\nThe utility `merge*` functions where renamed accordingly to `update*`.\r\n\r\nRenaming aside, the key changes happen in `updateLabels`, `updateMounts`, `updatePorts`, `updateNetworks` to directly override the service specification instead of appending to it.\r\n\r\nPing @dnephin @stevvooe @tonistiigi for review.","created_at":"2016-06-17T23:26:41Z","updated_at":"2016-06-17T23:34:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37d3638dc53de289ed3942017d25aed0b2e3c72d","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/53","html_url":"https://github.com/docker/docker/milestones/1.12.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/53/labels","id":1657301,"number":53,"title":"1.12.0","description":"feature/code freeze: June 14th, 2016","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":299,"state":"open","created_at":"2016-03-21T13:47:53Z","updated_at":"2016-06-17T23:26:58Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/docker/docker/pulls/23701/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/23701/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/23701/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/6d4c3d4a4f09d6c39aa78849fee28d4e2b0968df","head":{"label":"icecrime:fix_update","ref":"fix_update","sha":"6d4c3d4a4f09d6c39aa78849fee28d4e2b0968df","user":{"login":"icecrime","id":1564054,"avatar_url":"https://avatars.githubusercontent.com/u/1564054?v=3","gravatar_id":"","url":"https://api.github.com/users/icecrime","html_url":"https://github.com/icecrime","followers_url":"https://api.github.com/users/icecrime/followers","following_url":"https://api.github.com/users/icecrime/following{/other_user}","gists_url":"https://api.github.com/users/icecrime/gists{/gist_id}","starred_url":"https://api.github.com/users/icecrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icecrime/subscriptions","organizations_url":"https://api.github.com/users/icecrime/orgs","repos_url":"https://api.github.com/users/icecrime/repos","events_url":"https://api.github.com/users/icecrime/events{/privacy}","received_events_url":"https://api.github.com/users/icecrime/received_events","type":"User","site_admin":false},"repo":{"id":19612523,"name":"docker","full_name":"icecrime/docker","owner":{"login":"icecrime","id":1564054,"avatar_url":"https://avatars.githubusercontent.com/u/1564054?v=3","gravatar_id":"","url":"https://api.github.com/users/icecrime","html_url":"https://github.com/icecrime","followers_url":"https://api.github.com/users/icecrime/followers","following_url":"https://api.github.com/users/icecrime/following{/other_user}","gists_url":"https://api.github.com/users/icecrime/gists{/gist_id}","starred_url":"https://api.github.com/users/icecrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icecrime/subscriptions","organizations_url":"https://api.github.com/users/icecrime/orgs","repos_url":"https://api.github.com/users/icecrime/repos","events_url":"https://api.github.com/users/icecrime/events{/privacy}","received_events_url":"https://api.github.com/users/icecrime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/icecrime/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/icecrime/docker","forks_url":"https://api.github.com/repos/icecrime/docker/forks","keys_url":"https://api.github.com/repos/icecrime/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icecrime/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icecrime/docker/teams","hooks_url":"https://api.github.com/repos/icecrime/docker/hooks","issue_events_url":"https://api.github.com/repos/icecrime/docker/issues/events{/number}","events_url":"https://api.github.com/repos/icecrime/docker/events","assignees_url":"https://api.github.com/repos/icecrime/docker/assignees{/user}","branches_url":"https://api.github.com/repos/icecrime/docker/branches{/branch}","tags_url":"https://api.github.com/repos/icecrime/docker/tags","blobs_url":"https://api.github.com/repos/icecrime/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icecrime/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icecrime/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/icecrime/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icecrime/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/icecrime/docker/languages","stargazers_url":"https://api.github.com/repos/icecrime/docker/stargazers","contributors_url":"https://api.github.com/repos/icecrime/docker/contributors","subscribers_url":"https://api.github.com/repos/icecrime/docker/subscribers","subscription_url":"https://api.github.com/repos/icecrime/docker/subscription","commits_url":"https://api.github.com/repos/icecrime/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/icecrime/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/icecrime/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/icecrime/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/icecrime/docker/contents/{+path}","compare_url":"https://api.github.com/repos/icecrime/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icecrime/docker/merges","archive_url":"https://api.github.com/repos/icecrime/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icecrime/docker/downloads","issues_url":"https://api.github.com/repos/icecrime/docker/issues{/number}","pulls_url":"https://api.github.com/repos/icecrime/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/icecrime/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/icecrime/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icecrime/docker/labels{/name}","releases_url":"https://api.github.com/repos/icecrime/docker/releases{/id}","deployments_url":"https://api.github.com/repos/icecrime/docker/deployments","created_at":"2014-05-09T13:46:45Z","updated_at":"2016-02-27T01:47:43Z","pushed_at":"2016-06-17T23:29:33Z","git_url":"git://github.com/icecrime/docker.git","ssh_url":"git@github.com:icecrime/docker.git","clone_url":"https://github.com/icecrime/docker.git","svn_url":"https://github.com/icecrime/docker","homepage":"http://www.docker.io","size":93771,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"2b865dbc3a94675478a9d6faae480ff447cc75de","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","deployments_url":"https://api.github.com/repos/docker/docker/deployments","created_at":"2013-01-18T18:10:57Z","updated_at":"2016-06-17T21:33:37Z","pushed_at":"2016-06-17T23:29:35Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":200662,"stargazers_count":32126,"watchers_count":32126,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9215,"mirror_url":null,"open_issues_count":1694,"forks":9215,"open_issues":1694,"watchers":32126,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/23701"},"html":{"href":"https://github.com/docker/docker/pull/23701"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/23701"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/23701/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/23701/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/23701/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/6d4c3d4a4f09d6c39aa78849fee28d4e2b0968df"}}}}
{"actor":{"display_login":"aaronlehmann"}}