You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Zameer Manji <zm...@twopensource.com> on 2014/11/25 22:22:32 UTC

Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Review request for Aurora.


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


Repository: aurora


Description
-------

This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.


Diffs
-----

  src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
  src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 

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


Testing
-------

./pants src/test/python/apache/aurora/common:test_transport -v


Thanks,

Zameer Manji


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Zameer Manji <zm...@twopensource.com>.

> On Nov. 25, 2014, 2:04 p.m., Joshua Cohen wrote:
> > src/test/python/apache/aurora/common/test_transport.py, line 81
> > <https://reviews.apache.org/r/28451/diff/1/?file=776097#file776097line81>
> >
> >     This test doesn't really do what it says. It's just testing that we call raise_for_status, but ideally what we'd be testing is that unsuccessful status codes (500 in this case) on responses result in exceptions. I.e. the test is dependent on the implementation rather than simply testing the expected behavior.
> >     
> >     A more accurate test would be actually generate a mock 500 response rather than mocking raise_for_status to raise an error.
> >     
> >     I'm not sure how arduous that would be, if it's an excessive amount of work then I could live with just renaming the test to something that more accurately describes what it's doing.

I have deemed doing that a lot more work so I have renamed the test.


- Zameer


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


On Nov. 25, 2014, 1:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 1:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105225>

    This test doesn't really do what it says. It's just testing that we call raise_for_status, but ideally what we'd be testing is that unsuccessful status codes (500 in this case) on responses result in exceptions. I.e. the test is dependent on the implementation rather than simply testing the expected behavior.
    
    A more accurate test would be actually generate a mock 500 response rather than mocking raise_for_status to raise an error.
    
    I'm not sure how arduous that would be, if it's an excessive amount of work then I could live with just renaming the test to something that more accurately describes what it's doing.


- Joshua Cohen


On Nov. 25, 2014, 9:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 9:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Ship it!


Master (91b8d19) 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 Nov. 25, 2014, 10:35 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 10:35 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Ship it!


Master (91b8d19) 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 Nov. 25, 2014, 10:51 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 10:51 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Ship it!


Ship It!

- Joshua Cohen


On Nov. 25, 2014, 10:51 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 10:51 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Ship it!


Ship It!

- Kevin Sweeney


On Nov. 25, 2014, 2:51 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 2:51 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Zameer Manji <zm...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28451/#review63126
-----------------------------------------------------------


Kevin, you were the last comitter to give a ship it. Can you please commit this?

- Zameer Manji


On Nov. 25, 2014, 2:51 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 2:51 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Zameer Manji <zm...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28451/
-----------------------------------------------------------

(Updated Nov. 25, 2014, 2:51 p.m.)


Review request for Aurora, Kevin Sweeney and Bill Farner.


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


Repository: aurora


Description
-------

This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.


Diffs (updated)
-----

  src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
  src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 

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


Testing
-------

./pants src/test/python/apache/aurora/common:test_transport -v


Thanks,

Zameer Manji


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Zameer Manji <zm...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28451/
-----------------------------------------------------------

(Updated Nov. 25, 2014, 2:35 p.m.)


Review request for Aurora, Kevin Sweeney and Bill Farner.


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


Repository: aurora


Description
-------

This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.


Diffs (updated)
-----

  src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
  src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 

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


Testing
-------

./pants src/test/python/apache/aurora/common:test_transport -v


Thanks,

Zameer Manji


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Ship it!


Master (e95aa8e) 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 Nov. 25, 2014, 9:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 9:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Zameer Manji <zm...@twopensource.com>.

> On Nov. 25, 2014, 1:27 p.m., Kevin Sweeney wrote:
> > src/test/python/apache/aurora/common/test_transport.py, line 89
> > <https://reviews.apache.org/r/28451/diff/1/?file=776097#file776097line89>
> >
> >     You can remove the lambda here if you unset instance=True on session.

The underlying code will raise an exception if I don't pass in a callable that returns session.


- Zameer


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


On Nov. 25, 2014, 1:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 1:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105224>

    You can remove the lambda here if you unset instance=True on session.



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105223>

    You can use [pytest.raises](http://pytest.org/latest/builtin.html#pytest.raises) here.



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105222>

    You can do response.raise_for_status.assert_called_once_with() here.


- Kevin Sweeney


On Nov. 25, 2014, 1:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 1:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28451/#review63045
-----------------------------------------------------------

Ship it!


- Bill Farner


On Nov. 25, 2014, 9:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 9:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

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

Ship it!


Master (e95aa8e) 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 Nov. 25, 2014, 9:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 9:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 
> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.

Posted by Zameer Manji <zm...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28451/
-----------------------------------------------------------

(Updated Nov. 25, 2014, 1:22 p.m.)


Review request for Aurora, Kevin Sweeney and Bill Farner.


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


Repository: aurora


Description
-------

This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously the TRequestsTransport would ignore those responses and treat the response as valid. The response would not be valid JSON and cause thrift decoding errors later on.


Diffs
-----

  src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326 
  src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c 

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


Testing
-------

./pants src/test/python/apache/aurora/common:test_transport -v


Thanks,

Zameer Manji