Re: Review Request 19243: Adding min retention interval for task history.

2014-03-19 Thread Maxim Khutornenko

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

(Updated March 19, 2014, 9:38 p.m.)


Review request for Aurora, Kevin Sweeney and Bill Farner.


Changes
---

CR comments.


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


Repository: aurora


Description
---

Adding min retention interval for task history.


Diffs (updated)
-

  src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java 
be67e7d1f93584542a645ada4499e26ab9bb1fb4 
  src/main/java/org/apache/aurora/scheduler/async/HistoryPruner.java 
5bf9838e56f074fc5e66ace2a9c4e7bc50d1480f 
  src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java 
f7c9e5ed408b44e93df8cfff9c9beeb2f717b2d2 

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


Testing
---

gradle build


Thanks,

Maxim Khutornenko



Re: Review Request 19243: Adding min retention interval for task history.

2014-03-19 Thread Maxim Khutornenko

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



src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java
https://reviews.apache.org/r/19243/#comment69527

Sure, that might result in more memory consumption but should not matter 
much given our throttling scheduling restrictions. Done.



src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java
https://reviews.apache.org/r/19243/#comment69529

Done.



src/main/java/org/apache/aurora/scheduler/async/HistoryPruner.java
https://reviews.apache.org/r/19243/#comment69526

The way I see it there are 2 independent pruning actions:
1. Scheduled individual task pruning via executor.schedule();
2. Opportunistic enforcement of perJobHistoryGoal tasks.

The first one drives the cleanup of finished tasks while the second one 
makes sure a flapping job does not produce too much junk. 

If we are to enforce min retention policy we need to do it for both. That 
is what happens now:
- calculateTimeout() produces the max retaining interval (up to 2 days)
- safeToDelete() checks if min retaining interval is satisfied before 
enforcing perJobHistoryGoal.

Given the above, I am not sure what I am to do with Math.max in that filter.


- Maxim Khutornenko


On March 14, 2014, 10:54 p.m., Maxim Khutornenko wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19243/
 ---
 
 (Updated March 14, 2014, 10:54 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Bill Farner.
 
 
 Bugs: AURORA-263
 https://issues.apache.org/jira/browse/AURORA-263
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Adding min retention interval for task history.
 
 
 Diffs
 -
 
   src/main/java/org/apache/aurora/scheduler/async/AsyncModule.java 
 be67e7d1f93584542a645ada4499e26ab9bb1fb4 
   src/main/java/org/apache/aurora/scheduler/async/HistoryPruner.java 
 5bf9838e56f074fc5e66ace2a9c4e7bc50d1480f 
   src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java 
 f7c9e5ed408b44e93df8cfff9c9beeb2f717b2d2 
 
 Diff: https://reviews.apache.org/r/19243/diff/
 
 
 Testing
 ---
 
 gradle build
 
 
 Thanks,
 
 Maxim Khutornenko
 




Review Request 19431: Add instance specifier syntax to clientv2

2014-03-19 Thread Mark Chu-Carroll

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

Review request for Aurora, Bill Farner and Brian Wickman.


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


Repository: aurora


Description
---

Add instance specifier syntax to commands that can specify instances for 
clientv2.

Also, while I was at it, I added the kill/killall distinction to clientv2.


Diffs
-

  src/main/python/apache/aurora/client/cli/jobs.py 
2e62519a0531b2c910bc2c0227fd835baee644f1 
  src/main/python/apache/aurora/client/cli/options.py 
0e0bd45f9506e5dc729a24cd68b04b49650605b6 
  src/main/python/apache/aurora/client/cli/task.py 
8d4d38efbd126911f46bc3f8944e81bc9d149e32 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
  src/test/python/apache/aurora/client/cli/test_restart.py 
aa23d5bfe81361243d82aadf9dc574608e28d953 
  src/test/python/apache/aurora/client/cli/test_update.py 
51858b9e4ca02c2ae2151275fff9936460936bb4 

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


Testing
---

[sun-wukong incubator-aurora (instance-syntax)]$ !./p
./pants src/test/python/apache/aurora/client/cli:all
Build operating on targets: 
OrderedSet([PythonTestSuite(src/test/python/apache/aurora/client/cli/BUILD:all)])
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 4 items

src/test/python/apache/aurora/client/cli/test_bridge.py 

=== 4 passed in 0.02 seconds ===
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 5 items

src/test/python/apache/aurora/client/cli/test_help.py .

=== 5 passed in 0.48 seconds ===
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 27 items

src/test/python/apache/aurora/client/cli/test_cancel_update.py ..
src/test/python/apache/aurora/client/cli/test_create.py 
src/test/python/apache/aurora/client/cli/test_diff.py ...
src/test/python/apache/aurora/client/cli/test_kill.py .
src/test/python/apache/aurora/client/cli/test_restart.py ...
src/test/python/apache/aurora/client/cli/test_status.py ...
src/test/python/apache/aurora/client/cli/test_update.py ...

== 27 passed in 1.63 seconds ===
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 2 items

src/test/python/apache/aurora/client/cli/test_plugins.py ..

=== 2 passed in 0.49 seconds ===
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 3 items

src/test/python/apache/aurora/client/cli/test_quota.py ...

=== 3 passed in 0.50 seconds ===
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 5 items

src/test/python/apache/aurora/client/cli/test_sla.py .

=== 5 passed in 0.53 seconds ===
= test session starts ==
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
collected 2 items

src/test/python/apache/aurora/client/cli/test_task_run.py ..

=== 2 passed in 0.50 seconds ===
src.test.python.apache.aurora.client.cli.bridge 
.   SUCCESS
src.test.python.apache.aurora.client.cli.help   
.   SUCCESS
src.test.python.apache.aurora.client.cli.job
.   SUCCESS
src.test.python.apache.aurora.client.cli.plugins
.   SUCCESS
src.test.python.apache.aurora.client.cli.quota  
.   SUCCESS
src.test.python.apache.aurora.client.cli.sla
.   SUCCESS
src.test.python.apache.aurora.client.cli.task   
.   SUCCESS
[sun-wukong incubator-aurora (instance-syntax)]$
[sun-wukong incubator-aurora (instance-syntax)]$ grep INSTANCES_OPTION 
src/main/python/apache/aurora/client/cli/*.py
src/main/python/apache/aurora/client/cli/options.py:INSTANCES_OPTION = 
CommandOption('--instances', type=parse_instances, dest='instances',
src/main/python/apache/aurora/client/cli/task.py:INSTANCES_OPTION,

Re: Review Request 19426: Don't forget to register status checker observables.

2014-03-19 Thread Kevin Sweeney

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

Ship it!



src/main/python/apache/aurora/executor/common/status_checker.py
https://reviews.apache.org/r/19426/#comment69573

Any reason not to make this an abstractproperty? Just backwards 
compatibility?


- Kevin Sweeney


On March 19, 2014, 3:55 p.m., Brian Wickman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19426/
 ---
 
 (Updated March 19, 2014, 3:55 p.m.)
 
 
 Review request for Aurora and Kevin Sweeney.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Don't forget to register status checker observables.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/executor/aurora_executor.py 
 28e50540f4a431b78fae21200599a55e64001bc1 
   src/main/python/apache/aurora/executor/common/kill_manager.py 
 0d0d553932bd3504bd4ee967bb860531c03c3657 
   src/main/python/apache/aurora/executor/common/status_checker.py 
 f94042c0e90e1b36bbb6766fcdc1c474a2e2bc05 
   src/test/python/apache/aurora/executor/test_thermos_executor.py 
 b508eab60bc23930c9ffc3ecdd2d05b71093368e 
 
 Diff: https://reviews.apache.org/r/19426/diff/
 
 
 Testing
 ---
 
 src.test.python.apache.aurora.executor.executor_builds
   .   SUCCESS
 src.test.python.apache.aurora.executor.gc_executor
   .   SUCCESS
 src.test.python.apache.aurora.executor.thermos_executor   
   .   SUCCESS
 
 
 Thanks,
 
 Brian Wickman
 




Re: Review Request 19426: Don't forget to register status checker observables.

2014-03-19 Thread Brian Wickman

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



src/main/python/apache/aurora/executor/common/status_checker.py
https://reviews.apache.org/r/19426/#comment69574

yes


- Brian Wickman


On March 19, 2014, 10:55 p.m., Brian Wickman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19426/
 ---
 
 (Updated March 19, 2014, 10:55 p.m.)
 
 
 Review request for Aurora and Kevin Sweeney.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Don't forget to register status checker observables.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/executor/aurora_executor.py 
 28e50540f4a431b78fae21200599a55e64001bc1 
   src/main/python/apache/aurora/executor/common/kill_manager.py 
 0d0d553932bd3504bd4ee967bb860531c03c3657 
   src/main/python/apache/aurora/executor/common/status_checker.py 
 f94042c0e90e1b36bbb6766fcdc1c474a2e2bc05 
   src/test/python/apache/aurora/executor/test_thermos_executor.py 
 b508eab60bc23930c9ffc3ecdd2d05b71093368e 
 
 Diff: https://reviews.apache.org/r/19426/diff/
 
 
 Testing
 ---
 
 src.test.python.apache.aurora.executor.executor_builds
   .   SUCCESS
 src.test.python.apache.aurora.executor.gc_executor
   .   SUCCESS
 src.test.python.apache.aurora.executor.thermos_executor   
   .   SUCCESS
 
 
 Thanks,
 
 Brian Wickman
 




Review Request 19436: Preserving sandbox deleted task history.

2014-03-19 Thread Maxim Khutornenko

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

Review request for Aurora, Kevin Sweeney and Bill Farner.


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


Repository: aurora


Description
---

Part 1: Renaming of UNKNOWN to SANDBOX_DELETED.

Also, introducing the TaskState internal enum to facilitate task deletion 
coming next. 

The only functional change in this CR is dropping TaskStateMachine.getState(). 
Rest is ScheduleStatus to TaskState conversion.


Diffs
-

  src/main/java/org/apache/aurora/scheduler/base/Jobs.java 
4ac218b8f25be5e9e6b6243558af4258efe6e61a 
  src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java 
3ca4ee529aaf3491118da216116b19d7c6a49d09 
  src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java 
7371c12eb1efc3686582fdbbcb5e3b404bac61a6 
  src/main/java/org/apache/aurora/scheduler/state/TaskStateMachine.java 
15d1c1f5c2dc8161d9a203a98e4c40b123b93938 
  src/main/python/apache/aurora/executor/gc_executor.py 
4a866b2d6041a592692812eb3472db744d21e194 
  src/main/thrift/org/apache/aurora/gen/api.thrift 
e64f844cbd58d92621c6c21b896a9baf0c5a5f07 
  src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
a4e9464f7d5d3f5a640b62557c3e29f2f1566985 
  src/test/java/org/apache/aurora/scheduler/base/TasksTest.java 
102fe04f8d3a7142a0cd58251e16d31e8d4a433d 
  src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java 
24949c043b16a35a7960ed0a40b79f0981179eae 
  src/test/java/org/apache/aurora/scheduler/state/TaskStateMachineTest.java 
77380d9aaab99a9ad739bbc22251232354133c8d 
  src/test/resources/org/apache/aurora/gen/api.thrift.md5 
456634c76b9993119af2d841073c31a4a1c82ab7 

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


Testing
---

./build-support/jenkins/build.sh 


Thanks,

Maxim Khutornenko



Re: Review Request 19411: Add support for global hooks.

2014-03-19 Thread Maxim Khutornenko

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



src/main/python/apache/aurora/client/config.py
https://reviews.apache.org/r/19411/#comment69582

Would be great to see test cases actually exercising this.



src/main/python/apache/aurora/client/options.py
https://reviews.apache.org/r/19411/#comment69581

How about something like override_message instead? That would leave a more 
useful trail in client logs explaining the reason.


- Maxim Khutornenko


On March 19, 2014, 5:09 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19411/
 ---
 
 (Updated March 19, 2014, 5:09 p.m.)
 
 
 Review request for Aurora, Maxim Khutornenko and Brian Wickman.
 
 
 Bugs: aurora-269
 https://issues.apache.org/jira/browse/aurora-269
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Add support for global hooks.
 
 To support site-specific policy requirements, we'd like to be able to have 
 hooks that are applied to every configuration, and that are used regardless 
 of whether a configuration specifically enables hooks. We'd like these to be 
 baked in to the client.
 
 This change adds a global registry, which can be initialized with a set of 
 global hooks. In case of errors/emergencies, there is an override flag to 
 disable the global hooks.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/commands/core.py 
 9977c725528086d3e8cf58de294adee542570411 
   src/main/python/apache/aurora/client/config.py 
 1fe5db429007850911f19517565d49b0518e8196 
   src/main/python/apache/aurora/client/hooks/hooked_api.py 
 6de81347e021a71fc6aef598e6933c440335c8bf 
   src/main/python/apache/aurora/client/options.py 
 b8278bdeeb777a1b6a72167100323fb177bc9636 
   src/test/python/apache/aurora/client/commands/BUILD 
 7c808089f1456f5907aaf95d3f8d025f576a56f6 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 51e74823e90f460200d60065ea0ad31bd57a34f6 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 7824b764561cc95614c196c297137b0a6b49dccc 
   src/test/python/apache/aurora/client/commands/test_create.py 
 adbff90f23b958eae03da41ef7cbc5bedc84f1c8 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 fc154214574c19e0fff1e4be82cd61dd42f676b6 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 75e754ba2a850287ec0c3bbdee7289231ad35b2a 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 099475c90d3a5f350fe3240c345911a59f35df92 
   src/test/python/apache/aurora/client/commands/test_maintenance.py 
 df368e2f89149ff6b18b174e61657f3faa9cb0ab 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 1cab2a2dd4b1bc58a6ea47c7a07a3cc92f4b20cd 
   src/test/python/apache/aurora/client/commands/test_run.py 
 fe666158e0e9ad38b4b4f0c2b91af737eef130cd 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 2fe12ef5660f7ae2bf36493e6f1f6bc63ee9ccc7 
   src/test/python/apache/aurora/client/commands/test_status.py 
 eed798d2475280c787bea749647528cfd0715a40 
   src/test/python/apache/aurora/client/commands/test_update.py 
 21951b6b06321894607531884a0acd75e303204e 
   src/test/python/apache/aurora/client/hooks/BUILD 
 3d6f7966356fbe2b02868650a9784d3155884092 
 
 Diff: https://reviews.apache.org/r/19411/diff/
 
 
 Testing
 ---
 
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 2 items
 
 src/test/python/apache/aurora/client/test_binding_helper.py ..
 
 === 2 passed in 0.37 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/test_config.py ..
 
 === 6 passed in 0.48 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/api/test_disambiguator.py ..
 
 === 6 passed in 0.43 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 1 items
 
 src/test/python/apache/aurora/client/api/test_job_monitor.py .
 
 === 1 passed in 0.40 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- 

Re: Review Request 19411: Add support for global hooks.

2014-03-19 Thread Mark Chu-Carroll

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



src/main/python/apache/aurora/client/config.py
https://reviews.apache.org/r/19411/#comment69584

It is getting exercised in the hooks test; what additional tests would you 
like to see?



src/main/python/apache/aurora/client/options.py
https://reviews.apache.org/r/19411/#comment69585

Not sure what you mean: make the parameter a string-value instead of 
boolean, and if they supply an override, then hooks don't run?


- Mark Chu-Carroll


On March 19, 2014, 1:09 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19411/
 ---
 
 (Updated March 19, 2014, 1:09 p.m.)
 
 
 Review request for Aurora, Maxim Khutornenko and Brian Wickman.
 
 
 Bugs: aurora-269
 https://issues.apache.org/jira/browse/aurora-269
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Add support for global hooks.
 
 To support site-specific policy requirements, we'd like to be able to have 
 hooks that are applied to every configuration, and that are used regardless 
 of whether a configuration specifically enables hooks. We'd like these to be 
 baked in to the client.
 
 This change adds a global registry, which can be initialized with a set of 
 global hooks. In case of errors/emergencies, there is an override flag to 
 disable the global hooks.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/commands/core.py 
 9977c725528086d3e8cf58de294adee542570411 
   src/main/python/apache/aurora/client/config.py 
 1fe5db429007850911f19517565d49b0518e8196 
   src/main/python/apache/aurora/client/hooks/hooked_api.py 
 6de81347e021a71fc6aef598e6933c440335c8bf 
   src/main/python/apache/aurora/client/options.py 
 b8278bdeeb777a1b6a72167100323fb177bc9636 
   src/test/python/apache/aurora/client/commands/BUILD 
 7c808089f1456f5907aaf95d3f8d025f576a56f6 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 51e74823e90f460200d60065ea0ad31bd57a34f6 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 7824b764561cc95614c196c297137b0a6b49dccc 
   src/test/python/apache/aurora/client/commands/test_create.py 
 adbff90f23b958eae03da41ef7cbc5bedc84f1c8 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 fc154214574c19e0fff1e4be82cd61dd42f676b6 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 75e754ba2a850287ec0c3bbdee7289231ad35b2a 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 099475c90d3a5f350fe3240c345911a59f35df92 
   src/test/python/apache/aurora/client/commands/test_maintenance.py 
 df368e2f89149ff6b18b174e61657f3faa9cb0ab 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 1cab2a2dd4b1bc58a6ea47c7a07a3cc92f4b20cd 
   src/test/python/apache/aurora/client/commands/test_run.py 
 fe666158e0e9ad38b4b4f0c2b91af737eef130cd 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 2fe12ef5660f7ae2bf36493e6f1f6bc63ee9ccc7 
   src/test/python/apache/aurora/client/commands/test_status.py 
 eed798d2475280c787bea749647528cfd0715a40 
   src/test/python/apache/aurora/client/commands/test_update.py 
 21951b6b06321894607531884a0acd75e303204e 
   src/test/python/apache/aurora/client/hooks/BUILD 
 3d6f7966356fbe2b02868650a9784d3155884092 
 
 Diff: https://reviews.apache.org/r/19411/diff/
 
 
 Testing
 ---
 
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 2 items
 
 src/test/python/apache/aurora/client/test_binding_helper.py ..
 
 === 2 passed in 0.37 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/test_config.py ..
 
 === 6 passed in 0.48 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/api/test_disambiguator.py ..
 
 === 6 passed in 0.43 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 1 items
 
 src/test/python/apache/aurora/client/api/test_job_monitor.py .
 
 === 1 passed in 0.40 seconds 
 ===
 = test session starts 
 

Re: Review Request 19411: Add support for global hooks.

2014-03-19 Thread Maxim Khutornenko

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



src/main/python/apache/aurora/client/config.py
https://reviews.apache.org/r/19411/#comment69598

What tests are you referring to? I could not find anything with 
register_global_hook() in this changelist or repo.



src/main/python/apache/aurora/client/options.py
https://reviews.apache.org/r/19411/#comment69599

Correct. Something like --disable_all_hooks_reason=Disabling due to... 
might deliver better value than --disable_all_hooks


- Maxim Khutornenko


On March 19, 2014, 5:09 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19411/
 ---
 
 (Updated March 19, 2014, 5:09 p.m.)
 
 
 Review request for Aurora, Maxim Khutornenko and Brian Wickman.
 
 
 Bugs: aurora-269
 https://issues.apache.org/jira/browse/aurora-269
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Add support for global hooks.
 
 To support site-specific policy requirements, we'd like to be able to have 
 hooks that are applied to every configuration, and that are used regardless 
 of whether a configuration specifically enables hooks. We'd like these to be 
 baked in to the client.
 
 This change adds a global registry, which can be initialized with a set of 
 global hooks. In case of errors/emergencies, there is an override flag to 
 disable the global hooks.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/commands/core.py 
 9977c725528086d3e8cf58de294adee542570411 
   src/main/python/apache/aurora/client/config.py 
 1fe5db429007850911f19517565d49b0518e8196 
   src/main/python/apache/aurora/client/hooks/hooked_api.py 
 6de81347e021a71fc6aef598e6933c440335c8bf 
   src/main/python/apache/aurora/client/options.py 
 b8278bdeeb777a1b6a72167100323fb177bc9636 
   src/test/python/apache/aurora/client/commands/BUILD 
 7c808089f1456f5907aaf95d3f8d025f576a56f6 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 51e74823e90f460200d60065ea0ad31bd57a34f6 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 7824b764561cc95614c196c297137b0a6b49dccc 
   src/test/python/apache/aurora/client/commands/test_create.py 
 adbff90f23b958eae03da41ef7cbc5bedc84f1c8 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 fc154214574c19e0fff1e4be82cd61dd42f676b6 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 75e754ba2a850287ec0c3bbdee7289231ad35b2a 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 099475c90d3a5f350fe3240c345911a59f35df92 
   src/test/python/apache/aurora/client/commands/test_maintenance.py 
 df368e2f89149ff6b18b174e61657f3faa9cb0ab 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 1cab2a2dd4b1bc58a6ea47c7a07a3cc92f4b20cd 
   src/test/python/apache/aurora/client/commands/test_run.py 
 fe666158e0e9ad38b4b4f0c2b91af737eef130cd 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 2fe12ef5660f7ae2bf36493e6f1f6bc63ee9ccc7 
   src/test/python/apache/aurora/client/commands/test_status.py 
 eed798d2475280c787bea749647528cfd0715a40 
   src/test/python/apache/aurora/client/commands/test_update.py 
 21951b6b06321894607531884a0acd75e303204e 
   src/test/python/apache/aurora/client/hooks/BUILD 
 3d6f7966356fbe2b02868650a9784d3155884092 
 
 Diff: https://reviews.apache.org/r/19411/diff/
 
 
 Testing
 ---
 
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 2 items
 
 src/test/python/apache/aurora/client/test_binding_helper.py ..
 
 === 2 passed in 0.37 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/test_config.py ..
 
 === 6 passed in 0.48 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/api/test_disambiguator.py ..
 
 === 6 passed in 0.43 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 1 items
 
 src/test/python/apache/aurora/client/api/test_job_monitor.py .
 
 === 1 passed in 0.40 seconds 
 ===
 = test session starts 
 

Re: Review Request 19411: Add support for global hooks.

2014-03-19 Thread Brian Wickman

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



src/main/python/apache/aurora/client/hooks/hooked_api.py
https://reviews.apache.org/r/19411/#comment69621

you'll want GlobalHookRegistry.get_hooks() to return cls.HOOKS[:], 
otherwise 'hooks += config.hooks' will actually mutate the global registry


- Brian Wickman


On March 19, 2014, 5:09 p.m., Mark Chu-Carroll wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/19411/
 ---
 
 (Updated March 19, 2014, 5:09 p.m.)
 
 
 Review request for Aurora, Maxim Khutornenko and Brian Wickman.
 
 
 Bugs: aurora-269
 https://issues.apache.org/jira/browse/aurora-269
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Add support for global hooks.
 
 To support site-specific policy requirements, we'd like to be able to have 
 hooks that are applied to every configuration, and that are used regardless 
 of whether a configuration specifically enables hooks. We'd like these to be 
 baked in to the client.
 
 This change adds a global registry, which can be initialized with a set of 
 global hooks. In case of errors/emergencies, there is an override flag to 
 disable the global hooks.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/commands/core.py 
 9977c725528086d3e8cf58de294adee542570411 
   src/main/python/apache/aurora/client/config.py 
 1fe5db429007850911f19517565d49b0518e8196 
   src/main/python/apache/aurora/client/hooks/hooked_api.py 
 6de81347e021a71fc6aef598e6933c440335c8bf 
   src/main/python/apache/aurora/client/options.py 
 b8278bdeeb777a1b6a72167100323fb177bc9636 
   src/test/python/apache/aurora/client/commands/BUILD 
 7c808089f1456f5907aaf95d3f8d025f576a56f6 
   src/test/python/apache/aurora/client/commands/test_admin_sla.py 
 51e74823e90f460200d60065ea0ad31bd57a34f6 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 7824b764561cc95614c196c297137b0a6b49dccc 
   src/test/python/apache/aurora/client/commands/test_create.py 
 adbff90f23b958eae03da41ef7cbc5bedc84f1c8 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 fc154214574c19e0fff1e4be82cd61dd42f676b6 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 75e754ba2a850287ec0c3bbdee7289231ad35b2a 
   src/test/python/apache/aurora/client/commands/test_listjobs.py 
 099475c90d3a5f350fe3240c345911a59f35df92 
   src/test/python/apache/aurora/client/commands/test_maintenance.py 
 df368e2f89149ff6b18b174e61657f3faa9cb0ab 
   src/test/python/apache/aurora/client/commands/test_restart.py 
 1cab2a2dd4b1bc58a6ea47c7a07a3cc92f4b20cd 
   src/test/python/apache/aurora/client/commands/test_run.py 
 fe666158e0e9ad38b4b4f0c2b91af737eef130cd 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 2fe12ef5660f7ae2bf36493e6f1f6bc63ee9ccc7 
   src/test/python/apache/aurora/client/commands/test_status.py 
 eed798d2475280c787bea749647528cfd0715a40 
   src/test/python/apache/aurora/client/commands/test_update.py 
 21951b6b06321894607531884a0acd75e303204e 
   src/test/python/apache/aurora/client/hooks/BUILD 
 3d6f7966356fbe2b02868650a9784d3155884092 
 
 Diff: https://reviews.apache.org/r/19411/diff/
 
 
 Testing
 ---
 
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 2 items
 
 src/test/python/apache/aurora/client/test_binding_helper.py ..
 
 === 2 passed in 0.37 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/test_config.py ..
 
 === 6 passed in 0.48 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/api/test_disambiguator.py ..
 
 === 6 passed in 0.43 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 1 items
 
 src/test/python/apache/aurora/client/api/test_job_monitor.py .
 
 === 1 passed in 0.40 seconds 
 ===
 = test session starts 
 ==
 platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
 collected 6 items
 
 src/test/python/apache/aurora/client/api/test_restarter.py ..