You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Bastien Morel (JIRA)" <ji...@apache.org> on 2017/07/28 14:05:00 UTC

[jira] [Created] (ATLAS-2002) Regression Atlas 0.8- structured tag and multiplicity required

Bastien Morel created ATLAS-2002:
------------------------------------

             Summary: Regression Atlas 0.8- structured tag and multiplicity required
                 Key: ATLAS-2002
                 URL: https://issues.apache.org/jira/browse/ATLAS-2002
             Project: Atlas
          Issue Type: Bug
          Components:  atlas-core
    Affects Versions: 0.8-incubating
         Environment: HDP 2.6.1 - Atlas 0.8.0
            Reporter: Bastien Morel
            Priority: Critical


Hi, 

I created an Atlas structured tag with several attributes, some were created with a required multiplicity (attributes 2, 3 and 4) and others with an optional mulitplicity (attributes 1 and 5). 
Here is the curl request that I used:

curl -v -X POST -w '%{http_code}' -u atlasUsername:atlasPassword -d '{"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":[],"hierarchicalMetaTypeName":"org.apache
.atlas.typesystem.types.TraitType","typeName":"structuredTagName","typeDescription":"structuredTagName","attributeDefinitions":[{"name":"attribute1","dataTypeName": "string",*{color:red}"multiplicity": "optional"{color}*,"isCom
posite": false,"isUnique": false,"isIndexable": true,"reverseAttributeName": null},{"name":"attribute2","dataTypeName": "string",{color:red}*"multiplicity": "required"*{color},"isComposite": false,"isUnique": false,"isInde
xable": true,"reverseAttributeName": null},{"name":"attribute3","dataTypeName": "string",*{color:red}"multiplicity": "required"{color}*,"isComposite": false,"isUnique": false,"isIndexable": true,"reverseAttributeName": null},
{"name":"attribute4","dataTypeName": "string",{color:red}*"multiplicity": "required"*{color},"isComposite": false,"isUnique": false,"isIndexable": true,"reverseAttributeName": null},{"name":"attribute5","dataTypeName": "string",*{color:red}"mu
ltiplicity": "optional"{color}*,"isComposite": false,"isUnique": false,"isIndexable": true,"reverseAttributeName": null}]}],"classTypes":[]}' -H 'Content-Type: application/json' atlasServerURL/api/atlas/types/

Then, I'm creating a link between this tag and an existing Atlas entity. I voluntarily did not complete the 4th attribute (I set the attribute value as ""), defined as required:

curl -v -u admin:admin -X POST -d '{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct","typeName":"structuredTagName","values":{"attribute1":"value1","attribute2":"value2","attribute3":"value3","attribute4":""}}' -H "Content-Type: application/json" "atlasServerURL/api/atlas/entities/guid/traits"

I have this error message :
< HTTP/1.1 400 Bad Request
< Date: Fri, 28 Jul 2017 12:38:07 GMT
< Set-Cookie: ATLASSESSIONID=xxx;Path=/;HttpOnly
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-Frame-Options: DENY
< Content-Type: application/json; charset=UTF-8
< Transfer-Encoding: chunked
< Server: Jetty(9.2.12.v20150709)
<
* Connection #0 to host atlasServerURL left intact
* Closing connection #0
{"error":"Error deserializing trait instance"}

Atlas found an error because of the missing attribute4 value but created the tag anyway: I checked using a CURL GET request on the GUID traits ressource.

When I used the same request in Atlas 0.5, I got the error and the tag was not created. 

Is there any possibility to correct this regression please?
Many thanks,

Regards,
Bastien






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)