Re: Review Request 27650: Remove duplicate call to log handling code.

2014-11-06 Thread Bill Farner

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

Ship it!


Thanks!  This is now on master:

$ git log -1 origin/master
commit 53c732df49ab9959ca9917abffb0fd6d3abbc203
Author: Zameer Manji 
Date:   Thu Nov 6 12:39:32 2014 -0800

Remove duplicate call to log handling code. This duplicate call added 
another
stderr handler to the logger which caused each message to be printed 
twice to
stderr.

Bugs closed: AURORA-793

Reviewed at https://reviews.apache.org/r/27650/

- Bill Farner


On Nov. 6, 2014, 12:02 a.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27650/
> ---
> 
> (Updated Nov. 6, 2014, 12:02 a.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Bill Farner.
> 
> 
> Bugs: AURORA-793
> https://issues.apache.org/jira/browse/AURORA-793
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Remove duplicate call to log handling code. This duplicate call added another 
> stderr handler to the logger which caused each message to be printed twice to 
> stderr.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/client/cli/client.py 
> 0cb69448cd24372067ac845eca5862bc3d3a46a9 
> 
> Diff: https://reviews.apache.org/r/27650/diff/
> 
> 
> Testing
> ---
> 
> vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 job create -v 
> devcluster/www-data/devel/not_here /vagrant/not_real.aurora
> log(info): Error executing command: Error loading configuration: [Errno 2] No 
> such file or directory: '/vagrant/not_real.aurora'
> Error executing command: Error loading configuration: [Errno 2] No such file 
> or directory: '/vagrant/not_real.aurora'
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 27650: Remove duplicate call to log handling code.

2014-11-06 Thread Zameer Manji


> On Nov. 6, 2014, 9:38 a.m., Maxim Khutornenko wrote:
> > This fix does not address the duplicate error message at the end:
> > ```
> > $ aurora2 job create devcluster/vagrant/test/cron_hello_world4 
> > aurora/examples/jobs/cron_hello_world.aurora
> > Job creation failed due to error:
> > Job already exists: vagrant/test/cron_hello_world4
> > Error executing command: Job creation failed due to error:
> > ```
> > 
> > This happens due to context.check_and_log_response() raising CommandError 
> > with a template message, which is caught and reprinted in _execute() 
> > (__init__.py). 
> > 
> > A possible fix could be relying on a different error type in 
> > check_and_log_response() that would not log error message in _execute().

That's beyond the scope of this change. This change just aims to reduce 
duplication in logging. The above problem lies in how we print out data to 
users.


- Zameer


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


On Nov. 5, 2014, 4:02 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27650/
> ---
> 
> (Updated Nov. 5, 2014, 4:02 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Bill Farner.
> 
> 
> Bugs: AURORA-793
> https://issues.apache.org/jira/browse/AURORA-793
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Remove duplicate call to log handling code. This duplicate call added another 
> stderr handler to the logger which caused each message to be printed twice to 
> stderr.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/client/cli/client.py 
> 0cb69448cd24372067ac845eca5862bc3d3a46a9 
> 
> Diff: https://reviews.apache.org/r/27650/diff/
> 
> 
> Testing
> ---
> 
> vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 job create -v 
> devcluster/www-data/devel/not_here /vagrant/not_real.aurora
> log(info): Error executing command: Error loading configuration: [Errno 2] No 
> such file or directory: '/vagrant/not_real.aurora'
> Error executing command: Error loading configuration: [Errno 2] No such file 
> or directory: '/vagrant/not_real.aurora'
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 27650: Remove duplicate call to log handling code.

2014-11-06 Thread Maxim Khutornenko

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


This fix does not address the duplicate error message at the end:
```
$ aurora2 job create devcluster/vagrant/test/cron_hello_world4 
aurora/examples/jobs/cron_hello_world.aurora
Job creation failed due to error:
Job already exists: vagrant/test/cron_hello_world4
Error executing command: Job creation failed due to error:
```

This happens due to context.check_and_log_response() raising CommandError with 
a template message, which is caught and reprinted in _execute() (__init__.py). 

A possible fix could be relying on a different error type in 
check_and_log_response() that would not log error message in _execute().

- Maxim Khutornenko


On Nov. 6, 2014, 12:02 a.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27650/
> ---
> 
> (Updated Nov. 6, 2014, 12:02 a.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Bill Farner.
> 
> 
> Bugs: AURORA-793
> https://issues.apache.org/jira/browse/AURORA-793
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Remove duplicate call to log handling code. This duplicate call added another 
> stderr handler to the logger which caused each message to be printed twice to 
> stderr.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/client/cli/client.py 
> 0cb69448cd24372067ac845eca5862bc3d3a46a9 
> 
> Diff: https://reviews.apache.org/r/27650/diff/
> 
> 
> Testing
> ---
> 
> vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 job create -v 
> devcluster/www-data/devel/not_here /vagrant/not_real.aurora
> log(info): Error executing command: Error loading configuration: [Errno 2] No 
> such file or directory: '/vagrant/not_real.aurora'
> Error executing command: Error loading configuration: [Errno 2] No such file 
> or directory: '/vagrant/not_real.aurora'
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 27650: Remove duplicate call to log handling code.

2014-11-05 Thread Joshua Cohen

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

Ship it!


Ship It!

- Joshua Cohen


On Nov. 6, 2014, 12:02 a.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27650/
> ---
> 
> (Updated Nov. 6, 2014, 12:02 a.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Bill Farner.
> 
> 
> Bugs: AURORA-793
> https://issues.apache.org/jira/browse/AURORA-793
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Remove duplicate call to log handling code. This duplicate call added another 
> stderr handler to the logger which caused each message to be printed twice to 
> stderr.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/client/cli/client.py 
> 0cb69448cd24372067ac845eca5862bc3d3a46a9 
> 
> Diff: https://reviews.apache.org/r/27650/diff/
> 
> 
> Testing
> ---
> 
> vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 job create -v 
> devcluster/www-data/devel/not_here /vagrant/not_real.aurora
> log(info): Error executing command: Error loading configuration: [Errno 2] No 
> such file or directory: '/vagrant/not_real.aurora'
> Error executing command: Error loading configuration: [Errno 2] No such file 
> or directory: '/vagrant/not_real.aurora'
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 27650: Remove duplicate call to log handling code.

2014-11-05 Thread Aurora ReviewBot

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

Ship it!


Master (0ad2fca) is green with this patch.
  ./build-support/jenkins/build.sh

- Aurora ReviewBot


On Nov. 6, 2014, 12:02 a.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27650/
> ---
> 
> (Updated Nov. 6, 2014, 12:02 a.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Bill Farner.
> 
> 
> Bugs: AURORA-793
> https://issues.apache.org/jira/browse/AURORA-793
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Remove duplicate call to log handling code. This duplicate call added another 
> stderr handler to the logger which caused each message to be printed twice to 
> stderr.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/client/cli/client.py 
> 0cb69448cd24372067ac845eca5862bc3d3a46a9 
> 
> Diff: https://reviews.apache.org/r/27650/diff/
> 
> 
> Testing
> ---
> 
> vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 job create -v 
> devcluster/www-data/devel/not_here /vagrant/not_real.aurora
> log(info): Error executing command: Error loading configuration: [Errno 2] No 
> such file or directory: '/vagrant/not_real.aurora'
> Error executing command: Error loading configuration: [Errno 2] No such file 
> or directory: '/vagrant/not_real.aurora'
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>