{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/2202","repository_url":"https://api.github.com/repos/docker/swarm","labels_url":"https://api.github.com/repos/docker/swarm/issues/2202/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/2202/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/2202/events","html_url":"https://github.com/docker/swarm/pull/2202","id":152746780,"number":2202,"title":"change the way of producing engine label","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars.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},"labels":[{"url":"https://api.github.com/repos/docker/swarm/labels/area/API","name":"area/API","color":"fbca04"},{"url":"https://api.github.com/repos/docker/swarm/labels/status/2-code-review","name":"status/2-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/swarm/milestones/15","html_url":"https://github.com/docker/swarm/milestones/1.2.4","labels_url":"https://api.github.com/repos/docker/swarm/milestones/15/labels","id":1792844,"number":15,"title":"1.2.4","description":"","creator":{"login":"nishanttotla","id":1872537,"avatar_url":"https://avatars.githubusercontent.com/u/1872537?v=3","gravatar_id":"","url":"https://api.github.com/users/nishanttotla","html_url":"https://github.com/nishanttotla","followers_url":"https://api.github.com/users/nishanttotla/followers","following_url":"https://api.github.com/users/nishanttotla/following{/other_user}","gists_url":"https://api.github.com/users/nishanttotla/gists{/gist_id}","starred_url":"https://api.github.com/users/nishanttotla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nishanttotla/subscriptions","organizations_url":"https://api.github.com/users/nishanttotla/orgs","repos_url":"https://api.github.com/users/nishanttotla/repos","events_url":"https://api.github.com/users/nishanttotla/events{/privacy}","received_events_url":"https://api.github.com/users/nishanttotla/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":11,"state":"open","created_at":"2016-05-27T20:47:01Z","updated_at":"2016-07-06T22:09:22Z","due_on":"2016-07-07T07:00:00Z","closed_at":null},"comments":8,"created_at":"2016-05-03T10:52:30Z","updated_at":"2016-07-07T04:41:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/2202","html_url":"https://github.com/docker/swarm/pull/2202","diff_url":"https://github.com/docker/swarm/pull/2202.diff","patch_url":"https://github.com/docker/swarm/pull/2202.patch"},"body":"Swarm has its way to construct engine labels. However docker daemon changes a little in its api.\r\nFor instance:\r\ndocker 1.10.3 has a field `ExecutionDriver` in `info` api:\r\nhttps://github.com/docker/docker/blob/v1.10.3/daemon/info.go#L88\r\nwhile, docker 1.11.0 has no field `ExecutionDriver` in `info` api:\r\nhttps://github.com/docker/docker/blob/v1.11.0/daemon/info.go#L70-L107\r\nAs a result, swarm should change a little in that case.\r\n\r\nAnd this PR did:\r\n1. validate label if it is empty;\r\n2. fix a typo when judging whether it is a label with key `node`\r\n3. when user-provided engine labels have overlap with swarm specific labels, send a warn log and override the latter ones \r\n4. fix a typo in engine_test.go\r\n5. add several unit tests in engine_test.go\r\n\r\nThis pr will make the `continuous-integration/travis-ci/pr` show a lot of Warning logs. \r\nMaybe need optimized?\r\n\r\nFixed #2201 \r\n\r\nSigned-off-by: Sun Hongliang <allen.sun@daocloud.io>"},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/230977640","html_url":"https://github.com/docker/swarm/pull/2202#issuecomment-230977640","issue_url":"https://api.github.com/repos/docker/swarm/issues/2202","id":230977640,"user":{"login":"dongluochen","id":14985073,"avatar_url":"https://avatars.githubusercontent.com/u/14985073?v=3","gravatar_id":"","url":"https://api.github.com/users/dongluochen","html_url":"https://github.com/dongluochen","followers_url":"https://api.github.com/users/dongluochen/followers","following_url":"https://api.github.com/users/dongluochen/following{/other_user}","gists_url":"https://api.github.com/users/dongluochen/gists{/gist_id}","starred_url":"https://api.github.com/users/dongluochen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongluochen/subscriptions","organizations_url":"https://api.github.com/users/dongluochen/orgs","repos_url":"https://api.github.com/users/dongluochen/repos","events_url":"https://api.github.com/users/dongluochen/events{/privacy}","received_events_url":"https://api.github.com/users/dongluochen/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T04:41:01Z","updated_at":"2016-07-07T04:41:01Z","body":"LGTM"}}
{"actor":{"display_login":"dongluochen"}}