Re: Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-16 Thread Eugene Chekanskiy

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

(Updated Aug. 16, 2017, 3:55 p.m.)


Review request for Ambari, Jonathan Hurley and Nate Cole.


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


Repository: ambari


Description
---

Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
WEB working properly, but ambari has hardcoded values of acceptable HTTP codes. 
This patch allows for WEB alerts to define custom list of acceptable codes that 
will be accepted alongside with codes less than 400.


Diffs (updated)
-

  ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
  ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
  ambari-agent/src/test/python/ambari_agent/TestAlerts.py 64479a2 
  
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java 
8223db5 


Diff: https://reviews.apache.org/r/61605/diff/3/

Changes: https://reviews.apache.org/r/61605/diff/2-3/


Testing
---

mvn clean test


Thanks,

Eugene Chekanskiy



Re: Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-14 Thread Jonathan Hurley

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


Ship it!




Ship It!

- Jonathan Hurley


On Aug. 14, 2017, 9:23 a.m., Eugene Chekanskiy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61605/
> ---
> 
> (Updated Aug. 14, 2017, 9:23 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-21712
> https://issues.apache.org/jira/browse/AMBARI-21712
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
> WEB working properly, but ambari has hardcoded values of acceptable HTTP 
> codes. This patch allows for WEB alerts to define custom list of acceptable 
> codes that will be accepted alongside with codes less than 400.
> 
> 
> Diffs
> -
> 
>   ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
>   ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py 64479a2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java
>  dea105e 
> 
> 
> Diff: https://reviews.apache.org/r/61605/diff/2/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Eugene Chekanskiy
> 
>



Re: Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-14 Thread Nate Cole

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


Ship it!





ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java
Lines 36-37 (patched)


Seems like a Set would be more appropriate


- Nate Cole


On Aug. 14, 2017, 9:23 a.m., Eugene Chekanskiy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61605/
> ---
> 
> (Updated Aug. 14, 2017, 9:23 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-21712
> https://issues.apache.org/jira/browse/AMBARI-21712
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
> WEB working properly, but ambari has hardcoded values of acceptable HTTP 
> codes. This patch allows for WEB alerts to define custom list of acceptable 
> codes that will be accepted alongside with codes less than 400.
> 
> 
> Diffs
> -
> 
>   ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
>   ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py 64479a2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java
>  dea105e 
> 
> 
> Diff: https://reviews.apache.org/r/61605/diff/2/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Eugene Chekanskiy
> 
>



Re: Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-14 Thread Eugene Chekanskiy


> On Aug. 14, 2017, 12:58 p.m., Jonathan Hurley wrote:
> > Can you provide a test case for this?

sure, done.


- Eugene


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


On Aug. 14, 2017, 1:23 p.m., Eugene Chekanskiy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61605/
> ---
> 
> (Updated Aug. 14, 2017, 1:23 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-21712
> https://issues.apache.org/jira/browse/AMBARI-21712
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
> WEB working properly, but ambari has hardcoded values of acceptable HTTP 
> codes. This patch allows for WEB alerts to define custom list of acceptable 
> codes that will be accepted alongside with codes less than 400.
> 
> 
> Diffs
> -
> 
>   ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
>   ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py 64479a2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java
>  dea105e 
> 
> 
> Diff: https://reviews.apache.org/r/61605/diff/2/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Eugene Chekanskiy
> 
>



Re: Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-14 Thread Eugene Chekanskiy

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

(Updated Aug. 14, 2017, 1:23 p.m.)


Review request for Ambari, Jonathan Hurley and Nate Cole.


Changes
---

unit tests


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


Repository: ambari


Description
---

Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
WEB working properly, but ambari has hardcoded values of acceptable HTTP codes. 
This patch allows for WEB alerts to define custom list of acceptable codes that 
will be accepted alongside with codes less than 400.


Diffs (updated)
-

  ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
  ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
  ambari-agent/src/test/python/ambari_agent/TestAlerts.py 64479a2 
  
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java 
dea105e 


Diff: https://reviews.apache.org/r/61605/diff/2/

Changes: https://reviews.apache.org/r/61605/diff/1-2/


Testing
---

mvn clean test


Thanks,

Eugene Chekanskiy



Re: Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-14 Thread Jonathan Hurley

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



Can you provide a test case for this?

- Jonathan Hurley


On Aug. 12, 2017, 9:43 a.m., Eugene Chekanskiy wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61605/
> ---
> 
> (Updated Aug. 12, 2017, 9:43 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-21712
> https://issues.apache.org/jira/browse/AMBARI-21712
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
> WEB working properly, but ambari has hardcoded values of acceptable HTTP 
> codes. This patch allows for WEB alerts to define custom list of acceptable 
> codes that will be accepted alongside with codes less than 400.
> 
> 
> Diffs
> -
> 
>   ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
>   ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java
>  dea105e 
> 
> 
> Diff: https://reviews.apache.org/r/61605/diff/1/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Eugene Chekanskiy
> 
>



Review Request 61605: Allow WEB alert accept custom HTTP codes

2017-08-12 Thread Eugene Chekanskiy

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

Review request for Ambari, Jonathan Hurley and Nate Cole.


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


Repository: ambari


Description
---

Sometimes WEB alert can guaranty that codes more than 400 will guaranty that 
WEB working properly, but ambari has hardcoded values of acceptable HTTP codes. 
This patch allows for WEB alerts to define custom list of acceptable codes that 
will be accepted alongside with codes less than 400.


Diffs
-

  ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py add29fc 
  ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 8ce4405 
  
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java 
dea105e 


Diff: https://reviews.apache.org/r/61605/diff/1/


Testing
---

mvn clean test


Thanks,

Eugene Chekanskiy