You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Brian Wickman <wi...@apache.org> on 2014/06/05 23:58:43 UTC

Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

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

Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Repository: aurora


Description
-------

Implement a TRequestsClient as a prelude to kerberization.

Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.


Diffs
-----

  src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
  src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
  src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
  src/main/python/apache/aurora/common/transport.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 

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


Testing
-------

Updated client/api tests for the new transport.


Thanks,

Brian Wickman


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22280/#review44856
-----------------------------------------------------------



src/main/python/apache/aurora/common/transport.py
<https://reviews.apache.org/r/22280/#comment79451>

    Test coverage for this file is missing.


- Kevin Sweeney


On June 5, 2014, 2:58 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22280/
> -----------------------------------------------------------
> 
> (Updated June 5, 2014, 2:58 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implement a TRequestsClient as a prelude to kerberization.
> 
> Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
>   src/main/python/apache/aurora/common/transport.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
> 
> Diff: https://reviews.apache.org/r/22280/diff/
> 
> 
> Testing
> -------
> 
> Updated client/api tests for the new transport.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22280/#review45108
-----------------------------------------------------------

Ship it!


Approach looks good to me.

- Mark Chu-Carroll


On June 9, 2014, 2:42 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22280/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 2:42 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implement a TRequestsClient as a prelude to kerberization.
> 
> Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
>   src/main/python/apache/aurora/common/transport.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
>   src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
>   src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22280/diff/
> 
> 
> Testing
> -------
> 
> Updated client/api tests for the new transport.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22280/#review45110
-----------------------------------------------------------



src/main/python/apache/aurora/common/transport.py
<https://reviews.apache.org/r/22280/#comment79779>

    Following the thrift naming convention wouldn't this be "TRequestsTransport"?



src/main/python/apache/aurora/common/transport.py
<https://reviews.apache.org/r/22280/#comment79778>

    consider taking a Session or ()->Session as an argument here rather than baking the factory into the class (composition over inheritance, also improves testability).



src/main/python/apache/aurora/common/transport.py
<https://reviews.apache.org/r/22280/#comment79781>

    Catch the ValueError here and re-raise as TTransportException?


- Kevin Sweeney


On June 9, 2014, 11:42 a.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22280/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 11:42 a.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implement a TRequestsClient as a prelude to kerberization.
> 
> Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
>   src/main/python/apache/aurora/common/transport.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
>   src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
>   src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22280/diff/
> 
> 
> Testing
> -------
> 
> Updated client/api tests for the new transport.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

Posted by Joe Smith <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22280/#review45642
-----------------------------------------------------------


close this out?

- Joe Smith


On June 9, 2014, 4:42 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22280/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 4:42 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implement a TRequestsClient as a prelude to kerberization.
> 
> Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.
> 
> 
> Diffs
> -----
> 
>   3rdparty/python/BUILD f2e94d2b9281951ff67ed5a89ac4dba0c4086ed3 
>   src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
>   src/main/python/apache/aurora/common/transport.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
>   src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
>   src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22280/diff/
> 
> 
> Testing
> -------
> 
> Updated client/api tests for the new transport.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22280/#review45174
-----------------------------------------------------------

Ship it!


Ship It!

- Kevin Sweeney


On June 9, 2014, 4:42 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22280/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 4:42 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implement a TRequestsClient as a prelude to kerberization.
> 
> Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.
> 
> 
> Diffs
> -----
> 
>   3rdparty/python/BUILD f2e94d2b9281951ff67ed5a89ac4dba0c4086ed3 
>   src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
>   src/main/python/apache/aurora/common/transport.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
>   src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
>   src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22280/diff/
> 
> 
> Testing
> -------
> 
> Updated client/api tests for the new transport.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

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

(Updated June 9, 2014, 11:42 p.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Changes
-------

Update to requests==2.3.0


Repository: aurora


Description
-------

Implement a TRequestsClient as a prelude to kerberization.

Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.


Diffs (updated)
-----

  3rdparty/python/BUILD f2e94d2b9281951ff67ed5a89ac4dba0c4086ed3 
  src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
  src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
  src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
  src/main/python/apache/aurora/common/transport.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
  src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
  src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 

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


Testing
-------

Updated client/api tests for the new transport.


Thanks,

Brian Wickman


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22280/#review45138
-----------------------------------------------------------

Ship it!


Ship It!

- Kevin Sweeney


On June 9, 2014, 1:56 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22280/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 1:56 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Implement a TRequestsClient as a prelude to kerberization.
> 
> Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
>   src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
>   src/main/python/apache/aurora/common/transport.py PRE-CREATION 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
>   src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
>   src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22280/diff/
> 
> 
> Testing
> -------
> 
> Updated client/api tests for the new transport.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

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

(Updated June 9, 2014, 8:56 p.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Changes
-------

address ksweeney's feedback


Repository: aurora


Description
-------

Implement a TRequestsClient as a prelude to kerberization.

Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
  src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
  src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
  src/main/python/apache/aurora/common/transport.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
  src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
  src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 

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


Testing
-------

Updated client/api tests for the new transport.


Thanks,

Brian Wickman


Re: Review Request 22280: Implement a TRequestsClient as a prelude to kerberization.

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

(Updated June 9, 2014, 6:42 p.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Changes
-------

Added transport test

mba=aurora=; PANTS_PY_COVERAGE=1 ./pants src/test/python/apache/aurora/common:test_transport -v
Build operating on targets: OrderedSet([PythonTests(src/test/python/apache/aurora/common/BUILD:test_transport)])
======================================= test session starts ========================================
platform darwin -- Python 2.6.7 -- py-1.4.20 -- pytest-2.5.2 -- /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
collected 3 items 

src/test/python/apache/aurora/common/test_transport.py:22: test_request_transport_integration PASSED
src/test/python/apache/aurora/common/test_transport.py:49: test_request_transport_timeout PASSED
src/test/python/apache/aurora/common/test_transport.py:74: test_request_any_other_exception PASSEDCoverage.py warning: Trace function changed, measurement is likely wrong: None

------------------------- coverage: platform darwin, python 2.6.7-final-0 --------------------------
Name                                                                                                Stmts   Miss Branch BrMiss  Cover
-------------------------------------------------------------------------------------------------------------------------------------
/private/var/folders/4d/9tz0cd5n2n7947xs21gspsxc0000gp/T/tmpULUFvv/apache/aurora/common/__init__        1      0      0      0   100%
/private/var/folders/4d/9tz0cd5n2n7947xs21gspsxc0000gp/T/tmpULUFvv/apache/aurora/common/transport      50      4      2      1    90%
-------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                  51      4      2      1    91%


Repository: aurora


Description
-------

Implement a TRequestsClient as a prelude to kerberization.

Sending out for early feedback.  This could probably be shipped as-is but curious to see how people feel about this approach.  This is the first bit of AURORA-515.  To add kerberos support, we just need to add a dependency on requests_kerberos and inject KerberosAuth() as the 'auth=' parameter to TRequestsClient with the proper service principal specified.


Diffs (updated)
-----

  src/main/python/apache/aurora/client/api/BUILD 6968d62e663a3d45b86d665ca4090be49e6426a6 
  src/main/python/apache/aurora/client/api/scheduler_client.py 86ccdd982ddd678a8eb86f3d7be2761ced1d7b6c 
  src/main/python/apache/aurora/common/BUILD 0de0cf76c0f19a6cee44cfb558096d2ff010a014 
  src/main/python/apache/aurora/common/transport.py PRE-CREATION 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 6b23a4a5e23f0724e418cefaadb2429480353272 
  src/test/python/apache/aurora/common/BUILD 4fc778899dbae8ac2c1f802fb7c01903f6e8fc34 
  src/test/python/apache/aurora/common/test_transport.py PRE-CREATION 

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


Testing
-------

Updated client/api tests for the new transport.


Thanks,

Brian Wickman