-----------------------------------------------------------
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

Reply via email to