mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 72822: Extracted FrameworkInfo comparison logic from tests.
Date Wed, 02 Sep 2020 23:54:04 GMT

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


Ship it!




The main thing is that the current header structure seems a bit confusing (see below).
Also, I guess we could avoid the templated class in favor of a function, if we were to just
allocate the differencer on the heap to avoid moves/copies?


src/Makefile.am
Lines 1094 (patched)
<https://reviews.apache.org/r/72822/#comment310864>

    Should we just call it type_utils_differencers.hpp? Impl seems a bit odd since it's not
really the usual `_impl.h` meaning.
    
    If it's to become more generally the home of type utils stuff shared between v1 and v0,
then this location might be a bit confusing.



src/common/type_utils_impl.hpp
Lines 33-36 (patched)
<https://reviews.apache.org/r/72822/#comment310863>

    I guess we could make it a function if we place it on the heap and have the TODO reflect
that we can avoid that later?
    
    ```
    // TODO(asekretenko): Remove the unique_ptr wrapper if
    // MessageDifferencer becomes move/copy-constructible in
    // future versions of protobuf (currently it is not!)
    unique_ptr<MessageDifferencer> frameworkInfoDifferencer();
    ```



src/tests/master/update_framework_tests.cpp
Lines 64-65 (patched)
<https://reviews.apache.org/r/72822/#comment310866>

    I wonder if we could have the code look like:
    
    typeutils::diff(...)
    v1::typeutils::diff(...)
    
    That might be a bit clearer than just `diff` on its own.



src/v1/mesos.cpp
Lines 28 (patched)
<https://reviews.apache.org/r/72822/#comment310865>

    Per my other comment, it looks a little odd to be pulling in what appears to be a v0 type
utils related header


- Benjamin Mahler


On Sept. 1, 2020, 7:45 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72822/
> -----------------------------------------------------------
> 
> (Updated Sept. 1, 2020, 7:45 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-10166
>     https://issues.apache.org/jira/browse/MESOS-10166
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extracts the code that performs `FrameworkInfo` comparison
> via protobuf `MessageDifferencer` from the framework update tests
> into a set of general-purpose methods.
> 
> 
> Diffs
> -----
> 
>   include/mesos/type_utils.hpp da9fd9694b08827b968514b4b078097c912640c8 
>   include/mesos/v1/mesos.hpp d8304f10d6ac6bbcf014e515e0bfd77a2b96e138 
>   src/Makefile.am 1043c7b860372a17dba1e84fe5547388cb6a3b63 
>   src/common/type_utils.cpp bb437844183688e7f69eb0874d87efe5a7d6daf2 
>   src/common/type_utils_impl.hpp PRE-CREATION 
>   src/tests/master/update_framework_tests.cpp d2a63b696e976d9e3c729390d80f33180ab4aa1c

>   src/v1/mesos.cpp c2fb528d323899c42b32c0713b38ebf6f909dd29 
> 
> 
> Diff: https://reviews.apache.org/r/72822/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


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