You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Maxim Khutornenko <ma...@apache.org> on 2015/06/16 22:50:43 UTC

Review Request 35527: Making observer polling interval configurable.

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

Review request for Aurora, Joshua Cohen and Brian Wickman.


Bugs: AURORA-1351
    https://issues.apache.org/jira/browse/AURORA-1351


Repository: aurora


Description
-------

Making observer polling interval configurable.


Diffs
-----

  src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
  src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
  src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
  src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
  src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
  src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
  src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 

Diff: https://reviews.apache.org/r/35527/diff/


Testing
-------

./pants --test.pytest --no-fast src/test/python::


Thanks,

Maxim Khutornenko


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Joshua Cohen <jc...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35527/#review88154
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Cohen


On June 16, 2015, 10:18 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 10:18 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35527/#review88153
-----------------------------------------------------------

Ship it!


Master (ea2c9ad) 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 June 16, 2015, 10:18 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 10:18 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Maxim Khutornenko <ma...@apache.org>.

> On June 16, 2015, 10:25 p.m., Brian Wickman wrote:
> > src/test/python/apache/thermos/observer/test_task_observer.py, lines 37-38
> > <https://reviews.apache.org/r/35527/diff/2/?file=986119#file986119line37>
> >
> >     while ugly, should probably change pass to time.sleep(0.01) so that MainThread yields to the observer thread to make forward progress.

The busy wait loop relying on the mock_call count works just fine here producing the same 0.29sec run as the one with time.sleep(0.01). Is there a particular concern you have in mind?


- Maxim


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


On June 16, 2015, 10:18 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 10:18 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35527/#review88144
-----------------------------------------------------------

Ship it!



src/test/python/apache/thermos/observer/test_task_observer.py (lines 37 - 38)
<https://reviews.apache.org/r/35527/#comment140548>

    while ugly, should probably change pass to time.sleep(0.01) so that MainThread yields to the observer thread to make forward progress.


- Brian Wickman


On June 16, 2015, 10:18 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 10:18 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35527/
-----------------------------------------------------------

(Updated June 16, 2015, 10:18 p.m.)


Review request for Aurora, Joshua Cohen and Brian Wickman.


Changes
-------

Joshua's comments.


Bugs: AURORA-1351
    https://issues.apache.org/jira/browse/AURORA-1351


Repository: aurora


Description
-------

Making observer polling interval configurable.


Diffs (updated)
-----

  src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
  src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
  src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
  src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
  src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
  src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
  src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 

Diff: https://reviews.apache.org/r/35527/diff/


Testing
-------

./pants --test.pytest --no-fast src/test/python::


Thanks,

Maxim Khutornenko


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35527/#review88127
-----------------------------------------------------------

Ship it!


Master (b09adc6) 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 June 16, 2015, 8:50 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 8:50 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Maxim Khutornenko <ma...@apache.org>.

> On June 16, 2015, 9:33 p.m., Joshua Cohen wrote:
> > src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py, lines 27-30
> > <https://reviews.apache.org/r/35527/diff/1/?file=985959#file985959line27>
> >
> >     There's a way to set this up so that only these expected properties are accessed, right? Is it by doing `Mock(spec_set=['root','mesos_root',...])`?
> >     
> >     In any event, we should probably do that?

The option set is really irrelevant here but I don't have a strong opinion. Done.


- Maxim


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


On June 16, 2015, 8:50 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 8:50 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>


Re: Review Request 35527: Making observer polling interval configurable.

Posted by Joshua Cohen <jc...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35527/#review88130
-----------------------------------------------------------



src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py (lines 27 - 30)
<https://reviews.apache.org/r/35527/#comment140542>

    There's a way to set this up so that only these expected properties are accessed, right? Is it by doing `Mock(spec_set=['root','mesos_root',...])`?
    
    In any event, we should probably do that?


- Joshua Cohen


On June 16, 2015, 8:50 p.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35527/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 8:50 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Brian Wickman.
> 
> 
> Bugs: AURORA-1351
>     https://issues.apache.org/jira/browse/AURORA-1351
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Making observer polling interval configurable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/tools/__init__.py PRE-CREATION 
>   src/main/python/apache/aurora/tools/thermos_observer.py 4b534d3b0ccb78ddbe2f8d66eba0c2560ea48474 
>   src/main/python/apache/thermos/observer/task_observer.py b9a37de0f6260dc8c0a6ba92119c57e16f29d82c 
>   src/test/python/apache/aurora/BUILD 0701440ae47034c580b5baae40e5f6feec4bb4fd 
>   src/test/python/apache/aurora/tools/BUILD PRE-CREATION 
>   src/test/python/apache/aurora/tools/test_thermos_observer_entry_point.py PRE-CREATION 
>   src/test/python/apache/thermos/observer/test_task_observer.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35527/diff/
> 
> 
> Testing
> -------
> 
> ./pants --test.pytest --no-fast src/test/python::
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>