> On March 5, 2015, 11:37 p.m., Joshua Cohen wrote:
> > src/main/python/apache/aurora/client/cli/update.py, line 68
> > <https://reviews.apache.org/r/31779/diff/1/?file=886402#file886402line68>
> >
> >     `if not update_key:`

IIRC comparison to `None` is the best practice here when you are truly testing 
for `None`.  Otherwise you rely on the definition of `__bool__`, which could 
have additional meanings.


> On March 5, 2015, 11:37 p.m., Joshua Cohen wrote:
> > src/main/python/apache/aurora/client/cli/update.py, lines 60-64
> > <https://reviews.apache.org/r/31779/diff/1/?file=886402#file886402line60>
> >
> >     Are we 100% confident that we'll never get back multiple active updates 
> > for a job key?
> >     
> >     Should we raise if for some reason we get back more than one match here 
> > just to be safe?

I like the sound of being defensive.  You've convinced me to also not use a 
loop, which IMHO further emphasizes the expectations.


> On March 5, 2015, 11:37 p.m., Joshua Cohen wrote:
> > src/main/python/apache/aurora/client/cli/update.py, line 66
> > <https://reviews.apache.org/r/31779/diff/1/?file=886402#file886402line66>
> >
> >     Would it make more sense to have this be a context manager or a 
> > decorator to reduce (further) the boilerplate?

I'm not sure what the patterns are for use of context managers, but this would 
seem odd since there's no 'cleanup'.  I suppose i'm ambivalent here, and opted 
for what is (to me) simpler code.  Feel free to push if you feel strongly.


- Bill


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


On March 5, 2015, 11:10 p.m., Bill Farner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31779/
> -----------------------------------------------------------
> 
> (Updated March 5, 2015, 11:10 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Maxim Khutornenko.
> 
> 
> Bugs: AURORA-1093
>     https://issues.apache.org/jira/browse/AURORA-1093
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This was overlooked in AURORA-1093.
> 
> 
> Diffs
> -----
> 
>   api/src/main/thrift/org/apache/aurora/gen/api.thrift 
> 1cd21e598db0c0d51cfed293e5e0fc51d84e0bb0 
>   
> src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
>  8ec5f9a3810b4deae981988487c6a46a20db72a2 
>   src/main/java/org/apache/aurora/scheduler/updater/JobUpdateController.java 
> 5989a62f1651aede6e2372ad3f519a9a947470de 
>   
> src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
>  acdade3dca807a221b4da975d0310c91884ee752 
>   src/main/python/apache/aurora/client/api/__init__.py 
> c07122744e89fe61dbe4bea0c14400425983b2ef 
>   src/main/python/apache/aurora/client/cli/update.py 
> a4890057b7d258926bc3dfb84fd1248e68051f31 
>   
> src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
>  824740856236976984d2114ec6a6aea989a87d1e 
>   src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java 
> 459f745cec1f85ece41376cade39c09254b50013 
>   src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java 
> e24d6bde5f3479a75522e825cce4ec6c30c117aa 
>   src/test/python/apache/aurora/client/api/test_api.py 
> 0d552e8b9f9be300fc28a3f52aabe19e5a51b252 
>   src/test/python/apache/aurora/client/cli/test_create.py 
> a65aab71ee8ce19dc2c05ea230258084d6f55727 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> b596babc3c6877f68094943126b8cd49be3fc635 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 
> 93a5532dc6f7aee2c40bc86385a630b9a1b6f528 
>   src/test/python/apache/aurora/client/cli/util.py 
> 6d3cc51f50b417405549c254531c854565a54949 
> 
> Diff: https://reviews.apache.org/r/31779/diff/
> 
> 
> Testing
> -------
> 
> Normal test suite + end-to-end tests.
> 
> 
> Thanks,
> 
> Bill Farner
> 
>

Reply via email to