Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2458

RelationshipApi Delete doesnt remove relationshipAttributes from entity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.0.0, 2.0.0
    • None
    • None

    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": {}
      }

       

      Attachments

        1. ATLAS-2458.patch
          4 kB
          Kapildeo Nayak

        Issue Links

          Activity

            People

              kapildeo Kapildeo Nayak
              brandon.kirchner Brandon Kirchner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: