Re: Review Request 47038: Re-installation of components when there are no INSTALL_FAILED components returns 500 error

2016-05-05 Thread Nate Cole


> On May 5, 2016, 4:10 p.m., Jonathan Hurley wrote:
> > So the web client can correctly handle a NSRE correctly here? It would be 
> > nice to have been able to return a 2xx code, like 204.

Yes, the UpdateHandler uses exception-catching as logic (ugh) and propagates a 
NSRE for collection-based resources (which this is) as a 200.  Would like 204, 
but not sure how the UI would react.


- Nate


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


On May 5, 2016, 3:44 p.m., Nate Cole wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47038/
> ---
> 
> (Updated May 5, 2016, 3:44 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Jayush Luniya.
> 
> 
> Bugs: AMBARI-16279
> https://issues.apache.org/jira/browse/AMBARI-16279
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> The HostComponentResourceProvider will find the available Resources (host 
> components)  to update.  When this set is empty, then an Iterator 
> NoSuchElementException gets thrown.
> 
> Note: had a discussion with other committers and felt that 204 is an 
> appropriate response in the case where there  is nothing to update.  However, 
> code exists already whereby a 200 is returned.  I believe this to be 
> inappropriate, but cannot change it as it could change the UI in an 
> unexpected way.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
>  83bfeaa 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
>  683a235 
> 
> Diff: https://reviews.apache.org/r/47038/diff/
> 
> 
> Testing
> ---
> 
> Manual.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>



Re: Review Request 47038: Re-installation of components when there are no INSTALL_FAILED components returns 500 error

2016-05-05 Thread Jonathan Hurley

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


Fix it, then Ship it!




So the web client can correctly handle a NSRE correctly here? It would be nice 
to have been able to return a 2xx code, like 204.


ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 (line 800)


Ewww... Log?


- Jonathan Hurley


On May 5, 2016, 3:44 p.m., Nate Cole wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47038/
> ---
> 
> (Updated May 5, 2016, 3:44 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Jayush Luniya.
> 
> 
> Bugs: AMBARI-16279
> https://issues.apache.org/jira/browse/AMBARI-16279
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> The HostComponentResourceProvider will find the available Resources (host 
> components)  to update.  When this set is empty, then an Iterator 
> NoSuchElementException gets thrown.
> 
> Note: had a discussion with other committers and felt that 204 is an 
> appropriate response in the case where there  is nothing to update.  However, 
> code exists already whereby a 200 is returned.  I believe this to be 
> inappropriate, but cannot change it as it could change the UI in an 
> unexpected way.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
>  83bfeaa 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
>  683a235 
> 
> Diff: https://reviews.apache.org/r/47038/diff/
> 
> 
> Testing
> ---
> 
> Manual.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>