mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Conway <neil.con...@gmail.com>
Subject Re: Review Request 58305: Add some parameter validation to ReRegisterSlaveMessage.
Date Wed, 19 Apr 2017 23:06:50 GMT

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




src/master/validation.cpp
Line 835 (original), 928 (patched)
<https://reviews.apache.org/r/58305/#comment245530>

    I wonder if we should move this `internal::validateResources` call down to `validation::validate`
below. Then we'll be calling `validateResources` for the `ExecutorInfo.resources` in both
cases. I think this would also let us remove the `error = Resources::validate(executor.resources());`
call on line 271, no?



src/master/validation.cpp
Lines 933 (patched)
<https://reviews.apache.org/r/58305/#comment245529>

    Can we call this before we declare the `validators` vector? Or else call this after we
loop over `validators` below?
    
    i.e., would be good to group together related code.



src/master/validation.cpp
Lines 950 (patched)
<https://reviews.apache.org/r/58305/#comment245531>

    Can we improve the consistency between `executor::validate(const ExecutorInfo&)` and
`executor::internal::validate(const ExecutorInfo&, ...)`?
    
    e.g., name the vector of validators `validators` in both functions, either declare both
vectors `const` or neither, either use `lambda::function` / `lambda::bind` in both places
or neither, etc.



src/master/validation.cpp
Lines 959 (patched)
<https://reviews.apache.org/r/58305/#comment245528>

    `foreach` + no `auto`



src/tests/master_validation_tests.cpp
Lines 3776 (patched)
<https://reviews.apache.org/r/58305/#comment245534>

    We can remove the `data` variable.


- Neil Conway


On April 19, 2017, 10:49 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58305/
> -----------------------------------------------------------
> 
> (Updated April 19, 2017, 10:49 p.m.)
> 
> 
> Review request for mesos, Mesos Reviewbot and Neil Conway.
> 
> 
> Bugs: MESOS-7372
>     https://issues.apache.org/jira/browse/MESOS-7372
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The ReRegisterSlaveMessage message sends a number of fields which have
> internal consistency requirements. Add some simple validation checks
> to ensure that we have a minimally consistent re-registration request
> before proceeding.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp 52de2f91bdacf46f913c27382ad50b4f278ad297 
>   src/master/validation.hpp d96287de73ddb30ae2ed841c1b910b0ac6cfa74e 
>   src/master/validation.cpp 3f70875484bbd856ac79a7d6070ac313d69782fa 
>   src/tests/master_validation_tests.cpp 555380870ae115004312cfbe9f145faa92049030 
> 
> 
> Diff: https://reviews.apache.org/r/58305/diff/8/
> 
> 
> Testing
> -------
> 
> Make check (Fedora 25). Internal fuzzing.
> 
> 
> Thanks,
> 
> James Peach
> 
>


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