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

                           job_dict = env['jobs'][0].get()
                           job_dict['unknown_attribute'] = 'foo bar baz'
                           job_json_string = json.dumps(job_dict)
                           # If this fails, will raise an InvalidConfigError or other exception and fail the test.
                     >     AuroraConfigLoader.loads_json(job_json_string)
                     
                     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
                         'jobs': [base_schema.Job(x) for x in parsed.get('jobs')]
                     .pants.d/python-setup/chroots/e41daa35f608579a1e7bae55f6811e6403a710f9/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:160: in __init__
                         self._update_schema_data(**arg)
                     .pants.d/python-setup/chroots/e41daa35f608579a1e7bae55f6811e6403a710f9/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:180: in _update_schema_data
                         self._schema_data[attr] = self._process_schema_attribute(attr, value)
                     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                     
                     self = <[AttributeError("MesosJob has no attribute _scopes") raised in repr()] SafeRepr object at 0x7fe59f4c0878>
                     attr = 'unknown_attribute', value = 'foo bar baz'
                     
                         def _process_schema_attribute(self, attr, value):
                           if attr not in self.TYPEMAP:
                     >       raise AttributeError('Unknown schema attribute %s' % attr)
                     E       AttributeError: Unknown schema attribute unknown_attribute
                     
                     .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 
                     ====== 1 failed, 27 passed in 3.29 seconds =======
                     
                     src.test.python.apache.aurora.client.client                                     .....   SUCCESS
                     src.test.python.apache.aurora.client.hooks.hooks                                .....   SUCCESS
                     src.test.python.apache.aurora.config.config                                     .....   FAILURE
                     src.test.python.apache.aurora.tools.tools                                       .....   SUCCESS
                     src.test.python.apache.thermos.core.core                                        .....   SUCCESS
                     src.test.python.apache.thermos.monitoring.monitoring                            .....   SUCCESS
                     src.test.python.apache.thermos.observer.http.http                               .....   SUCCESS
FAILURE


09:13:56 04:12   [complete]
               FAILURE


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
> > 
> >                            """Stop the runner.  If it's already completed, no-op.  If it's still running, issue a kill."""
> >                            log.info('ThermosTaskRunner is shutting down.')
> >                          
> >                            if not self.forking.is_set():
> >                              raise TaskError('Failed to call TaskRunner.start.')
> >                          
> >                            log.info('Invoking runner.kill')
> >                            self.kill()
> >                          
> >                            waited = Amount(0, Time.SECONDS)
> >                            while self.is_alive and waited < timeout:
> >                              self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))
> >                              waited += self.POLL_INTERVAL
> >                          
> >                            if not self.is_alive and self.task_state() != TaskState.ACTIVE:
> >                              return
> >                          
> >                            log.info('Thermos task did not shut down cleanly, rebinding to kill.')
> >                            self.quitquitquit()
> >                          
> >                            while not self._monitor.finished and waited < timeout:
> >                              self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))
> >                              waited += self.POLL_INTERVAL
> >                          
> >                            if not self._monitor.finished:
> >                      >       raise TaskError('Task did not stop within deadline.')
> >                      E       TaskError: Task did not stop within deadline.
> >                      
> >                      .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 
> >                       1 failed, 36 passed, 2 skipped in 121.44 seconds 
> >                      
> > FAILURE
> > 
> > 
> > 23:51:01 09:23   [complete]
> >                FAILURE
> > 
> > 
> > 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

                           """Stop the runner.  If it's already completed, no-op.  If it's still running, issue a kill."""
                           log.info('ThermosTaskRunner is shutting down.')
                         
                           if not self.forking.is_set():
                             raise TaskError('Failed to call TaskRunner.start.')
                         
                           log.info('Invoking runner.kill')
                           self.kill()
                         
                           waited = Amount(0, Time.SECONDS)
                           while self.is_alive and waited < timeout:
                             self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))
                             waited += self.POLL_INTERVAL
                         
                           if not self.is_alive and self.task_state() != TaskState.ACTIVE:
                             return
                         
                           log.info('Thermos task did not shut down cleanly, rebinding to kill.')
                           self.quitquitquit()
                         
                           while not self._monitor.finished and waited < timeout:
                             self._clock.sleep(self.POLL_INTERVAL.as_(Time.SECONDS))
                             waited += self.POLL_INTERVAL
                         
                           if not self._monitor.finished:
                     >       raise TaskError('Task did not stop within deadline.')
                     E       TaskError: Task did not stop within deadline.
                     
                     .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 
                      1 failed, 36 passed, 2 skipped in 121.44 seconds 
                     
FAILURE


23:51:01 09:23   [complete]
               FAILURE


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

                           # If this fails, will raise an InvalidConfigError or other exception and fail the test.
                     >     AuroraConfigLoader.loads_json(job_json_string)
                     
                     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
                         'jobs': [base_schema.Job(x) for x in parsed.get('jobs')]
                     .pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:160: in __init__
                         self._update_schema_data(**arg)
                     .pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:180: in _update_schema_data
                         self._schema_data[attr] = self._process_schema_attribute(attr, value)
                     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                     
                     self = <[AttributeError("MesosJob has no attribute _scopes") raised in repr()] SafeRepr object at 0x7f71e0a34440>
                     attr = 'unknown_attribute', value = 'foo bar baz'
                     
                         def _process_schema_attribute(self, attr, value):
                           if attr not in self.TYPEMAP:
                     >       raise AttributeError('Unknown schema attribute %s' % attr)
                     E       AttributeError: Unknown schema attribute unknown_attribute
                     
                     .pants.d/python-setup/chroots/0ffa30cf850ad77bcb959bce6b299b3e46dbaada/.deps/pystachio-0.8.0-py2.py3-none-any.whl/pystachio/composite.py:169: AttributeError
                     _________________ test_load_json _________________
                     
                         def test_load_json():
                           env = AuroraConfigLoader.load(BytesIO(MESOS_CONFIG))
                           job = env['jobs'][0]
                           new_job = AuroraConfigLoader.loads_json(json.dumps(job.get()))
                     >     assert new_job == job
                     E     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)
                     
                     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 
                     ====== 2 failed, 26 passed in 3.78 seconds =======
                     
FAILURE


06:14:43 04:09   [complete]
               FAILURE


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