atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apoorv Naik <naik.apo...@gmail.com>
Subject Re: Review Request 61502: ATLAS-2025: Validation on type name and classification
Date Tue, 08 Aug 2017 19:45:48 GMT

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




repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
Lines 431 (patched)
<https://reviews.apache.org/r/61502/#comment258318>

    Not needed, only added as an extra guard, in case anything slips through.



repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Lines 61 (patched)
<https://reviews.apache.org/r/61502/#comment258317>

    The entityType can be null under two cases 
    
    1. TypeName is present in request but it's invalid
    2. TypeName is missing in request
    
    We need to identity case 1 and throw 400 for that, case 2 doesn't equate to 400 bad request.
    
    Same for the other check


- Apoorv Naik


On Aug. 8, 2017, 5:16 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61502/
> -----------------------------------------------------------
> 
> (Updated Aug. 8, 2017, 5:16 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2025
>     https://issues.apache.org/jira/browse/ATLAS-2025
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Right now there's no such validation and as a (unwanted) side-effect the following happens
> 
> 1. Internal error when type name is invalid (NPE)
> 2. Type is valid but classification is invalid - the result contains entities which don't
have the tag (exactly opposite behavior)
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 66dd7484

>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 929f8d00 
> 
> 
> Diff: https://reviews.apache.org/r/61502/diff/1/
> 
> 
> Testing
> -------
> 
> Validated the correctness of results using curl/postman calls, any invalid type name
/ classification throws 400 now.
> 
> mvn clean package -Pdist,berkeley-elasticsearch executes successfully
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message