Review Request 60184: Resources: Adjusted the `operator<<` to the new resource format [4/N].

2017-06-18 Thread Michael Park

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

Review request for mesos and Neil Conway.


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


Repository: mesos


Description
---

See summary.


Diffs
-

  src/common/resources.cpp cc305e64cadc9fab913ede987625fc1839646306 
  src/v1/resources.cpp 03d6c8098a24a2751617d14f2664de1d88318414 


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


Testing
---


Thanks,

Michael Park



Review Request 60182: Resources: Adjusted the predicates to the new resource format [2/N].

2017-06-18 Thread Michael Park

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

Review request for mesos and Neil Conway.


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


Repository: mesos


Description
---

See summary.


Diffs
-

  include/mesos/resources.hpp be2e377ab9a7332adf373c585e5fafd47ce79f7e 
  include/mesos/v1/resources.hpp fe62166f20088504bdf90a178d3e3b0a94cdc1ac 
  src/common/resources.cpp cc305e64cadc9fab913ede987625fc1839646306 
  src/v1/resources.cpp 03d6c8098a24a2751617d14f2664de1d88318414 


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


Testing
---


Thanks,

Michael Park



Re: Review Request 60181: Resources: Updated the comment to mention the resource format [1/N].

2017-06-18 Thread Neil Conway

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


Ship it!




Ship It!

- Neil Conway


On June 19, 2017, 5:17 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60181/
> ---
> 
> (Updated June 19, 2017, 5:17 a.m.)
> 
> 
> Review request for mesos and Neil Conway.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp be2e377ab9a7332adf373c585e5fafd47ce79f7e 
>   include/mesos/v1/resources.hpp fe62166f20088504bdf90a178d3e3b0a94cdc1ac 
> 
> 
> Diff: https://reviews.apache.org/r/60181/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 60015: Introduced a utility function `Resources::reservationRole`.

2017-06-18 Thread Neil Conway

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


Ship it!





src/common/resources.cpp
Line 1041 (original), 1041 (patched)


Personally, I think this is a bit more readable:

```
if (isUnreserved(resource)) {
  return false;
}

return role.isNone() || role.get() == reservationRole(resource);
```


- Neil Conway


On June 13, 2017, 8:34 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60015/
> ---
> 
> (Updated June 13, 2017, 8:34 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Introduced a utility function `Resources::reservationRole`.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp be2e377ab9a7332adf373c585e5fafd47ce79f7e 
>   include/mesos/v1/resources.hpp fe62166f20088504bdf90a178d3e3b0a94cdc1ac 
>   src/common/resources.cpp cc305e64cadc9fab913ede987625fc1839646306 
>   src/v1/resources.cpp 03d6c8098a24a2751617d14f2664de1d88318414 
> 
> 
> Diff: https://reviews.apache.org/r/60015/diff/9/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Review Request 60181: Resources: Updated the comment to mention the resource format [1/N].

2017-06-18 Thread Michael Park

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

Review request for mesos and Neil Conway.


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


Repository: mesos


Description
---

See summary.


Diffs
-

  include/mesos/resources.hpp be2e377ab9a7332adf373c585e5fafd47ce79f7e 
  include/mesos/v1/resources.hpp fe62166f20088504bdf90a178d3e3b0a94cdc1ac 


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


Testing
---


Thanks,

Michael Park



Re: Review Request 60036: Avoided exposing `role` in JSON for resources with refined reservations.

2017-06-18 Thread Michael Park


> On June 18, 2017, 6:46 p.m., Neil Conway wrote:
> > src/common/http.cpp
> > Lines 519 (patched)
> > 
> >
> > Backticks not double quotes?

Eh... I'm referring to fields in a JSON object here, I feel like double-quotes 
are fine.


- Michael


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


On June 15, 2017, 12:39 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60036/
> ---
> 
> (Updated June 15, 2017, 12:39 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> With reservation refinement, we use the `Resource.reservations` field to
> express the reservation state. Due to the fact that `Resource.role` is
> an optional field __and__ has a default value, our generic Protobuf to
> JSON code injects the `role` field with the default value even if it's
> not set. Since this will likely confuse users, here we manually remove
> the `Resource.role` field if the resource has refined reservations.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 167dce2b9a2d3b68a1df5b4079f701482d34db28 
>   src/master/http.cpp e01c3fcdc0df63934fc82ee4c9bf081f54cf7ea2 
>   src/slave/http.cpp 78b35865e465ff1e8e7e4950fdb60e3a48b916b6 
> 
> 
> Diff: https://reviews.apache.org/r/60036/diff/10/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 60178: Added test for endpoint resource format.

2017-06-18 Thread Neil Conway

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

(Updated June 19, 2017, 1:40 a.m.)


Review request for mesos and Michael Park.


Repository: mesos


Description
---

Added test for endpoint resource format.


Diffs (updated)
-

  src/tests/master_validation_tests.cpp 
83370fa5653fe5da666ec577b05001c4a5499848 


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

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 60036: Avoided exposing `role` in JSON for resources with refined reservations.

2017-06-18 Thread Neil Conway

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



Tests, can do later.


src/common/http.hpp
Lines 131 (patched)


Note that it doesn't roundtrip.



src/common/http.hpp
Lines 135 (patched)


Indentation is non-idiomatic



src/common/http.cpp
Lines 519 (patched)


Backticks not double quotes?



src/common/http.cpp
Lines 526 (patched)


Can we add `is` checks here, for safety's sake?


- Neil Conway


On June 15, 2017, 7:39 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60036/
> ---
> 
> (Updated June 15, 2017, 7:39 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> With reservation refinement, we use the `Resource.reservations` field to
> express the reservation state. Due to the fact that `Resource.role` is
> an optional field __and__ has a default value, our generic Protobuf to
> JSON code injects the `role` field with the default value even if it's
> not set. Since this will likely confuse users, here we manually remove
> the `Resource.role` field if the resource has refined reservations.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 167dce2b9a2d3b68a1df5b4079f701482d34db28 
>   src/master/http.cpp e01c3fcdc0df63934fc82ee4c9bf081f54cf7ea2 
>   src/slave/http.cpp 78b35865e465ff1e8e7e4950fdb60e3a48b916b6 
> 
> 
> Diff: https://reviews.apache.org/r/60036/diff/9/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 60036: Avoided exposing `role` in JSON for resources with refined reservations.

2017-06-18 Thread Neil Conway

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


Ship it!




Ship It!

- Neil Conway


On June 15, 2017, 7:39 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60036/
> ---
> 
> (Updated June 15, 2017, 7:39 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> With reservation refinement, we use the `Resource.reservations` field to
> express the reservation state. Due to the fact that `Resource.role` is
> an optional field __and__ has a default value, our generic Protobuf to
> JSON code injects the `role` field with the default value even if it's
> not set. Since this will likely confuse users, here we manually remove
> the `Resource.role` field if the resource has refined reservations.
> 
> 
> Diffs
> -
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 167dce2b9a2d3b68a1df5b4079f701482d34db28 
>   src/master/http.cpp e01c3fcdc0df63934fc82ee4c9bf081f54cf7ea2 
>   src/slave/http.cpp 78b35865e465ff1e8e7e4950fdb60e3a48b916b6 
> 
> 
> Diff: https://reviews.apache.org/r/60036/diff/9/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 60022: Introduced `convertResourceFormat` to convert between resource formats.

2017-06-18 Thread Neil Conway

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




src/common/resources_utils.hpp
Lines 61 (patched)


Typo



src/common/resources_utils.hpp
Lines 63 (patched)


Can we remove the 3x repitition of this? Seems sufficient to have the 
header comment.



src/common/resources_utils.hpp
Lines 75 (patched)


Typo.



src/common/resources_utils.hpp
Lines 76 (patched)


We also do this for frameworks that send old resources, right? i.e., 
clarify that the old-agent conversion discussion is an example.



src/common/resources_utils.hpp
Lines 96 (patched)


Can we clarify this slightly?

"We inject the resources with the "pre-reservation-refinement" format to 
enable backward compatibility with external tooling. If the master has been 
upgraded to a version that supports reservation refinement but no refined 
reservations have been made, the endpoints will return the data in both the new 
and old formats to maximize backward compatibility. However, once a reservation 
refinement is made to a resource, that resource is only returned in the new 
format."



src/common/resources_utils.hpp
Lines 103 (patched)


"Converts the given `Resource` to the specified `ResourceFormat`."



src/common/resources_utils.hpp
Lines 105 (patched)


I'd remove these comments, they seem confusing/redundant with the 
discussion above.



src/common/resources_utils.cpp
Lines 87 (patched)


I'm confused by this function's precondition. When converting to 
`PRE_RESERVATION_REFINEMENT`, the resources _cannot_ be in the pre-refined 
format; but when converting to `POST_RESERVATION_REFINEMENT`, the resources 
_can_ be in the post-refined format. Seems inconsistent.



src/common/resources_utils.cpp
Lines 125 (patched)


Typo



src/common/resources_utils.cpp
Lines 135 (patched)


"we're in"



src/common/resources_utils.cpp
Lines 158 (patched)


I feel like `reservation->CopyFrom(resource->reservation())` would be more 
idiomatic...?


- Neil Conway


On June 15, 2017, 8:48 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60022/
> ---
> 
> (Updated June 15, 2017, 8:48 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Neil Conway.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> With reservation refinement, we introduced a new resource format to
> enable creating a refined reservation on top of an existing reservation.
> We still have the "pre-reservation-refinement" format which uses
> the `Resource.role` and `Resource.reservation` fields, and we now also
> have the "post-reservation-refinement" format which uses
> the `Resource.reservations` field to represent the reservation state.
> 
> In order to simplify our code, we use `convertResourceFormat` to
> canonicalize the resources into the "post-reservation-refinement" in
> memory, and convert them back as necessary.
> 
> 
> Diffs
> -
> 
>   src/common/resources_utils.hpp 2840f459288bbe8440eda08119d4f86a8be5a291 
>   src/common/resources_utils.cpp c3088433d8c147b06dbef6f310fbe4059c3dc0ba 
> 
> 
> Diff: https://reviews.apache.org/r/60022/diff/8/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Review Request 60179: Introduced a utility function `Resources::hasRefinedReservations`.

2017-06-18 Thread Michael Park

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

Review request for mesos.


Repository: mesos


Description
---

Introduced a utility function `Resources::hasRefinedReservations`.


Testing
---


Thanks,

Michael Park



Re: Review Request 60178: Added test for endpoint resource format.

2017-06-18 Thread Michael Park

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


Fix it, then Ship it!





src/tests/master_validation_tests.cpp
Lines 292-293 (patched)


Can we take this one out? It's invalid not because they're inconsistent but 
rather because the `ReservationInfo` doesn't have the required fields set. 
Seems like we have the inconsistency tests below anyway.


- Michael Park


On June 18, 2017, 6:12 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60178/
> ---
> 
> (Updated June 18, 2017, 6:12 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Added test for endpoint resource format.
> 
> 
> Diffs
> -
> 
>   src/tests/master_validation_tests.cpp 
> 83370fa5653fe5da666ec577b05001c4a5499848 
> 
> 
> Diff: https://reviews.apache.org/r/60178/diff/2/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 60178: Added test for endpoint resource format.

2017-06-18 Thread Neil Conway

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

(Updated June 19, 2017, 1:12 a.m.)


Review request for mesos and Michael Park.


Changes
---

Avoid using resource utility functions.


Repository: mesos


Description
---

Added test for endpoint resource format.


Diffs (updated)
-

  src/tests/master_validation_tests.cpp 
83370fa5653fe5da666ec577b05001c4a5499848 


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

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 60174: Updated the resources validation logic to allow for the endpoint format.

2017-06-18 Thread Neil Conway

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


Ship it!




Ship It!

- Neil Conway


On June 18, 2017, 10:02 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60174/
> ---
> 
> (Updated June 18, 2017, 10:02 p.m.)
> 
> 
> Review request for mesos and Neil Conway.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> For backwards compatibility of external tools consuming endpoints,
> We'll inject the "pre-reservation-refinement" format for resources
> without refined reservations. That is, the `Resource.role` and
> `Resource.reservation` fields will be present as well as
> the in with the single `Resource.reservations` field.
> 
> Since the users of the endpoints are likely to feed the result back into
> Mesos, we need to update the validation logic to allow these resources
> to be considered valid.
> 
> 
> Diffs
> -
> 
>   src/common/resources.cpp f12ab970fbce2815a5a22e5080af9fb70c6aef9f 
>   src/v1/resources.cpp 30644ee0bfeb8498d7b10daa79c0da369201abf3 
> 
> 
> Diff: https://reviews.apache.org/r/60174/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Review Request 60178: Added test for endpoint resource format.

2017-06-18 Thread Neil Conway

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

Review request for mesos and Michael Park.


Repository: mesos


Description
---

Added test for endpoint resource format.


Diffs
-

  src/tests/master_validation_tests.cpp 
83370fa5653fe5da666ec577b05001c4a5499848 


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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 60174: Updated the resources validation logic to allow for the endpoint format.

2017-06-18 Thread Neil Conway

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



In the commit message, can we explain why we need to update validation to 
support this new format? i.e., the commit message says the master is going to 
_emit_ this weird format, but it doesn't necessarily follow why the master 
needs to _accept_ inputs in this format.

Seems like we should update the tests for this change, right?

- Neil Conway


On June 18, 2017, 10:02 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60174/
> ---
> 
> (Updated June 18, 2017, 10:02 p.m.)
> 
> 
> Review request for mesos and Neil Conway.
> 
> 
> Bugs: MESOS-7655
> https://issues.apache.org/jira/browse/MESOS-7655
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> For backwards compatibility of external tools consuming endpoints,
> We'll inject the "pre-reservation-refinement" format for resources
> without refined reservations. That is, the `Resource.role` and
> `Resource.reservation` fields will be filled in with the single
> reservation inside `Resource.reservations`.
> 
> We update the validation logic to allow these resources to be valid.
> 
> 
> Diffs
> -
> 
>   src/common/resources.cpp f12ab970fbce2815a5a22e5080af9fb70c6aef9f 
>   src/v1/resources.cpp 30644ee0bfeb8498d7b10daa79c0da369201abf3 
> 
> 
> Diff: https://reviews.apache.org/r/60174/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 60175: Introduced a utility function `Resources::hasRefinedReservations`.

2017-06-18 Thread Neil Conway

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


Ship it!




Is it worth adding coverage of this to the tests?

- Neil Conway


On June 18, 2017, 10:03 p.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60175/
> ---
> 
> (Updated June 18, 2017, 10:03 p.m.)
> 
> 
> Review request for mesos and Neil Conway.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   include/mesos/resources.hpp d380a590404f119cdb1f715c43bbb0052422d1ec 
>   include/mesos/v1/resources.hpp 66c2b215761c488a1554f925726d53035d40708a 
>   src/common/resources.cpp f12ab970fbce2815a5a22e5080af9fb70c6aef9f 
>   src/v1/resources.cpp 30644ee0bfeb8498d7b10daa79c0da369201abf3 
> 
> 
> Diff: https://reviews.apache.org/r/60175/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Review Request 60175: Introduced a utility function `Resources::hasRefinedReservations`.

2017-06-18 Thread Michael Park

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

Review request for mesos and Neil Conway.


Repository: mesos


Description
---

See summary.


Diffs
-

  include/mesos/resources.hpp d380a590404f119cdb1f715c43bbb0052422d1ec 
  include/mesos/v1/resources.hpp 66c2b215761c488a1554f925726d53035d40708a 
  src/common/resources.cpp f12ab970fbce2815a5a22e5080af9fb70c6aef9f 
  src/v1/resources.cpp 30644ee0bfeb8498d7b10daa79c0da369201abf3 


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


Testing
---


Thanks,

Michael Park



Review Request 60174: Updated the resources validation logic to allow for the endpoint format.

2017-06-18 Thread Michael Park

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

Review request for mesos and Neil Conway.


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


Repository: mesos


Description
---

For backwards compatibility of external tools consuming endpoints,
We'll inject the "pre-reservation-refinement" format for resources
without refined reservations. That is, the `Resource.role` and
`Resource.reservation` fields will be filled in with the single
reservation inside `Resource.reservations`.

We update the validation logic to allow these resources to be valid.


Diffs
-

  src/common/resources.cpp f12ab970fbce2815a5a22e5080af9fb70c6aef9f 
  src/v1/resources.cpp 30644ee0bfeb8498d7b10daa79c0da369201abf3 


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


Testing
---


Thanks,

Michael Park



Re: Review Request 59454: Adjust tests to account for GCC 7.1 fix in bytes.hpp.

2017-06-18 Thread Neil Conway

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


Ship it!




lgtm, although I'll change the commit message -- there isn't anything specific 
about GCC 7.1 in this fix.

- Neil Conway


On May 24, 2017, 5:53 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59454/
> ---
> 
> (Updated May 24, 2017, 5:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, James Peach, Michael Park, and 
> Neil Conway.
> 
> 
> Bugs: MESOS-7520
> https://issues.apache.org/jira/browse/MESOS-7520
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This fixes tests that uses the old inheritance types from `bytes.hpp`.
> 
> 
> Diffs
> -
> 
>   src/tests/persistent_volume_tests.cpp ef0085316 
>   src/tests/role_tests.cpp 03b6f7bd6 
> 
> 
> Diff: https://reviews.apache.org/r/59454/diff/3/
> 
> 
> Testing
> ---
> 
> `./bootstrap && mkdir build && cd build && ../configure --disable-python 
> --disable-java --disable-optimize --disable-hardening &&  make check 
> -j$(nproc)`
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59989: Added a test `ProtobufTest.JsonifyMap`.

2017-06-18 Thread Qian Zhang

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

(Updated June 18, 2017, 8:43 p.m.)


Review request for mesos, Anand Mazumdar and Zhitao Li.


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


Repository: mesos


Description
---

Added a test `ProtobufTest.JsonifyMap`.


Diffs
-

  3rdparty/stout/tests/protobuf_tests.cpp 
8877e8934e0f7875bfedcfa88b491ce4b13ca44f 


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


Testing
---

sudo make check


Thanks,

Qian Zhang



Re: Review Request 59988: Added a new protobuf message `MapMessage` for protobuf tests.

2017-06-18 Thread Qian Zhang

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

(Updated June 18, 2017, 8:42 p.m.)


Review request for mesos, Anand Mazumdar and Zhitao Li.


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


Repository: mesos


Description
---

Added a new protobuf message `MapMessage` for protobuf tests.


Diffs
-

  3rdparty/stout/tests/protobuf_tests.proto 
d16726aa8060aea2b830040b20dbdd467c801483 


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


Testing
---


Thanks,

Qian Zhang



Re: Review Request 59987: Added protobuf map support.

2017-06-18 Thread Qian Zhang

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

(Updated June 18, 2017, 8:42 p.m.)


Review request for mesos, Anand Mazumdar and Zhitao Li.


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


Repository: mesos


Description
---

Map is a feature of proto2 syntax, but it can only be compiled
with proto3 compiler, see the following discussion for details:
https://groups.google.com/forum/#!topic/protobuf/p4WxcplrlA4
We have already upgraded the compiler from 2.6.1 to 3.3.0 in
MESOS-7228, however, to use protobuf map in Mesos code, we also
need to add the protobuf map support to the code in Mesos for
converting protobuf message to JSON object and parsing JSON
object as protobuf message, that is what I have done in this patch.


Diffs
-

  3rdparty/stout/include/stout/protobuf.hpp 
2735354256f35d2792c3690bcc8fc61c3f6d9524 


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


Testing
---


Thanks,

Qian Zhang



Re: Review Request 59988: Added a new protobuf message `MapMessage` for protobuf tests.

2017-06-18 Thread Qian Zhang

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

(Updated June 18, 2017, 8:40 p.m.)


Review request for mesos, Anand Mazumdar and Zhitao Li.


Changes
---

Rebased


Repository: mesos


Description (updated)
---

Added a new protobuf message `MapMessage` for protobuf tests.


Diffs (updated)
-

  3rdparty/stout/tests/protobuf_tests.proto 
d16726aa8060aea2b830040b20dbdd467c801483 


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

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


Testing
---


Thanks,

Qian Zhang



Re: Review Request 59987: Added protobuf map support.

2017-06-18 Thread Qian Zhang

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

(Updated June 18, 2017, 8:39 p.m.)


Review request for mesos, Anand Mazumdar and Zhitao Li.


Repository: mesos


Description
---

Map is a feature of proto2 syntax, but it can only be compiled
with proto3 compiler, see the following discussion for details:
https://groups.google.com/forum/#!topic/protobuf/p4WxcplrlA4
We have already upgraded the compiler from 2.6.1 to 3.3.0 in
MESOS-7228, however, to use protobuf map in Mesos code, we also
need to add the protobuf map support to the code in Mesos for
converting protobuf message to JSON object and parsing JSON
object as protobuf message, that is what I have done in this patch.


Diffs
-

  3rdparty/stout/include/stout/protobuf.hpp 
2735354256f35d2792c3690bcc8fc61c3f6d9524 


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


Testing
---


Thanks,

Qian Zhang