You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Mark Chu-Carroll <mc...@twopensource.com> on 2014/05/01 01:46:04 UTC
Review Request 20928: Command hooks: stage 2.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/
-----------------------------------------------------------
Review request for Aurora, David McLaughlin and Suman Karumuri.
Bugs: aurora-270
https://issues.apache.org/jira/browse/aurora-270
Repository: aurora
Description
-------
The second half of command hooks:
- Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
URL.
- Hooks are loaded and activated by the noun/verb framework.
- Hook selection and dispatch has been substantially updated.
Also did some long overdue cleanup of string quoting consistency.
Diffs
-----
3rdparty/python/BUILD cf0d29eea6c2ff115f3645bcb153c4049fa57e2a
docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
Diff: https://reviews.apache.org/r/20928/diff/
Testing
-------
[sun-wukong incubator-aurora (command-hooks-two)]$ !./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
plugins: cov
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
plugins: cov
collected 9 items
src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
=========================== 9 passed in 0.80 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_help.py .....
=========================== 5 passed in 0.70 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 36 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_open.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 ...
========================== 36 passed in 2.02 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 1 items
src/test/python/apache/aurora/client/cli/test_logging.py .
=========================== 1 passed in 0.65 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 3 items
src/test/python/apache/aurora/client/cli/test_plugins.py ...
=========================== 3 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 4 items
src/test/python/apache/aurora/client/cli/test_quota.py ....
=========================== 4 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_sla.py .....
=========================== 5 passed in 0.72 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 2 items
src/test/python/apache/aurora/client/cli/test_task_run.py ..
=========================== 2 passed in 0.65 seconds ===========================
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.help ..... SUCCESS
src.test.python.apache.aurora.client.cli.job ..... SUCCESS
src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
Thanks,
Mark Chu-Carroll
Re: Review Request 20928: Command hooks: stage 2.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/#review41951
-----------------------------------------------------------
docs/design/command-hooks.md
<https://reviews.apache.org/r/20928/#comment75619>
Good catch, thanks!
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75620>
The intention is that any field of a hook skip rule that is left blank means "match anything, as long as the rest of the rule matches", so that is intentional.
But I think you're right - that's not the best approach. I'll modify it, and update the docs.
src/test/python/apache/aurora/client/cli/test_command_hooks.py
<https://reviews.apache.org/r/20928/#comment75621>
They do - the cases that use exception 'b".
- Mark Chu-Carroll
On May 1, 2014, 4:47 p.m., Mark Chu-Carroll wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20928/
> -----------------------------------------------------------
>
> (Updated May 1, 2014, 4:47 p.m.)
>
>
> Review request for Aurora, David McLaughlin and Suman Karumuri.
>
>
> Bugs: aurora-270
> https://issues.apache.org/jira/browse/aurora-270
>
>
> Repository: aurora
>
>
> Description
> -------
>
> The second half of command hooks:
> - Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
> URL.
> - Hooks are loaded and activated by the noun/verb framework.
> - Hook selection and dispatch has been substantially updated.
>
> Also did some long overdue cleanup of string quoting consistency.
>
>
> Diffs
> -----
>
> 3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
> docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
> src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
> src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
> src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
> src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
>
> Diff: https://reviews.apache.org/r/20928/diff/
>
>
> Testing
> -------
>
> [sun-wukong incubator-aurora (command-hooks-two)]$ !./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
> plugins: cov
> 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
> plugins: cov
> collected 9 items
>
> src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
>
> =========================== 9 passed in 0.80 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_help.py .....
>
> =========================== 5 passed in 0.70 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 36 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_open.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 ...
>
> ========================== 36 passed in 2.02 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 1 items
>
> src/test/python/apache/aurora/client/cli/test_logging.py .
>
> =========================== 1 passed in 0.65 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 3 items
>
> src/test/python/apache/aurora/client/cli/test_plugins.py ...
>
> =========================== 3 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 4 items
>
> src/test/python/apache/aurora/client/cli/test_quota.py ....
>
> =========================== 4 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_sla.py .....
>
> =========================== 5 passed in 0.72 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 2 items
>
> src/test/python/apache/aurora/client/cli/test_task_run.py ..
>
> =========================== 2 passed in 0.65 seconds ===========================
> 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.help ..... SUCCESS
> src.test.python.apache.aurora.client.cli.job ..... SUCCESS
> src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
>
>
> Thanks,
>
> Mark Chu-Carroll
>
>
Re: Review Request 20928: Command hooks: stage 2.
Posted by David McLaughlin <da...@dmclaughlin.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/#review41945
-----------------------------------------------------------
docs/design/command-hooks.md
<https://reviews.apache.org/r/20928/#comment75605>
This isn't true anymore, right?
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75613>
This is a confusing and potentially dangerous way to write this. Wouldn't it better to return False by default, and only return True if the conditions for skipping were met?
e.g. if I define json with no hooks option, this will always return True. Is that desired behaviour here? (It's unclear from the docs).
src/test/python/apache/aurora/client/cli/test_command_hooks.py
<https://reviews.apache.org/r/20928/#comment75616>
Further to above, could you add some test cases for some partially defined JSON documents?
- David McLaughlin
On May 1, 2014, 8:47 p.m., Mark Chu-Carroll wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20928/
> -----------------------------------------------------------
>
> (Updated May 1, 2014, 8:47 p.m.)
>
>
> Review request for Aurora, David McLaughlin and Suman Karumuri.
>
>
> Bugs: aurora-270
> https://issues.apache.org/jira/browse/aurora-270
>
>
> Repository: aurora
>
>
> Description
> -------
>
> The second half of command hooks:
> - Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
> URL.
> - Hooks are loaded and activated by the noun/verb framework.
> - Hook selection and dispatch has been substantially updated.
>
> Also did some long overdue cleanup of string quoting consistency.
>
>
> Diffs
> -----
>
> 3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
> docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
> src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
> src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
> src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
> src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
>
> Diff: https://reviews.apache.org/r/20928/diff/
>
>
> Testing
> -------
>
> [sun-wukong incubator-aurora (command-hooks-two)]$ !./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
> plugins: cov
> 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
> plugins: cov
> collected 9 items
>
> src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
>
> =========================== 9 passed in 0.80 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_help.py .....
>
> =========================== 5 passed in 0.70 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 36 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_open.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 ...
>
> ========================== 36 passed in 2.02 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 1 items
>
> src/test/python/apache/aurora/client/cli/test_logging.py .
>
> =========================== 1 passed in 0.65 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 3 items
>
> src/test/python/apache/aurora/client/cli/test_plugins.py ...
>
> =========================== 3 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 4 items
>
> src/test/python/apache/aurora/client/cli/test_quota.py ....
>
> =========================== 4 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_sla.py .....
>
> =========================== 5 passed in 0.72 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 2 items
>
> src/test/python/apache/aurora/client/cli/test_task_run.py ..
>
> =========================== 2 passed in 0.65 seconds ===========================
> 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.help ..... SUCCESS
> src.test.python.apache.aurora.client.cli.job ..... SUCCESS
> src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
>
>
> Thanks,
>
> Mark Chu-Carroll
>
>
Re: Review Request 20928: Command hooks: stage 2.
Posted by David McLaughlin <da...@dmclaughlin.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/#review41958
-----------------------------------------------------------
Ship it!
lgtm
- David McLaughlin
On May 1, 2014, 9:39 p.m., Mark Chu-Carroll wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20928/
> -----------------------------------------------------------
>
> (Updated May 1, 2014, 9:39 p.m.)
>
>
> Review request for Aurora, David McLaughlin and Suman Karumuri.
>
>
> Bugs: aurora-270
> https://issues.apache.org/jira/browse/aurora-270
>
>
> Repository: aurora
>
>
> Description
> -------
>
> The second half of command hooks:
> - Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
> URL.
> - Hooks are loaded and activated by the noun/verb framework.
> - Hook selection and dispatch has been substantially updated.
>
> Also did some long overdue cleanup of string quoting consistency.
>
>
> Diffs
> -----
>
> 3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
> docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
> src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
> src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
> src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
> src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
>
> Diff: https://reviews.apache.org/r/20928/diff/
>
>
> Testing
> -------
>
> [sun-wukong incubator-aurora (command-hooks-two)]$ !./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
> plugins: cov
> 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
> plugins: cov
> collected 9 items
>
> src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
>
> =========================== 9 passed in 0.80 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_help.py .....
>
> =========================== 5 passed in 0.70 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 36 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_open.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 ...
>
> ========================== 36 passed in 2.02 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 1 items
>
> src/test/python/apache/aurora/client/cli/test_logging.py .
>
> =========================== 1 passed in 0.65 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 3 items
>
> src/test/python/apache/aurora/client/cli/test_plugins.py ...
>
> =========================== 3 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 4 items
>
> src/test/python/apache/aurora/client/cli/test_quota.py ....
>
> =========================== 4 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_sla.py .....
>
> =========================== 5 passed in 0.72 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 2 items
>
> src/test/python/apache/aurora/client/cli/test_task_run.py ..
>
> =========================== 2 passed in 0.65 seconds ===========================
> 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.help ..... SUCCESS
> src.test.python.apache.aurora.client.cli.job ..... SUCCESS
> src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
>
>
> Thanks,
>
> Mark Chu-Carroll
>
>
Re: Review Request 20928: Command hooks: stage 2.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/
-----------------------------------------------------------
(Updated May 6, 2014, 3:14 p.m.)
Review request for Aurora, David McLaughlin and Suman Karumuri.
Changes
-------
Rebase to master.
Bugs: aurora-270
https://issues.apache.org/jira/browse/aurora-270
Repository: aurora
Description
-------
The second half of command hooks:
- Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
URL.
- Hooks are loaded and activated by the noun/verb framework.
- Hook selection and dispatch has been substantially updated.
Also did some long overdue cleanup of string quoting consistency.
Diffs (updated)
-----
3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
src/test/python/apache/aurora/client/cli/test_command_hooks.py 6c6f6f58e0263aeb6442d48e32ea13f1e3b98479
Diff: https://reviews.apache.org/r/20928/diff/
Testing
-------
[sun-wukong incubator-aurora (command-hooks-two)]$ !./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
plugins: cov
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
plugins: cov
collected 9 items
src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
=========================== 9 passed in 0.80 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_help.py .....
=========================== 5 passed in 0.70 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 36 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_open.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 ...
========================== 36 passed in 2.02 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 1 items
src/test/python/apache/aurora/client/cli/test_logging.py .
=========================== 1 passed in 0.65 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 3 items
src/test/python/apache/aurora/client/cli/test_plugins.py ...
=========================== 3 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 4 items
src/test/python/apache/aurora/client/cli/test_quota.py ....
=========================== 4 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_sla.py .....
=========================== 5 passed in 0.72 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 2 items
src/test/python/apache/aurora/client/cli/test_task_run.py ..
=========================== 2 passed in 0.65 seconds ===========================
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.help ..... SUCCESS
src.test.python.apache.aurora.client.cli.job ..... SUCCESS
src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
Thanks,
Mark Chu-Carroll
Re: Review Request 20928: Command hooks: stage 2.
Posted by Suman Karumuri <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/#review42322
-----------------------------------------------------------
Ship it!
Also, please reply to the review comments inline.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment76085>
To keep it DRY, just point to the design doc at the top of the file.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment76086>
To keep it DRY, just point to the design doc at the top of the file.
- Suman Karumuri
On May 6, 2014, 2:47 p.m., Mark Chu-Carroll wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20928/
> -----------------------------------------------------------
>
> (Updated May 6, 2014, 2:47 p.m.)
>
>
> Review request for Aurora, David McLaughlin and Suman Karumuri.
>
>
> Bugs: aurora-270
> https://issues.apache.org/jira/browse/aurora-270
>
>
> Repository: aurora
>
>
> Description
> -------
>
> The second half of command hooks:
> - Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
> URL.
> - Hooks are loaded and activated by the noun/verb framework.
> - Hook selection and dispatch has been substantially updated.
>
> Also did some long overdue cleanup of string quoting consistency.
>
>
> Diffs
> -----
>
> .auroraversion f0334e962b038d4b8a8de7ce87a8dd445616a0ea
> 3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
> docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
> src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
> src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
> src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
> src/test/python/apache/aurora/client/cli/test_command_hooks.py 6c6f6f58e0263aeb6442d48e32ea13f1e3b98479
>
> Diff: https://reviews.apache.org/r/20928/diff/
>
>
> Testing
> -------
>
> [sun-wukong incubator-aurora (command-hooks-two)]$ !./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
> plugins: cov
> 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
> plugins: cov
> collected 9 items
>
> src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
>
> =========================== 9 passed in 0.80 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_help.py .....
>
> =========================== 5 passed in 0.70 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 36 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_open.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 ...
>
> ========================== 36 passed in 2.02 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 1 items
>
> src/test/python/apache/aurora/client/cli/test_logging.py .
>
> =========================== 1 passed in 0.65 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 3 items
>
> src/test/python/apache/aurora/client/cli/test_plugins.py ...
>
> =========================== 3 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 4 items
>
> src/test/python/apache/aurora/client/cli/test_quota.py ....
>
> =========================== 4 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_sla.py .....
>
> =========================== 5 passed in 0.72 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 2 items
>
> src/test/python/apache/aurora/client/cli/test_task_run.py ..
>
> =========================== 2 passed in 0.65 seconds ===========================
> 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.help ..... SUCCESS
> src.test.python.apache.aurora.client.cli.job ..... SUCCESS
> src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
>
>
> Thanks,
>
> Mark Chu-Carroll
>
>
Re: Review Request 20928: Command hooks: stage 2.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/
-----------------------------------------------------------
(Updated May 6, 2014, 10:47 a.m.)
Review request for Aurora, David McLaughlin and Suman Karumuri.
Changes
-------
Address Suman's review.
Bugs: aurora-270
https://issues.apache.org/jira/browse/aurora-270
Repository: aurora
Description
-------
The second half of command hooks:
- Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
URL.
- Hooks are loaded and activated by the noun/verb framework.
- Hook selection and dispatch has been substantially updated.
Also did some long overdue cleanup of string quoting consistency.
Diffs (updated)
-----
.auroraversion f0334e962b038d4b8a8de7ce87a8dd445616a0ea
3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
src/test/python/apache/aurora/client/cli/test_command_hooks.py 6c6f6f58e0263aeb6442d48e32ea13f1e3b98479
Diff: https://reviews.apache.org/r/20928/diff/
Testing
-------
[sun-wukong incubator-aurora (command-hooks-two)]$ !./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
plugins: cov
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
plugins: cov
collected 9 items
src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
=========================== 9 passed in 0.80 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_help.py .....
=========================== 5 passed in 0.70 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 36 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_open.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 ...
========================== 36 passed in 2.02 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 1 items
src/test/python/apache/aurora/client/cli/test_logging.py .
=========================== 1 passed in 0.65 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 3 items
src/test/python/apache/aurora/client/cli/test_plugins.py ...
=========================== 3 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 4 items
src/test/python/apache/aurora/client/cli/test_quota.py ....
=========================== 4 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_sla.py .....
=========================== 5 passed in 0.72 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 2 items
src/test/python/apache/aurora/client/cli/test_task_run.py ..
=========================== 2 passed in 0.65 seconds ===========================
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.help ..... SUCCESS
src.test.python.apache.aurora.client.cli.job ..... SUCCESS
src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
Thanks,
Mark Chu-Carroll
Re: Review Request 20928: Command hooks: stage 2.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/#review42283
-----------------------------------------------------------
src/main/python/apache/aurora/client/cli/__init__.py
<https://reviews.apache.org/r/20928/#comment76059>
Done.
(Getting comments like this in a review is always a bit frustrating, because I just want to get stuff done. But then, I look at the code, and you're absolutely right, and the code is so much nicer after I fix it. This is exactly what makes code review so valuable. Thanks!)
src/main/python/apache/aurora/client/cli/__init__.py
<https://reviews.apache.org/r/20928/#comment76060>
I don't think so. I thought it was just 4 space indent on the next line. That's the style that I've used throughout the client.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment76064>
In this case, these submethods are just there to make the condition below more readable. They're not intended to ever be used outside of this method (which is why they're privates).
The overall method that they're part of has a good set of tests.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment76066>
(I could have sworn I replied to this already, but reviewboard says I didn't. Forgive me if this is a duplicate.)
These are local private methods which only exist to make the compound conditional below easier to read. They should never (and in fact can never) be called from anywhere else.
The condition that they're part of has a decent set of tests.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment76067>
Added an additional link at the top of the file, but I'd prefer to also leave this here.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment76065>
Nope, this is the correct behavior.
The client should not abort because it couldn't read skip rules. The only effect that the skip rules error will have is that attempts to execute commands blocked by hooks won't be executable.
We don't want the client to abort all commands because some commands might be block. All we want to do is let them (and the loggie service) know that there was a problem with the skip rules. This will get logged to loggie, because it's got a global handler in place.
- Mark Chu-Carroll
On May 1, 2014, 5:39 p.m., Mark Chu-Carroll wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20928/
> -----------------------------------------------------------
>
> (Updated May 1, 2014, 5:39 p.m.)
>
>
> Review request for Aurora, David McLaughlin and Suman Karumuri.
>
>
> Bugs: aurora-270
> https://issues.apache.org/jira/browse/aurora-270
>
>
> Repository: aurora
>
>
> Description
> -------
>
> The second half of command hooks:
> - Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
> URL.
> - Hooks are loaded and activated by the noun/verb framework.
> - Hook selection and dispatch has been substantially updated.
>
> Also did some long overdue cleanup of string quoting consistency.
>
>
> Diffs
> -----
>
> 3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
> docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
> src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
> src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
> src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
> src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
>
> Diff: https://reviews.apache.org/r/20928/diff/
>
>
> Testing
> -------
>
> [sun-wukong incubator-aurora (command-hooks-two)]$ !./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
> plugins: cov
> 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
> plugins: cov
> collected 9 items
>
> src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
>
> =========================== 9 passed in 0.80 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_help.py .....
>
> =========================== 5 passed in 0.70 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 36 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_open.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 ...
>
> ========================== 36 passed in 2.02 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 1 items
>
> src/test/python/apache/aurora/client/cli/test_logging.py .
>
> =========================== 1 passed in 0.65 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 3 items
>
> src/test/python/apache/aurora/client/cli/test_plugins.py ...
>
> =========================== 3 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 4 items
>
> src/test/python/apache/aurora/client/cli/test_quota.py ....
>
> =========================== 4 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_sla.py .....
>
> =========================== 5 passed in 0.72 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 2 items
>
> src/test/python/apache/aurora/client/cli/test_task_run.py ..
>
> =========================== 2 passed in 0.65 seconds ===========================
> 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.help ..... SUCCESS
> src.test.python.apache.aurora.client.cli.job ..... SUCCESS
> src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
>
>
> Thanks,
>
> Mark Chu-Carroll
>
>
Re: Review Request 20928: Command hooks: stage 2.
Posted by Suman Karumuri <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/#review42200
-----------------------------------------------------------
docs/design/command-hooks.md
<https://reviews.apache.org/r/20928/#comment75949>
Since no one is using these hooks yet, why do we need this changelog? I vote for dropping it.
src/main/python/apache/aurora/client/cli/__init__.py
<https://reviews.apache.org/r/20928/#comment75942>
Can you please break up this method into smaller methods?
src/main/python/apache/aurora/client/cli/__init__.py
<https://reviews.apache.org/r/20928/#comment75944>
isn't the styling convention one arg per line?
src/main/python/apache/aurora/client/cli/__init__.py
<https://reviews.apache.org/r/20928/#comment75943>
please add a more informative doc.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75946>
Is declaring methods like this unit test friendly? If not, please make these private methods in the class.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75945>
consider moving the link to the doc to the top of the file. I think it's simpler if this is the first class is the first class in the file.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75950>
Shouldn't we be signaling the caller that the process to load the global rules has failed? It looks like we treat success and failure in an identical way here.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75948>
make "all" a static string variable.
src/main/python/apache/aurora/client/cli/command_hooks.py
<https://reviews.apache.org/r/20928/#comment75947>
Please add a comment on why we need this check.
- Suman Karumuri
On May 1, 2014, 9:39 p.m., Mark Chu-Carroll wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20928/
> -----------------------------------------------------------
>
> (Updated May 1, 2014, 9:39 p.m.)
>
>
> Review request for Aurora, David McLaughlin and Suman Karumuri.
>
>
> Bugs: aurora-270
> https://issues.apache.org/jira/browse/aurora-270
>
>
> Repository: aurora
>
>
> Description
> -------
>
> The second half of command hooks:
> - Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
> URL.
> - Hooks are loaded and activated by the noun/verb framework.
> - Hook selection and dispatch has been substantially updated.
>
> Also did some long overdue cleanup of string quoting consistency.
>
>
> Diffs
> -----
>
> 3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
> docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
> src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
> src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
> src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
> src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
>
> Diff: https://reviews.apache.org/r/20928/diff/
>
>
> Testing
> -------
>
> [sun-wukong incubator-aurora (command-hooks-two)]$ !./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
> plugins: cov
> 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
> plugins: cov
> collected 9 items
>
> src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
>
> =========================== 9 passed in 0.80 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_help.py .....
>
> =========================== 5 passed in 0.70 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 36 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_open.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 ...
>
> ========================== 36 passed in 2.02 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 1 items
>
> src/test/python/apache/aurora/client/cli/test_logging.py .
>
> =========================== 1 passed in 0.65 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 3 items
>
> src/test/python/apache/aurora/client/cli/test_plugins.py ...
>
> =========================== 3 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 4 items
>
> src/test/python/apache/aurora/client/cli/test_quota.py ....
>
> =========================== 4 passed in 0.67 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 5 items
>
> src/test/python/apache/aurora/client/cli/test_sla.py .....
>
> =========================== 5 passed in 0.72 seconds ===========================
> ============================= test session starts ==============================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 2 items
>
> src/test/python/apache/aurora/client/cli/test_task_run.py ..
>
> =========================== 2 passed in 0.65 seconds ===========================
> 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.help ..... SUCCESS
> src.test.python.apache.aurora.client.cli.job ..... SUCCESS
> src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
>
>
> Thanks,
>
> Mark Chu-Carroll
>
>
Re: Review Request 20928: Command hooks: stage 2.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/
-----------------------------------------------------------
(Updated May 1, 2014, 5:39 p.m.)
Review request for Aurora, David McLaughlin and Suman Karumuri.
Changes
-------
Address review:
- Fix docs.
- Simplify the hook-skip check.
Bugs: aurora-270
https://issues.apache.org/jira/browse/aurora-270
Repository: aurora
Description
-------
The second half of command hooks:
- Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
URL.
- Hooks are loaded and activated by the noun/verb framework.
- Hook selection and dispatch has been substantially updated.
Also did some long overdue cleanup of string quoting consistency.
Diffs (updated)
-----
3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
Diff: https://reviews.apache.org/r/20928/diff/
Testing
-------
[sun-wukong incubator-aurora (command-hooks-two)]$ !./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
plugins: cov
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
plugins: cov
collected 9 items
src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
=========================== 9 passed in 0.80 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_help.py .....
=========================== 5 passed in 0.70 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 36 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_open.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 ...
========================== 36 passed in 2.02 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 1 items
src/test/python/apache/aurora/client/cli/test_logging.py .
=========================== 1 passed in 0.65 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 3 items
src/test/python/apache/aurora/client/cli/test_plugins.py ...
=========================== 3 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 4 items
src/test/python/apache/aurora/client/cli/test_quota.py ....
=========================== 4 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_sla.py .....
=========================== 5 passed in 0.72 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 2 items
src/test/python/apache/aurora/client/cli/test_task_run.py ..
=========================== 2 passed in 0.65 seconds ===========================
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.help ..... SUCCESS
src.test.python.apache.aurora.client.cli.job ..... SUCCESS
src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
Thanks,
Mark Chu-Carroll
Re: Review Request 20928: Command hooks: stage 2.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20928/
-----------------------------------------------------------
(Updated May 1, 2014, 4:47 p.m.)
Review request for Aurora, David McLaughlin and Suman Karumuri.
Changes
-------
Fix logging glitch: move logging statement to after plugin activation.
Bugs: aurora-270
https://issues.apache.org/jira/browse/aurora-270
Repository: aurora
Description
-------
The second half of command hooks:
- Dynamically registered hook exceptions are provided, by fetching a hooks skip rules file from a
URL.
- Hooks are loaded and activated by the noun/verb framework.
- Hook selection and dispatch has been substantially updated.
Also did some long overdue cleanup of string quoting consistency.
Diffs (updated)
-----
3rdparty/python/BUILD 122f71db0bc6f37c19ae0f3cb2fcade8321404e6
docs/design/command-hooks.md ee320ed3922928408d23a2dfdf3c42ef96e62ff7
src/main/python/apache/aurora/client/cli/BUILD 1bd565effb3dbe2aeb5d6156575e9316bd77c6a8
src/main/python/apache/aurora/client/cli/__init__.py 1e396b2263451b41cd223708f4cc4cdb1eeddbf0
src/main/python/apache/aurora/client/cli/command_hooks.py 2d200682209e1df83c03f9d515f3b118aaa85a99
src/test/python/apache/aurora/client/cli/test_command_hooks.py 7c6f70c7ef7534e9dd4986364331c67f6f7c36b1
Diff: https://reviews.apache.org/r/20928/diff/
Testing
-------
[sun-wukong incubator-aurora (command-hooks-two)]$ !./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
plugins: cov
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
plugins: cov
collected 9 items
src/test/python/apache/aurora/client/cli/test_command_hooks.py .........
=========================== 9 passed in 0.80 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_help.py .....
=========================== 5 passed in 0.70 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 36 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_open.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 ...
========================== 36 passed in 2.02 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 1 items
src/test/python/apache/aurora/client/cli/test_logging.py .
=========================== 1 passed in 0.65 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 3 items
src/test/python/apache/aurora/client/cli/test_plugins.py ...
=========================== 3 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 4 items
src/test/python/apache/aurora/client/cli/test_quota.py ....
=========================== 4 passed in 0.67 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 5 items
src/test/python/apache/aurora/client/cli/test_sla.py .....
=========================== 5 passed in 0.72 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 2 items
src/test/python/apache/aurora/client/cli/test_task_run.py ..
=========================== 2 passed in 0.65 seconds ===========================
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.help ..... SUCCESS
src.test.python.apache.aurora.client.cli.job ..... SUCCESS
src.test.python.apache.aurora.client.cli.logging ..... 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 (command-hooks-two)]$
Thanks,
Mark Chu-Carroll