You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Madhan Neethiraj <ma...@apache.org> on 2015/07/27 07:40:45 UTC
Re: 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/#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
>
>