You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Antoine Tollenaere <at...@twitter.com> on 2014/05/28 03:27:16 UTC
Review Request 21943: Accept a job key for config loading.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21943/
-----------------------------------------------------------
Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
Repository: aurora
Description
-------
Config loading used to have optional, individual job key components. As far as I know there are no use for that (it used to be the way we would infer a job). Changed the interface to take a mandatory job key instead.
Diffs
-----
src/main/python/apache/aurora/client/cli/context.py b1e8e407f27d6ae0512057211b147836f28eeac3
src/main/python/apache/aurora/client/commands/core.py 4eb4e465dcdea859984835dfa9878b1d92ccb5ab
src/main/python/apache/aurora/client/config.py b4b9a96f4652189abc063a2374e03cff26a0dc9f
src/main/python/apache/aurora/config/__init__.py dd2f89014a3da730364b14e01c499ac0f2c288c1
src/test/python/apache/aurora/client/test_binding_helper.py e909a05fadcf63fc948bb629c9894e4bec6c1ac3
src/test/python/apache/aurora/client/test_config.py 4eb081a5648203ac148d50850d5e4f6b310d3562
src/test/python/apache/aurora/config/test_base.py 72a711a61fed246cdb7614d4ea95a7fd303e1562
src/test/python/apache/aurora/config/test_loader.py adde41babcce8b97a26fe31daff36671e15c2f4a
Diff: https://reviews.apache.org/r/21943/diff/
Testing
-------
- all unit tests pass
- e2e tests pass
- e2e v2 tests pass
Some manual testing for no such job key and multiple jobs defined with same key:
$ aurora create devcluster/atollenaere/devel/test test.aurora
Error: No job defined in this config!
$ aurora create devcluster/atollenaere/devel/test test.aurora
Traceback (most recent call last):
File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 738, in _wrap_method
return_code = method()
File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 760, in <lambda>
main = lambda: main_method(*args, **kwargs)
File "/usr/local/bin/aurora/apache/aurora/client/base.py", line 72, in wrapped_function
return fn(*args)
File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 131, in create
config = get_job_config(job_spec, config_file, options)
File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 79, in get_job_config
return get_config(job_key, config_file, json_option, bindings)
File "/usr/local/bin/aurora/apache/aurora/client/config.py", line 259, in get_config
return loader(config_file, job_key, bindings)
File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 92, in load
return cls.apply_plugins(cls(cls.pick(env, job_key, bindings)), env)
File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 67, in pick
raise cls.InvalidConfig('Multiple jobs have key %s in your config.' % job_key)
InvalidConfig: The configuration was invalid: Multiple jobs have key devcluster/atollenaere/devel/test in your config.
Thanks,
Antoine Tollenaere
Re: Review Request 21943: Accept a job key for config loading.
Posted by Antoine Tollenaere <at...@twitter.com>.
> On May 29, 2014, 12:49 a.m., Mark Chu-Carroll wrote:
> > Thank you for this! Long overdue; I've been meaning to get to this, but never had time.
Yes I was embarrassed with these old todos for myself.
I can't merge the change though, you'll have to do it for me.
- Antoine
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21943/#review44210
-----------------------------------------------------------
On May 29, 2014, 6:21 p.m., Antoine Tollenaere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21943/
> -----------------------------------------------------------
>
> (Updated May 29, 2014, 6:21 p.m.)
>
>
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Config loading used to have optional, individual job key components. As far as I know there are no use for that (it used to be the way we would infer a job). Changed the interface to take a mandatory job key instead.
>
>
> Diffs
> -----
>
> src/main/python/apache/aurora/client/cli/context.py b1e8e407f27d6ae0512057211b147836f28eeac3
> src/main/python/apache/aurora/client/commands/core.py 4eb4e465dcdea859984835dfa9878b1d92ccb5ab
> src/main/python/apache/aurora/client/config.py b4b9a96f4652189abc063a2374e03cff26a0dc9f
> src/main/python/apache/aurora/config/__init__.py dd2f89014a3da730364b14e01c499ac0f2c288c1
> src/test/python/apache/aurora/client/test_binding_helper.py e909a05fadcf63fc948bb629c9894e4bec6c1ac3
> src/test/python/apache/aurora/client/test_config.py 4eb081a5648203ac148d50850d5e4f6b310d3562
> src/test/python/apache/aurora/config/test_base.py 72a711a61fed246cdb7614d4ea95a7fd303e1562
> src/test/python/apache/aurora/config/test_loader.py adde41babcce8b97a26fe31daff36671e15c2f4a
>
> Diff: https://reviews.apache.org/r/21943/diff/
>
>
> Testing
> -------
>
> - all unit tests pass
> - e2e tests pass
> - e2e v2 tests pass
>
> Some manual testing for no such job key and multiple jobs defined with same key:
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Error: No job defined in this config!
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Traceback (most recent call last):
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 738, in _wrap_method
> return_code = method()
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 760, in <lambda>
> main = lambda: main_method(*args, **kwargs)
> File "/usr/local/bin/aurora/apache/aurora/client/base.py", line 72, in wrapped_function
> return fn(*args)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 131, in create
> config = get_job_config(job_spec, config_file, options)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 79, in get_job_config
> return get_config(job_key, config_file, json_option, bindings)
> File "/usr/local/bin/aurora/apache/aurora/client/config.py", line 259, in get_config
> return loader(config_file, job_key, bindings)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 92, in load
> return cls.apply_plugins(cls(cls.pick(env, job_key, bindings)), env)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 67, in pick
> raise cls.InvalidConfig('Multiple jobs have key %s in your config.' % job_key)
> InvalidConfig: The configuration was invalid: Multiple jobs have key devcluster/atollenaere/devel/test in your config.
>
>
> Thanks,
>
> Antoine Tollenaere
>
>
Re: Review Request 21943: Accept a job key for config loading.
Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21943/#review44210
-----------------------------------------------------------
Ship it!
Thank you for this! Long overdue; I've been meaning to get to this, but never had time.
src/main/python/apache/aurora/config/__init__.py
<https://reviews.apache.org/r/21943/#comment78548>
I don't think this check is necessary: you've got a jobkey - pystachio will reject it if they're not bound.
- Mark Chu-Carroll
On May 27, 2014, 9:27 p.m., Antoine Tollenaere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21943/
> -----------------------------------------------------------
>
> (Updated May 27, 2014, 9:27 p.m.)
>
>
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Config loading used to have optional, individual job key components. As far as I know there are no use for that (it used to be the way we would infer a job). Changed the interface to take a mandatory job key instead.
>
>
> Diffs
> -----
>
> src/main/python/apache/aurora/client/cli/context.py b1e8e407f27d6ae0512057211b147836f28eeac3
> src/main/python/apache/aurora/client/commands/core.py 4eb4e465dcdea859984835dfa9878b1d92ccb5ab
> src/main/python/apache/aurora/client/config.py b4b9a96f4652189abc063a2374e03cff26a0dc9f
> src/main/python/apache/aurora/config/__init__.py dd2f89014a3da730364b14e01c499ac0f2c288c1
> src/test/python/apache/aurora/client/test_binding_helper.py e909a05fadcf63fc948bb629c9894e4bec6c1ac3
> src/test/python/apache/aurora/client/test_config.py 4eb081a5648203ac148d50850d5e4f6b310d3562
> src/test/python/apache/aurora/config/test_base.py 72a711a61fed246cdb7614d4ea95a7fd303e1562
> src/test/python/apache/aurora/config/test_loader.py adde41babcce8b97a26fe31daff36671e15c2f4a
>
> Diff: https://reviews.apache.org/r/21943/diff/
>
>
> Testing
> -------
>
> - all unit tests pass
> - e2e tests pass
> - e2e v2 tests pass
>
> Some manual testing for no such job key and multiple jobs defined with same key:
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Error: No job defined in this config!
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Traceback (most recent call last):
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 738, in _wrap_method
> return_code = method()
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 760, in <lambda>
> main = lambda: main_method(*args, **kwargs)
> File "/usr/local/bin/aurora/apache/aurora/client/base.py", line 72, in wrapped_function
> return fn(*args)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 131, in create
> config = get_job_config(job_spec, config_file, options)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 79, in get_job_config
> return get_config(job_key, config_file, json_option, bindings)
> File "/usr/local/bin/aurora/apache/aurora/client/config.py", line 259, in get_config
> return loader(config_file, job_key, bindings)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 92, in load
> return cls.apply_plugins(cls(cls.pick(env, job_key, bindings)), env)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 67, in pick
> raise cls.InvalidConfig('Multiple jobs have key %s in your config.' % job_key)
> InvalidConfig: The configuration was invalid: Multiple jobs have key devcluster/atollenaere/devel/test in your config.
>
>
> Thanks,
>
> Antoine Tollenaere
>
>
Re: Review Request 21943: Accept a job key for config loading.
Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21943/#review45111
-----------------------------------------------------------
Ship it!
ef yeah!
- Brian Wickman
On May 29, 2014, 6:21 p.m., Antoine Tollenaere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21943/
> -----------------------------------------------------------
>
> (Updated May 29, 2014, 6:21 p.m.)
>
>
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Config loading used to have optional, individual job key components. As far as I know there are no use for that (it used to be the way we would infer a job). Changed the interface to take a mandatory job key instead.
>
>
> Diffs
> -----
>
> src/main/python/apache/aurora/client/cli/context.py b1e8e407f27d6ae0512057211b147836f28eeac3
> src/main/python/apache/aurora/client/commands/core.py 4eb4e465dcdea859984835dfa9878b1d92ccb5ab
> src/main/python/apache/aurora/client/config.py b4b9a96f4652189abc063a2374e03cff26a0dc9f
> src/main/python/apache/aurora/config/__init__.py dd2f89014a3da730364b14e01c499ac0f2c288c1
> src/test/python/apache/aurora/client/test_binding_helper.py e909a05fadcf63fc948bb629c9894e4bec6c1ac3
> src/test/python/apache/aurora/client/test_config.py 4eb081a5648203ac148d50850d5e4f6b310d3562
> src/test/python/apache/aurora/config/test_base.py 72a711a61fed246cdb7614d4ea95a7fd303e1562
> src/test/python/apache/aurora/config/test_loader.py adde41babcce8b97a26fe31daff36671e15c2f4a
>
> Diff: https://reviews.apache.org/r/21943/diff/
>
>
> Testing
> -------
>
> - all unit tests pass
> - e2e tests pass
> - e2e v2 tests pass
>
> Some manual testing for no such job key and multiple jobs defined with same key:
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Error: No job defined in this config!
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Traceback (most recent call last):
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 738, in _wrap_method
> return_code = method()
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 760, in <lambda>
> main = lambda: main_method(*args, **kwargs)
> File "/usr/local/bin/aurora/apache/aurora/client/base.py", line 72, in wrapped_function
> return fn(*args)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 131, in create
> config = get_job_config(job_spec, config_file, options)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 79, in get_job_config
> return get_config(job_key, config_file, json_option, bindings)
> File "/usr/local/bin/aurora/apache/aurora/client/config.py", line 259, in get_config
> return loader(config_file, job_key, bindings)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 92, in load
> return cls.apply_plugins(cls(cls.pick(env, job_key, bindings)), env)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 67, in pick
> raise cls.InvalidConfig('Multiple jobs have key %s in your config.' % job_key)
> InvalidConfig: The configuration was invalid: Multiple jobs have key devcluster/atollenaere/devel/test in your config.
>
>
> Thanks,
>
> Antoine Tollenaere
>
>
Re: Review Request 21943: Accept a job key for config loading.
Posted by Joe Smith <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21943/#review45119
-----------------------------------------------------------
Ship it!
schweet
- Joe Smith
On May 29, 2014, 11:21 a.m., Antoine Tollenaere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21943/
> -----------------------------------------------------------
>
> (Updated May 29, 2014, 11:21 a.m.)
>
>
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Config loading used to have optional, individual job key components. As far as I know there are no use for that (it used to be the way we would infer a job). Changed the interface to take a mandatory job key instead.
>
>
> Diffs
> -----
>
> src/main/python/apache/aurora/client/cli/context.py b1e8e407f27d6ae0512057211b147836f28eeac3
> src/main/python/apache/aurora/client/commands/core.py 4eb4e465dcdea859984835dfa9878b1d92ccb5ab
> src/main/python/apache/aurora/client/config.py b4b9a96f4652189abc063a2374e03cff26a0dc9f
> src/main/python/apache/aurora/config/__init__.py dd2f89014a3da730364b14e01c499ac0f2c288c1
> src/test/python/apache/aurora/client/test_binding_helper.py e909a05fadcf63fc948bb629c9894e4bec6c1ac3
> src/test/python/apache/aurora/client/test_config.py 4eb081a5648203ac148d50850d5e4f6b310d3562
> src/test/python/apache/aurora/config/test_base.py 72a711a61fed246cdb7614d4ea95a7fd303e1562
> src/test/python/apache/aurora/config/test_loader.py adde41babcce8b97a26fe31daff36671e15c2f4a
>
> Diff: https://reviews.apache.org/r/21943/diff/
>
>
> Testing
> -------
>
> - all unit tests pass
> - e2e tests pass
> - e2e v2 tests pass
>
> Some manual testing for no such job key and multiple jobs defined with same key:
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Error: No job defined in this config!
> $ aurora create devcluster/atollenaere/devel/test test.aurora
> Traceback (most recent call last):
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 738, in _wrap_method
> return_code = method()
> File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 760, in <lambda>
> main = lambda: main_method(*args, **kwargs)
> File "/usr/local/bin/aurora/apache/aurora/client/base.py", line 72, in wrapped_function
> return fn(*args)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 131, in create
> config = get_job_config(job_spec, config_file, options)
> File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 79, in get_job_config
> return get_config(job_key, config_file, json_option, bindings)
> File "/usr/local/bin/aurora/apache/aurora/client/config.py", line 259, in get_config
> return loader(config_file, job_key, bindings)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 92, in load
> return cls.apply_plugins(cls(cls.pick(env, job_key, bindings)), env)
> File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 67, in pick
> raise cls.InvalidConfig('Multiple jobs have key %s in your config.' % job_key)
> InvalidConfig: The configuration was invalid: Multiple jobs have key devcluster/atollenaere/devel/test in your config.
>
>
> Thanks,
>
> Antoine Tollenaere
>
>
Re: Review Request 21943: Accept a job key for config loading.
Posted by Antoine Tollenaere <at...@twitter.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21943/
-----------------------------------------------------------
(Updated May 29, 2014, 6:21 p.m.)
Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
Changes
-------
Remove check for name.
Repository: aurora
Description
-------
Config loading used to have optional, individual job key components. As far as I know there are no use for that (it used to be the way we would infer a job). Changed the interface to take a mandatory job key instead.
Diffs (updated)
-----
src/main/python/apache/aurora/client/cli/context.py b1e8e407f27d6ae0512057211b147836f28eeac3
src/main/python/apache/aurora/client/commands/core.py 4eb4e465dcdea859984835dfa9878b1d92ccb5ab
src/main/python/apache/aurora/client/config.py b4b9a96f4652189abc063a2374e03cff26a0dc9f
src/main/python/apache/aurora/config/__init__.py dd2f89014a3da730364b14e01c499ac0f2c288c1
src/test/python/apache/aurora/client/test_binding_helper.py e909a05fadcf63fc948bb629c9894e4bec6c1ac3
src/test/python/apache/aurora/client/test_config.py 4eb081a5648203ac148d50850d5e4f6b310d3562
src/test/python/apache/aurora/config/test_base.py 72a711a61fed246cdb7614d4ea95a7fd303e1562
src/test/python/apache/aurora/config/test_loader.py adde41babcce8b97a26fe31daff36671e15c2f4a
Diff: https://reviews.apache.org/r/21943/diff/
Testing
-------
- all unit tests pass
- e2e tests pass
- e2e v2 tests pass
Some manual testing for no such job key and multiple jobs defined with same key:
$ aurora create devcluster/atollenaere/devel/test test.aurora
Error: No job defined in this config!
$ aurora create devcluster/atollenaere/devel/test test.aurora
Traceback (most recent call last):
File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 738, in _wrap_method
return_code = method()
File "/home/vagrant/.pex/install/twitter.common.app-0.3.0-py27-none-any.whl.d773cda648ab4fc153efb92c408a1f44b85b3e54/twitter.common.app-0.3.0-py27-none-any.whl/twitter/common/app/application.py", line 760, in <lambda>
main = lambda: main_method(*args, **kwargs)
File "/usr/local/bin/aurora/apache/aurora/client/base.py", line 72, in wrapped_function
return fn(*args)
File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 131, in create
config = get_job_config(job_spec, config_file, options)
File "/usr/local/bin/aurora/apache/aurora/client/commands/core.py", line 79, in get_job_config
return get_config(job_key, config_file, json_option, bindings)
File "/usr/local/bin/aurora/apache/aurora/client/config.py", line 259, in get_config
return loader(config_file, job_key, bindings)
File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 92, in load
return cls.apply_plugins(cls(cls.pick(env, job_key, bindings)), env)
File "/usr/local/bin/aurora/apache/aurora/config/__init__.py", line 67, in pick
raise cls.InvalidConfig('Multiple jobs have key %s in your config.' % job_key)
InvalidConfig: The configuration was invalid: Multiple jobs have key devcluster/atollenaere/devel/test in your config.
Thanks,
Antoine Tollenaere