----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48585/#review137137 -----------------------------------------------------------
LGTM overall. Minor comments around evolving `Response` to `v1::Response` before returning back to the client. src/internal/evolve.hpp (lines 120 - 121) <https://reviews.apache.org/r/48585/#comment202291> It's fine to evolve `JSON::Object` directly into `v1` to avoid making an extra copy. We adopted a similar approach with the Scheduler/Executor API's i.e. we had an `evolve` from old style messages to `v1::Call`. src/internal/evolve.hpp (line 123) <https://reviews.apache.org/r/48585/#comment202295> You would need another overload for evolving `master::Response` -> `master::v1::Response`. src/internal/evolve.cpp (line 468) <https://reviews.apache.org/r/48585/#comment202296> `evolve(response)`; src/internal/evolve.cpp (line 514) <https://reviews.apache.org/r/48585/#comment202297> `evolve(response)` src/master/http.cpp (lines 1293 - 1299) <https://reviews.apache.org/r/48585/#comment202292> hmm .. We need to return a Response of type `v1::master::Response` but this is of type of `master::Response`. :-) Read my earlier comment. It should be fine to `evolve` to a `v1::master::Response` directly. Something like: ```cpp return OK(serialize(responseContentType, evolve<v1::master::Response::GET_FLAGS>(_flags())), stringify(responseContentType)); ``` src/master/http.cpp (line 1347) <https://reviews.apache.org/r/48585/#comment202298> It's fine to evolve to v1 directly from `JSON::Object` like `GET_FLAGS` in my earlier comment. src/master/http.cpp (line 1363) <https://reviews.apache.org/r/48585/#comment202293> `evolve(response)` src/master/master.hpp (line 1285) <https://reviews.apache.org/r/48585/#comment202294> Not yours: Can we make the first character in caps? - Anand Mazumdar On June 11, 2016, 6:42 p.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48585/ > ----------------------------------------------------------- > > (Updated June 11, 2016, 6:42 p.m.) > > > Review request for mesos, Anand Mazumdar, zhou xing, Jay Guo, and Vinod Kone. > > > Bugs: MESOS-5593 > https://issues.apache.org/jira/browse/MESOS-5593 > > > Repository: mesos > > > Description > ------- > > Devolved v1 operator protos to unversioned operator protos in Master. > > > Diffs > ----- > > src/internal/devolve.hpp 00842bb0de1dd587f2b47c79f17c0e7bd7f51189 > src/internal/devolve.cpp 4233246c6838f85189f1b4c7e66d2bc0a3bf5408 > src/internal/evolve.hpp 66a3deaa94939ad2233d944ba35ac7e5cbe682e7 > src/internal/evolve.cpp 7f16cbda7da6c838648cca909368973e7298730b > src/master/http.cpp 6e1bf9557a854a89fa9173223295816a9e114e7c > src/master/master.hpp 2c45dab291a153b42809ab12e4252bf58559feeb > src/master/validation.hpp e1271bbaebaac52a078eedfdc2299c7c6f4474f8 > src/master/validation.cpp 7b9c2281b2ab1295211f0dd385cd77947fbd63be > > Diff: https://reviews.apache.org/r/48585/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >
