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



Thanks for the patch!


RELEASE-NOTES.md
Lines 50 (patched)
<https://reviews.apache.org/r/64341/#comment271236>

    Massaging the wording:
    > Introduce a `metadata` field in the `Job` object of the DSL, which will 
populate `TaskConfig.metadata`.



src/main/python/apache/aurora/config/schema/base.py
Lines 179 (patched)
<https://reviews.apache.org/r/64341/#comment271241>

    This prohibits duplicate keys, while the thrift struct allows them 
(`set<Metadata>`).  As such, i don't think we stand much to lose by mirroring 
the thrift struct semantics.



src/main/python/apache/aurora/config/thrift.py
Lines 282 (patched)
<https://reviews.apache.org/r/64341/#comment271240>

    Please add a test to validate this behavior.  Specifically, please test the 
behavior when `metadata` and `customized_metadata` have colliding keys.



src/test/python/apache/aurora/config/test_thrift.py
Lines 233 (patched)
<https://reviews.apache.org/r/64341/#comment271239>

    This is irrelevant to the test case, please remove.



src/test/python/apache/aurora/config/test_thrift.py
Lines 236-239 (patched)
<https://reviews.apache.org/r/64341/#comment271238>

    Please replace this with a direct equality comparison to the expected set.


- Bill Farner


On Dec. 5, 2017, 7:14 a.m., Jing Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64341/
> -----------------------------------------------------------
> 
> (Updated Dec. 5, 2017, 7:14 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner.
> 
> 
> Bugs: AURORA-1898
>     https://issues.apache.org/jira/browse/AURORA-1898
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add metadata field to Job object in DSL
> 
> 
> Diffs
> -----
> 
>   RELEASE-NOTES.md 54dcc75ef4f4fbf52c4dc60ec0dcbdd7ff3926a2 
>   docs/reference/configuration.md 67d9914f6b43f5eb73fe05b547981737f665489c 
>   src/main/python/apache/aurora/config/schema/base.py 
> a466e78f85d980dc11689ab252b8c70e9cfd3d57 
>   src/main/python/apache/aurora/config/thrift.py 
> eb0014422f99fdc8dcea9b0b75b86cdf78cf2dbb 
>   src/test/python/apache/aurora/config/test_thrift.py 
> 76d0ad681689e7aa03401ecea2d2b3123268d7da 
> 
> 
> Diff: https://reviews.apache.org/r/64341/diff/1/
> 
> 
> Testing
> -------
> 
> Test with `.aurora` file as:
> ```
> pkg_path = '/vagrant/hello.py'
> 
> install = Process(
>     name='fetch package',
>     cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path))
> 
> runner = Process(
>     name='hello world',
>     cmdline='python -u hello.py')
> 
> hello_task = SequentialTask(
>     name='hello task',
>     processes=[install, runner],
>     resources=Resources(cpu=1, ram=1*MB, disk=8*MB))
> 
> jobs = [
>     Service(cluster='devcluster',
>         role='www-data',
>         environment='devel',
>         name='hello_test',
>         task=hello_task,
>         metadata={'tag':'metadata test', 'version': 1}
>     )
> ]
> ```
> 
> Metadata information can be found in job configuration of UI as:
> ```
> METADATA      
> version: 1
> tag: metadata test    
> ```
> 
> 
> Thanks,
> 
> Jing Chen
> 
>

Reply via email to