mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam B" <a...@mesosphere.io>
Subject Re: Review Request 35711: Disallow special characters in role name.
Date Thu, 07 Jan 2016 22:51:09 GMT

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


Still wondering if `class Roles` is any better than `namespace roles`, and unsure about the
need for the CMake change.


include/mesos/roles.hpp (line 57)
<https://reviews.apache.org/r/35711/#comment173816>

    s/Role name list/List of role names/



docs/roles.md (lines 105 - 106)
<https://reviews.apache.org/r/35711/#comment173879>

    Shouldn't we use backticks instead of single quotes?



include/mesos/roles.hpp (lines 26 - 30)
<https://reviews.apache.org/r/35711/#comment173880>

    This comment should go below the `namespace mesos {` line, just above `class Roles`.



include/mesos/roles.hpp (line 33)
<https://reviews.apache.org/r/35711/#comment173892>

    This isn't much of a real 'class' anymore, is it? Any reason why you don't want to just
wrap these functions in a `namespace roles {` instead?



include/mesos/roles.hpp (line 44)
<https://reviews.apache.org/r/35711/#comment173881>

    Start this comment with a brief description, like "Validates the given role name. A role
name..."



include/mesos/roles.hpp (line 50)
<https://reviews.apache.org/r/35711/#comment173883>

    @return Error if validation fails, None otherwise.



include/mesos/roles.hpp (line 55)
<https://reviews.apache.org/r/35711/#comment173882>

    s/roles object/list of roles/



src/CMakeLists.txt (line 104)
<https://reviews.apache.org/r/35711/#comment173885>

    I think CMake currently only works for the agent build target, and roles.cpp is only used
by master. Did you test if the cmake build works with/without this change?
    We may need to pull in Alex Clemmer for advice.



src/tests/role_tests.cpp (lines 587 - 588)
<https://reviews.apache.org/r/35711/#comment173887>

    EXPECT_SOME_EQ(v, r1.get())
    Combine here and elsewhere



src/tests/role_tests.cpp (line 615)
<https://reviews.apache.org/r/35711/#comment173888>

    Could you add another check that validate("foo..bar") and/or ".foo" succeeds, so we know
we're only erroring on "." and ".." as full strings.


- Adam B


On Jan. 5, 2016, 7:19 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35711/
> -----------------------------------------------------------
> 
> (Updated Jan. 5, 2016, 7:19 a.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
> -----
> 
>   docs/roles.md af1adad7ec8122fd10f7de44848014b850416bcd 
>   include/mesos/roles.hpp PRE-CREATION 
>   src/CMakeLists.txt 8169fe4f1a0eda5c2e2b30e22a7346478420a9a0 
>   src/Makefile.am e08e86724abaa3023f0483aa222354c95d4d3817 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/common/roles.cpp PRE-CREATION 
>   src/master/master.cpp 40ce3e17fca88da689128bcf5d35fdddc396c011 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/tests/role_tests.cpp 91a6d27158a21ae11dd310dd1f55922dc147e6f3 
> 
> Diff: https://reviews.apache.org/r/35711/diff/
> 
> 
> Testing
> -------
> 
> make -j8 check
> 
> 
> Thanks,
> 
> haosdent huang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message