aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Leinartas" <mleinar...@gmail.com>
Subject Re: Review Request 35745: Allow equals in bound variables passed via cmdline
Date Mon, 22 Jun 2015 21:39:08 GMT

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

(Updated June 22, 2015, 9:39 p.m.)


Review request for Aurora.


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

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


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


Testing
-------

Tried adding an equals to bind parameter (cluster_binding) in test_simple_successful_create_job_with_bindings
and re-ran tests


Thanks,

Michael Leinartas


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