{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/synapse/issues/202","repository_url":"https://api.github.com/repos/airbnb/synapse","labels_url":"https://api.github.com/repos/airbnb/synapse/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/synapse/issues/202/comments","events_url":"https://api.github.com/repos/airbnb/synapse/issues/202/events","html_url":"https://github.com/airbnb/synapse/pull/202","id":162535434,"number":202,"title":"Refactor label filter","user":{"login":"igor47","id":200575,"avatar_url":"https://avatars.githubusercontent.com/u/200575?v=3","gravatar_id":"","url":"https://api.github.com/users/igor47","html_url":"https://github.com/igor47","followers_url":"https://api.github.com/users/igor47/followers","following_url":"https://api.github.com/users/igor47/following{/other_user}","gists_url":"https://api.github.com/users/igor47/gists{/gist_id}","starred_url":"https://api.github.com/users/igor47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igor47/subscriptions","organizations_url":"https://api.github.com/users/igor47/orgs","repos_url":"https://api.github.com/users/igor47/repos","events_url":"https://api.github.com/users/igor47/events{/privacy}","received_events_url":"https://api.github.com/users/igor47/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-27T20:01:35Z","updated_at":"2016-07-16T06:05:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/airbnb/synapse/pulls/202","html_url":"https://github.com/airbnb/synapse/pull/202","diff_url":"https://github.com/airbnb/synapse/pull/202.diff","patch_url":"https://github.com/airbnb/synapse/pull/202.patch"},"body":"In this PR, we make the following changes:\r\n\r\n* go from `label_filter` to `label_filters` -- this allows us to define multiple filters, which must ALL match\r\n* add a new filter condition, for `not-equals`\r\n* allow leader election to operate on filtered backends, thus making leader election and filters no longer mutually exclusive (the mutual exclusivity was not documented)\r\n\r\nthis covers our main use case -- utilize only backends in the current region and the current az (the default case), or utilize only backends in the current region and NOT the current az (in case of AZ failover).\r\n\r\nas well, we refactor the specs for labels to use a factory to create the labels, vs creating hashes manually and being forced to specify a bunch of attributes we don't care about.\r\n\r\nto: @jolynch @scarletmeow @nwadams \r\ncc: @jtai "},"comment":{"url":"https://api.github.com/repos/airbnb/synapse/issues/comments/233112014","html_url":"https://github.com/airbnb/synapse/pull/202#issuecomment-233112014","issue_url":"https://api.github.com/repos/airbnb/synapse/issues/202","id":233112014,"user":{"login":"jolynch","id":1420460,"avatar_url":"https://avatars.githubusercontent.com/u/1420460?v=3","gravatar_id":"","url":"https://api.github.com/users/jolynch","html_url":"https://github.com/jolynch","followers_url":"https://api.github.com/users/jolynch/followers","following_url":"https://api.github.com/users/jolynch/following{/other_user}","gists_url":"https://api.github.com/users/jolynch/gists{/gist_id}","starred_url":"https://api.github.com/users/jolynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolynch/subscriptions","organizations_url":"https://api.github.com/users/jolynch/orgs","repos_url":"https://api.github.com/users/jolynch/repos","events_url":"https://api.github.com/users/jolynch/events{/privacy}","received_events_url":"https://api.github.com/users/jolynch/received_events","type":"User","site_admin":false},"created_at":"2016-07-16T06:05:23Z","updated_at":"2016-07-16T06:05:23Z","body":"👍 lg2m\r\n\r\nI am curious about how we're going to allow users to combine the label filters going forward. In this iteration it's a logical and over all the filters, but I am curious how much complexity other options would be (such as or, negation, etc ...). For this PR an and sg2m."}}
{"actor":{"display_login":"jolynch"}}