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

Regression: NegativeTest: Partial update REST API call to set string as float is accepted by atlas(200 OK) and float value is set as 0. Previously this was rejected by atlas.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 0.8-incubating
    • 0.8-incubating
    • atlas-core
    • None

    Description

      sample request:

      2017-03-01 14:31:44,697 INFO  - [main:partialUpdateByPostInvalid] ~ Request payload is : {
        "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
        "id":{
          "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
          "id":"-16999275390902688",
          "version":0,
          "typeName":"EntityUpdateTest2szmwqubeh",
          "state":"ACTIVE"
        },
        "typeName":"EntityUpdateTest2szmwqubeh",
        "values":{
          "float":"str",
          "set":[
            "setValue1",
            "setValue2"
          ],
          "collection":[
            "collectionValue1",
            "collectionValue2"
          ],
          "name":"updateEntitiesqg8z7qbuvv"
        },
        "traitNames":[
      
        ],
        "traits":{
      
        },
        "systemAttributes":{
          "createdBy":null,
          "modifiedBy":null,
          "createdTime":null,
          "modifiedTime":null
        }
      } (InstanceUtils:157)
      2017-03-01 14:31:44,698 INFO  - [main:partialUpdateByPostInvalid] ~ Request Url: http://ctr-e129-1487033772569-29425-01-000006.hwx.site:21000/api/atlas/entities/qualifiedName?user.name=hrt_qa&type=EntityUpdateTest2szmwqubeh&property=name&value=updateEntitiesqg8z7qbuvv (BaseRequest:165)
      

      Response for this is:

      Response is: {"requestId":"pool-2-thread-9 - 1dce7307-6b3e-44bc-9566-d49e89de3894","entities":{"updated":["66e86cc9-2307-4ced-ab83-0301fb388296"]},"definition":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference","id":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"66e86cc9-2307-4ced-ab83-0301fb388296","version":0,"typeName":"EntityUpdateTest2szmwqubeh","state":"ACTIVE"},"typeName":"EntityUpdateTest2szmwqubeh","values":{"name":"updateEntitiesqg8z7qbuvv","collection":["collectionValue1","collectionValue2"],"float":0,"short":0,"set":["setValue1","setValue2"],"optional":null,"double":0,"long":0,"biginteger":0,"boolean":false,"date":"1970-01-01T00:00:00.000Z","bigdecimal":0,"int":0,"byte":0},"traitNames":[],"traits":{},"systemAttributes":{"createdBy":"admin","modifiedBy":"admin","createdTime":"2017-03-01T14:31:44.575Z","modifiedTime":"2017-03-01T14:31:44.706Z"}}}
      

      Previously the same request used to be rejected by atlas but now it is accepted and reflected as 0 in the response. Is this new implementation? If yes, this mean any value for any type is accepted but the value for that type is set to default. For example: when float type is set as string, the default value set for float is 0.

      Attachments

        1. ATLAS-1614.1.patch
          7 kB
          Madhan Neethiraj

        Activity

          People

            madhan Madhan Neethiraj
            ayubpathan Ayub Pathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: