Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-27 Thread Brian Wickman

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

Ship it!


Ship It!

- Brian Wickman


On March 26, 2014, 6:08 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 26, 2014, 6:08 p.m.)
> 
> 
> 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/context.py 
> 83f7b6a4ae1e6896278752cb481901c6e381ba0e 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> e354ee153da3e03ce0f134ddcef65ebd2075d8b5 
>   src/main/python/apache/aurora/client/cli/options.py 
> 040c5c213798e644ba59c4ce3f9c4fe8868af2d5 
>   src/main/python/apache/aurora/client/cli/task.py 
> e4ee77ede119fc1e3bd196293965073405bb48b3 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 208816060789a49f6c6dc5d2081bab784a8c811d 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 6bcdd6aab7fda259b135793378b6db731fe02601 
>   src/test/python/apache/aurora/client/cli/util.py 
> bc2a3e9b88947bb9ab06d945c0f154f3b19a9ff9 
> 
> 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

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-27 Thread Mark Chu-Carroll
Bill: It's been 24 hours, and I'm still waiting on a clarification request.
Please, can you take a minute, and answer, so that I can get this review
done?

   -Mark



On Wed, Mar 26, 2014 at 3:28 PM, Mark Chu-Carroll <
mchucarr...@twopensource.com> wrote:

>This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
>
> src/main/python/apache/aurora/client/cli/jobs.py
>  (Diff
> revision 6)
>
> 301
>
> while len(instances_to_kill) > 0:
>
>   Sorry, I don't follow what you're suggesting here. Do you mean that you 
> want each batch kill to take a minimum amount of time, and so pad with sleep 
> if the batches are fast?
>
> (In any case, that's not really part of this review; that's just change 
> tangling that I couldn't quickly unwind. If you want that changed, I'd like 
> to make it a separate change.)
>
>
> - Mark Chu-Carroll
>
> On March 26th, 2014, 2:08 p.m. EDT, Mark Chu-Carroll wrote:
>   Review request for Aurora, Bill Farner and Brian Wickman.
> By Mark Chu-Carroll.
>
> *Updated March 26, 2014, 2:08 p.m.*
>  *Bugs: * 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.
>
>   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 
>   

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-26 Thread Mark Chu-Carroll

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



src/main/python/apache/aurora/client/cli/jobs.py


Sorry, I don't follow what you're suggesting here. Do you mean that you 
want each batch kill to take a minimum amount of time, and so pad with sleep if 
the batches are fast?

(In any case, that's not really part of this review; that's just change 
tangling that I couldn't quickly unwind. If you want that changed, I'd like to 
make it a separate change.)



- Mark Chu-Carroll


On March 26, 2014, 2:08 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 26, 2014, 2:08 p.m.)
> 
> 
> 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/context.py 
> 83f7b6a4ae1e6896278752cb481901c6e381ba0e 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> e354ee153da3e03ce0f134ddcef65ebd2075d8b5 
>   src/main/python/apache/aurora/client/cli/options.py 
> 040c5c213798e644ba59c4ce3f9c4fe8868af2d5 
>   src/main/python/apache/aurora/client/cli/task.py 
> e4ee77ede119fc1e3bd196293965073405bb48b3 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 208816060789a49f6c6dc5d2081bab784a8c811d 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 6bcdd6aab7fda259b135793378b6db731fe02601 
>   src/test/python/apache/aurora/client/cli/util.py 
> bc2a3e9b88947bb9ab06d945c0f154f3b19a9ff9 
> 
> 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/

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-26 Thread Bill Farner

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

Ship it!



src/main/python/apache/aurora/client/cli/jobs.py


Looks like the API call is the only thing rate limiting this.  Seems like 
additional code would be wise in the event that kill is  fast.



src/main/python/apache/aurora/client/cli/options.py


Wasn't the line break style correct before this diff?


- Bill Farner


On March 26, 2014, 6:08 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 26, 2014, 6:08 p.m.)
> 
> 
> 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/context.py 
> 83f7b6a4ae1e6896278752cb481901c6e381ba0e 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> e354ee153da3e03ce0f134ddcef65ebd2075d8b5 
>   src/main/python/apache/aurora/client/cli/options.py 
> 040c5c213798e644ba59c4ce3f9c4fe8868af2d5 
>   src/main/python/apache/aurora/client/cli/task.py 
> e4ee77ede119fc1e3bd196293965073405bb48b3 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 208816060789a49f6c6dc5d2081bab784a8c811d 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 6bcdd6aab7fda259b135793378b6db731fe02601 
>   src/test/python/apache/aurora/client/cli/util.py 
> bc2a3e9b88947bb9ab06d945c0f154f3b19a9ff9 
> 
> 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 i

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-26 Thread Mark Chu-Carroll

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

(Updated March 26, 2014, 2:08 p.m.)


Review request for Aurora, Bill Farner and Brian Wickman.


Changes
---

Trying to fix this. This review got tangled with 19466, which is making things 
very confusing. 
(This is why I complain about having too many outstanding reviews: I'm 
absolutely terrible at it. 
Due to my mistake juggling, parts of this wound up getting tangled with that.

I'm not going to try to completely disentangle it. Basically, the stuff that's 
part of this, but not 19466 is
the part that it's options.py.)


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 (updated)
-

  src/main/python/apache/aurora/client/cli/context.py 
83f7b6a4ae1e6896278752cb481901c6e381ba0e 
  src/main/python/apache/aurora/client/cli/jobs.py 
e354ee153da3e03ce0f134ddcef65ebd2075d8b5 
  src/main/python/apache/aurora/client/cli/options.py 
040c5c213798e644ba59c4ce3f9c4fe8868af2d5 
  src/main/python/apache/aurora/client/cli/task.py 
e4ee77ede119fc1e3bd196293965073405bb48b3 
  src/test/python/apache/aurora/client/cli/test_kill.py 
208816060789a49f6c6dc5d2081bab784a8c811d 
  src/test/python/apache/aurora/client/cli/test_restart.py 
6bcdd6aab7fda259b135793378b6db731fe02601 
  src/test/python/apache/aurora/client/cli/util.py 
bc2a3e9b88947bb9ab06d945c0f154f3b19a9ff9 

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.tes

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-25 Thread Mark Chu-Carroll
Not uncaught: it gets handled exactly the way that all invalid parameters
get handled - the exception gets thrown in the parser, it bubbles up, and
gets caught by the framework and turned into an error:

[sun-wukong incubator-aurora (instance-syntax)]$ ./dist/client.pex job kill
west/mchucarroll/test/foo/asonteuh
usage: client.pex job kill [-h] [--open-browser] [--config CONFIG]
   CLUSTER/ROLE/ENV/NAME/INSTANCES
client.pex job kill: error: argument CLUSTER/ROLE/ENV/NAME/INSTANCES:
invalid instance_specifier value: 'west/mchucarroll/test/foo/asonteuh'


On Tue, Mar 25, 2014 at 6:22 PM, Brian Wickman  wrote:

>This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
>
> On March 24th, 2014, 6:57 p.m. UTC, *Mark Chu-Carroll* wrote:
>
>   
> src/main/python/apache/aurora/client/cli/options.py
>  (Diff
> revision 4)
>
> def parse_qualified_role(rolestr):
>
>   111
>
>   for part in instances.split(','):
>
> 121
>
>   for part in instances.split(','):
>
>  112
>
> x = part.split('-')
>
> 122
>
> x = part.split('-')
>
>  113
>
> result.update(range(int(x[0]), int(x[-1]) + 1))
>
> 123
>
> result.update(range(int(x[0]), int(x[-1]) + 1))
>
>  114
>
>   return sorted(result)
>
> 124
>
>   return sorted(result)
>
>   "all" was never revealed to users, and we've decided to get rid of it. It 
> will never show up in a user-visible way; mentioning it here will just be 
> confusing.
>
>  I understand, but there is no input sanitation preventing you from doing 
> "west/foo/prod/bar/morfgorf" -- it will raise an uncaught ValueError here.
>
>
> - Brian
>
> On March 24th, 2014, 6:58 p.m. UTC, Mark Chu-Carroll wrote:
>   Review request for Aurora, Bill Farner and Brian Wickman.
> By Mark Chu-Carroll.
>
> *Updated March 24, 2014, 6:58 p.m.*
>  *Bugs: * 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.
>
>   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 ..
>
> 

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-25 Thread Brian Wickman


> On March 24, 2014, 6:57 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/cli/options.py, lines 121-124
> > 
> >
> > "all" was never revealed to users, and we've decided to get rid of it. 
> > It will never show up in a user-visible way; mentioning it here will just 
> > be confusing.
> >

I understand, but there is no input sanitation preventing you from doing 
"west/foo/prod/bar/morfgorf" -- it will raise an uncaught ValueError here.


- Brian


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


On March 24, 2014, 6:58 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 24, 2014, 6:58 p.m.)
> 
> 
> 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/context.py 
> dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> 3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
>   src/main/python/apache/aurora/client/cli/options.py 
> 1f33ea293969326c4e8cbd39e54b173f659e61bf 
>   src/main/python/apache/aurora/client/cli/task.py 
> 8d4d38efbd126911f46bc3f8944e81bc9d149e32 
>   src/main/python/apache/aurora/client/config.py 
> 1fe5db429007850911f19517565d49b0518e8196 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 7547bd79f059c9d535db926d882abc0b46f9d046 
>   src/test/python/apache/aurora/client/cli/util.py 
> db65eee3aeba651f3dedc76233f589a7b22020e8 
> 
> 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 
> ==

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-25 Thread Mark Chu-Carroll

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


Ping?

- Mark Chu-Carroll


On March 24, 2014, 2:58 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 24, 2014, 2:58 p.m.)
> 
> 
> 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/context.py 
> dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> 3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
>   src/main/python/apache/aurora/client/cli/options.py 
> 1f33ea293969326c4e8cbd39e54b173f659e61bf 
>   src/main/python/apache/aurora/client/cli/task.py 
> 8d4d38efbd126911f46bc3f8944e81bc9d149e32 
>   src/main/python/apache/aurora/client/config.py 
> 1fe5db429007850911f19517565d49b0518e8196 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 7547bd79f059c9d535db926d882abc0b46f9d046 
>   src/test/python/apache/aurora/client/cli/util.py 
> db65eee3aeba651f3dedc76233f589a7b22020e8 
> 
> 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   

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-24 Thread Mark Chu-Carroll

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



src/main/python/apache/aurora/client/cli/jobs.py


I think that the code is clearer when it's explicit that instances is a 
required parameter, and that we're deliberately passing "None" as a signal.




src/main/python/apache/aurora/client/cli/options.py


"all" was never revealed to users, and we've decided to get rid of it. It 
will never show up in a user-visible way; mentioning it here will just be 
confusing.



- Mark Chu-Carroll


On March 22, 2014, 10:14 a.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 22, 2014, 10:14 a.m.)
> 
> 
> 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/context.py 
> dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> 3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
>   src/main/python/apache/aurora/client/cli/options.py 
> 1f33ea293969326c4e8cbd39e54b173f659e61bf 
>   src/main/python/apache/aurora/client/cli/task.py 
> 8d4d38efbd126911f46bc3f8944e81bc9d149e32 
>   src/main/python/apache/aurora/client/config.py 
> 1fe5db429007850911f19517565d49b0518e8196 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 7547bd79f059c9d535db926d882abc0b46f9d046 
>   src/test/python/apache/aurora/client/cli/util.py 
> db65eee3aeba651f3dedc76233f589a7b22020e8 
> 
> 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 
> ==

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-24 Thread Mark Chu-Carroll

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

(Updated March 24, 2014, 2:58 p.m.)


Review request for Aurora, Bill Farner and Brian Wickman.


Changes
---

Another round of review changes.


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 (updated)
-

  src/main/python/apache/aurora/client/cli/context.py 
dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
  src/main/python/apache/aurora/client/cli/jobs.py 
3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
  src/main/python/apache/aurora/client/cli/options.py 
1f33ea293969326c4e8cbd39e54b173f659e61bf 
  src/main/python/apache/aurora/client/cli/task.py 
8d4d38efbd126911f46bc3f8944e81bc9d149e32 
  src/main/python/apache/aurora/client/config.py 
1fe5db429007850911f19517565d49b0518e8196 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
  src/test/python/apache/aurora/client/cli/test_restart.py 
7547bd79f059c9d535db926d882abc0b46f9d046 
  src/test/python/apache/aurora/client/cli/util.py 
db65eee3aeba651f3dedc76233f589a7b22020e8 

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 INST

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-24 Thread Brian Wickman

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



src/main/python/apache/aurora/client/cli/jobs.py


if instances_arg is optional, make instances_arg=None here and drop the 
explicit 'None' being passed elsewhere



src/main/python/apache/aurora/client/cli/jobs.py


is this the right print function now?



src/main/python/apache/aurora/client/cli/jobs.py


print_err?



src/main/python/apache/aurora/client/cli/jobs.py


this error message looks invalid now



src/main/python/apache/aurora/client/cli/options.py


passing "all" here will result in a ValueError from the int(x[0]), so that 
should probably be caught and signaled to the user as a human-readable error 
message.


- Brian Wickman


On March 22, 2014, 2:14 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 22, 2014, 2:14 p.m.)
> 
> 
> 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/context.py 
> dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> 3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
>   src/main/python/apache/aurora/client/cli/options.py 
> 1f33ea293969326c4e8cbd39e54b173f659e61bf 
>   src/main/python/apache/aurora/client/cli/task.py 
> 8d4d38efbd126911f46bc3f8944e81bc9d149e32 
>   src/main/python/apache/aurora/client/config.py 
> 1fe5db429007850911f19517565d49b0518e8196 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 7547bd79f059c9d535db926d882abc0b46f9d046 
>   src/test/python/apache/aurora/client/cli/util.py 
> db65eee3aeba651f3dedc76233f589a7b22020e8 
> 
> 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 
> ===
> =

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-22 Thread Mark Chu-Carroll

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

(Updated March 22, 2014, 10:14 a.m.)


Review request for Aurora, Bill Farner and Brian Wickman.


Changes
---

get rid of '/all'.


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 (updated)
-

  src/main/python/apache/aurora/client/cli/context.py 
dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
  src/main/python/apache/aurora/client/cli/jobs.py 
3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
  src/main/python/apache/aurora/client/cli/options.py 
1f33ea293969326c4e8cbd39e54b173f659e61bf 
  src/main/python/apache/aurora/client/cli/task.py 
8d4d38efbd126911f46bc3f8944e81bc9d149e32 
  src/main/python/apache/aurora/client/config.py 
1fe5db429007850911f19517565d49b0518e8196 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
  src/test/python/apache/aurora/client/cli/test_restart.py 
7547bd79f059c9d535db926d882abc0b46f9d046 
  src/test/python/apache/aurora/client/cli/util.py 
db65eee3aeba651f3dedc76233f589a7b22020e8 

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 

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-21 Thread Brian Wickman

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



src/main/python/apache/aurora/client/cli/options.py


i'd prefer "all" not exist, since it's just unnecessary ceremony (vs 
omitting it.)



src/main/python/apache/aurora/client/cli/options.py


elif



src/main/python/apache/aurora/client/cli/options.py


metavar should be something like CLUSTER/ROLE/ENV/NAME[/INSTANCES]


- Brian Wickman


On March 21, 2014, 7:56 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 21, 2014, 7:56 p.m.)
> 
> 
> 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/context.py 
> dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
>   src/main/python/apache/aurora/client/cli/jobs.py 
> 3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
>   src/main/python/apache/aurora/client/cli/options.py 
> 1f33ea293969326c4e8cbd39e54b173f659e61bf 
>   src/main/python/apache/aurora/client/cli/task.py 
> 8d4d38efbd126911f46bc3f8944e81bc9d149e32 
>   src/main/python/apache/aurora/client/config.py 
> 1fe5db429007850911f19517565d49b0518e8196 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 7547bd79f059c9d535db926d882abc0b46f9d046 
>   src/test/python/apache/aurora/client/cli/test_update.py 
> 51858b9e4ca02c2ae2151275fff9936460936bb4 
>   src/test/python/apache/aurora/client/cli/util.py 
> db65eee3aeba651f3dedc76233f589a7b22020e8 
> 
> 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 
> ===
> =

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-21 Thread Mark Chu-Carroll

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

(Updated March 21, 2014, 3:56 p.m.)


Review request for Aurora, Bill Farner and Brian Wickman.


Changes
---

Address reviews:
- Make omitting the "instances" part an instance spec equivalent to appending 
'/all'.
- Abstract the common parts of kill and killall.
- Add a max-total-failures option to kill and killall, and add a test to ensure 
it works.


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 (updated)
-

  src/main/python/apache/aurora/client/cli/context.py 
dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
  src/main/python/apache/aurora/client/cli/jobs.py 
3a68cf8dadcf2984a3ed97e7213cdf1fa9cb9fa4 
  src/main/python/apache/aurora/client/cli/options.py 
1f33ea293969326c4e8cbd39e54b173f659e61bf 
  src/main/python/apache/aurora/client/cli/task.py 
8d4d38efbd126911f46bc3f8944e81bc9d149e32 
  src/main/python/apache/aurora/client/config.py 
1fe5db429007850911f19517565d49b0518e8196 
  src/test/python/apache/aurora/client/cli/test_kill.py 
6040ed45eb1d2d8ed2b0a09718e13ad8dbb0e6aa 
  src/test/python/apache/aurora/client/cli/test_restart.py 
7547bd79f059c9d535db926d882abc0b46f9d046 
  src/test/python/apache/aurora/client/cli/test_update.py 
51858b9e4ca02c2ae2151275fff9936460936bb4 
  src/test/python/apache/aurora/client/cli/util.py 
db65eee3aeba651f3dedc76233f589a7b22020e8 

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  
.

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-21 Thread Brian Wickman

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



src/main/python/apache/aurora/client/cli/jobs.py


this is virtually line by line the same thing as L356-L371 and possibly 
error prone as well, so this should definitely be factored out into a helper.



src/main/python/apache/aurora/client/cli/options.py


2nl



src/main/python/apache/aurora/client/cli/options.py


2nl



src/main/python/apache/aurora/client/cli/options.py


like bill i'm somewhat ambivalent about 'all'.

i think it's much more natural instead of having a wildcard, to simply omit 
the last key altogether.



src/main/python/apache/aurora/client/cli/options.py


why not if len(parts) == 4:
  instance_str = 'all' ?

this seems much more natural, and with batching as the default, should be 
safe to interoperate.


- Brian Wickman


On March 20, 2014, 6:48 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 20, 2014, 6:48 p.m.)
> 
> 
> 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/context.py 
> dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
>   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/main/python/apache/aurora/client/config.py 
> 1fe5db429007850911f19517565d49b0518e8196 
>   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 
>   src/test/python/apache/aurora/client/cli/util.py 
> db65eee3aeba651f3dedc76233f589a7b22020e8 
> 
> 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 -- P

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-20 Thread Mark Chu-Carroll

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

(Updated March 20, 2014, 2:48 p.m.)


Review request for Aurora, Bill Farner and Brian Wickman.


Changes
---

- Add documentation of the "all" option in instance syntax.
- Make 'all' be a symbolic constant rather than literal strings throughout the 
code.


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 (updated)
-

  src/main/python/apache/aurora/client/cli/context.py 
dad4fcb63c7d7b6bce898b1a4202425f5a0d70fe 
  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/main/python/apache/aurora/client/config.py 
1fe5db429007850911f19517565d49b0518e8196 
  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 
  src/test/python/apache/aurora/client/cli/util.py 
db65eee3aeba651f3dedc76233f589a7b22020e8 

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
. 

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-20 Thread Mark Chu-Carroll


> On March 20, 2014, 2:27 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/cli/jobs.py, line 293
> > 
> >
> > The "instance" syntax is mandatory for commands that can operate on 
> > instances. The parser is shared between all of them.
> > 
> > For restart, run, and update, it make sense to be able to say "all 
> > shard". So you can say "all" instead of providing a numeric range.
> > 
> > For kill, we don't want to allow users to specify "all"; we wnt them to 
> > use killall.
> >
> 
> Bill Farner wrote:
> I know wickman has mentioned using * for this, which i personally find 
> more natural.  At the very least, this deserves some comments explaining the 
> methodology, as well as docs in the help output.  Ideally the doc for 
> developers would live near a constant that defines the wildcard string.

You're absolutely right about the documentation. I'll fix that.

Two objections to '*':
- * looks too much like we're allowing globbing. We're already using 
globbing/wildcards other place in the client, and the semantics are different. 
I think it's confusing that at other places in the client I can say 
"cluster/name/env/j*" to mean "all jobs that start with j", but here, '1*' 
wouldn't work. 
- If you use *, then the instance spec argument needs to be single-quoted in 
the shell.

The first is more serious to me. I think that that's a semantic distinction 
which should be clearly visible in the syntax.


- Mark


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


On March 19, 2014, 7:38 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 19, 2014, 7:38 p.m.)
> 
> 
> 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/tes

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-20 Thread Bill Farner

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



src/main/python/apache/aurora/client/cli/jobs.py


s/except/accept/


- Bill Farner


On March 19, 2014, 11:38 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 19, 2014, 11:38 p.m.)
> 
> 
> 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.

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-20 Thread Bill Farner


> On March 20, 2014, 6:27 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/cli/jobs.py, line 293
> > 
> >
> > The "instance" syntax is mandatory for commands that can operate on 
> > instances. The parser is shared between all of them.
> > 
> > For restart, run, and update, it make sense to be able to say "all 
> > shard". So you can say "all" instead of providing a numeric range.
> > 
> > For kill, we don't want to allow users to specify "all"; we wnt them to 
> > use killall.
> >

I know wickman has mentioned using * for this, which i personally find more 
natural.  At the very least, this deserves some comments explaining the 
methodology, as well as docs in the help output.  Ideally the doc for 
developers would live near a constant that defines the wildcard string.


- Bill


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


On March 19, 2014, 11:38 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 19, 2014, 11:38 p.m.)
> 
> 
> 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_

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-20 Thread Mark Chu-Carroll

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



src/main/python/apache/aurora/client/cli/jobs.py


The "instance" syntax is mandatory for commands that can operate on 
instances. The parser is shared between all of them.

For restart, run, and update, it make sense to be able to say "all shard". 
So you can say "all" instead of providing a numeric range.

For kill, we don't want to allow users to specify "all"; we wnt them to use 
killall.




src/main/python/apache/aurora/client/cli/jobs.py


Yes. Some of the wildcard stuff is still more up-in-the-air than I'd like; 
I just haven't had time to go through and make it uniform.

The parser will still allow a wildcard. The wildcard won't actually be 
expanded to match anything, because that code doesn't run in kill. But there 
should be a proper, uniform error message in all commands that don't support 
wildcarding.




src/main/python/apache/aurora/client/cli/jobs.py


See above. I can't remember who I've talked to about it - I know I've 
talked about i, but I don't remember who. 

Without instance syntax, if you run "aurora job update c/r/e/j" without 
"--instances", it automatically runs on all instances. 

With instance syntax, the parameter to update and restart is a five-tuple, 
one part of which is a shard specifier. We don't want to eliminate all-shard 
update, but this does add a degree of safety, in that you can't accidentally 
update all shards: you need to explicitly say that that's what you want to do.



- Mark Chu-Carroll


On March 19, 2014, 7:38 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 19, 2014, 7:38 p.m.)
> 
> 
> 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 d

Re: Review Request 19431: Add instance specifier syntax to clientv2

2014-03-20 Thread Bill Farner

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



src/main/python/apache/aurora/client/cli/jobs.py


KillInstancesCommand?



src/main/python/apache/aurora/client/cli/jobs.py


What's this about?



src/main/python/apache/aurora/client/cli/jobs.py


Is this TODO valid?



src/main/python/apache/aurora/client/cli/jobs.py


I may have missed something, but is this 'all' thing new?  Has it been 
pitched to the team?


- Bill Farner


On March 19, 2014, 11:38 p.m., Mark Chu-Carroll wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19431/
> ---
> 
> (Updated March 19, 2014, 11:38 p.m.)
> 
> 
> 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/c

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,
[sun-wukon