You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Alok Lal <al...@hortonworks.com> on 2015/06/19 23:56:30 UTC

Review Request 35669: RANGER-560 Policy validation: user friendly error messages about validation failures

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

Review request for ranger and Madhan Neethiraj.


Bugs: RANGER-560
    https://issues.apache.org/jira/browse/RANGER-560


Repository: ranger


Description
-------

Changes made to policy validation only to return user friendly messages:
- Each error has distinct code.
- Message generated is for human consumption.
- Multiple error messages are serialized in a user friendly manner


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java 84f750d 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java 3246138 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java 015203a 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetailsBuilder.java 3a57341 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java 6236d71 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestValidationFailureDetails.java PRE-CREATION 

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


Testing
-------

New junits, changes to existing junits.
Manual testing invoking REST api


Thanks,

Alok Lal


Re: Review Request 35669: RANGER-560 Policy validation: user friendly error messages about validation failures

Posted by Alok Lal <al...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35669/
-----------------------------------------------------------

(Updated July 28, 2015, 7 p.m.)


Review request for ranger and Madhan Neethiraj.


Changes
-------

Fixed the broken junits.


Bugs: RANGER-560
    https://issues.apache.org/jira/browse/RANGER-560


Repository: ranger


Description
-------

Changes made to policy validation only to return user friendly messages:
- Each error has distinct code.
- Message generated is for human consumption.
- Multiple error messages are serialized in a user friendly manner


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java 015203a 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestValidationFailureDetails.java PRE-CREATION 

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


Testing
-------

New junits, changes to existing junits.
Manual testing invoking REST api


Thanks,

Alok Lal


Re: Review Request 35669: RANGER-560 Policy validation: user friendly error messages about validation failures

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35669/#review93353
-----------------------------------------------------------

Ship it!


Ship It!

- Madhan Neethiraj


On July 28, 2015, 9:14 p.m., Alok Lal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35669/
> -----------------------------------------------------------
> 
> (Updated July 28, 2015, 9:14 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-560
>     https://issues.apache.org/jira/browse/RANGER-560
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Changes made to policy validation only to return user friendly messages:
> - Each error has distinct code.
> - Message generated is for human consumption.
> - Multiple error messages are serialized in a user friendly manner
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java 84f750d 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java 015203a 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestValidationFailureDetails.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35669/diff/
> 
> 
> Testing
> -------
> 
> New junits, changes to existing junits.
> Manual testing invoking REST api
> 
> 
> Thanks,
> 
> Alok Lal
> 
>


Re: Review Request 35669: RANGER-560 Policy validation: user friendly error messages about validation failures

Posted by Alok Lal <al...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35669/
-----------------------------------------------------------

(Updated July 28, 2015, 2:14 p.m.)


Review request for ranger and Madhan Neethiraj.


Changes
-------

Rework comments addressed.


Bugs: RANGER-560
    https://issues.apache.org/jira/browse/RANGER-560


Repository: ranger


Description
-------

Changes made to policy validation only to return user friendly messages:
- Each error has distinct code.
- Message generated is for human consumption.
- Multiple error messages are serialized in a user friendly manner


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java 84f750d 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java 015203a 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestValidationFailureDetails.java PRE-CREATION 

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


Testing
-------

New junits, changes to existing junits.
Manual testing invoking REST api


Thanks,

Alok Lal


Re: Review Request 35669: RANGER-560 Policy validation: user friendly error messages about validation failures

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35669/#review93075
-----------------------------------------------------------



agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java (line 82)
<https://reviews.apache.org/r/35669/#comment147335>

    Instead of argument "that", the method can work on "this" object - right?



agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java (line 83)
<https://reviews.apache.org/r/35669/#comment147334>

    Wouldn't the following be simpler:
    
    return template.replace('{field}', _that.fieldName).replace('{sub-field}', that._subFieldName).replace('{reason}', that._reason);


- Madhan Neethiraj


On June 19, 2015, 9:56 p.m., Alok Lal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35669/
> -----------------------------------------------------------
> 
> (Updated June 19, 2015, 9:56 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-560
>     https://issues.apache.org/jira/browse/RANGER-560
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Changes made to policy validation only to return user friendly messages:
> - Each error has distinct code.
> - Message generated is for human consumption.
> - Multiple error messages are serialized in a user friendly manner
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java 84f750d 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java 3246138 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetails.java 015203a 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/ValidationFailureDetailsBuilder.java 3a57341 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java 6236d71 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestValidationFailureDetails.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/35669/diff/
> 
> 
> Testing
> -------
> 
> New junits, changes to existing junits.
> Manual testing invoking REST api
> 
> 
> Thanks,
> 
> Alok Lal
> 
>