You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Vitalyi Brodetskyi <vb...@hortonworks.com> on 2014/02/12 16:46:18 UTC

Review Request 18015: Passthrough /proxy API not passing through extra params

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

Review request for Ambari, Dmitro Lisnichenko and Nate Cole.


Bugs: AMBARI-4630
    https://issues.apache.org/jira/browse/AMBARI-4630


Repository: ambari


Description
-------

UI makes the following call where there are multiple params which should end up in the target URL

/proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1


None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java be95221 
  ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 3ed0b8c 
  ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 1a9a176 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Listening for transport dt_socket at address: 5006
Running org.apache.ambari.server.proxy.ProxyServiceTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec

Results :

Tests run: 7, Failures: 0, Errors: 0, Skipped: 0


Thanks,

Vitalyi Brodetskyi


Re: Review Request 18015: Passthrough /proxy API not passing through extra params

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.

> On Feb. 12, 2014, 9:25 p.m., Nate Cole wrote:
> > For completeness, we should have a unit test that verifies escaped urls are covered.  IE:
> > 
> > /proxy?url=http%3a%2f%2fserver%3a8188%2fws%2fv1%2fapptimeline%2fHIVE_QUERY_ID%3ffields=events%2cprimaryfilters%26limit=10%26primaryFilter=user%3ahiveuser1
> > 
> > In fact, requiring that syntax gets out of the substring/replace business and just use the url parameter and make a URI out of it.

Nate, can we create separate ticket for test? Because some fixes in this ticket, is critical for UI functionality. UI guys now are blocked.


- Vitalyi


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


On Feb. 12, 2014, 3:46 p.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18015/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2014, 3:46 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
> 
> 
> Bugs: AMBARI-4630
>     https://issues.apache.org/jira/browse/AMBARI-4630
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> UI makes the following call where there are multiple params which should end up in the target URL
> 
> /proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1
> 
> 
> None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java be95221 
>   ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 3ed0b8c 
>   ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 1a9a176 
> 
> Diff: https://reviews.apache.org/r/18015/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Listening for transport dt_socket at address: 5006
> Running org.apache.ambari.server.proxy.ProxyServiceTest
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec
> 
> Results :
> 
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 18015: Passthrough /proxy API not passing through extra params

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18015/#review34317
-----------------------------------------------------------


For completeness, we should have a unit test that verifies escaped urls are covered.  IE:

/proxy?url=http%3a%2f%2fserver%3a8188%2fws%2fv1%2fapptimeline%2fHIVE_QUERY_ID%3ffields=events%2cprimaryfilters%26limit=10%26primaryFilter=user%3ahiveuser1

In fact, requiring that syntax gets out of the substring/replace business and just use the url parameter and make a URI out of it.

- Nate Cole


On Feb. 12, 2014, 10:46 a.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18015/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2014, 10:46 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
> 
> 
> Bugs: AMBARI-4630
>     https://issues.apache.org/jira/browse/AMBARI-4630
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> UI makes the following call where there are multiple params which should end up in the target URL
> 
> /proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1
> 
> 
> None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java be95221 
>   ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 3ed0b8c 
>   ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 1a9a176 
> 
> Diff: https://reviews.apache.org/r/18015/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Listening for transport dt_socket at address: 5006
> Running org.apache.ambari.server.proxy.ProxyServiceTest
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec
> 
> Results :
> 
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 18015: Passthrough /proxy API not passing through extra params

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18015/
-----------------------------------------------------------

(Updated Feb. 13, 2014, 4:46 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Nate Cole.


Changes
-------

Updated patch, because for current trunk it's not actual.


Bugs: AMBARI-4630
    https://issues.apache.org/jira/browse/AMBARI-4630


Repository: ambari


Description
-------

UI makes the following call where there are multiple params which should end up in the target URL

/proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1


None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 0de826a 
  ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 326eb13 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Listening for transport dt_socket at address: 5006
Running org.apache.ambari.server.proxy.ProxyServiceTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec

Results :

Tests run: 7, Failures: 0, Errors: 0, Skipped: 0


Thanks,

Vitalyi Brodetskyi


Re: Review Request 18015: Passthrough /proxy API not passing through extra params

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18015/#review34289
-----------------------------------------------------------

Ship it!


Ship It!

- Dmitro Lisnichenko


On Feb. 12, 2014, 3:46 p.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18015/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2014, 3:46 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
> 
> 
> Bugs: AMBARI-4630
>     https://issues.apache.org/jira/browse/AMBARI-4630
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> UI makes the following call where there are multiple params which should end up in the target URL
> 
> /proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1
> 
> 
> None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java be95221 
>   ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 3ed0b8c 
>   ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 1a9a176 
> 
> Diff: https://reviews.apache.org/r/18015/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Listening for transport dt_socket at address: 5006
> Running org.apache.ambari.server.proxy.ProxyServiceTest
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec
> 
> Results :
> 
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 18015: Passthrough /proxy API not passing through extra params

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18015/#review34371
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Feb. 12, 2014, 10:46 a.m., Vitalyi Brodetskyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18015/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2014, 10:46 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
> 
> 
> Bugs: AMBARI-4630
>     https://issues.apache.org/jira/browse/AMBARI-4630
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> UI makes the following call where there are multiple params which should end up in the target URL
> 
> /proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1
> 
> 
> None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java be95221 
>   ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 3ed0b8c 
>   ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 1a9a176 
> 
> Diff: https://reviews.apache.org/r/18015/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Listening for transport dt_socket at address: 5006
> Running org.apache.ambari.server.proxy.ProxyServiceTest
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec
> 
> Results :
> 
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>


Re: Review Request 18015: Passthrough /proxy API not passing through extra params

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18015/
-----------------------------------------------------------

(Updated Feb. 12, 2014, 3:46 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Nate Cole.


Bugs: AMBARI-4630
    https://issues.apache.org/jira/browse/AMBARI-4630


Repository: ambari


Description
-------

UI makes the following call where there are multiple params which should end up in the target URL

/proxy?url=http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primaryfilters&limit=10&primaryFilter=user:hiveuser1


None of the filter params (fields, limit, primaryFilter) are ending up on the target server. The passthrough API should pass through all extra params (other than url). 


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java be95221 
  ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 3ed0b8c 
  ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java 1a9a176 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Listening for transport dt_socket at address: 5006
Running org.apache.ambari.server.proxy.ProxyServiceTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.34 sec

Results :

Tests run: 7, Failures: 0, Errors: 0, Skipped: 0


Thanks,

Vitalyi Brodetskyi