[
https://issues.apache.org/jira/browse/ATLAS-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Kirchner updated ATLAS-2458:
------------------------------------
Description:
When I create a Process and DataSet entity, and create a
process_dataset_outputs relationship between the two, when I delete the
relationship, the relationshipAttributes are not removed from the Process or
DataSet entities. full reproduction steps and output are below --
step 1 -- create dataset and process (through UI)
step 2 -- create relationship
http post http://localhost:21000/api/atlas/v2/relationship
PAYLOAD
{
"end1" : {
"guid" : "d456dc93-8832-4a36-8ae0-071946c653fc"
},
"end2" : {
"guid" : "247bc2d1-de27-4c50-a35b-b62350dc7979"
},
"typeName":"process_dataset_outputs"
}
RESPONSE
{
"createTime": 1519335073389,
"createdBy": "admin",
"end1": {
"guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
"typeName": "Process"
},
"end2": {
"guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
"typeName": "DataSet"
},
"guid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"label": "__Process.outputs",
"propagateTags": "ONE_TO_TWO",
"status": "ACTIVE",
"typeName": "process_dataset_outputs",
"updateTime": 1519335073389,
"updatedBy": "admin",
"version": 0
}
step 3 -- verify relationship on entities
http get
http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
HTTP/1.1 200 OK
{
"entity": {
"attributes": {
"description": null,
"name": "dataset",
"owner": null,
"qualifiedName": "dataset"
},
"classifications": [],
"createTime": 1519334042139,
"createdBy": "admin",
"guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
"relationshipAttributes": {
"sinkFromProcesses": [
{
"displayText": "process",
"guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
"relationshipAttributes": {
"typeName": "process_dataset_outputs"
},
"relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"typeName": "Process"
}
],
"sourceToProcesses": []
},
"status": "ACTIVE",
"typeName": "DataSet",
"updateTime": 1519334042139,
"updatedBy": "admin",
"version": 0
},
"referredEntities": {}
}
http get
http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
HTTP/1.1 200 OK
{
"entity": {
"attributes": {
"description": null,
"name": "dataset",
"owner": null,
"qualifiedName": "dataset"
},
"classifications": [],
"createTime": 1519334042139,
"createdBy": "admin",
"guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
"relationshipAttributes": {
"sinkFromProcesses": [
{
"displayText": "process",
"guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
"relationshipAttributes": {
"typeName": "process_dataset_outputs"
},
"relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"typeName": "Process"
}
],
"sourceToProcesses": []
},
"status": "ACTIVE",
"typeName": "DataSet",
"updateTime": 1519334042139,
"updatedBy": "admin",
"version": 0
},
"referredEntities": {}
}
step 4 -- delete relationship
http delete
http://localhost:21000/api/atlas/v2/relationship/guid/bb9dfa43-c193-4cbb-9472-6b9421f43701
HTTP/1.1 204 No Content
step 5 -- verify deletion
http get
http://localhost:21000/api/atlas/v2/relationship/guid/bb9dfa43-c193-4cbb-9472-6b9421f43701
HTTP/1.1 200 OK
{
"createTime": 1519334256264,
"createdBy": "admin",
"end1": {
"guid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"typeName": "Process"
},
"end2": {
"guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
"typeName": "DataSet"
},
"guid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"label": "__Process.outputs",
"propagateTags": "ONE_TO_TWO",
"status": "DELETED",
"typeName": "process_dataset_outputs",
"updateTime": 1519334383683,
"updatedBy": "admin",
"version": 0
}
step 6 -- verify relationship removed from entities (FAILS)
http get
http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
HTTP/1.1 200 OK
{
"entity": {
"attributes": {
"description": null,
"name": "dataset",
"owner": null,
"qualifiedName": "dataset"
},
"classifications": [],
"createTime": 1519334042139,
"createdBy": "admin",
"guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
"relationshipAttributes": {
"sinkFromProcesses": [
{
"displayText": "process",
"guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
"relationshipAttributes": {
"typeName": "process_dataset_outputs"
},
"relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"typeName": "Process"
}
],
"sourceToProcesses": []
},
"status": "ACTIVE",
"typeName": "DataSet",
"updateTime": 1519334042139,
"updatedBy": "admin",
"version": 0
},
"referredEntities": {}
}
http get
http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
HTTP/1.1 200 OK
{
"entity": {
"attributes": {
"description": null,
"name": "dataset",
"owner": null,
"qualifiedName": "dataset"
},
"classifications": [],
"createTime": 1519334042139,
"createdBy": "admin",
"guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
"relationshipAttributes": {
"sinkFromProcesses": [
{
"displayText": "process",
"guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
"relationshipAttributes": {
"typeName": "process_dataset_outputs"
},
"relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
"typeName": "Process"
}
],
"sourceToProcesses": []
},
"status": "ACTIVE",
"typeName": "DataSet",
"updateTime": 1519334042139,
"updatedBy": "admin",
"version": 0
},
"referredEntities": {}
}
> RelationshipApi Delete doesnt remove relationshipAttributes from entity
> -----------------------------------------------------------------------
>
> Key: ATLAS-2458
> URL: https://issues.apache.org/jira/browse/ATLAS-2458
> Project: Atlas
> Issue Type: Bug
> Reporter: Brandon Kirchner
> Priority: Major
>
> When I create a Process and DataSet entity, and create a
> process_dataset_outputs relationship between the two, when I delete the
> relationship, the relationshipAttributes are not removed from the Process or
> DataSet entities. full reproduction steps and output are below --
>
> step 1 -- create dataset and process (through UI)
> step 2 -- create relationship
> http post http://localhost:21000/api/atlas/v2/relationship
> PAYLOAD
> {
> "end1" : {
> "guid" : "d456dc93-8832-4a36-8ae0-071946c653fc"
> },
> "end2" : {
> "guid" : "247bc2d1-de27-4c50-a35b-b62350dc7979"
> },
> "typeName":"process_dataset_outputs"
> }
> RESPONSE
> {
> "createTime": 1519335073389,
> "createdBy": "admin",
> "end1": {
> "guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
> "typeName": "Process"
> },
> "end2": {
> "guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
> "typeName": "DataSet"
> },
> "guid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "label": "__Process.outputs",
> "propagateTags": "ONE_TO_TWO",
> "status": "ACTIVE",
> "typeName": "process_dataset_outputs",
> "updateTime": 1519335073389,
> "updatedBy": "admin",
> "version": 0
> }
> step 3 -- verify relationship on entities
> http get
> http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
> HTTP/1.1 200 OK
> {
> "entity": {
> "attributes": {
> "description": null,
> "name": "dataset",
> "owner": null,
> "qualifiedName": "dataset"
> },
> "classifications": [],
> "createTime": 1519334042139,
> "createdBy": "admin",
> "guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
> "relationshipAttributes": {
> "sinkFromProcesses": [
> {
> "displayText": "process",
> "guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
> "relationshipAttributes": {
> "typeName": "process_dataset_outputs"
> },
> "relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "typeName": "Process"
> }
> ],
> "sourceToProcesses": []
> },
> "status": "ACTIVE",
> "typeName": "DataSet",
> "updateTime": 1519334042139,
> "updatedBy": "admin",
> "version": 0
> },
> "referredEntities": {}
> }
> http get
> http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
> HTTP/1.1 200 OK
> {
> "entity": {
> "attributes": {
> "description": null,
> "name": "dataset",
> "owner": null,
> "qualifiedName": "dataset"
> },
> "classifications": [],
> "createTime": 1519334042139,
> "createdBy": "admin",
> "guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
> "relationshipAttributes": {
> "sinkFromProcesses": [
> {
> "displayText": "process",
> "guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
> "relationshipAttributes": {
> "typeName": "process_dataset_outputs"
> },
> "relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "typeName": "Process"
> }
> ],
> "sourceToProcesses": []
> },
> "status": "ACTIVE",
> "typeName": "DataSet",
> "updateTime": 1519334042139,
> "updatedBy": "admin",
> "version": 0
> },
> "referredEntities": {}
> }
> step 4 -- delete relationship
> http delete
> http://localhost:21000/api/atlas/v2/relationship/guid/bb9dfa43-c193-4cbb-9472-6b9421f43701
> HTTP/1.1 204 No Content
> step 5 -- verify deletion
> http get
> http://localhost:21000/api/atlas/v2/relationship/guid/bb9dfa43-c193-4cbb-9472-6b9421f43701
> HTTP/1.1 200 OK
> {
> "createTime": 1519334256264,
> "createdBy": "admin",
> "end1": {
> "guid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "typeName": "Process"
> },
> "end2": {
> "guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
> "typeName": "DataSet"
> },
> "guid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "label": "__Process.outputs",
> "propagateTags": "ONE_TO_TWO",
> "status": "DELETED",
> "typeName": "process_dataset_outputs",
> "updateTime": 1519334383683,
> "updatedBy": "admin",
> "version": 0
> }
> step 6 -- verify relationship removed from entities (FAILS)
> http get
> http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
> HTTP/1.1 200 OK
> {
> "entity": {
> "attributes": {
> "description": null,
> "name": "dataset",
> "owner": null,
> "qualifiedName": "dataset"
> },
> "classifications": [],
> "createTime": 1519334042139,
> "createdBy": "admin",
> "guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
> "relationshipAttributes": {
> "sinkFromProcesses": [
> {
> "displayText": "process",
> "guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
> "relationshipAttributes": {
> "typeName": "process_dataset_outputs"
> },
> "relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "typeName": "Process"
> }
> ],
> "sourceToProcesses": []
> },
> "status": "ACTIVE",
> "typeName": "DataSet",
> "updateTime": 1519334042139,
> "updatedBy": "admin",
> "version": 0
> },
> "referredEntities": {}
> }
> http get
> http://localhost:21000/api/atlas/v2/entity/guid/247bc2d1-de27-4c50-a35b-b62350dc7979
> HTTP/1.1 200 OK
> {
> "entity": {
> "attributes": {
> "description": null,
> "name": "dataset",
> "owner": null,
> "qualifiedName": "dataset"
> },
> "classifications": [],
> "createTime": 1519334042139,
> "createdBy": "admin",
> "guid": "247bc2d1-de27-4c50-a35b-b62350dc7979",
> "relationshipAttributes": {
> "sinkFromProcesses": [
> {
> "displayText": "process",
> "guid": "d456dc93-8832-4a36-8ae0-071946c653fc",
> "relationshipAttributes": {
> "typeName": "process_dataset_outputs"
> },
> "relationshipGuid": "bb9dfa43-c193-4cbb-9472-6b9421f43701",
> "typeName": "Process"
> }
> ],
> "sourceToProcesses": []
> },
> "status": "ACTIVE",
> "typeName": "DataSet",
> "updateTime": 1519334042139,
> "updatedBy": "admin",
> "version": 0
> },
> "referredEntities": {}
> }
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)