mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Kone <vinodk...@gmail.com>
Subject Re: Review Request 48012: Implemented v1::master::Call::GET_FLAGS.
Date Sun, 29 May 2016 20:13:03 GMT


> On May 29, 2016, 8 p.m., Benjamin Hindman wrote:
> > src/master/http.cpp, line 1101
> > <https://reviews.apache.org/r/48012/diff/2/?file=1400613#file1400613line1101>
> >
> >     It doesn't look like `__flags` needs to be asynchronous, any reason to not do
it that way?
> >     
> >     ```
> >     return OK(__flags(), request.url.query.get("jsonp"));
> >     ```
> >     
> >     In fact, you could probably pull this all the way up in to `flags` and then
make `_flags` be the shared function.

i should've added a comment here but i wanted the common core to be asynchronous because i
imagine this is where fine-grained authorization will take place in the future. for example,
if we want to hide certain flags from certain principals that would be done in `__flags()`
since it is common for both REST and RPC. `_flags()` will be used for REST specific coarse-grained
authz (e.g., GET_ENDPOINT_WITH_PATH) whereas `getFlags()` will do RPC specific coarse-grained
authz. this pattern wil proably more clear when we handle GET_STATE call.

does that make sense?

happy to make `__flags()` synchronous for now to avoid confusion and refactor later when we
add fine-grained authz.


- Vinod


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


On May 29, 2016, 1:19 a.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48012/
> -----------------------------------------------------------
> 
> (Updated May 29, 2016, 1:19 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Benjamin Hindman, and Kevin Klues.
> 
> 
> Bugs: MESOS-2720
>     https://issues.apache.org/jira/browse/MESOS-2720
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The idea is to extract JSON::Object representation of flags into a
> function that can be used by both the old JSON REST API handler and the
> new v1 API handler.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am f1bd5e6e5515535c2aaf9ea8b205f4e8c7096ec5 
>   src/internal/evolve.hpp 4d1cb7f2a180f4f4a44491393393449d36ed616b 
>   src/internal/evolve.cpp e7afcdb629a509e8bb30ba29542f360066eb8ad4 
>   src/master/http.cpp bbbf0a00e486b96e036f59a3107789d0322bc6cd 
>   src/master/master.hpp 1a875c32eddfb6d884e3d0dda7f5716ee53966c3 
>   src/master/master.cpp 6442762c9fdfa368d5d9d7cd43b97f5addaf7f17 
>   src/master/validation.hpp 580f420a72f33290bcbe718bad839084d4209b8c 
>   src/master/validation.cpp 982b61da5fe34dbe46190477e75ee7a4e4cdce9c 
>   src/tests/api_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/48012/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


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