mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guangya Liu <gyliu...@gmail.com>
Subject Re: Review Request 51683: Avoided resource validation when flatten resources.
Date Sun, 11 Sep 2016 03:02:58 GMT


> On 九月 10, 2016, 7:35 a.m., Jiang Yan Xu wrote:
> > src/cli/execute.cpp, line 377
> > <https://reviews.apache.org/r/51683/diff/2/?file=1494022#file1494022line377>
> >
> >     In the places where it's not **obvious** (i.e., the arguments are locally defined)
that the role/reservation **must be valid**, I think we should at least use a CHECK on the
result of `flatten()` instead of directly `get()`. This is probably true especially for all
non-testing code.
> >     
> >     Mind do a sweep for the whole patch?

Thanks Jiang Yan, I made an update for all of the non-testing code, hope it is OK.


- Guangya


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


On 九月 8, 2016, 6:31 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51683/
> -----------------------------------------------------------
> 
> (Updated 九月 8, 2016, 6:31 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-6131
>     https://issues.apache.org/jira/browse/MESOS-6131
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> 1) Previously if role or reservation info are invalid,
> the result is an empty Resources object, now it returns
> an error.
> 2) Added a new flatten() method to flatten resources with
> star role and empty reservation.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 87828aa5e4818efd40dd72dc199669281b8a15ae 
>   include/mesos/v1/resources.hpp 27bdd275277edc60d97b720e596f21e8e8f8dc27 
>   src/cli/execute.cpp b752d057a3d86482ef1a4baaf31052469e38dc76 
>   src/common/resources.cpp 77ee92193de1f34131f7a86b7d16731c9c3e17e2 
>   src/examples/dynamic_reservation_framework.cpp 850bb2a5b243dd5d5a8b6476570b4f943fde6185

>   src/examples/test_framework.cpp a83766a92617d50eadd92ec55113e049a7290d03 
>   src/examples/test_http_framework.cpp 441e86c88b035d9a268b8b51b95da3e1eb842a62 
>   src/tests/api_tests.cpp e440d1b44fb0b40dd1f68209c71e5ca0cd19f4fb 
>   src/tests/hierarchical_allocator_tests.cpp b2179215f3a4c2f4018670e8e54f02e06c39c3b1

>   src/tests/mesos.hpp 9bcdaf19833d08ccfbfe4781179f8626e141a7e1 
>   src/tests/persistent_volume_endpoints_tests.cpp 266c2a0ff4a99baa96a7c4980f076755603256a9

>   src/tests/reservation_endpoints_tests.cpp bee5ea6b3a3ee7fafb7312a6d89de79d62c57ec1

>   src/tests/reservation_tests.cpp 000957826011bf28f7550a83db3e60a796162fb3 
>   src/tests/resources_tests.cpp f627862870279e5a778aa83e1ddcaa88c27ba1cb 
>   src/tests/role_tests.cpp 162c9414a70723a212cfd39ac5c0b8325c3f3b5d 
>   src/v1/resources.cpp 4ba5bf87c9b9fef67eeb447a3f3b520f1e81ad77 
> 
> Diff: https://reviews.apache.org/r/51683/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> ```
> ./bin/mesos-tests.sh  --gtest_filter="ResourcesOperationTest.FlattenResources"
> [==========] Running 1 test from 1 test case.
> [----------] Global test environment set-up.
> [----------] 1 test from ResourcesOperationTest
> [ RUN      ] ResourcesOperationTest.FlattenResources
> [       OK ] ResourcesOperationTest.FlattenResources (3 ms)
> [----------] 1 test from ResourcesOperationTest (3 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (24 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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