You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <bb...@apache.org> on 2017/11/02 01:57:05 UTC
Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/
-----------------------------------------------------------
Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
Repository: mesos
Description
-------
This patch surfaces this information to resource provider manager
users like the agent. In a later patch we will modify the agent to
forward this information to the master.
Diffs
-----
src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
Diff: https://reviews.apache.org/r/63491/diff/1/
Testing
-------
`make check`, additional testing as part of https://reviews.apache.org/r/63496/.
Thanks,
Benjamin Bannier
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
> On Nov. 3, 2017, 10:19 p.m., Greg Mann wrote:
> > src/resource_provider/message.hpp
> > Lines 42 (patched)
> > <https://reviews.apache.org/r/63491/diff/1/?file=1878544#file1878544line42>
> >
> > I'm tempted to use `UUID` here instead of `string`, but we would probably just end up converting it back immediately in the agent before it gets sent to master, so perhaps it's not worth it. What do you think?
I went for a `string` here since a `UUID` cannot be default-constructed, but using a `UUID` turned out to work perfectly fine. Thanks for the suggestion!
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/#review190064
-----------------------------------------------------------
On Nov. 6, 2017, 1:38 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63491/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 1:38 p.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patch surfaces this information to resource provider manager
> users like the agent. In a later patch we will modify the agent to
> forward this information to the master.
>
>
> Diffs
> -----
>
> src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
> src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63491/diff/2/
>
>
> Testing
> -------
>
> `make check`, additional testing as part of https://reviews.apache.org/r/63496/.
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/#review190064
-----------------------------------------------------------
src/resource_provider/message.hpp
Lines 42 (patched)
<https://reviews.apache.org/r/63491/#comment267317>
I'm tempted to use `UUID` here instead of `string`, but we would probably just end up converting it back immediately in the agent before it gets sent to master, so perhaps it's not worth it. What do you think?
- Greg Mann
On Nov. 2, 2017, 1:57 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63491/
> -----------------------------------------------------------
>
> (Updated Nov. 2, 2017, 1:57 a.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patch surfaces this information to resource provider manager
> users like the agent. In a later patch we will modify the agent to
> forward this information to the master.
>
>
> Diffs
> -----
>
> src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
> src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
>
>
> Diff: https://reviews.apache.org/r/63491/diff/1/
>
>
> Testing
> -------
>
> `make check`, additional testing as part of https://reviews.apache.org/r/63496/.
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/#review189897
-----------------------------------------------------------
Fix it, then Ship it!
src/resource_provider/message.hpp
Line 39 (original), 40 (patched)
<https://reviews.apache.org/r/63491/#comment267127>
please move `{` to the next line.
- Jie Yu
On Nov. 6, 2017, 10:12 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63491/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 10:12 p.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patch surfaces this information to resource provider manager
> users like the agent. In a later patch we will modify the agent to
> forward this information to the master.
>
>
> Diffs
> -----
>
> src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
> src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63491/diff/3/
>
>
> Testing
> -------
>
> `make check`, additional testing as part of https://reviews.apache.org/r/63496/.
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/
-----------------------------------------------------------
(Updated Nov. 7, 2017, 11 p.m.)
Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
Changes
-------
Fixed serialization.
Repository: mesos
Description
-------
This patch surfaces this information to resource provider manager
users like the agent. In a later patch we will modify the agent to
forward this information to the master.
Diffs (updated)
-----
src/resource_provider/manager.cpp a878507d71a09a415d8a4573cf2b33c26c985451
src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
Diff: https://reviews.apache.org/r/63491/diff/6/
Changes: https://reviews.apache.org/r/63491/diff/5-6/
Testing
-------
`make check`, additional testing as part of https://reviews.apache.org/r/63496/.
Thanks,
Benjamin Bannier
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/
-----------------------------------------------------------
(Updated Nov. 7, 2017, 1:40 p.m.)
Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
Changes
-------
Removed unneeded `CHECK` spotted by Jan.
Repository: mesos
Description
-------
This patch surfaces this information to resource provider manager
users like the agent. In a later patch we will modify the agent to
forward this information to the master.
Diffs (updated)
-----
src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
Diff: https://reviews.apache.org/r/63491/diff/5/
Changes: https://reviews.apache.org/r/63491/diff/4-5/
Testing
-------
`make check`, additional testing as part of https://reviews.apache.org/r/63496/.
Thanks,
Benjamin Bannier
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/
-----------------------------------------------------------
(Updated Nov. 7, 2017, 1:25 p.m.)
Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
Changes
-------
Addressed comments by Jie.
Repository: mesos
Description
-------
This patch surfaces this information to resource provider manager
users like the agent. In a later patch we will modify the agent to
forward this information to the master.
Diffs (updated)
-----
src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
Diff: https://reviews.apache.org/r/63491/diff/4/
Changes: https://reviews.apache.org/r/63491/diff/3-4/
Testing
-------
`make check`, additional testing as part of https://reviews.apache.org/r/63496/.
Thanks,
Benjamin Bannier
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/
-----------------------------------------------------------
(Updated Nov. 6, 2017, 11:12 p.m.)
Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
Changes
-------
Implemented suggestions by Greg.
Repository: mesos
Description
-------
This patch surfaces this information to resource provider manager
users like the agent. In a later patch we will modify the agent to
forward this information to the master.
Diffs (updated)
-----
src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
Diff: https://reviews.apache.org/r/63491/diff/3/
Changes: https://reviews.apache.org/r/63491/diff/2-3/
Testing
-------
`make check`, additional testing as part of https://reviews.apache.org/r/63496/.
Thanks,
Benjamin Bannier
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
> On Nov. 6, 2017, 10:51 p.m., Greg Mann wrote:
> > src/resource_provider/manager.cpp
> > Lines 368-371 (patched)
> > <https://reviews.apache.org/r/63491/diff/2/?file=1881894#file1881894line368>
> >
> > I found a couple other spots where we indent four spaces in this situation, perhaps we should do the same here? I don't think our style guide explicitly mentions indentation of initialization lists, but the Google style guide does say:
> >
> > "Format a braced initializer list exactly like you would format a function call in its place."
Yeah, this makes sense to me. This is an aggregate initialization and the Google style guide suggests just what you wrote above. Strangly enough our `clang-format` indents this correctly when written as a function call with `()`, but gave above format for `{}`.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/#review190189
-----------------------------------------------------------
On Nov. 6, 2017, 11:12 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63491/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 11:12 p.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patch surfaces this information to resource provider manager
> users like the agent. In a later patch we will modify the agent to
> forward this information to the master.
>
>
> Diffs
> -----
>
> src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
> src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63491/diff/3/
>
>
> Testing
> -------
>
> `make check`, additional testing as part of https://reviews.apache.org/r/63496/.
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/#review190189
-----------------------------------------------------------
Fix it, then Ship it!
src/resource_provider/manager.cpp
Lines 368-371 (patched)
<https://reviews.apache.org/r/63491/#comment267467>
I found a couple other spots where we indent four spaces in this situation, perhaps we should do the same here? I don't think our style guide explicitly mentions indentation of initialization lists, but the Google style guide does say:
"Format a braced initializer list exactly like you would format a function call in its place."
src/resource_provider/message.hpp
Lines 21 (patched)
<https://reviews.apache.org/r/63491/#comment267523>
This is no longer needed.
- Greg Mann
On Nov. 6, 2017, 12:38 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63491/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 12:38 p.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patch surfaces this information to resource provider manager
> users like the agent. In a later patch we will modify the agent to
> forward this information to the master.
>
>
> Diffs
> -----
>
> src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
> src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63491/diff/2/
>
>
> Testing
> -------
>
> `make check`, additional testing as part of https://reviews.apache.org/r/63496/.
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 63491: Added resource version to resource provider
UpdateTotalResources call.
Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63491/
-----------------------------------------------------------
(Updated Nov. 6, 2017, 1:38 p.m.)
Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht.
Changes
-------
Used `UUID` instead of `string`, rebased.
Repository: mesos
Description
-------
This patch surfaces this information to resource provider manager
users like the agent. In a later patch we will modify the agent to
forward this information to the master.
Diffs (updated)
-----
src/resource_provider/manager.cpp 11f890156f0fd099f8a97b07cdc458a0726ee78e
src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521
src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
Diff: https://reviews.apache.org/r/63491/diff/2/
Changes: https://reviews.apache.org/r/63491/diff/1-2/
Testing
-------
`make check`, additional testing as part of https://reviews.apache.org/r/63496/.
Thanks,
Benjamin Bannier