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 39057: "aurora config read" command
Date Mon, 12 Oct 2015 19:17:01 GMT


> On Oct. 11, 2015, 8:43 p.m., Stephan Erb wrote:
> > src/main/python/apache/aurora/client/cli/config.py, line 75
> > <https://reviews.apache.org/r/39057/diff/1/?file=1091955#file1091955line75>
> >
> >     I find it a little bit confusing that this command is called `read`. Isn't the
`bind` the most important step it does?
> 
> David McLaughlin wrote:
>     I just saw the IRC meeting notes for this. -1 to read but also -1 to bind. I think
something like evaluate, parse or even dump would be better, since bind is used in the psyatchio
translation sense but also used to pass variables to the config from the CLI.

I actually liked the simplicity of "read" but if it raises too many eyebrows my second choice
would be "evaluate". Parse, dump or bind feel either too shallow or too implementation-biased.


- Maxim


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


On Oct. 6, 2015, 6:43 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39057/
> -----------------------------------------------------------
> 
> (Updated Oct. 6, 2015, 6:43 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Zameer Manji.
> 
> 
> Bugs: AURORA-1504
>     https://issues.apache.org/jira/browse/AURORA-1504
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> 1. Moves "metadata" into Job schema and out of AuroraConfig so that metadata from bindings
is saved/loaded from .json output.
> 2. Adds "config read" command that accepts same format as job create/inspect etc.
> 
> This makes it simpler to build sensible deployment pipelines with binding helpers.  Take
an .aurora or .json config, "compile" it by making all bindings concrete, check into a vcs,
use for diff if necessary, deploy/rollback from json without losing metadata.
> 
> 
> Diffs
> -----
> 
>   .gitignore 6c37128b5d02b0e52eb467be3652a37b10d7bc06 
>   src/main/python/apache/aurora/client/cli/config.py 73b556266183bf17463881b87cda107d07d79d71

>   src/main/python/apache/aurora/config/__init__.py 665e2cd08d4146e652b13bb82e04680315a1eebe

>   src/main/python/apache/aurora/config/schema/base.py 398f737bed9ef02ce4a5636896d6587bce26501e

>   src/main/python/apache/aurora/config/thrift.py b40a7fdfa63eaf18d9a85f62eec5aa717a7e7d91

>   src/test/python/apache/aurora/config/test_thrift.py 1bd745964b45b30014cabbef89949ac6221f148b

> 
> Diff: https://reviews.apache.org/r/39057/diff/
> 
> 
> Testing
> -------
> 
> # build
> mba=aurora=; ./pants binary src/main/python/apache/aurora/client:aurora
> 
> # list configs
> mba=aurora=; dist/aurora.pex config list examples/jobs/hello_world.aurora 
> jobs=[devcluster/www-data/prod/hello]
> 
> # write to disk
> mba=aurora=; dist/aurora.pex config read devcluster/www-data/prod/hello examples/jobs/hello_world.aurora
> /tmp/hello_world.json
> 
> # edit file to change command, ram
> mba=aurora=; joe example/jobs/hello_world.aurora
> 
> # compare
> mba=aurora=; diff <(dist/aurora.pex config read devcluster/www-data/prod/hello examples/jobs/hello_world.aurora)
/tmp/hello_world.json 
> 
>     44c44
>     <                 "cmdline": "\n    while true; do\n      echo hello world with
twice as much ram\n      sleep 10\n    done\n  ", 
>     ---
>     >                 "cmdline": "\n    while true; do\n      echo hello world\n 
    sleep 10\n    done\n  ", 
>     56c56
>     <             "ram": 268435456
>     ---
>     >             "ram": 134217728
> 
> # submit
> mba=aurora=; aurora update start --read-json devcluster/www-data/prod/hello /tmp/hello_world.json
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


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