{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22819","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22819/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22819/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22819/events","html_url":"https://github.com/cockroachdb/cockroach/pull/22819","id":298388530,"number":22819,"title":"WIP: config: Implement parsing of more expressive zone configs","user":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars3.githubusercontent.com/u/7085343?v=4","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-19T20:07:05Z","updated_at":"2018-02-20T21:26:54Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/22819","html_url":"https://github.com/cockroachdb/cockroach/pull/22819","diff_url":"https://github.com/cockroachdb/cockroach/pull/22819.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/22819.patch"},"body":"This creates a new allowable format for zone config constraints, which\r\nlets the user apply different sets of constraints to different numbers\r\nof replicas within a zone. See the included test for what the new format\r\nlooks like.\r\n\r\nFixes #19985\r\n\r\nRelease note (cli change): Replication zone constraints can now be\r\nspecified on a per-replica basis, meaning you can configure some\r\nreplicas in a zone's ranges to follow one set of constraints and other\r\nreplicas to follow other constraints.\r\n\r\n--------------------\r\n\r\nEverything except the last commit is just #22412, so please ignore all the others.\r\n\r\nThis is really just a prototype of what it takes to make the YAML parsing backwards-compatible while supporting something along the lines of what @petermattis proposed for the new format in #19985. I'm looking for feedback on the format as well as on whether I'm over-complicating the parsing. Suggestions on other formats would be great -- I'm not at all attached to this.\r\n\r\nOnce we agree on the format/parsing, this still needs validation of the new constraints (e.g. to ensure that all the `Constraints.NumReplicas` sum to `ZoneConfig.NumReplicas`, that either all `Constraints` specify `NumReplicas` or there's only 0 or 1 `Constraints`, and that only positive constraints are included if `Constraints.NumReplicas` is set because that's the limited scope we settled on -- allowing more may make for some weird edge cases and doesn't seem necessary). It also will need a version gate to not allow `Constraints.NumReplicas` to be used unless the cluster's min version is 2.0, since old nodes would fail to parse the new configs."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/367125349","html_url":"https://github.com/cockroachdb/cockroach/pull/22819#issuecomment-367125349","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/22819","id":367125349,"user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T21:26:53Z","updated_at":"2018-02-20T21:26:53Z","author_association":"CONTRIBUTOR","body":"Looks good to go modulo bike shedding of the syntax.\n\n---\n\nReview status: 0 of 12 files reviewed at latest revision, all discussions resolved, some commit checks failed.\n\n---\n\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/22819#-:-L5p67UTxk7RZWD6S9z7:b38791j)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"petermattis"}}