aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Khutornenko <ma...@apache.org>
Subject Re: Review Request 43373: Implementing 'aurora job add' command.
Date Tue, 09 Feb 2016 22:04:29 GMT


> On Feb. 9, 2016, 9:11 p.m., Joshua Cohen wrote:
> > src/main/python/apache/aurora/client/cli/context.py, line 75
> > <https://reviews.apache.org/r/43373/diff/1/?file=1238720#file1238720line75>
> >
> >     s/an/the

Done.


> On Feb. 9, 2016, 9:11 p.m., Joshua Cohen wrote:
> > src/main/python/apache/aurora/client/cli/context.py, line 196
> > <https://reviews.apache.org/r/43373/diff/1/?file=1238720#file1238720line196>
> >
> >     s/is/are

Done.


> On Feb. 9, 2016, 9:11 p.m., Joshua Cohen wrote:
> > src/main/python/apache/aurora/client/cli/jobs.py, line 471
> > <https://reviews.apache.org/r/43373/diff/1/?file=1238721#file1238721line471>
> >
> >     What happens if someone specifies an instance range here instead of a single
instance?

This is exactly the reason I used TASK_INSTANCE_ARGUMENT instead of INSTANCE_SPEC_ARGUMENT,
which disallows instance ranges.

However, your question prompted me to take a look at the error message and it wasn't ideal:
```
aurora job add: error: argument task_instance: invalid parse_task_instance_key value: 'devcluster/www-data/prod/hello/2-4'
```

Further look uncovered a few places in options.py parsers where we raise ValueError instead
of ArgumentTypeError. Fixed all of relevant cases and added tests. The new message is much
better now:
```
aurora job add: error: argument task_instance: Instance must be an integer, but got 2-4
```


- Maxim


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


On Feb. 9, 2016, 10:04 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43373/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2016, 10:04 p.m.)
> 
> 
> Review request for Aurora, John Sirois and Bill Farner.
> 
> 
> Bugs: AURORA-1258
>     https://issues.apache.org/jira/browse/AURORA-1258
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Taking advantage of the refactored addInstances RPC to add a 'scale out' client command.
> 
> The mitigation of .aurora config file `instances` value mismatch is currently discussed
at http://markmail.org/message/5ekpapmxr4vxxcd5 and will be addressed separately.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/__init__.py 63bd649377816c72ef2453d9abb7363637a91680

>   src/main/python/apache/aurora/client/cli/context.py 24a37ec60a8845b4816d292c49fed814ba0a5854

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

>   src/main/python/apache/aurora/client/cli/options.py 226397865e54cf4c0a59ecb91b93ddc10967edf7

>   src/main/python/apache/aurora/client/hooks/hooked_api.py 185e57d08aa13b687529fefd7c356f3d50c6af33

>   src/test/python/apache/aurora/api_util.py 9d44b884e5e67506acaaecda1d9ff02a80cf1567

>   src/test/python/apache/aurora/client/api/test_api.py 1f041f42fcd5ee5d147afacd9c8f83aa3129fe47

>   src/test/python/apache/aurora/client/cli/test_add.py PRE-CREATION 
>   src/test/python/apache/aurora/client/cli/test_options.py 21d5888c0a87e07a385159de0b56420086666d9d

>   src/test/python/apache/aurora/client/hooks/test_hooked_api.py 67517a23535e3f535c3114193a5ae06bf4326515

>   src/test/python/apache/aurora/client/hooks/test_non_hooked_api.py f4b771bc968143845772a0149a943c97c5aaf963

> 
> Diff: https://reviews.apache.org/r/43373/diff/
> 
> 
> Testing
> -------
> 
> local and manual tests in vagrant
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message