Re: Review Request 25505: Make aurora job status JSON output more friendly.

2014-09-10 Thread Maxim Khutornenko

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


Since you are touching this code, mind fixing the error when no tasks returned:

log(ERROR): Internal error executing command: 'NoneType' object is not iterable

As opposed to aurora status:

INFO] No tasks found.

- Maxim Khutornenko


On Sept. 10, 2014, 5:38 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25505/
 ---
 
 (Updated Sept. 10, 2014, 5:38 p.m.)
 
 
 Review request for Aurora, David McLaughlin and Maxim Khutornenko.
 
 
 Bugs: aurora-666
 https://issues.apache.org/jira/browse/aurora-666
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Use string names instead of numeric values for ScheduleStatus fields of
 records rendered in JSON.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/jobs.py 
 38b5f6e306c2c8dd9aa8d98e21c6a628028ad899 
   src/test/python/apache/aurora/client/cli/test_status.py 
 721d9764190bdc4b1c5b65e416a039803b7c507c 
 
 Diff: https://reviews.apache.org/r/25505/diff/
 
 
 Testing
 ---
 
 Added new unit tests; all tests pass.
 
 
 Thanks,
 
 Mark Chu-Carroll
 




Re: Review Request 25505: Make aurora job status JSON output more friendly.

2014-09-10 Thread Mark Chu-Carroll

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

(Updated Sept. 10, 2014, 3:34 p.m.)


Review request for Aurora, David McLaughlin and Maxim Khutornenko.


Changes
---

Fix other error in job status, generating error when no matching job is found.


Bugs: aurora-666
https://issues.apache.org/jira/browse/aurora-666


Repository: aurora


Description
---

Use string names instead of numeric values for ScheduleStatus fields of
records rendered in JSON.


Diffs (updated)
-

  src/main/python/apache/aurora/client/cli/jobs.py 
38b5f6e306c2c8dd9aa8d98e21c6a628028ad899 
  src/test/python/apache/aurora/client/cli/test_status.py 
721d9764190bdc4b1c5b65e416a039803b7c507c 

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


Testing
---

Added new unit tests; all tests pass.


Thanks,

Mark Chu-Carroll



Re: Review Request 25505: Make aurora job status JSON output more friendly.

2014-09-10 Thread Maxim Khutornenko

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

Ship it!


Ship It!

- Maxim Khutornenko


On Sept. 10, 2014, 7:34 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25505/
 ---
 
 (Updated Sept. 10, 2014, 7:34 p.m.)
 
 
 Review request for Aurora, David McLaughlin and Maxim Khutornenko.
 
 
 Bugs: aurora-666
 https://issues.apache.org/jira/browse/aurora-666
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Use string names instead of numeric values for ScheduleStatus fields of
 records rendered in JSON.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/jobs.py 
 38b5f6e306c2c8dd9aa8d98e21c6a628028ad899 
   src/test/python/apache/aurora/client/cli/test_status.py 
 721d9764190bdc4b1c5b65e416a039803b7c507c 
 
 Diff: https://reviews.apache.org/r/25505/diff/
 
 
 Testing
 ---
 
 Added new unit tests; all tests pass.
 
 
 Thanks,
 
 Mark Chu-Carroll
 




Review Request 25519: Adding get_scheduler admin command.

2014-09-10 Thread Maxim Khutornenko

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

Review request for Aurora, Mark Chu-Carroll and Zameer Manji.


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


Repository: aurora


Description
---

Adding get_scheduler admin command.


Diffs
-

  src/main/python/apache/aurora/client/api/scheduler_client.py 
0ba07611b1a367f7157b91a1d4b65b1af176 
  src/main/python/apache/aurora/client/commands/admin.py 
bc9a9eee9a187f2c895e70a093871f0b795931c4 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
630f662ad2ffb8d192299d98c612ad4892161081 
  src/test/python/apache/aurora/client/commands/test_admin.py 
94e736fb80c3fd7f103437c24f33d7c4451a6969 
  src/test/python/apache/aurora/client/commands/util.py 
21b8830df5a3eccc7d36067369fc16cc5fd9de2a 

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


Testing
---

./pants src/test/python:all


Thanks,

Maxim Khutornenko



Re: Review Request 25519: Adding get_scheduler admin command.

2014-09-10 Thread Zameer Manji

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

Ship it!


Thanks for doing this so quickly.

- Zameer Manji


On Sept. 10, 2014, 12:53 p.m., Maxim Khutornenko wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25519/
 ---
 
 (Updated Sept. 10, 2014, 12:53 p.m.)
 
 
 Review request for Aurora, Mark Chu-Carroll and Zameer Manji.
 
 
 Bugs: AURORA-692
 https://issues.apache.org/jira/browse/AURORA-692
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Adding get_scheduler admin command.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 0ba07611b1a367f7157b91a1d4b65b1af176 
   src/main/python/apache/aurora/client/commands/admin.py 
 bc9a9eee9a187f2c895e70a093871f0b795931c4 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 630f662ad2ffb8d192299d98c612ad4892161081 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 94e736fb80c3fd7f103437c24f33d7c4451a6969 
   src/test/python/apache/aurora/client/commands/util.py 
 21b8830df5a3eccc7d36067369fc16cc5fd9de2a 
 
 Diff: https://reviews.apache.org/r/25519/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all
 
 
 Thanks,
 
 Maxim Khutornenko
 




Re: Review Request 25505: Make aurora job status JSON output more friendly.

2014-09-10 Thread Zameer Manji

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

Ship it!


Ship It!

- Zameer Manji


On Sept. 10, 2014, 12:34 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25505/
 ---
 
 (Updated Sept. 10, 2014, 12:34 p.m.)
 
 
 Review request for Aurora, David McLaughlin and Maxim Khutornenko.
 
 
 Bugs: aurora-666
 https://issues.apache.org/jira/browse/aurora-666
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Use string names instead of numeric values for ScheduleStatus fields of
 records rendered in JSON.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/cli/jobs.py 
 38b5f6e306c2c8dd9aa8d98e21c6a628028ad899 
   src/test/python/apache/aurora/client/cli/test_status.py 
 721d9764190bdc4b1c5b65e416a039803b7c507c 
 
 Diff: https://reviews.apache.org/r/25505/diff/
 
 
 Testing
 ---
 
 Added new unit tests; all tests pass.
 
 
 Thanks,
 
 Mark Chu-Carroll
 




Re: Review Request 25519: Adding get_scheduler admin command.

2014-09-10 Thread Joe Smith

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


can you also add e2e test coverage?

- Joe Smith


On Sept. 10, 2014, 12:53 p.m., Maxim Khutornenko wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25519/
 ---
 
 (Updated Sept. 10, 2014, 12:53 p.m.)
 
 
 Review request for Aurora, Mark Chu-Carroll and Zameer Manji.
 
 
 Bugs: AURORA-692
 https://issues.apache.org/jira/browse/AURORA-692
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Adding get_scheduler admin command.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 0ba07611b1a367f7157b91a1d4b65b1af176 
   src/main/python/apache/aurora/client/commands/admin.py 
 bc9a9eee9a187f2c895e70a093871f0b795931c4 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 630f662ad2ffb8d192299d98c612ad4892161081 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 94e736fb80c3fd7f103437c24f33d7c4451a6969 
   src/test/python/apache/aurora/client/commands/util.py 
 21b8830df5a3eccc7d36067369fc16cc5fd9de2a 
 
 Diff: https://reviews.apache.org/r/25519/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all
 
 
 Thanks,
 
 Maxim Khutornenko
 




Re: Review Request 25398: Make the offer hold jitter window configurable.

2014-09-10 Thread Bill Farner

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

Ship it!


Ship It!

- Bill Farner


On Sept. 9, 2014, 4:54 p.m., Joshua Cohen wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25398/
 ---
 
 (Updated Sept. 9, 2014, 4:54 p.m.)
 
 
 Review request for Aurora, Maxim Khutornenko and Bill Farner.
 
 
 Bugs: AURORA-313
 https://issues.apache.org/jira/browse/AURORA-313
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Make the offer hold jitter window configurable.
 
 
 Diffs
 -
 
   src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java 
 5a38a1f69ac5dbe68af3bfe175899ddee392880b 
   
 src/main/java/org/apache/aurora/scheduler/async/RandomJitterReturnDelay.java 
 PRE-CREATION 
   
 src/test/java/org/apache/aurora/scheduler/async/RandomJitterReturnDelayTest.java
  PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/25398/diff/
 
 
 Testing
 ---
 
 gradle -Pq build
 
 
 Thanks,
 
 Joshua Cohen
 




Re: Review Request 25519: Adding get_scheduler admin command.

2014-09-10 Thread Maxim Khutornenko


 On Sept. 10, 2014, 9:09 p.m., Joe Smith wrote:
  can you also add e2e test coverage?

Great idea. We need to start adding admin integration tests at some point and 
why not now:
```...
== Testing Aurora Admin commands...
+ echo '== Getting leading scheduler'
== Getting leading scheduler
+ vagrant ssh -c 'aurora_admin get_scheduler devcluster'
+ grep http://192.168.33.7:8081
Found leading scheduler at: http://192.168.33.7:8081
Connection to 127.0.0.1 closed.
+ RETCODE=0
+ collect_result
+ [[ 0 = 0 ]]
+ echo '***'
***
+ echo 'OK (all tests passed)'
OK (all tests passed)
+ echo '***'
***
+ exit 0```


- Maxim


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


On Sept. 10, 2014, 7:53 p.m., Maxim Khutornenko wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25519/
 ---
 
 (Updated Sept. 10, 2014, 7:53 p.m.)
 
 
 Review request for Aurora, Mark Chu-Carroll and Zameer Manji.
 
 
 Bugs: AURORA-692
 https://issues.apache.org/jira/browse/AURORA-692
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Adding get_scheduler admin command.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 0ba07611b1a367f7157b91a1d4b65b1af176 
   src/main/python/apache/aurora/client/commands/admin.py 
 bc9a9eee9a187f2c895e70a093871f0b795931c4 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 630f662ad2ffb8d192299d98c612ad4892161081 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 94e736fb80c3fd7f103437c24f33d7c4451a6969 
   src/test/python/apache/aurora/client/commands/util.py 
 21b8830df5a3eccc7d36067369fc16cc5fd9de2a 
 
 Diff: https://reviews.apache.org/r/25519/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all
 
 
 Thanks,
 
 Maxim Khutornenko
 




Re: Review Request 25398: Make the offer hold jitter window configurable.

2014-09-10 Thread Bill Farner


 On Sept. 10, 2014, 10:15 p.m., Bill Farner wrote:
  Ship It!

Thanks! This is now on master:

```
commit cc70136
Author: Joshua Cohen jco...@twopensource.com
Date:   Wed Sep 10 15:38:56 2014 -0700

Make the offer hold jitter window configurable.

Bugs closed: AURORA-313

Reviewed at https://reviews.apache.org/r/25398/
```


- Bill


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


On Sept. 9, 2014, 4:54 p.m., Joshua Cohen wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25398/
 ---
 
 (Updated Sept. 9, 2014, 4:54 p.m.)
 
 
 Review request for Aurora, Maxim Khutornenko and Bill Farner.
 
 
 Bugs: AURORA-313
 https://issues.apache.org/jira/browse/AURORA-313
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Make the offer hold jitter window configurable.
 
 
 Diffs
 -
 
   src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java 
 5a38a1f69ac5dbe68af3bfe175899ddee392880b 
   
 src/main/java/org/apache/aurora/scheduler/async/RandomJitterReturnDelay.java 
 PRE-CREATION 
   
 src/test/java/org/apache/aurora/scheduler/async/RandomJitterReturnDelayTest.java
  PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/25398/diff/
 
 
 Testing
 ---
 
 gradle -Pq build
 
 
 Thanks,
 
 Joshua Cohen
 




Re: Review Request 25519: Adding get_scheduler admin command.

2014-09-10 Thread Joe Smith

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

Ship it!


Ship It!

- Joe Smith


On Sept. 10, 2014, 3:43 p.m., Maxim Khutornenko wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/25519/
 ---
 
 (Updated Sept. 10, 2014, 3:43 p.m.)
 
 
 Review request for Aurora, Mark Chu-Carroll and Zameer Manji.
 
 
 Bugs: AURORA-692
 https://issues.apache.org/jira/browse/AURORA-692
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Adding get_scheduler admin command.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 0ba07611b1a367f7157b91a1d4b65b1af176 
   src/main/python/apache/aurora/client/commands/admin.py 
 bc9a9eee9a187f2c895e70a093871f0b795931c4 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 630f662ad2ffb8d192299d98c612ad4892161081 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 94e736fb80c3fd7f103437c24f33d7c4451a6969 
   src/test/python/apache/aurora/client/commands/util.py 
 21b8830df5a3eccc7d36067369fc16cc5fd9de2a 
   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 
 989801cfcbd19109ac140b01cd3024d70c78c829 
   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 
 0965b5c8cb89eb36c6e15108c702c39dd68268be 
 
 Diff: https://reviews.apache.org/r/25519/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all
 
 
 Thanks,
 
 Maxim Khutornenko
 




Review Request 25529: Add a controller for job updates.

2014-09-10 Thread Bill Farner

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

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


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


Repository: aurora


Description
---

There's a lot going on here, i'm happy to break this up if you'd perfer, but 
the bulk of the change (JobUpdateControllerImpl+Test) would remain.

The remaining required piece here is to record JobInstanceUpdateEvents when 
actions are taken.

As you try to follow JobUpdateControllerImplTest, take some care to understand 
how FakeScheduledExecutor works.  Ultimately, it accepts work added to a mock, 
and executes that work when FakeClock is advanced past the scheduled time.  It 
may not be obvious at first, but be glad it's there - this kind of async test 
would be a nightmare without it.


Diffs
-

  build.gradle 3237f8dfa3e7d4249a388042dba840a939d513b3 
  src/main/java/org/apache/aurora/scheduler/async/RescheduleCalculator.java 
aaa3513ae99c70ffa51fec0a241d67fb815b6d3f 
  src/main/java/org/apache/aurora/scheduler/base/Jobs.java 
7b10cf876d4424fab06113aa3e2989a6bef4d346 
  src/main/java/org/apache/aurora/scheduler/base/Query.java 
d8572bb21a92025e7a51cf18d5bdf00fc1281078 
  src/main/java/org/apache/aurora/scheduler/base/Tasks.java 
1be16374aeebaee59063aec982690ffa1fbdcf0f 
  src/main/java/org/apache/aurora/scheduler/state/LockManagerImpl.java 
8befecaf4f13c0b890b452bc7b9c0618725b8c41 
  src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java 
b894a71348d2d71c077f35bb21a80ba88a6b4c42 
  src/main/java/org/apache/aurora/scheduler/storage/JobUpdateStore.java 
599dbd8bb762d051b75aa1a1e4d6a4c90ca6eb87 
  src/main/java/org/apache/aurora/scheduler/storage/db/DBJobUpdateStore.java 
ec9b37ccaf03651e986aab9b4541f17ff0540008 
  
src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java 
a43e5d7748c22d60f56f03a8a3d52949faebeff2 
  src/main/java/org/apache/aurora/scheduler/updater/InstanceActionHandler.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java 
d725bc356178f51464b4d8ea896f1bf76815e1b2 
  src/main/java/org/apache/aurora/scheduler/updater/JobUpdateController.java 
39bdca02295706714cf720545ffc291f9042702a 
  
src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java 
3f542ce3e45ec4561238736f4ce84b69f7e41219 
  
src/main/java/org/apache/aurora/scheduler/updater/JobUpdateEventSubscriber.java 
7be792f0bc9c5ec14c7001cb243a17d643f9607f 
  src/main/java/org/apache/aurora/scheduler/updater/JobUpdateStateMachine.java 
037602d6aabe6dda978cad008075c053e2c042eb 
  src/main/java/org/apache/aurora/scheduler/updater/OneWayJobUpdater.java 
d6a1e4b2c916b1c4dbcc73fe79bd672fca9b3189 
  
src/main/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterFactory.java 
80baa7f9360cc8b2bf7910c26d119d443d6cbbf9 
  
src/main/java/org/apache/aurora/scheduler/updater/UpdateConfigurationException.java
 PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/updater/UpdaterModule.java 
028cb079316ca48bb93a35913ae25ace78088fb4 
  
src/main/java/org/apache/aurora/scheduler/updater/strategy/ActiveLimitedStrategy.java
 8298ea2283298daa71de4d958ca6bb0898d47531 
  src/main/java/org/apache/aurora/scheduler/updater/strategy/BatchStrategy.java 
a3e666e85993b833a4765ce0ad5f4825dc9253e8 
  src/main/java/org/apache/aurora/scheduler/updater/strategy/QueueStrategy.java 
0cf36839dbf64ad755383bef829e14fd94a97e30 
  src/main/thrift/org/apache/aurora/gen/api.thrift 
c00f94371a27ffab41188b22f81bb1c8ec7a57e9 
  
src/test/java/org/apache/aurora/scheduler/storage/db/DBJobUpdateStoreTest.java 
0be4d78dd737b34f8a58276be9ffd7aeaa7f95bb 
  
src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
 0d51f7dc367081f72090736e36605bf363f3395e 
  src/test/java/org/apache/aurora/scheduler/updater/FakeScheduledExecutor.java 
PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/updater/InstanceActionHandlerTest.java
 PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java 
f38e6a3e6a798b1c78d73c6d19404156eb6d8c91 
  
src/test/java/org/apache/aurora/scheduler/updater/JobUpdateEventSubscriberTest.java
 41274421aaae30b43abc3da15a63276a941094f9 
  
src/test/java/org/apache/aurora/scheduler/updater/JobUpdateStateMachineTest.java
 6eed641895123d21ed760fa755ce7b30cec3fd44 
  src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java 
PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdateControllerTest.java
 f0b68350ea39e5925a911e46532982c3d61ee0d6 
  
src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterFactoryImplTest.java
 ae654625370fd3ba8be59b9a37ba343ec7115cba