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


Fix it, then Ship it!





src/common/protobuf_utils.hpp (line 163)
<https://reviews.apache.org/r/55710/#comment237252>

    This comment is a bit misleading, since this is more general, it's for 
going back to the protobuf from the struct.



src/master/http.cpp (lines 129 - 142)
<https://reviews.apache.org/r/55710/#comment237258>

    Just a note, the existing approach here that we're following in this patch 
is unfortunate in that it assumes there is only a 'type' within capability. If 
more fields are added it's difficult to expose them here as we have to 
introduce a second 'capabilities' key to keep it backwards compatible.
    
    E.g.
    
    ```
    // current technique:
    {
      "capabilities": ["MULTI_ROLE"],
    }
    
    // vs pure transformation into json:
    {
      "capabilities": [
        {
          "type": "MULTI_ROLE"
        }
      ],
    }
    ```
    
    Since this is already how we expose framework capabilities I think we'll 
just stick with this approach.



src/tests/master_tests.cpp (line 4090)
<https://reviews.apache.org/r/55710/#comment237254>

    We should check for a capabilities entry as this will insert one if absent.


- Benjamin Mahler


On Feb. 13, 2017, 9:35 a.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55710/
> -----------------------------------------------------------
> 
> (Updated Feb. 13, 2017, 9:35 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Guangya Liu, and 
> Michael Park.
> 
> 
> Bugs: MESOS-6902
>     https://issues.apache.org/jira/browse/MESOS-6902
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Master should be able to reflect agent capabilities via  `/state`(v0)
> and `getState`(v1) endpoints.
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/master.proto a2228db8902c297f137b8106a7b3d2babbc35017 
>   include/mesos/v1/master/master.proto 
> cfdca7400d98233c6320eebd8784e4f51c43ebbd 
>   src/common/protobuf_utils.hpp 3ba689f30ae080ea9b2a0af4d819dd3e377c7bf5 
>   src/common/protobuf_utils.cpp ed84e9ae083c2dc6cd8b49d9ce8dc624a8607b8a 
>   src/master/http.cpp c5324abc0db82275fd65d3f7d361ad8ee9e017d1 
>   src/tests/master_tests.cpp 9a7a953adbbbed0b37082bb0166d03b1388c80ae 
> 
> Diff: https://reviews.apache.org/r/55710/diff/
> 
> 
> Testing
> -------
> 
> make check GTEST_FILTER="MasterTest.StateEndpointAgentCapabilities"
> [       OK ] MasterTest.StateEndpointAgentCapabilities (85 ms)
> [----------] 1 test from MasterTest (94 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (122 ms total)
> 
> make check on Ubuntu 14.04
> 
> 
> Thanks,
> 
> Jay Guo
> 
>

Reply via email to