You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Benjamin Staffin <be...@folsomlabs.com> on 2016/01/29 06:28:25 UTC
Review Request 42953: Improve --read-json to handle multi-job files
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/
-----------------------------------------------------------
Review request for Aurora.
Repository: aurora
Description
-------
Still handles the old --read-json behavior of expecting a single job,
but adds the ability to read files with a {"jobs": [job1, job2, ...]}
schema like the pystachio format.
Also adds --read-json to the `aurora config load` command, as it is
now useful there.
Fixes: AURORA-1577
Diffs
-----
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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
Diff: https://reviews.apache.org/r/42953/diff/
Testing
-------
Thanks,
Benjamin Staffin
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review116935
-----------------------------------------------------------
Master (0eb753d) is red with this patch.
./build-support/jenkins/build.sh
[1m job_dict = env['jobs'][0].get()[0m
[1m job_dict['unknown_attribute'] = 'foo bar baz'[0m
[1m job_json_string = json.dumps(job_dict)[0m
[1m # If this fails, will raise an InvalidConfigError or other exception and fail the test.[0m
[1m> AuroraConfigLoader.loads_json(job_json_string)[0m
src/test/python/apache/aurora/config/test_loader.py:63:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pants.d/python-setup/chroots/e41daa35f608579a1e7bae55f6811e6403a710f9/apache/aurora/config/loader.py:79: in loads_json
[1m 'jobs': [base_schema.Job(x) for x in parsed.get('jobs')][0m
.pants.d/python-setup/chroots/e41daa35f608579a1e7bae55f6811e6403a710f9/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:160: in __init__
[1m self._update_schema_data(**arg)[0m
.pants.d/python-setup/chroots/e41daa35f608579a1e7bae55f6811e6403a710f9/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:180: in _update_schema_data
[1m self._schema_data[attr] = self._process_schema_attribute(attr, value)[0m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <[AttributeError("MesosJob has no attribute _scopes") raised in repr()] SafeRepr object at 0x7fe59f4c0878>
attr = 'unknown_attribute', value = 'foo bar baz'
[1m def _process_schema_attribute(self, attr, value):[0m
[1m if attr not in self.TYPEMAP:[0m
[1m> raise AttributeError('Unknown schema attribute %s' % attr)[0m
[1m[31mE AttributeError: Unknown schema attribute unknown_attribute[0m
.pants.d/python-setup/chroots/e41daa35f608579a1e7bae55f6811e6403a710f9/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:169: AttributeError
generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.config.config.xml
[1m[31m====== 1 failed, 27 passed in 3.29 seconds =======[0m
[32m
src.test.python.apache.aurora.client.client ..... SUCCESS[0m[32m
src.test.python.apache.aurora.client.hooks.hooks ..... SUCCESS[0m[32m
src.test.python.apache.aurora.config.config ..... FAILURE[0m[32m
src.test.python.apache.aurora.tools.tools ..... SUCCESS[0m[32m
src.test.python.apache.thermos.core.core ..... SUCCESS[0m[32m
src.test.python.apache.thermos.monitoring.monitoring ..... SUCCESS[0m[32m
src.test.python.apache.thermos.observer.http.http ..... SUCCESS[0m
FAILURE
09:13:56 04:12 [complete][31m
FAILURE[0m
I will refresh this build result if you post a review containing "@ReviewBot retry"
- Aurora ReviewBot
On Jan. 29, 2016, 8:44 a.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 8:44 a.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117071
-----------------------------------------------------------
Ship it!
Master (0eb753d) is green with this patch.
./build-support/jenkins/build.sh
I will refresh this build result if you post a review containing "@ReviewBot retry"
- Aurora ReviewBot
On Jan. 29, 2016, 11:31 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 11:31 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
> On Jan. 29, 2016, 3:56 p.m., Aurora ReviewBot wrote:
> > Master (0eb753d) is red with this patch.
> > ./build-support/jenkins/build.sh
> >
> > [1m """Stop the runner. If it's already completed, no-op. If it's still running, issue a kill."""[0m
> > [1m log.info('ThermosTaskRunner is shutting down.')[0m
> > [1m [0m
> > [1m if not self.forking.is_set():[0m
> > [1m raise TaskError('Failed to call TaskRunner.start.')[0m
> > [1m [0m
> > [1m log.info('Invoking runner.kill')[0m
> > [1m self.kill()[0m
> > [1m [0m
> > [1m waited = Amount(0, Time.SECONDS)[0m
> > [1m while self.is_alive and waited < timeout:[0m
> > [1m self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))[0m
> > [1m waited += self.POLL_INTERVAL[0m
> > [1m [0m
> > [1m if not self.is_alive and self.task_state() != TaskState.ACTIVE:[0m
> > [1m return[0m
> > [1m [0m
> > [1m log.info('Thermos task did not shut down cleanly, rebinding to kill.')[0m
> > [1m self.quitquitquit()[0m
> > [1m [0m
> > [1m while not self._monitor.finished and waited < timeout:[0m
> > [1m self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))[0m
> > [1m waited += self.POLL_INTERVAL[0m
> > [1m [0m
> > [1m if not self._monitor.finished:[0m
> > [1m> raise TaskError('Task did not stop within deadline.')[0m
> > [1m[31mE TaskError: Task did not stop within deadline.[0m
> >
> > .pants.d/python-setup/chroots/3a746f58f5a747cd9caa30cc01558d3ddf64803e/apache/aurora/executor/thermos_task_runner.py:343: TaskError
> > -------------- Captured stderr call --------------
> > Writing log files to disk in /tmp/user/2396/tmpiA5_AW
> > ERROR] Could not quitquitquit runner: Cannot take control of a task in terminal state.
> > generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.executor.executor.xml
> > [1m[31m 1 failed, 36 passed, 2 skipped in 121.44 seconds [0m
> >
> > FAILURE
> >
> >
> > 23:51:01 09:23 [complete][31m
> > FAILURE[0m
> >
> >
> > I will refresh this build result if you post a review containing "@ReviewBot retry"
I can't reproduce this failure. I suspect it's not related to my change.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117062
-----------------------------------------------------------
On Jan. 29, 2016, 3:31 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 3:31 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117062
-----------------------------------------------------------
Master (0eb753d) is red with this patch.
./build-support/jenkins/build.sh
[1m """Stop the runner. If it's already completed, no-op. If it's still running, issue a kill."""[0m
[1m log.info('ThermosTaskRunner is shutting down.')[0m
[1m [0m
[1m if not self.forking.is_set():[0m
[1m raise TaskError('Failed to call TaskRunner.start.')[0m
[1m [0m
[1m log.info('Invoking runner.kill')[0m
[1m self.kill()[0m
[1m [0m
[1m waited = Amount(0, Time.SECONDS)[0m
[1m while self.is_alive and waited < timeout:[0m
[1m self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))[0m
[1m waited += self.POLL_INTERVAL[0m
[1m [0m
[1m if not self.is_alive and self.task_state() != TaskState.ACTIVE:[0m
[1m return[0m
[1m [0m
[1m log.info('Thermos task did not shut down cleanly, rebinding to kill.')[0m
[1m self.quitquitquit()[0m
[1m [0m
[1m while not self._monitor.finished and waited < timeout:[0m
[1m self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))[0m
[1m waited += self.POLL_INTERVAL[0m
[1m [0m
[1m if not self._monitor.finished:[0m
[1m> raise TaskError('Task did not stop within deadline.')[0m
[1m[31mE TaskError: Task did not stop within deadline.[0m
.pants.d/python-setup/chroots/3a746f58f5a747cd9caa30cc01558d3ddf64803e/apache/aurora/executor/thermos_task_runner.py:343: TaskError
-------------- Captured stderr call --------------
Writing log files to disk in /tmp/user/2396/tmpiA5_AW
ERROR] Could not quitquitquit runner: Cannot take control of a task in terminal state.
generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.executor.executor.xml
[1m[31m 1 failed, 36 passed, 2 skipped in 121.44 seconds [0m
FAILURE
23:51:01 09:23 [complete][31m
FAILURE[0m
I will refresh this build result if you post a review containing "@ReviewBot retry"
- Aurora ReviewBot
On Jan. 29, 2016, 11:31 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 11:31 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117293
-----------------------------------------------------------
Ship it!
Ship It!
- Bill Farner
On Jan. 30, 2016, 3:08 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 30, 2016, 3:08 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> NEWS 39e6a0b5bdc61c1ea3a22eb431654d29dbf8631a
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117128
-----------------------------------------------------------
Ship it!
Master (de0029b) is green with this patch.
./build-support/jenkins/build.sh
I will refresh this build result if you post a review containing "@ReviewBot retry"
- Aurora ReviewBot
On Jan. 30, 2016, 11:08 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 30, 2016, 11:08 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> NEWS 39e6a0b5bdc61c1ea3a22eb431654d29dbf8631a
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/
-----------------------------------------------------------
(Updated Jan. 30, 2016, 3:08 p.m.)
Review request for Aurora.
Bugs: AURORA-1577
https://issues.apache.org/jira/browse/AURORA-1577
Repository: aurora
Description
-------
Still handles the old --read-json behavior of expecting a single job,
but adds the ability to read files with a {"jobs": [job1, job2, ...]}
schema like the pystachio format.
Also adds --read-json to the `aurora config load` command, as it is
now useful there.
Json configs are now loaded in a way that is much closer to the
pystachio one, so the config loader will no longer ignore unknown
fields.
Fixes: AURORA-1577
Diffs (updated)
-----
NEWS 39e6a0b5bdc61c1ea3a22eb431654d29dbf8631a
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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
Diff: https://reviews.apache.org/r/42953/diff/
Testing
-------
Thanks,
Benjamin Staffin
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117066
-----------------------------------------------------------
@ReviewBot retry
- Benjamin Staffin
On Jan. 29, 2016, 3:31 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 3:31 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
> On Jan. 29, 2016, 6:51 p.m., Bill Farner wrote:
> > Can you add a test case for the new behavior? Also, an 0.13.0 NEWS entry to call out the new feature.
done.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117087
-----------------------------------------------------------
On Jan. 30, 2016, 3:08 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 30, 2016, 3:08 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> NEWS 39e6a0b5bdc61c1ea3a22eb431654d29dbf8631a
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review117087
-----------------------------------------------------------
Can you add a test case for the new behavior? Also, an 0.13.0 NEWS entry to call out the new feature.
- Bill Farner
On Jan. 29, 2016, 3:31 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 3:31 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Json configs are now loaded in a way that is much closer to the
> pystachio one, so the config loader will no longer ignore unknown
> fields.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
> src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/
-----------------------------------------------------------
(Updated Jan. 29, 2016, 3:31 p.m.)
Review request for Aurora.
Bugs: AURORA-1577
https://issues.apache.org/jira/browse/AURORA-1577
Repository: aurora
Description (updated)
-------
Still handles the old --read-json behavior of expecting a single job,
but adds the ability to read files with a {"jobs": [job1, job2, ...]}
schema like the pystachio format.
Also adds --read-json to the `aurora config load` command, as it is
now useful there.
Json configs are now loaded in a way that is much closer to the
pystachio one, so the config loader will no longer ignore unknown
fields.
Fixes: AURORA-1577
Diffs
-----
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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
Diff: https://reviews.apache.org/r/42953/diff/
Testing
-------
Thanks,
Benjamin Staffin
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/
-----------------------------------------------------------
(Updated Jan. 29, 2016, 3:30 p.m.)
Review request for Aurora.
Bugs: AURORA-1577
https://issues.apache.org/jira/browse/AURORA-1577
Repository: aurora
Description
-------
Still handles the old --read-json behavior of expecting a single job,
but adds the ability to read files with a {"jobs": [job1, job2, ...]}
schema like the pystachio format.
Also adds --read-json to the `aurora config load` command, as it is
now useful there.
Fixes: AURORA-1577
Diffs (updated)
-----
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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
Diff: https://reviews.apache.org/r/42953/diff/
Testing
-------
Thanks,
Benjamin Staffin
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/
-----------------------------------------------------------
(Updated Jan. 29, 2016, 12:44 a.m.)
Review request for Aurora.
Bugs: AURORA-1577
https://issues.apache.org/jira/browse/AURORA-1577
Repository: aurora
Description
-------
Still handles the old --read-json behavior of expecting a single job,
but adds the ability to read files with a {"jobs": [job1, job2, ...]}
schema like the pystachio format.
Also adds --read-json to the `aurora config load` command, as it is
now useful there.
Fixes: AURORA-1577
Diffs (updated)
-----
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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
src/test/python/apache/aurora/config/test_loader.py 9789255cb0280ef0d1a83cd8c1cf8fa3581553b5
Diff: https://reviews.apache.org/r/42953/diff/
Testing
-------
Thanks,
Benjamin Staffin
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@folsomlabs.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review116909
-----------------------------------------------------------
This probably warrants some tests, doesn't it. And maybe some documentation updates.
- Benjamin Staffin
On Jan. 28, 2016, 9:28 p.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 28, 2016, 9:28 p.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/#review116915
-----------------------------------------------------------
Master (0eb753d) is red with this patch.
./build-support/jenkins/build.sh
[1m # If this fails, will raise an InvalidConfigError or other exception and fail the test.[0m
[1m> AuroraConfigLoader.loads_json(job_json_string)[0m
src/test/python/apache/aurora/config/test_loader.py:63:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/apache/aurora/config/loader.py:79: in loads_json
[1m 'jobs': [base_schema.Job(x) for x in parsed.get('jobs')][0m
.pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:160: in __init__
[1m self._update_schema_data(**arg)[0m
.pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:180: in _update_schema_data
[1m self._schema_data[attr] = self._process_schema_attribute(attr, value)[0m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <[AttributeError("MesosJob has no attribute _scopes") raised in repr()] SafeRepr object at 0x7f71e0a34440>
attr = 'unknown_attribute', value = 'foo bar baz'
[1m def _process_schema_attribute(self, attr, value):[0m
[1m if attr not in self.TYPEMAP:[0m
[1m> raise AttributeError('Unknown schema attribute %s' % attr)[0m
[1m[31mE AttributeError: Unknown schema attribute unknown_attribute[0m
.pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:169: AttributeError
_________________ test_load_json _________________
[1m def test_load_json():[0m
[1m env = AuroraConfigLoader.load(BytesIO(MESOS_CONFIG))[0m
[1m job = env['jobs'][0][0m
[1m new_job = AuroraConfigLoader.loads_json(json.dumps(job.get()))[0m
[1m> assert new_job == job[0m
[1m[31mE assert {'jobs': [MesosJob(health_check_config=HealthCheckConfig(initial_interval_secs=15.0,\n ...aints=ConstraintList()),\n name=hello_world,\n cluster=smf1-test)]} == MesosJob(health_check_config=HealthCheckConfig(initial_interval_secs=15.0,\n ...aints=ConstraintList()),\n name=hello_world,\n cluster=smf1-test)[0m
src/test/python/apache/aurora/config/test_loader.py:74: AssertionError
generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/src.test.python.apache.aurora.config.config.xml
[1m[31m====== 2 failed, 26 passed in 3.78 seconds =======[0m
FAILURE
06:14:43 04:09 [complete][31m
FAILURE[0m
I will refresh this build result if you post a review containing "@ReviewBot retry"
- Aurora ReviewBot
On Jan. 29, 2016, 5:28 a.m., Benjamin Staffin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42953/
> -----------------------------------------------------------
>
> (Updated Jan. 29, 2016, 5:28 a.m.)
>
>
> Review request for Aurora.
>
>
> Bugs: AURORA-1577
> https://issues.apache.org/jira/browse/AURORA-1577
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Still handles the old --read-json behavior of expecting a single job,
> but adds the ability to read files with a {"jobs": [job1, job2, ...]}
> schema like the pystachio format.
>
> Also adds --read-json to the `aurora config load` command, as it is
> now useful there.
>
> Fixes: AURORA-1577
>
>
> Diffs
> -----
>
> 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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
>
> Diff: https://reviews.apache.org/r/42953/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Staffin
>
>
Re: Review Request 42953: Improve --read-json to handle multi-job
files
Posted by Benjamin Staffin <be...@folsomlabs.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42953/
-----------------------------------------------------------
(Updated Jan. 28, 2016, 9:28 p.m.)
Review request for Aurora.
Bugs: AURORA-1577
https://issues.apache.org/jira/browse/AURORA-1577
Repository: aurora
Description
-------
Still handles the old --read-json behavior of expecting a single job,
but adds the ability to read files with a {"jobs": [job1, job2, ...]}
schema like the pystachio format.
Also adds --read-json to the `aurora config load` command, as it is
now useful there.
Fixes: AURORA-1577
Diffs
-----
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/loader.py a967b9dca353f5a70c89abee5d45220a9593c01a
Diff: https://reviews.apache.org/r/42953/diff/
Testing
-------
Thanks,
Benjamin Staffin