You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Chun-Hung Hsiao <ch...@apache.org> on 2018/05/16 19:20:12 UTC

Review Request 67154: Replaced `RpcResult` with `Try`.

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

Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.


Bugs: MESOS-8924
    https://issues.apache.org/jira/browse/MESOS-8924


Repository: mesos


Description
-------

The `process::grpc::client::Runtime::call` method currently returns a
`RpcResult<Response>`, which contains both a `::grpc::Status` object
and the resulting response protobuf. However, if the `::grpc::Status`
represents a non-OK status, the gRPC library does not guarantee that
the response protobuf is valid. This patch replaces `RpcResult` with
`Try` to provide better type safety.


Diffs
-----

  3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
  3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 


Diff: https://reviews.apache.org/r/67154/diff/1/


Testing
-------

make check in libprocess

NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.


Thanks,

Chun-Hung Hsiao


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/#review203275
-----------------------------------------------------------



PASS: Mesos patch 67154 was successfully built and tested.

Reviews applied: `['67154']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67154

- Mesos Reviewbot Windows


On May 16, 2018, 7:20 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 16, 2018, 7:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/1/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.

> On May 17, 2018, 11:12 a.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/include/process/grpc.hpp
> > Lines 188 (patched)
> > <https://reviews.apache.org/r/67154/diff/3/?file=2024197#file2024197line191>
> >
> >     Why do we `move` here? It seems both not needed to me as `shared_ptr`'s `operator*` returns an lvalue and also potentially like a dangerous antipattern since (at least in general) the shared data is not necessarily safe to access concurrently.
> >     
> >     Please just make a copy here.

I did a move because I'd like to avoid a protobuf copy when doing `promise->set`. `response` is a shared pointer just because C++11 cannot capture unique pointer. All shared pointers in this function are supposed to be unique pointers.


- Chun-Hung


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


On May 16, 2018, 10:02 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 16, 2018, 10:02 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/3/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/#review203317
-----------------------------------------------------------


Fix it, then Ship it!





3rdparty/libprocess/include/process/grpc.hpp
Lines 85 (patched)
<https://reviews.apache.org/r/67154/#comment285423>

    We need to `#include <utility>` for `std::move`.



3rdparty/libprocess/include/process/grpc.hpp
Lines 188 (patched)
<https://reviews.apache.org/r/67154/#comment285424>

    Why do we `move` here? It seems both not needed to me as `shared_ptr`'s `operator*` returns an lvalue and also potentially like a dangerous antipattern since (at least in general) the shared data is not necessarily safe to access concurrently.
    
    Please just make a copy here.


- Benjamin Bannier


On May 17, 2018, 12:02 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 17, 2018, 12:02 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/3/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/
-----------------------------------------------------------

(Updated May 17, 2018, 7:36 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.


Changes
-------

Rebased.


Bugs: MESOS-8924
    https://issues.apache.org/jira/browse/MESOS-8924


Repository: mesos


Description
-------

The `process::grpc::client::Runtime::call` method currently returns a
`RpcResult<Response>`, which contains both a `::grpc::Status` object
and the resulting response protobuf. However, if the `::grpc::Status`
represents a non-OK status, the gRPC library does not guarantee that
the response protobuf is valid. This patch replaces `RpcResult` with
`Try` to provide better type safety.


Diffs
-----

  3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
  3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 


Diff: https://reviews.apache.org/r/67154/diff/4/


Testing
-------

make check in libprocess

NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.


Thanks,

Chun-Hung Hsiao


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/
-----------------------------------------------------------

(Updated May 17, 2018, 6:11 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.


Changes
-------

Addressed Benjamin's comments.


Bugs: MESOS-8924
    https://issues.apache.org/jira/browse/MESOS-8924


Repository: mesos


Description
-------

The `process::grpc::client::Runtime::call` method currently returns a
`RpcResult<Response>`, which contains both a `::grpc::Status` object
and the resulting response protobuf. However, if the `::grpc::Status`
represents a non-OK status, the gRPC library does not guarantee that
the response protobuf is valid. This patch replaces `RpcResult` with
`Try` to provide better type safety.


Diffs (updated)
-----

  3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
  3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 


Diff: https://reviews.apache.org/r/67154/diff/4/

Changes: https://reviews.apache.org/r/67154/diff/3-4/


Testing
-------

make check in libprocess

NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.


Thanks,

Chun-Hung Hsiao


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/
-----------------------------------------------------------

(Updated May 16, 2018, 10:02 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.


Changes
-------

Fixed a copy-paste error.


Bugs: MESOS-8924
    https://issues.apache.org/jira/browse/MESOS-8924


Repository: mesos


Description
-------

The `process::grpc::client::Runtime::call` method currently returns a
`RpcResult<Response>`, which contains both a `::grpc::Status` object
and the resulting response protobuf. However, if the `::grpc::Status`
represents a non-OK status, the gRPC library does not guarantee that
the response protobuf is valid. This patch replaces `RpcResult` with
`Try` to provide better type safety.


Diffs (updated)
-----

  3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
  3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 


Diff: https://reviews.apache.org/r/67154/diff/3/

Changes: https://reviews.apache.org/r/67154/diff/2-3/


Testing
-------

make check in libprocess

NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.


Thanks,

Chun-Hung Hsiao


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/
-----------------------------------------------------------

(Updated May 16, 2018, 9:35 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.


Changes
-------

Addressed Zhitao's and Benjamin's comments.


Bugs: MESOS-8924
    https://issues.apache.org/jira/browse/MESOS-8924


Repository: mesos


Description
-------

The `process::grpc::client::Runtime::call` method currently returns a
`RpcResult<Response>`, which contains both a `::grpc::Status` object
and the resulting response protobuf. However, if the `::grpc::Status`
represents a non-OK status, the gRPC library does not guarantee that
the response protobuf is valid. This patch replaces `RpcResult` with
`Try` to provide better type safety.


Diffs (updated)
-----

  3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
  3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 


Diff: https://reviews.apache.org/r/67154/diff/2/

Changes: https://reviews.apache.org/r/67154/diff/1-2/


Testing
-------

make check in libprocess

NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.


Thanks,

Chun-Hung Hsiao


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.

> On May 16, 2018, 7:45 p.m., Zhitao Li wrote:
> > 3rdparty/libprocess/include/process/grpc.hpp
> > Lines 125-126 (patched)
> > <https://reviews.apache.org/r/67154/diff/1/?file=2024140#file2024140line128>
> >
> >     Do we need to call out what case the `Future` itself can be failed?

Currently the future won't fail.


- Chun-Hung


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


On May 16, 2018, 7:20 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 16, 2018, 7:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/1/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Zhitao Li <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/#review203271
-----------------------------------------------------------




3rdparty/libprocess/include/process/grpc.hpp
Lines 122 (patched)
<https://reviews.apache.org/r/67154/#comment285376>

    This function returns a `Future` of a `Try` ...



3rdparty/libprocess/include/process/grpc.hpp
Lines 125-126 (patched)
<https://reviews.apache.org/r/67154/#comment285377>

    Do we need to call out what case the `Future` itself can be failed?


- Zhitao Li


On May 16, 2018, 12:20 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 16, 2018, 12:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/1/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Chun-Hung Hsiao <ch...@apache.org>.

> On May 16, 2018, 8:36 p.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/include/process/grpc.hpp
> > Line 86 (original), 84-93 (patched)
> > <https://reviews.apache.org/r/67154/diff/1/?file=2024140#file2024140line86>
> >
> >     Is this any different than
> >     
> >         StatusError(const ::grpc::Status& _status)
> >           : Error(_status.error_message()),
> >             status(_status) ...
> >             
> >     We currently don't seem to require this to be able to take generic types.

This is for perfect forwarding (i.e., copying when passing const ref and moving when passing rvalue ref). If you think this is not needed then I'll take your suggestion.


> On May 16, 2018, 8:36 p.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/include/process/grpc.hpp
> > Line 122 (original), 135 (patched)
> > <https://reviews.apache.org/r/67154/diff/1/?file=2024140#file2024140line138>
> >
> >     This would look like a good use case for a hypothetical `Future` with a custom error type (instead of `std::string` aka `Failure`)
> >     
> >         template <typename T, typename E> struct Future;
> >         
> >     I believe there is a bigger interest in customizing the error type of `Try` recently, and it might make sense to think about adding that same power to `Future`. I created https://issues.apache.org/jira/browse/MESOS-8925 to track such work.

This would be a huge work, as it would be very hard to make typed failure to flow through a chain of futures.


- Chun-Hung


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


On May 16, 2018, 7:20 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 16, 2018, 7:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/1/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Re: Review Request 67154: Replaced `RpcResult` with `Try`.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67154/#review203273
-----------------------------------------------------------



Not a proper review, yet.


3rdparty/libprocess/include/process/grpc.hpp
Line 86 (original), 84-93 (patched)
<https://reviews.apache.org/r/67154/#comment285380>

    Is this any different than
    
        StatusError(const ::grpc::Status& _status)
          : Error(_status.error_message()),
            status(_status) ...
            
    We currently don't seem to require this to be able to take generic types.



3rdparty/libprocess/include/process/grpc.hpp
Line 122 (original), 135 (patched)
<https://reviews.apache.org/r/67154/#comment285379>

    This would look like a good use case for a hypothetical `Future` with a custom error type (instead of `std::string` aka `Failure`)
    
        template <typename T, typename E> struct Future;
        
    I believe there is a bigger interest in customizing the error type of `Try` recently, and it might make sense to think about adding that same power to `Future`. I created https://issues.apache.org/jira/browse/MESOS-8925 to track such work.


- Benjamin Bannier


On May 16, 2018, 9:20 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 16, 2018, 9:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/1/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>