> On Dec. 18, 2015, 12:04 a.m., Anand Mazumdar wrote: > > src/master/quota_handler.cpp, line 353 > > <https://reviews.apache.org/r/41514/diff/1/?file=1168675#file1168675line353> > > > > hmmm .. Should we return a `BadRequest` for all other non-allowed > > values of `force` other then `true` or `false` ? > > Alexander Rukletsov wrote: > I was thinking about the [Postel's > law](https://en.wikipedia.org/wiki/Robustness_principle), but maybe you are > right and we should not interpret "force:t", "force:1", "force:god-damn-yes" > as `false`, I'll fix that.
I was wondering if we should accept only `true/false` as valid values. Currently the `/scheduler` endpoint also specifies a semantically similar field `force` in `Call::Subscribe` message that just takes these 2 possible values. Should we strive for consistency across all the endpoints and reject all other values ? > On Dec. 18, 2015, 12:04 a.m., Anand Mazumdar wrote: > > src/master/quota_handler.cpp, line 338 > > <https://reviews.apache.org/r/41514/diff/1/?file=1168675#file1168675line338> > > > > I like the less jagged version more here. It's also more consistent > > with other similar strings in the function. What do you think ? > > Alexander Rukletsov wrote: > It's a known fact, that jaggedness is very subjective. I would argue, > that wrapping error message after `BadRequest` is less jagged and more > readable, because more there is more space for the message itself. > Consistency is important, hence the following review: > https://reviews.apache.org/r/41515/ sgtm, I dropped the issue. - Anand ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41514/#review111086 ----------------------------------------------------------- On Dec. 21, 2015, 1:27 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41514/ > ----------------------------------------------------------- > > (Updated Dec. 21, 2015, 1:27 p.m.) > > > Review request for mesos, Anand Mazumdar, Bernd Mathiske, Joerg Schad, and > Joris Van Remoortere. > > > Bugs: MESOS-3960 > https://issues.apache.org/jira/browse/MESOS-3960 > > > Repository: mesos > > > Description > ------- > > POST request to "/quota" requires a single JSON object as opposed to > key-value pairs encoded in a string. > > > Diffs > ----- > > src/master/quota_handler.cpp 0217149a865ede751b3a03fe40b2d91b487b7b10 > src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 > src/tests/role_tests.cpp 2c5f68ccaac7e9a37345e2f331d1bc35cae77736 > > Diff: https://reviews.apache.org/r/41514/diff/ > > > Testing > ------- > > make check on Mac OS 10.10.4 > > > Thanks, > > Alexander Rukletsov > >