Re: Review Request 45342: Make the Action enum optional to support upgrades (MESOS-5031).

2016-04-24 Thread Adam B


> On April 18, 2016, 5:03 p.m., Ben Mahler wrote:
> > src/authorizer/local/authorizer.cpp, line 204
> > 
> >
> > 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).

2016-04-18 Thread Ben Mahler

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




src/authorizer/local/authorizer.cpp (line 204)


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).

2016-03-29 Thread Mesos ReviewBot

---
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).

2016-03-28 Thread Yong Tang


> 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).

2016-03-28 Thread Yong Tang

---
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



Re: Review Request 45342: Make the Action enum optional to support upgrades (MESOS-5031).

2016-03-28 Thread Adam B

---
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)


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).

2016-03-28 Thread Vinod Kone

---
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).

2016-03-28 Thread Adam B

---
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).

2016-03-25 Thread Mesos ReviewBot

---
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
> 
>



Review Request 45342: Make the Action enum optional to support upgrades (MESOS-5031).

2016-03-25 Thread Yong Tang

---
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