-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35711/#review105756
-----------------------------------------------------------



include/mesos/roles.hpp (lines 40 - 41)
<https://reviews.apache.org/r/35711/#comment164386>

    What do you think about having `Roles::parse()` return a `Try<Roles>` and 
let it call `Roles::validate()` during parsing?



src/common/roles.cpp (lines 81 - 82)
<https://reviews.apache.org/r/35711/#comment164385>

    Perhaps it's sufficient to simply `return error.get();` here, since the 
error returned by the other `validate()` function already includes the name of 
the role?
    
    If you do decide to keep the role name here, we probably don't need 
`stringify()`?



src/master/master.cpp (line 568)
<https://reviews.apache.org/r/35711/#comment164387>

    Should we add a comment here saying that the validation of roles occurs in 
flags.cpp?



src/tests/roles_tests.cpp (line 36)
<https://reviews.apache.org/r/35711/#comment164393>

    Could you add a line or two of comments saying what this test does?



src/tests/roles_tests.cpp (line 52)
<https://reviews.apache.org/r/35711/#comment164394>

    Could you add a line or two of comments saying what this test does?



src/tests/roles_tests.cpp (line 54)
<https://reviews.apache.org/r/35711/#comment164395>

    Maybe we want a comment saying that `validate()` returns `Option<Error>`, 
so these cases expect successful validation?



src/tests/roles_tests.cpp (line 60)
<https://reviews.apache.org/r/35711/#comment164396>

    Maybe we want a comment saying that `validate()` returns `Option<Error>`, 
so these cases expect failed validation?


- Greg Mann


On Oct. 3, 2015, 4:11 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35711/
> -----------------------------------------------------------
> 
> (Updated Oct. 3, 2015, 4:11 p.m.)
> 
> 
> Review request for mesos, Adam B, Jie Yu, and Michael Park.
> 
> 
> Bugs: MESOS-2210
>     https://issues.apache.org/jira/browse/MESOS-2210
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Disallow special characters in role name.
> 
> 
> Diffs
> -----
> 
>   include/mesos/roles.hpp PRE-CREATION 
>   src/Makefile.am f060998bb08cdb071db5a2e85dfbad805dab45e9 
>   src/common/resources.cpp 601388c35a1bff37c58e753d1870d53b8d0af2d1 
>   src/common/roles.cpp PRE-CREATION 
>   src/master/flags.cpp 0285ce70cefca09e81ef7137968d024e297fec87 
>   src/master/master.hpp 4bb65f0b6b77ea7324b0dee943602cfdb0f6a11c 
>   src/master/master.cpp 6bee4f351c3fd0fb72f64bbc863968e4786b318b 
>   src/slave/flags.cpp 029aa1eb00e1aa3e92c2155925022c17fd905862 
>   src/tests/resources_tests.cpp 6584fc6c39e6ffe9f8085576677dcc669f127697 
>   src/tests/roles_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35711/diff/
> 
> 
> Testing
> -------
> 
> make -j8 check
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to