Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Bill Farner

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

Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian Wickman.


Bugs: AURORA-889
https://issues.apache.org/jira/browse/AURORA-889


Repository: aurora


Description
---

Most of these are find/replace on Mock to use create_autospec instead.  There 
are a few additional changes of note:
- introduction of `api_util.py` to provide a speccable interface for what 
`SchedulerProxy` supports
- converted many (but not all) unnecessary uses of mocks to concrete objects
- attempted to explore an improved test pattern in `test_restart_failed_status` 
(`test_restart.py`) to avoid a Mock for the options object


Diffs
-

  src/main/python/apache/aurora/client/cli/update.py 
1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
  src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_api.py 
47b5236edde4a396f99b47b0a25f9a02dd8bf689 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 
cb2503e41c7643f9398f31dd3fca64a0b94c4383 
  src/test/python/apache/aurora/client/api/test_quota_check.py 
d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
af8353edef92d79f20779beca2785318b4e05ceb 
  src/test/python/apache/aurora/client/api/test_task_util.py 
582c708f09e3efb0fca32713a0b6e2f44d24ab22 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py 
fb5a527a3ec32028371732fca5ac186ecc0d325a 
  src/test/python/apache/aurora/client/cli/test_command_hooks.py 
eb4d413e42c7653ca52950536f693306c591a048 
  src/test/python/apache/aurora/client/cli/test_create.py 
6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
  src/test/python/apache/aurora/client/cli/test_cron.py 
b84bbfc1eace430ff64af3c77b2cf093c6525c80 
  src/test/python/apache/aurora/client/cli/test_diff.py 
f7c07f2e4d44db20250337a053ce6b841cc22a63 
  src/test/python/apache/aurora/client/cli/test_inspect.py 
b5b949b5e10c406786290bc6bfb706e430c21222 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
  src/test/python/apache/aurora/client/cli/test_logging.py 
10fa015b697554d4786aa4ade0e90b91bc8f18cc 
  src/test/python/apache/aurora/client/cli/test_plugins.py 
0b29346c107ca7341b2c7c5639ded607310b81b1 
  src/test/python/apache/aurora/client/cli/test_quota.py 
6e38227b19872be86b989663b5b206b533d8c9b6 
  src/test/python/apache/aurora/client/cli/test_restart.py 
ff702648777b0e719b910faf08a5bcda798e94eb 
  src/test/python/apache/aurora/client/cli/test_sla.py 
a7bfd35701fc57875bcbc939eab9688d0afa0d90 
  src/test/python/apache/aurora/client/cli/test_status.py 
6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
  src/test/python/apache/aurora/client/cli/test_supdate.py 
bf979e27799da56a2781a3af8370bd44cb216f78 
  src/test/python/apache/aurora/client/cli/test_task_run.py 
8458606d282a3bcef8129d25fa123d28f8f8f7df 
  src/test/python/apache/aurora/client/cli/test_update.py 
840cde982c310e257263add1848e4225b22eaa04 
  src/test/python/apache/aurora/client/cli/util.py 
796c4f9880a0f834a6950472892981e8a6789a97 
  src/test/python/apache/aurora/client/commands/test_admin.py 
cae539594dc73e05920d7ae08610634e7458178c 
  src/test/python/apache/aurora/client/commands/test_admin_sla.py 
a565318d1044f52571de41a921842c606edbc437 
  src/test/python/apache/aurora/client/commands/test_cancel_update.py 
5d2a7898e95266e94e041e68b1471fc47606286d 
  src/test/python/apache/aurora/client/commands/test_create.py 
be69ed57cc328d39c5866f0737a727241445e160 
  src/test/python/apache/aurora/client/commands/test_diff.py 
9a486c3551a8bf0e269e51f64406bc96e3cf7161 
  src/test/python/apache/aurora/client/commands/test_hooks.py 
638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
  src/test/python/apache/aurora/client/commands/test_kill.py 
8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
  src/test/python/apache/aurora/client/commands/test_listjobs.py 
d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
  src/test/python/apache/aurora/client/commands/test_restart.py 
6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
  src/test/python/apache/aurora/client/commands/test_run.py 
738a42bd2a8aa56bb4900c1b48ecbd043eaa4b3e 
  src/test/python/apache/aurora/client/commands/test_ssh.py 
6d51bb30581668e73250c4d6c8dc1b95d83a3762 
  src/test/python/apache/aurora/client/commands/test_status.py 
062b1321e7342eac7c4408a966006d429268406f 
  src/test/python/apache/aurora/client/commands/test_update.py 
e359d32c9b4f4be975b4e7d0fd77e096300fb01d 
  src/test/python/apache/aurora/client/commands/util.py 
fb842582781c12389520f3bf896dc185f1b1904f 
  src/test/python/apache/aurora/client/hooks/test_hooked_api.py 
496bdb0eda338381f1315b953b1925df7a116dd7 
  

Re: Review Request 27542: Add test coverage for WriteAheadStorage.

2014-11-05 Thread Bill Farner


 On Nov. 5, 2014, 2:19 a.m., Maxim Khutornenko wrote:
  src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java,
   line 164
  https://reviews.apache.org/r/27542/diff/1/?file=747813#file747813line164
 
  duplicate asserts

Nope, this is two calls to mutateTasks, both return values being checked.


- Bill


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


On Nov. 3, 2014, 10:11 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27542/
 ---
 
 (Updated Nov. 3, 2014, 10:11 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Maxim Khutornenko.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Bring WriteAheadStorage up to 100% branch and instruction coverage.
 
 
 Diffs
 -
 
   src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 
 cbab75964052a950e1b868b3a53eb15fadb31cb7 
   
 src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 
 094d1c66e1f464687e0416bc652dba4b1bda0f7e 
   
 src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java
  PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/27542/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 27542: Add test coverage for WriteAheadStorage.

2014-11-05 Thread Bill Farner

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

(Updated Nov. 5, 2014, 6:04 p.m.)


Review request for Aurora, Kevin Sweeney and Maxim Khutornenko.


Changes
---

Needed to disable a PMD rule that forbids injecting Logger.


Repository: aurora


Description
---

Bring WriteAheadStorage up to 100% branch and instruction coverage.


Diffs (updated)
-

  config/pmd/logging-java.xml e4ec6adffdb88d35de3f5001d79e94befa44d067 
  src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 
cbab75964052a950e1b868b3a53eb15fadb31cb7 
  src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 
094d1c66e1f464687e0416bc652dba4b1bda0f7e 
  
src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java
 PRE-CREATION 

Diff: https://reviews.apache.org/r/27542/diff/


Testing
---


Thanks,

Bill Farner



Re: Review Request 27630: Mark inotify disk collector test as flaky.

2014-11-05 Thread Aurora ReviewBot

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


Master (9847b7b) is red with this patch.
  ./build-support/jenkins/build.sh

  pants build (options) [spec] (build args)
  pants build (options) [spec]... -- (build args)

Options:
  --version show program's version number and exit
  --no-pantsrc  Specifies that pantsrc files should be ignored.
  --log-exitLog an exit message on success or failure.
  -t CONN_TIMEOUT, --timeout=CONN_TIMEOUT
Number of seconds to wait for http connections.
  -i INTERPRETERS, --interpreter=INTERPRETERS
Constrain what Python interpreters to use.  Uses
Requirement format from pkg_resources, e.g.
'CPython=2.6,3' or 'PyPy'. By default, no
constraints are used.  Multiple constraints may be
added.  They will be ORed together.
  -v, --verbose Show verbose output.
  -f, --fastRun tests in a single chroot.

Builds the specified Python target(s). Use ./pants goal for JVM and other
targets.

- Aurora ReviewBot


On Nov. 5, 2014, 6:04 p.m., Joshua Cohen wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27630/
 ---
 
 (Updated Nov. 5, 2014, 6:04 p.m.)
 
 
 Review request for Aurora and Bill Farner.
 
 
 Bugs: AURORA-916
 https://issues.apache.org/jira/browse/AURORA-916
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Mark inotify disk collector test as flaky.
 
 
 Diffs
 -
 
   src/test/python/apache/thermos/monitoring/test_disk.py 
 913f87d90944e2c5359ac0b7c2205ddf7db676ba 
 
 Diff: https://reviews.apache.org/r/27630/diff/
 
 
 Testing
 ---
 
 ./pants build src/test/python/apache/thermos/monitoring:test_disk
 
 
 Thanks,
 
 Joshua Cohen
 




Re: Review Request 27542: Add test coverage for WriteAheadStorage.

2014-11-05 Thread Aurora ReviewBot

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


Master (9847b7b) is red with this patch.
  ./build-support/jenkins/build.sh

  pants build (options) [spec] (build args)
  pants build (options) [spec]... -- (build args)

Options:
  --version show program's version number and exit
  --no-pantsrc  Specifies that pantsrc files should be ignored.
  --log-exitLog an exit message on success or failure.
  -t CONN_TIMEOUT, --timeout=CONN_TIMEOUT
Number of seconds to wait for http connections.
  -i INTERPRETERS, --interpreter=INTERPRETERS
Constrain what Python interpreters to use.  Uses
Requirement format from pkg_resources, e.g.
'CPython=2.6,3' or 'PyPy'. By default, no
constraints are used.  Multiple constraints may be
added.  They will be ORed together.
  -v, --verbose Show verbose output.
  -f, --fastRun tests in a single chroot.

Builds the specified Python target(s). Use ./pants goal for JVM and other
targets.

- Aurora ReviewBot


On Nov. 5, 2014, 6:04 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27542/
 ---
 
 (Updated Nov. 5, 2014, 6:04 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Maxim Khutornenko.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Bring WriteAheadStorage up to 100% branch and instruction coverage.
 
 
 Diffs
 -
 
   config/pmd/logging-java.xml e4ec6adffdb88d35de3f5001d79e94befa44d067 
   src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 
 cbab75964052a950e1b868b3a53eb15fadb31cb7 
   
 src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 
 094d1c66e1f464687e0416bc652dba4b1bda0f7e 
   
 src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java
  PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/27542/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 27630: Mark inotify disk collector test as flaky.

2014-11-05 Thread Joshua Cohen

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

(Updated Nov. 5, 2014, 6:16 p.m.)


Review request for Aurora and Bill Farner.


Changes
---

Trying to appease the reviewbot.


Bugs: AURORA-916
https://issues.apache.org/jira/browse/AURORA-916


Repository: aurora


Description
---

Mark inotify disk collector test as flaky.


Diffs (updated)
-

  src/test/python/apache/thermos/monitoring/test_disk.py 
913f87d90944e2c5359ac0b7c2205ddf7db676ba 

Diff: https://reviews.apache.org/r/27630/diff/


Testing
---

./pants build src/test/python/apache/thermos/monitoring:test_disk


Thanks,

Joshua Cohen



Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Aurora ReviewBot

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


Master (9847b7b) is red with this patch.
  ./build-support/jenkins/build.sh

  pants build (options) [spec] (build args)
  pants build (options) [spec]... -- (build args)

Options:
  --version show program's version number and exit
  --no-pantsrc  Specifies that pantsrc files should be ignored.
  --log-exitLog an exit message on success or failure.
  -t CONN_TIMEOUT, --timeout=CONN_TIMEOUT
Number of seconds to wait for http connections.
  -i INTERPRETERS, --interpreter=INTERPRETERS
Constrain what Python interpreters to use.  Uses
Requirement format from pkg_resources, e.g.
'CPython=2.6,3' or 'PyPy'. By default, no
constraints are used.  Multiple constraints may be
added.  They will be ORed together.
  -v, --verbose Show verbose output.
  -f, --fastRun tests in a single chroot.

Builds the specified Python target(s). Use ./pants goal for JVM and other
targets.

- Aurora ReviewBot


On Nov. 5, 2014, 5:58 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 5:58 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian 
 Wickman.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   

Re: Review Request 27630: Mark inotify disk collector test as flaky.

2014-11-05 Thread Aurora ReviewBot

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

Ship it!


Master (9847b7b) is green with this patch.
  ./build-support/jenkins/build.sh

- Aurora ReviewBot


On Nov. 5, 2014, 6:16 p.m., Joshua Cohen wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27630/
 ---
 
 (Updated Nov. 5, 2014, 6:16 p.m.)
 
 
 Review request for Aurora and Bill Farner.
 
 
 Bugs: AURORA-916
 https://issues.apache.org/jira/browse/AURORA-916
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Mark inotify disk collector test as flaky.
 
 
 Diffs
 -
 
   src/test/python/apache/thermos/monitoring/test_disk.py 
 913f87d90944e2c5359ac0b7c2205ddf7db676ba 
 
 Diff: https://reviews.apache.org/r/27630/diff/
 
 
 Testing
 ---
 
 ./pants build src/test/python/apache/thermos/monitoring:test_disk
 
 
 Thanks,
 
 Joshua Cohen
 




Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Joshua Cohen

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


I know this was mostly automated, but how do you feel about creating a helper 
for the create_autospec call since it seems like every instance passes the same 
values for spec_set and instance?


src/main/python/apache/aurora/client/cli/update.py
https://reviews.apache.org/r/27628/#comment101310

Debug cruft? Kill?



src/test/python/apache/aurora/client/api/test_api.py
https://reviews.apache.org/r/27628/#comment101312

Is `[]` the correct value for `spec_set`? From the docs:

If spec_set is True then attempting to set attributes that don’t exist 
on the spec object will raise an AttributeError.

Here's the relevant source: 
https://code.google.com/p/mock/source/browse/mock.py#2180

It looks like the only usage of spec_set by create_autospec is as a truthy 
value (confusingly it causes the *spec* to be passed as a kwarg value called 
`spec_set`.


- Joshua Cohen


On Nov. 5, 2014, 5:58 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 5:58 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian 
 Wickman.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 

Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Zameer Manji

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



src/test/python/apache/aurora/client/cli/test_inspect.py
https://reviews.apache.org/r/27628/#comment101338

I don't think we need to use a mock here, why can't we just create the 
Pystachio object and use it instead of the mock?


- Zameer Manji


On Nov. 5, 2014, 9:58 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 9:58 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian 
 Wickman.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5d2a7898e95266e94e041e68b1471fc47606286d 
   src/test/python/apache/aurora/client/commands/test_create.py 
 be69ed57cc328d39c5866f0737a727241445e160 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 9a486c3551a8bf0e269e51f64406bc96e3cf7161 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 

Re: Review Request 27591: Remove --bind-var for cron deschedule.

2014-11-05 Thread Bill Farner

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

Ship it!


Thanks!  This is now on master

$ git log -1 origin/master
commit 98a4f42d5d2d6ab2ff3b54b68862e9d1e2b1e217
Author: Zameer Manji zma...@twopensource.com
Date:   Wed Nov 5 11:25:32 2014 -0800

Remove --bind-var for cron deschedule.

Bugs closed: AURORA-854

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

- Bill Farner


On Nov. 5, 2014, 2:52 a.m., Zameer Manji wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27591/
 ---
 
 (Updated Nov. 5, 2014, 2:52 a.m.)
 
 
 Review request for Aurora and Bill Farner.
 
 
 Bugs: AURORA-854
 https://issues.apache.org/jira/browse/AURORA-854
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Remove --bind-var for cron deschedule.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/cron.py 
 3416c8e1932056725880f2007b60d77112759428 
 
 Diff: https://reviews.apache.org/r/27591/diff/
 
 
 Testing
 ---
 
 
 [tw-mbp-zmanji aurora (fix-cron-help)]$ ./pants 
 ./src/main/python/apache/aurora/client/cli:aurora2
 Build operating on top level addresses: 
 set([BuildFileAddress(/Users/zmanji/workspace/aurora/src/main/python/apache/aurora/client/cli/BUILD,
  aurora2)])
 Building PythonBinary 
 PythonBinary(BuildFileAddress(/Users/zmanji/workspace/aurora/src/main/python/apache/aurora/client/cli/BUILD,
  aurora2)):
 Wrote /Users/zmanji/workspace/aurora/dist/aurora2.pex
 [tw-mbp-zmanji aurora (fix-cron-help)]$ ./dist/aurora2.pex cron deschedule 
 --help
 usage: aurora2.pex cron deschedule [-h] [--verbose-logging]
[--logging-level numeric_level]
[--error-log-dir ERROR_LOG_DIR]
[--skip-hooks hook,hook,...]
CLUSTER/ROLE/ENV/NAME
 
 positional arguments:
   CLUSTER/ROLE/ENV/NAME
 Fully specified job key, in CLUSTER/ROLE/ENV/NAME
 format
 
 optional arguments:
   -h, --helpshow this help message and exit
   --verbose-logging, -v
 Show verbose logging, including all logs up to level
 INFO (equivalent to --logging-level=20)
   --logging-level numeric_level
 Set logging to a specific numeric level, using the
 standard python log-levels.
   --error-log-dir ERROR_LOG_DIR
 Directory location where error files containing stack
 traces should be written. If the directory doesn't
 exist, it will be created
   --skip-hooks hook,hook,...
 A comma-separated list of command hook names that
 should be skipped. If the hooks cannot be skipped,
 then the command will be aborted
 
 
 
 Thanks,
 
 Zameer Manji
 




Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Bill Farner


 On Nov. 5, 2014, 7:11 p.m., Zameer Manji wrote:
  src/test/python/apache/aurora/client/cli/test_inspect.py, line 31
  https://reviews.apache.org/r/27628/diff/1/?file=750448#file750448line31
 
  I don't think we need to use a mock here, why can't we just create the 
  Pystachio object and use it instead of the mock?

I'd like to leave the TODO.  There are 52 call sites relevant, and i'd like to 
avoid further growth of this diff.


- Bill


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


On Nov. 5, 2014, 5:58 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 5:58 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian 
 Wickman.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5d2a7898e95266e94e041e68b1471fc47606286d 
   src/test/python/apache/aurora/client/commands/test_create.py 
 be69ed57cc328d39c5866f0737a727241445e160 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 9a486c3551a8bf0e269e51f64406bc96e3cf7161 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
   

Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Aurora ReviewBot

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


Master (98a4f42) is red with this patch.
  ./build-support/jenkins/build.sh

src.test.python.apache.aurora.client.cli.task   
.   SUCCESS
src.test.python.apache.aurora.client.cli.update 
.   SUCCESS
src.test.python.apache.aurora.client.commands.admin 
.   SUCCESS
src.test.python.apache.aurora.client.commands.core  
.   SUCCESS
src.test.python.apache.aurora.client.commands.hooks 
.   SUCCESS
src.test.python.apache.aurora.client.commands.maintenance   
.   SUCCESS
src.test.python.apache.aurora.client.commands.run   
.   SUCCESS
src.test.python.apache.aurora.client.commands.ssh   
.   SUCCESS
src.test.python.apache.aurora.client.config 
.   SUCCESS
src.test.python.apache.aurora.client.hooks.hooked_api   
.   SUCCESS
src.test.python.apache.aurora.client.hooks.non_hooked_api   
.   SUCCESS
src.test.python.apache.aurora.common.test_aurora_job_key
.   SUCCESS
src.test.python.apache.aurora.common.test_cluster   
.   SUCCESS
src.test.python.apache.aurora.common.test_cluster_option
.   SUCCESS
src.test.python.apache.aurora.common.test_clusters  
.   SUCCESS
src.test.python.apache.aurora.common.test_http_signaler 
.   SUCCESS
src.test.python.apache.aurora.common.test_shellify  
.   SUCCESS
src.test.python.apache.aurora.common.test_transport 
.   SUCCESS
src.test.python.apache.aurora.config.test_base  
.   SUCCESS
src.test.python.apache.aurora.config.test_constraint_parsing
.   SUCCESS
src.test.python.apache.aurora.config.test_loader
.   SUCCESS
src.test.python.apache.aurora.config.test_thrift
.   SUCCESS
src.test.python.apache.aurora.executor.common.announcer 
.   SUCCESS
src.test.python.apache.aurora.executor.common.directory_sandbox 
.   SUCCESS
src.test.python.apache.aurora.executor.common.executor_timeout  
.   SUCCESS
src.test.python.apache.aurora.executor.common.health_checker
.   SUCCESS
src.test.python.apache.aurora.executor.common.status_checker
.   SUCCESS
src.test.python.apache.aurora.executor.common.task_info 
.   SUCCESS
src.test.python.apache.aurora.executor.executor_base
.   SUCCESS
src.test.python.apache.aurora.executor.executor_detector
.   SUCCESS
src.test.python.apache.aurora.executor.executor_vars
.   SUCCESS
src.test.python.apache.aurora.executor.gc_executor  
.   SUCCESS
src.test.python.apache.aurora.executor.status_manager   
.   SUCCESS
src.test.python.apache.aurora.executor.thermos_executor 
.   SUCCESS
src.test.python.apache.aurora.executor.thermos_task_runner  
.   SUCCESS
src.test.python.apache.thermos.bin.test_thermos 
.   SUCCESS
src.test.python.apache.thermos.common.test_pathspec 
.   SUCCESS
src.test.python.apache.thermos.common.test_planner  
.   SUCCESS
src.test.python.apache.thermos.common.test_task_planner 
.   SUCCESS
src.test.python.apache.thermos.config.test_schema   
.   SUCCESS
src.test.python.apache.thermos.core.test_angry  
.   SUCCESS
src.test.python.apache.thermos.core.test_ephemerals 
.   SUCCESS
src.test.python.apache.thermos.core.test_failing_runner 
.   SUCCESS
src.test.python.apache.thermos.core.test_failure_limit  
.   SUCCESS
src.test.python.apache.thermos.core.test_finalization   
.   SUCCESS
src.test.python.apache.thermos.core.test_helper 
.   SUCCESS
src.test.python.apache.thermos.core.test_process
.   SUCCESS
src.test.python.apache.thermos.core.test_runner_integration 
.   SUCCESS

Re: Review Request 27542: Add test coverage for WriteAheadStorage.

2014-11-05 Thread Kevin Sweeney

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



src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java
https://reviews.apache.org/r/27542/#comment101358

Note: none of these annotations will work since we're constructing this 
class without Guice.


- Kevin Sweeney


On Nov. 5, 2014, 10:04 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27542/
 ---
 
 (Updated Nov. 5, 2014, 10:04 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Maxim Khutornenko.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Bring WriteAheadStorage up to 100% branch and instruction coverage.
 
 
 Diffs
 -
 
   config/pmd/logging-java.xml e4ec6adffdb88d35de3f5001d79e94befa44d067 
   src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 
 cbab75964052a950e1b868b3a53eb15fadb31cb7 
   
 src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 
 094d1c66e1f464687e0416bc652dba4b1bda0f7e 
   
 src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java
  PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/27542/diff/
 
 
 Testing
 ---
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Kevin Sweeney

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



src/test/python/apache/aurora/client/api/test_api.py
https://reviews.apache.org/r/27628/#comment101359

no need for a mock here, just use the generated class.

also this is useless, as you're free to do

```py
response.fakeMadeUpProperty = 10
```


- Kevin Sweeney


On Nov. 5, 2014, 11:42 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 11:42 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian 
 Wickman.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5d2a7898e95266e94e041e68b1471fc47606286d 
   src/test/python/apache/aurora/client/commands/test_create.py 
 be69ed57cc328d39c5866f0737a727241445e160 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 9a486c3551a8bf0e269e51f64406bc96e3cf7161 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
   

Re: Review Request 27586: Increase robustness when reading PEX-INFO

2014-11-05 Thread Bill Farner

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

Ship it!


Thanks!  This is now on master:

$ git log -1 origin/master
commit 0ad2fcabb6444c2da9d156b0117ee8ae8e3b713f
Author: Zameer Manji zma...@twopensource.com
Date:   Wed Nov 5 14:29:26 2014 -0800

Increase robustness when reading PEX-INFO

Bugs closed: AURORA-456

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

- Bill Farner


On Nov. 5, 2014, 3:34 a.m., Zameer Manji wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27586/
 ---
 
 (Updated Nov. 5, 2014, 3:34 a.m.)
 
 
 Review request for Aurora and Bill Farner.
 
 
 Bugs: AURORA-456
 https://issues.apache.org/jira/browse/AURORA-456
 
 
 Repository: aurora
 
 
 Description
 ---
 
 This patch prevents aurora version from crashing when it is built with a 
 different version of pants.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/commands/core.py 
 1644f84b5887c2f8172789d82de00e6a735f5d0c 
   src/test/python/apache/aurora/client/commands/BUILD 
 17933dedfa08c9d12c369087bf801e7c35cdde9b 
   src/test/python/apache/aurora/client/commands/test_version.py PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/27586/diff/
 
 
 Testing
 ---
 
 [tw-mbp-zmanji aurora (fix-version)]$ ./pants 
 ./src/main/python/apache/aurora/client/cli:aurora2
 Build operating on top level addresses: 
 set([BuildFileAddress(/Users/zmanji/workspace/aurora/src/main/python/apache/aurora/client/cli/BUILD,
  aurora2)])
 Building PythonBinary 
 PythonBinary(BuildFileAddress(/Users/zmanji/workspace/aurora/src/main/python/apache/aurora/client/cli/BUILD,
  aurora2)):
 Wrote /Users/zmanji/workspace/aurora/dist/aurora2.pex
 [tw-mbp-zmanji aurora (fix-version)]$ ./pants 
 src/main/python/apache/aurora/client/bin:aurora_client
 Build operating on top level addresses: 
 set([BuildFileAddress(/Users/zmanji/workspace/aurora/src/main/python/apache/aurora/client/bin/BUILD,
  aurora_client)])
 Building PythonBinary 
 PythonBinary(BuildFileAddress(/Users/zmanji/workspace/aurora/src/main/python/apache/aurora/client/bin/BUILD,
  aurora_client)):
 Wrote /Users/zmanji/workspace/aurora/dist/aurora_client.pex
 [tw-mbp-zmanji aurora (fix-version)]$ ./dist/aurora2.pex version
 Aurora client build info:
   sha: d03187404dac583884a979dd302dd3cd36163c98
   date: Tuesday Nov 04, 2014 11:39:07
 Aurora API version: APIVersion(major=3)
 [tw-mbp-zmanji aurora (fix-version)]$ ./dist/aurora_client.pex version
 Aurora client build info:
   sha: d03187404dac583884a979dd302dd3cd36163c98
   date: Tuesday Nov 04, 2014 11:39:18
 Aurora API version: APIVersion(major=3)
 
 
 Thanks,
 
 Zameer Manji
 




Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Bill Farner

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

(Updated Nov. 5, 2014, 11:37 p.m.)


Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Zameer Manji.


Bugs: AURORA-889
https://issues.apache.org/jira/browse/AURORA-889


Repository: aurora


Description
---

Most of these are find/replace on Mock to use create_autospec instead.  There 
are a few additional changes of note:
- introduction of `api_util.py` to provide a speccable interface for what 
`SchedulerProxy` supports
- converted many (but not all) unnecessary uses of mocks to concrete objects
- attempted to explore an improved test pattern in `test_restart_failed_status` 
(`test_restart.py`) to avoid a Mock for the options object


Diffs
-

  src/main/python/apache/aurora/client/cli/update.py 
1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
  src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_api.py 
47b5236edde4a396f99b47b0a25f9a02dd8bf689 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 
cb2503e41c7643f9398f31dd3fca64a0b94c4383 
  src/test/python/apache/aurora/client/api/test_quota_check.py 
d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
af8353edef92d79f20779beca2785318b4e05ceb 
  src/test/python/apache/aurora/client/api/test_task_util.py 
582c708f09e3efb0fca32713a0b6e2f44d24ab22 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py 
fb5a527a3ec32028371732fca5ac186ecc0d325a 
  src/test/python/apache/aurora/client/cli/test_command_hooks.py 
eb4d413e42c7653ca52950536f693306c591a048 
  src/test/python/apache/aurora/client/cli/test_create.py 
6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
  src/test/python/apache/aurora/client/cli/test_cron.py 
b84bbfc1eace430ff64af3c77b2cf093c6525c80 
  src/test/python/apache/aurora/client/cli/test_diff.py 
f7c07f2e4d44db20250337a053ce6b841cc22a63 
  src/test/python/apache/aurora/client/cli/test_inspect.py 
b5b949b5e10c406786290bc6bfb706e430c21222 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
  src/test/python/apache/aurora/client/cli/test_logging.py 
10fa015b697554d4786aa4ade0e90b91bc8f18cc 
  src/test/python/apache/aurora/client/cli/test_plugins.py 
0b29346c107ca7341b2c7c5639ded607310b81b1 
  src/test/python/apache/aurora/client/cli/test_quota.py 
6e38227b19872be86b989663b5b206b533d8c9b6 
  src/test/python/apache/aurora/client/cli/test_restart.py 
ff702648777b0e719b910faf08a5bcda798e94eb 
  src/test/python/apache/aurora/client/cli/test_sla.py 
a7bfd35701fc57875bcbc939eab9688d0afa0d90 
  src/test/python/apache/aurora/client/cli/test_status.py 
6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
  src/test/python/apache/aurora/client/cli/test_supdate.py 
bf979e27799da56a2781a3af8370bd44cb216f78 
  src/test/python/apache/aurora/client/cli/test_task_run.py 
8458606d282a3bcef8129d25fa123d28f8f8f7df 
  src/test/python/apache/aurora/client/cli/test_update.py 
840cde982c310e257263add1848e4225b22eaa04 
  src/test/python/apache/aurora/client/cli/util.py 
796c4f9880a0f834a6950472892981e8a6789a97 
  src/test/python/apache/aurora/client/commands/test_admin.py 
cae539594dc73e05920d7ae08610634e7458178c 
  src/test/python/apache/aurora/client/commands/test_admin_sla.py 
a565318d1044f52571de41a921842c606edbc437 
  src/test/python/apache/aurora/client/commands/test_cancel_update.py 
5d2a7898e95266e94e041e68b1471fc47606286d 
  src/test/python/apache/aurora/client/commands/test_create.py 
be69ed57cc328d39c5866f0737a727241445e160 
  src/test/python/apache/aurora/client/commands/test_diff.py 
9a486c3551a8bf0e269e51f64406bc96e3cf7161 
  src/test/python/apache/aurora/client/commands/test_hooks.py 
638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
  src/test/python/apache/aurora/client/commands/test_kill.py 
8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
  src/test/python/apache/aurora/client/commands/test_listjobs.py 
d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
  src/test/python/apache/aurora/client/commands/test_restart.py 
6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
  src/test/python/apache/aurora/client/commands/test_run.py 
738a42bd2a8aa56bb4900c1b48ecbd043eaa4b3e 
  src/test/python/apache/aurora/client/commands/test_ssh.py 
6d51bb30581668e73250c4d6c8dc1b95d83a3762 
  src/test/python/apache/aurora/client/commands/test_status.py 
062b1321e7342eac7c4408a966006d429268406f 
  src/test/python/apache/aurora/client/commands/test_update.py 
e359d32c9b4f4be975b4e7d0fd77e096300fb01d 
  src/test/python/apache/aurora/client/commands/util.py 
fb842582781c12389520f3bf896dc185f1b1904f 
  src/test/python/apache/aurora/client/hooks/test_hooked_api.py 

Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Bill Farner

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

(Updated Nov. 5, 2014, 11:53 p.m.)


Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Zameer Manji.


Bugs: AURORA-889
https://issues.apache.org/jira/browse/AURORA-889


Repository: aurora


Description
---

Most of these are find/replace on Mock to use create_autospec instead.  There 
are a few additional changes of note:
- introduction of `api_util.py` to provide a speccable interface for what 
`SchedulerProxy` supports
- converted many (but not all) unnecessary uses of mocks to concrete objects
- attempted to explore an improved test pattern in `test_restart_failed_status` 
(`test_restart.py`) to avoid a Mock for the options object


Diffs (updated)
-

  src/main/python/apache/aurora/client/cli/update.py 
1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
  src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_api.py 
47b5236edde4a396f99b47b0a25f9a02dd8bf689 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 
cb2503e41c7643f9398f31dd3fca64a0b94c4383 
  src/test/python/apache/aurora/client/api/test_quota_check.py 
d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
af8353edef92d79f20779beca2785318b4e05ceb 
  src/test/python/apache/aurora/client/api/test_task_util.py 
582c708f09e3efb0fca32713a0b6e2f44d24ab22 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py 
fb5a527a3ec32028371732fca5ac186ecc0d325a 
  src/test/python/apache/aurora/client/cli/test_command_hooks.py 
eb4d413e42c7653ca52950536f693306c591a048 
  src/test/python/apache/aurora/client/cli/test_create.py 
6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
  src/test/python/apache/aurora/client/cli/test_cron.py 
b84bbfc1eace430ff64af3c77b2cf093c6525c80 
  src/test/python/apache/aurora/client/cli/test_diff.py 
f7c07f2e4d44db20250337a053ce6b841cc22a63 
  src/test/python/apache/aurora/client/cli/test_inspect.py 
b5b949b5e10c406786290bc6bfb706e430c21222 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
  src/test/python/apache/aurora/client/cli/test_logging.py 
10fa015b697554d4786aa4ade0e90b91bc8f18cc 
  src/test/python/apache/aurora/client/cli/test_plugins.py 
0b29346c107ca7341b2c7c5639ded607310b81b1 
  src/test/python/apache/aurora/client/cli/test_quota.py 
6e38227b19872be86b989663b5b206b533d8c9b6 
  src/test/python/apache/aurora/client/cli/test_restart.py 
ff702648777b0e719b910faf08a5bcda798e94eb 
  src/test/python/apache/aurora/client/cli/test_sla.py 
a7bfd35701fc57875bcbc939eab9688d0afa0d90 
  src/test/python/apache/aurora/client/cli/test_status.py 
6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
  src/test/python/apache/aurora/client/cli/test_supdate.py 
bf979e27799da56a2781a3af8370bd44cb216f78 
  src/test/python/apache/aurora/client/cli/test_task_run.py 
8458606d282a3bcef8129d25fa123d28f8f8f7df 
  src/test/python/apache/aurora/client/cli/test_update.py 
840cde982c310e257263add1848e4225b22eaa04 
  src/test/python/apache/aurora/client/cli/util.py 
796c4f9880a0f834a6950472892981e8a6789a97 
  src/test/python/apache/aurora/client/commands/test_admin.py 
cae539594dc73e05920d7ae08610634e7458178c 
  src/test/python/apache/aurora/client/commands/test_admin_sla.py 
a565318d1044f52571de41a921842c606edbc437 
  src/test/python/apache/aurora/client/commands/test_cancel_update.py 
5d2a7898e95266e94e041e68b1471fc47606286d 
  src/test/python/apache/aurora/client/commands/test_create.py 
be69ed57cc328d39c5866f0737a727241445e160 
  src/test/python/apache/aurora/client/commands/test_diff.py 
9a486c3551a8bf0e269e51f64406bc96e3cf7161 
  src/test/python/apache/aurora/client/commands/test_hooks.py 
638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
  src/test/python/apache/aurora/client/commands/test_kill.py 
8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
  src/test/python/apache/aurora/client/commands/test_listjobs.py 
d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
  src/test/python/apache/aurora/client/commands/test_restart.py 
6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
  src/test/python/apache/aurora/client/commands/test_run.py 
738a42bd2a8aa56bb4900c1b48ecbd043eaa4b3e 
  src/test/python/apache/aurora/client/commands/test_ssh.py 
6d51bb30581668e73250c4d6c8dc1b95d83a3762 
  src/test/python/apache/aurora/client/commands/test_status.py 
062b1321e7342eac7c4408a966006d429268406f 
  src/test/python/apache/aurora/client/commands/test_update.py 
e359d32c9b4f4be975b4e7d0fd77e096300fb01d 
  src/test/python/apache/aurora/client/commands/util.py 
fb842582781c12389520f3bf896dc185f1b1904f 
  src/test/python/apache/aurora/client/hooks/test_hooked_api.py 

Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Zameer Manji

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



src/test/python/apache/aurora/client/commands/test_create.py
https://reviews.apache.org/r/27628/#comment101417

Don't we want to remove spec_set=[] ?


- Zameer Manji


On Nov. 5, 2014, 3:53 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 3:53 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Zameer Manji.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5d2a7898e95266e94e041e68b1471fc47606286d 
   src/test/python/apache/aurora/client/commands/test_create.py 
 be69ed57cc328d39c5866f0737a727241445e160 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 9a486c3551a8bf0e269e51f64406bc96e3cf7161 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
   src/test/python/apache/aurora/client/commands/test_run.py 
 

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

2014-11-05 Thread Zameer Manji

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

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 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Aurora ReviewBot

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

Ship it!


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

- Aurora ReviewBot


On Nov. 5, 2014, 11:53 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 5, 2014, 11:53 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Zameer Manji.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5d2a7898e95266e94e041e68b1471fc47606286d 
   src/test/python/apache/aurora/client/commands/test_create.py 
 be69ed57cc328d39c5866f0737a727241445e160 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 9a486c3551a8bf0e269e51f64406bc96e3cf7161 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
   src/test/python/apache/aurora/client/commands/test_run.py 
 738a42bd2a8aa56bb4900c1b48ecbd043eaa4b3e 
   

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
 




Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Bill Farner

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

(Updated Nov. 6, 2014, 12:47 a.m.)


Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Zameer Manji.


Bugs: AURORA-889
https://issues.apache.org/jira/browse/AURORA-889


Repository: aurora


Description
---

Most of these are find/replace on Mock to use create_autospec instead.  There 
are a few additional changes of note:
- introduction of `api_util.py` to provide a speccable interface for what 
`SchedulerProxy` supports
- converted many (but not all) unnecessary uses of mocks to concrete objects
- attempted to explore an improved test pattern in `test_restart_failed_status` 
(`test_restart.py`) to avoid a Mock for the options object


Diffs (updated)
-

  src/main/python/apache/aurora/client/cli/update.py 
1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
  src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_api.py 
47b5236edde4a396f99b47b0a25f9a02dd8bf689 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 
cb2503e41c7643f9398f31dd3fca64a0b94c4383 
  src/test/python/apache/aurora/client/api/test_quota_check.py 
d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
af8353edef92d79f20779beca2785318b4e05ceb 
  src/test/python/apache/aurora/client/api/test_task_util.py 
582c708f09e3efb0fca32713a0b6e2f44d24ab22 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py 
fb5a527a3ec32028371732fca5ac186ecc0d325a 
  src/test/python/apache/aurora/client/cli/test_command_hooks.py 
eb4d413e42c7653ca52950536f693306c591a048 
  src/test/python/apache/aurora/client/cli/test_create.py 
6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
  src/test/python/apache/aurora/client/cli/test_cron.py 
b84bbfc1eace430ff64af3c77b2cf093c6525c80 
  src/test/python/apache/aurora/client/cli/test_diff.py 
f7c07f2e4d44db20250337a053ce6b841cc22a63 
  src/test/python/apache/aurora/client/cli/test_inspect.py 
b5b949b5e10c406786290bc6bfb706e430c21222 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
  src/test/python/apache/aurora/client/cli/test_logging.py 
10fa015b697554d4786aa4ade0e90b91bc8f18cc 
  src/test/python/apache/aurora/client/cli/test_plugins.py 
0b29346c107ca7341b2c7c5639ded607310b81b1 
  src/test/python/apache/aurora/client/cli/test_quota.py 
6e38227b19872be86b989663b5b206b533d8c9b6 
  src/test/python/apache/aurora/client/cli/test_restart.py 
ff702648777b0e719b910faf08a5bcda798e94eb 
  src/test/python/apache/aurora/client/cli/test_sla.py 
a7bfd35701fc57875bcbc939eab9688d0afa0d90 
  src/test/python/apache/aurora/client/cli/test_status.py 
6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
  src/test/python/apache/aurora/client/cli/test_supdate.py 
bf979e27799da56a2781a3af8370bd44cb216f78 
  src/test/python/apache/aurora/client/cli/test_task_run.py 
8458606d282a3bcef8129d25fa123d28f8f8f7df 
  src/test/python/apache/aurora/client/cli/test_update.py 
840cde982c310e257263add1848e4225b22eaa04 
  src/test/python/apache/aurora/client/cli/util.py 
796c4f9880a0f834a6950472892981e8a6789a97 
  src/test/python/apache/aurora/client/commands/test_admin.py 
cae539594dc73e05920d7ae08610634e7458178c 
  src/test/python/apache/aurora/client/commands/test_admin_sla.py 
a565318d1044f52571de41a921842c606edbc437 
  src/test/python/apache/aurora/client/commands/test_cancel_update.py 
5d2a7898e95266e94e041e68b1471fc47606286d 
  src/test/python/apache/aurora/client/commands/test_create.py 
be69ed57cc328d39c5866f0737a727241445e160 
  src/test/python/apache/aurora/client/commands/test_diff.py 
9a486c3551a8bf0e269e51f64406bc96e3cf7161 
  src/test/python/apache/aurora/client/commands/test_hooks.py 
638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
  src/test/python/apache/aurora/client/commands/test_kill.py 
8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
  src/test/python/apache/aurora/client/commands/test_listjobs.py 
d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
  src/test/python/apache/aurora/client/commands/test_restart.py 
6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
  src/test/python/apache/aurora/client/commands/test_run.py 
738a42bd2a8aa56bb4900c1b48ecbd043eaa4b3e 
  src/test/python/apache/aurora/client/commands/test_ssh.py 
6d51bb30581668e73250c4d6c8dc1b95d83a3762 
  src/test/python/apache/aurora/client/commands/test_status.py 
062b1321e7342eac7c4408a966006d429268406f 
  src/test/python/apache/aurora/client/commands/test_update.py 
e359d32c9b4f4be975b4e7d0fd77e096300fb01d 
  src/test/python/apache/aurora/client/commands/util.py 
fb842582781c12389520f3bf896dc185f1b1904f 
  src/test/python/apache/aurora/client/hooks/test_hooked_api.py 

Re: Review Request 27628: Convert most uses of Mock to create_autospec, remove some uses of mocking altogether.

2014-11-05 Thread Aurora ReviewBot

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

Ship it!


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

- Aurora ReviewBot


On Nov. 6, 2014, 12:47 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27628/
 ---
 
 (Updated Nov. 6, 2014, 12:47 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Zameer Manji.
 
 
 Bugs: AURORA-889
 https://issues.apache.org/jira/browse/AURORA-889
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Most of these are find/replace on Mock to use create_autospec instead.  There 
 are a few additional changes of note:
 - introduction of `api_util.py` to provide a speccable interface for what 
 `SchedulerProxy` supports
 - converted many (but not all) unnecessary uses of mocks to concrete objects
 - attempted to explore an improved test pattern in 
 `test_restart_failed_status` (`test_restart.py`) to avoid a Mock for the 
 options object
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/update.py 
 1d3fd667c36fab7fec060ad1d0f5d3825667fc27 
   src/test/python/apache/aurora/client/api/api_util.py PRE-CREATION 
   src/test/python/apache/aurora/client/api/test_api.py 
 47b5236edde4a396f99b47b0a25f9a02dd8bf689 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 cb2503e41c7643f9398f31dd3fca64a0b94c4383 
   src/test/python/apache/aurora/client/api/test_quota_check.py 
 d75bd1bd5a3e11c8d82d1a1b15e1b8619de3ac0d 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 af8353edef92d79f20779beca2785318b4e05ceb 
   src/test/python/apache/aurora/client/api/test_task_util.py 
 582c708f09e3efb0fca32713a0b6e2f44d24ab22 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 3e7006ed4375ddbb5533fd2235e5aa3e4e8666a4 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 fb5a527a3ec32028371732fca5ac186ecc0d325a 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 eb4d413e42c7653ca52950536f693306c591a048 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6013fa1354ca2ac8ebe30ce5ae49e885f33ac2f2 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 b84bbfc1eace430ff64af3c77b2cf093c6525c80 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 f7c07f2e4d44db20250337a053ce6b841cc22a63 
   src/test/python/apache/aurora/client/cli/test_inspect.py 
 b5b949b5e10c406786290bc6bfb706e430c21222 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 6f5b1bb1cf982362c4bb2cd911558a2bd0eca61c 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 10fa015b697554d4786aa4ade0e90b91bc8f18cc 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 0b29346c107ca7341b2c7c5639ded607310b81b1 
   src/test/python/apache/aurora/client/cli/test_quota.py 
 6e38227b19872be86b989663b5b206b533d8c9b6 
   src/test/python/apache/aurora/client/cli/test_restart.py 
 ff702648777b0e719b910faf08a5bcda798e94eb 
   src/test/python/apache/aurora/client/cli/test_sla.py 
 a7bfd35701fc57875bcbc939eab9688d0afa0d90 
   src/test/python/apache/aurora/client/cli/test_status.py 
 6b2f18b28ec46a7bb8e250bb17455bf2bc679585 
   src/test/python/apache/aurora/client/cli/test_supdate.py 
 bf979e27799da56a2781a3af8370bd44cb216f78 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 8458606d282a3bcef8129d25fa123d28f8f8f7df 
   src/test/python/apache/aurora/client/cli/test_update.py 
 840cde982c310e257263add1848e4225b22eaa04 
   src/test/python/apache/aurora/client/cli/util.py 
 796c4f9880a0f834a6950472892981e8a6789a97 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 cae539594dc73e05920d7ae08610634e7458178c 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 a565318d1044f52571de41a921842c606edbc437 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5d2a7898e95266e94e041e68b1471fc47606286d 
   src/test/python/apache/aurora/client/commands/test_create.py 
 be69ed57cc328d39c5866f0737a727241445e160 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 9a486c3551a8bf0e269e51f64406bc96e3cf7161 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 638fba625c3cbaa3bf4a96e5f04d3bf5055b778b 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 8194c9622e4789f1fae28dc9eb21e2f17ac51b79 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 d9fa617129d46c3fa3e7cf092368788a04ad3a0a 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 6da9e73c108d4d1908418cb9f6b6b1bc51d24879 
   src/test/python/apache/aurora/client/commands/test_run.py 
 738a42bd2a8aa56bb4900c1b48ecbd043eaa4b3e 
   

Re: Review Request 27598: Fixing the log replay for the job update history pruner.

2014-11-05 Thread Bill Farner

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

Ship it!


Ship It!

- Bill Farner


On Nov. 5, 2014, 1:52 a.m., Maxim Khutornenko wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27598/
 ---
 
 (Updated Nov. 5, 2014, 1:52 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Bill Farner.
 
 
 Bugs: AURORA-912
 https://issues.apache.org/jira/browse/AURORA-912
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixing the log replay for the job update history pruner.
 
 Also, refactored LogStorage replay routine to fully test all 
 LogEntry/LogEntry.TRANSACTION handlers.
 
 
 Diffs
 -
 
   src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 
 cbab75964052a950e1b868b3a53eb15fadb31cb7 
   src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java 
 8eb5c3f7c542206066b39a09911c7df01a43bee7 
 
 Diff: https://reviews.apache.org/r/27598/diff/
 
 
 Testing
 ---
 
 ./gradlew -Pq build
 
 
 Thanks,
 
 Maxim Khutornenko
 




Re: Review Request 27657: Print out the job url after scheduling a cron job.

2014-11-05 Thread Aurora ReviewBot

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


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

src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_cron_status
 PASSED
src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_cron_status_multiple_jobs
 PASSED
src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_deschedule_cron_deep_api
 PASSED
src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_schedule_cron_deep_api
 Fatal error running command; traceback can be found in 
/home/jenkins/.aurora/errors/aurora-1415238529.error-log
FAILED

=== FAILURES ===
___ TestCronNoun.test_schedule_cron_deep_api ___

self = client.cli.test_cron.TestCronNoun 
testMethod=test_schedule_cron_deep_api

def test_schedule_cron_deep_api(self):
  (mock_api, mock_scheduler_proxy) = self.create_mock_api()
  with contextlib.nested(
  patch('time.sleep'),
  patch('apache.aurora.client.api.SchedulerProxy', 
return_value=mock_scheduler_proxy),
  patch('apache.aurora.client.factory.CLUSTERS', 
new=self.TEST_CLUSTERS)):
mock_scheduler_proxy.scheduleCronJob.return_value = 
self.create_simple_success_response()
with temporary_file() as fp:
  fp.write(self.get_valid_config())
  fp.flush()
  cmd = AuroraCommandLine()
  result = cmd.execute(['cron', 'schedule', 'west/bozo/test/hello', 
fp.name])
 assert result == EXIT_OK
E AssertionError: assert 20 == 0

src/test/python/apache/aurora/client/cli/test_cron.py:100: AssertionError
 generated xml file: 
/jenkins/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.client.cli.cron.xml
 
 Interrupted: stopping after 1 failures 
== 1 failed, 3 passed in 1.55 seconds ==
Build operating on top level addresses: 
set([BuildFileAddress(/jenkins/workspace/AuroraBot/src/test/python/BUILD, all)])
src.test.python.apache.aurora.admin.admin_util  
.   SUCCESS
src.test.python.apache.aurora.admin.host_maintenance
.   SUCCESS
src.test.python.apache.aurora.client.api.api
.   SUCCESS
src.test.python.apache.aurora.client.api.disambiguator  
.   SUCCESS
src.test.python.apache.aurora.client.api.instance_watcher   
.   SUCCESS
src.test.python.apache.aurora.client.api.job_monitor
.   SUCCESS
src.test.python.apache.aurora.client.api.mux
.   SUCCESS
src.test.python.apache.aurora.client.api.quota_check
.   SUCCESS
src.test.python.apache.aurora.client.api.restarter  
.   SUCCESS
src.test.python.apache.aurora.client.api.scheduler_client   
.   SUCCESS
src.test.python.apache.aurora.client.api.sla
.   SUCCESS
src.test.python.apache.aurora.client.api.updater
.   SUCCESS
src.test.python.apache.aurora.client.api.updater_util   
.   SUCCESS
src.test.python.apache.aurora.client.binding_helper 
.   SUCCESS
src.test.python.apache.aurora.client.cli.api
.   SUCCESS
src.test.python.apache.aurora.client.cli.bridge 
.   SUCCESS
src.test.python.apache.aurora.client.cli.command_hooks  
.   SUCCESS
src.test.python.apache.aurora.client.cli.cron   
.   FAILURE
src.test.python.apache.aurora.client.config 
.   SUCCESS

- Aurora ReviewBot


On Nov. 6, 2014, 1:33 a.m., Zameer Manji wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/27657/
 ---
 
 (Updated Nov. 6, 2014, 1:33 a.m.)
 
 
 Review request for Aurora and Bill Farner.
 
 
 Bugs: AURORA-857
 https://issues.apache.org/jira/browse/AURORA-857
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Print out the job url after scheduling a cron job.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/cron.py 
 3416c8e1932056725880f2007b60d77112759428 
   src/test/python/apache/aurora/client/cli/test_cron.py 
 f488432cd68cc68fab8fce968e8605625ea3f56a 
 
 Diff: https://reviews.apache.org/r/27657/diff/
 
 
 Testing
 ---
 

Re: Review Request 27657: Print out the job url after scheduling a cron job.

2014-11-05 Thread Zameer Manji

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

(Updated Nov. 5, 2014, 6:14 p.m.)


Review request for Aurora and Bill Farner.


Changes
---

Depend on review 27628


Bugs: AURORA-857
https://issues.apache.org/jira/browse/AURORA-857


Repository: aurora


Description
---

Print out the job url after scheduling a cron job.


Diffs
-

  src/main/python/apache/aurora/client/cli/cron.py 
3416c8e1932056725880f2007b60d77112759428 
  src/test/python/apache/aurora/client/cli/test_cron.py 
f488432cd68cc68fab8fce968e8605625ea3f56a 

Diff: https://reviews.apache.org/r/27657/diff/


Testing
---

./pants build --timeout=60 src/test/python:all -vxs


vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 cron schedule 
devcluster/www-data/test/cron_hello_world 
/vagrant/examples/jobs/cron_hello_world.aurora
log(info): Registering job cron_hello_world with cron
cron schedule created at 
http://vagrant-ubuntu-trusty-64:8081/scheduler/www-data/test/cron_hello_world



Thanks,

Zameer Manji



Re: Review Request 27657: Print out the job url after scheduling a cron job.

2014-11-05 Thread Zameer Manji
I have no idea how this did not fail locally. I have traced the problem
down to improper mocking and I will wait until
https://reviews.apache.org/r/27628 lands before I address it.

On Wed, Nov 5, 2014 at 5:48 PM, Aurora ReviewBot wfar...@apache.org wrote:

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

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

 src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_cron_status
  PASSED
 src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_cron_status_multiple_jobs
  PASSED
 src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_deschedule_cron_deep_api
  PASSED
 src/test/python/apache/aurora/client/cli/test_cron.py::TestCronNoun::test_schedule_cron_deep_api
  Fatal error running command; traceback can be found in 
 /home/jenkins/.aurora/errors/aurora-1415238529.error-log
 FAILED

 === FAILURES 
 ===
 ___ TestCronNoun.test_schedule_cron_deep_api 
 ___

 self = client.cli.test_cron.TestCronNoun 
 testMethod=test_schedule_cron_deep_api

 def test_schedule_cron_deep_api(self):
   (mock_api, mock_scheduler_proxy) = self.create_mock_api()
   with contextlib.nested(
   patch('time.sleep'),
   patch('apache.aurora.client.api.SchedulerProxy', 
 return_value=mock_scheduler_proxy),
   patch('apache.aurora.client.factory.CLUSTERS', 
 new=self.TEST_CLUSTERS)):
 mock_scheduler_proxy.scheduleCronJob.return_value = 
 self.create_simple_success_response()
 with temporary_file() as fp:
   fp.write(self.get_valid_config())
   fp.flush()
   cmd = AuroraCommandLine()
   result = cmd.execute(['cron', 'schedule', 'west/bozo/test/hello', 
 fp.name])
  assert result == EXIT_OK
 E AssertionError: assert 20 == 0

 src/test/python/apache/aurora/client/cli/test_cron.py:100: AssertionError
  generated xml file: 
 /jenkins/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.client.cli.cron.xml
  Interrupted: stopping after 1 failures 
 
 == 1 failed, 3 passed in 1.55 seconds 
 ==
 Build operating on top level addresses: 
 set([BuildFileAddress(/jenkins/workspace/AuroraBot/src/test/python/BUILD, 
 all)])
 src.test.python.apache.aurora.admin.admin_util
   .   SUCCESS
 src.test.python.apache.aurora.admin.host_maintenance  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.api  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.disambiguator
   .   SUCCESS
 src.test.python.apache.aurora.client.api.instance_watcher 
   .   SUCCESS
 src.test.python.apache.aurora.client.api.job_monitor  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.mux  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.quota_check  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.restarter
   .   SUCCESS
 src.test.python.apache.aurora.client.api.scheduler_client 
   .   SUCCESS
 src.test.python.apache.aurora.client.api.sla  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.updater  
   .   SUCCESS
 src.test.python.apache.aurora.client.api.updater_util 
   .   SUCCESS
 src.test.python.apache.aurora.client.binding_helper   
   .   SUCCESS
 src.test.python.apache.aurora.client.cli.api  
   .   SUCCESS
 src.test.python.apache.aurora.client.cli.bridge   
   .   SUCCESS
 src.test.python.apache.aurora.client.cli.command_hooks
   .   SUCCESS
 src.test.python.apache.aurora.client.cli.cron 
   .   FAILURE
 src.test.python.apache.aurora.client.config   
   .   SUCCESS


 - Aurora ReviewBot

 On November 6th, 2014, 1:33 a.m. UTC, Zameer Manji wrote:
   Review request for Aurora and Bill Farner.
 By Zameer Manji.

 *Updated Nov. 6, 2014, 1:33 a.m.*
  *Bugs: * AURORA-857 https://issues.apache.org/jira/browse/AURORA-857
  *Repository: * aurora
 Description

 Print out the job url after scheduling a cron job.

   Testing

 ./pants build --timeout=60 src/test/python:all -vxs

 vagrant@vagrant-ubuntu-trusty-64:~$ aurora2 cron schedule 
 devcluster/www-data/test/cron_hello_world 
 /vagrant/examples/jobs/cron_hello_world.aurora
 log(info): Registering job cron_hello_world with cron
 cron schedule