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

Ship it!


Ship It!

- Zameer Manji


On June 22, 2015, 4:01 p.m., Michael Leinartas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35745/
> -----------------------------------------------------------
> 
> (Updated June 22, 2015, 4:01 p.m.)
> 
> 
> Review request for Aurora and Zameer Manji.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> - Allow equals in bound variables passed via cmdline
> 
> The parsing for the --bind parameter splits the parameter value on equals and 
> enforces only two elements. This prevents parameters whose value contains an 
> equals to be passed.
> 
> Example case:
>     HELLO_WORLD = Job(
>          name = 'hello',
>          role = 'bozo',
>          cluster = 'west',
>          environment = 'test',
>          instances = 1,
>          update_config = UpdateConfig(
>            batch_size = 1,
>            restart_threshold = 60,
>            watch_secs = 45,
>            max_per_shard_failures = 2,
>          ),
>          task = Task(
>            name = 'test',
>            processes = [Process(name = 'hello_world', cmdline = 'echo 
> {{flags}}')],
>            resources = Resources(cpu = 0.1, ram = 64 * MB, disk = 64 * MB),
>          )
>        )
>        jobs = [HELLO_WORLD]
>        
> 
> aurora job create --bind flags=-myflag=value west/bozo/test/hello 
> ./hello_world.aurora
> 
> Instead, the split() should use the maxsplit parameter to limit to 1 match 
> and leave additional equals signs in the parameter
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/cli/options.py 
> f8ac25287e296bcec89d3701738c7dd06ffae133 
>   src/test/python/apache/aurora/client/cli/test_create.py 
> 9f32ca3474ea51529217db29b88911010fa73602 
>   src/test/python/apache/aurora/client/cli/util.py 
> 053c9a56248848478ca2fe6ab2c12e24c3d93c13 
> 
> Diff: https://reviews.apache.org/r/35745/diff/
> 
> 
> Testing
> -------
> 
> Added a new binding to UNBOUND_CONFIG and a matching --bind parameter with an 
> equals sign in it to test_simple_successful_create_job_with_bindings 
> (test_create.py)
> 
>     $ ./pants test --test-pytest-options='-k _bindings' 
> src/test/python/apache/aurora:all
> passes
> 
> 
> Thanks,
> 
> Michael Leinartas
> 
>

Reply via email to