{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/673","labels_url":"https://api.github.com/repos/docker/swarm/issues/673/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/673/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/673/events","html_url":"https://github.com/docker/swarm/pull/673","id":70878724,"number":673,"title":"store constraints and affinities as labels","user":{"login":"vieux","id":1032519,"avatar_url":"https://avatars.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},"labels":[{"url":"https://api.github.com/repos/docker/swarm/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"vieux","id":1032519,"avatar_url":"https://avatars.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},"milestone":{"url":"https://api.github.com/repos/docker/swarm/milestones/3","html_url":"https://github.com/docker/swarm/milestones/0.3.0","labels_url":"https://api.github.com/repos/docker/swarm/milestones/3/labels","id":1026388,"number":3,"title":"0.3.0","description":"","creator":{"login":"vieux","id":1032519,"avatar_url":"https://avatars.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":24,"closed_issues":11,"state":"open","created_at":"2015-03-17T23:46:40Z","updated_at":"2015-04-27T19:36:07Z","due_on":"2015-06-02T07:00:00Z","closed_at":null},"comments":2,"created_at":"2015-04-25T08:51:20Z","updated_at":"2015-04-28T18:58:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/673","html_url":"https://github.com/docker/swarm/pull/673","diff_url":"https://github.com/docker/swarm/pull/673.diff","patch_url":"https://github.com/docker/swarm/pull/673.patch"},"body":"With this PR, you still use `-e` to pass constraints or affinities, but swarm store those inside a label `com.docker.swarm.filters` on the container.\r\n\r\nThe code is much simpler and we don't leak those constraints/affinities inside the container's env anymore."},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/97170418","html_url":"https://github.com/docker/swarm/pull/673#issuecomment-97170418","issue_url":"https://api.github.com/repos/docker/swarm/issues/673","id":97170418,"user":{"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},"created_at":"2015-04-28T18:58:41Z","updated_at":"2015-04-28T18:58:41Z","body":"I suggested the same in docker-compose; perhaps also add a label for the *version* of swarm that's used to set the labels; this allows for migrating existing labels/containers in case the format changes in future.\r\n\r\n(Reading on my phone, so it's possible its in there already, but I overlooked)"}}