You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Yong Tang <yo...@outlook.com> on 2016/03/25 21:13:24 UTC
Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/
-----------------------------------------------------------
Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
Bugs: MESOS-5031
https://issues.apache.org/jira/browse/MESOS-5031
Repository: mesos
Description
-------
This fix tries to make the Action enum in Authorization optional
to support upgrades. See MESOS-4997 for details.
Diffs
-----
include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
Diff: https://reviews.apache.org/r/45342/diff/
Testing
-------
make check (Ubuntu 14.04)
Thanks,
Yong Tang
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review125486
-----------------------------------------------------------
Patch looks great!
Reviews applied: [45342]
Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh
- Mesos ReviewBot
On March 25, 2016, 8:13 p.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 25, 2016, 8:13 p.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review125725
-----------------------------------------------------------
Ship it!
Ship It!
- Vinod Kone
On March 25, 2016, 8:13 p.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 25, 2016, 8:13 p.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Adam B <ad...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review125618
-----------------------------------------------------------
Ship it!
Ship It!
- Adam B
On March 25, 2016, 1:13 p.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 25, 2016, 1:13 p.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Yong Tang <yo...@outlook.com>.
> On March 28, 2016, 10:23 p.m., Adam B wrote:
> > Let's change the UNREACHABLE to an error+unauthorized.
Thanks for the review Adam. I updated the review request. Let me know if the change meets the requirements or not.
- Yong
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review125768
-----------------------------------------------------------
On March 29, 2016, 2:04 a.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 29, 2016, 2:04 a.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Adam B <ad...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review125768
-----------------------------------------------------------
Let's change the UNREACHABLE to an error+unauthorized.
src/authorizer/local/authorizer.cpp (line 205)
<https://reviews.apache.org/r/45342/#comment188623>
On second thought, this case is NOT unreachable, and we should error and fail the request rather than aborting the process.
- Adam B
On March 25, 2016, 1:13 p.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 25, 2016, 1:13 p.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Adam B <ad...@mesosphere.io>.
> On April 18, 2016, 5:03 p.m., Ben Mahler wrote:
> > src/authorizer/local/authorizer.cpp, line 204
> > <https://reviews.apache.org/r/45342/diff/2/?file=1317428#file1317428line204>
> >
> > We generally avoid 'default' cases in enum switches because they allow the code to compile when a new enum value is introduced.
> >
> > If you use a 'case UNKNOWN' instead, this will handle the unknown types and will prevent the code from compiling when a new enum value is introduced but not handled.
> >
> > Make sense?
> >
> > Ditto for the recent executor.proto and scheduler.proto changes.
Fixed in https://reviews.apache.org/r/46470/
See also https://reviews.apache.org/r/46364/
- Adam
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review129450
-----------------------------------------------------------
On March 28, 2016, 7:04 p.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 28, 2016, 7:04 p.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review129450
-----------------------------------------------------------
src/authorizer/local/authorizer.cpp (line 204)
<https://reviews.apache.org/r/45342/#comment192864>
We generally avoid 'default' cases in enum switches because they allow the code to compile when a new enum value is introduced.
If you use a 'case UNKNOWN' instead, this will handle the unknown types and will prevent the code from compiling when a new enum value is introduced but not handled.
Make sense?
Ditto for the recent executor.proto and scheduler.proto changes.
- Ben Mahler
On March 29, 2016, 2:04 a.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 29, 2016, 2:04 a.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/#review125853
-----------------------------------------------------------
Patch looks great!
Reviews applied: [45342]
Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh
- Mesos ReviewBot
On March 29, 2016, 2:04 a.m., Yong Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45342/
> -----------------------------------------------------------
>
> (Updated March 29, 2016, 2:04 a.m.)
>
>
> Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
>
>
> Bugs: MESOS-5031
> https://issues.apache.org/jira/browse/MESOS-5031
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This fix tries to make the Action enum in Authorization optional
> to support upgrades. See MESOS-4997 for details.
>
>
> Diffs
> -----
>
> include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
> src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
>
> Diff: https://reviews.apache.org/r/45342/diff/
>
>
> Testing
> -------
>
> make check (Ubuntu 14.04)
>
>
> Thanks,
>
> Yong Tang
>
>
Re: Review Request 45342: Make the Action enum optional to support
upgrades (MESOS-5031).
Posted by Yong Tang <yo...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45342/
-----------------------------------------------------------
(Updated March 29, 2016, 2:04 a.m.)
Review request for mesos, Adam B, Anand Mazumdar, and Vinod Kone.
Changes
-------
Update the review request and change UNREACHABLE to an error+unauthorized.
Bugs: MESOS-5031
https://issues.apache.org/jira/browse/MESOS-5031
Repository: mesos
Description
-------
This fix tries to make the Action enum in Authorization optional
to support upgrades. See MESOS-4997 for details.
Diffs (updated)
-----
include/mesos/authorizer/authorizer.proto 944a493e0979c7ffbd99f3a67785a10425fd9040
src/authorizer/local/authorizer.cpp 0f0d9276337858984f0b19a82ffca74ee84dc650
Diff: https://reviews.apache.org/r/45342/diff/
Testing
-------
make check (Ubuntu 14.04)
Thanks,
Yong Tang