Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLT-373 : Fix updateBy field in deleteEntityEvent #2574

Merged
merged 4 commits into from
Dec 4, 2023

Conversation

aarshi0301
Copy link

@aarshi0301 aarshi0301 commented Dec 4, 2023

Change description

Description here

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

Developer Testing Notes:

  1. Create Glossary on Beta [with user profile 'A']
  2. Delete Glossary with user profile 'B'
  3. Validate Events [updatedBy field should contain userId of step2]
curl --location 'https://beta.atlan.dev/api/meta/entity/auditSearch' \
--header 'authorization: Bearer  your token' \
--header 'content-type: application/json' \
--data '{
    "dsl": {
        "from": 0,
        "size": 10,
        "sort": [
            {
                "created": {
                    "order": "desc"
                }
            }
        ],
        "query": {
            "bool": {
                "filter": {
                    "bool": {
                        "should": [
                        
                            {
                                "term": {
                                    "entityId": "10f0cc44-45c5-449b-bc0e-0b3358989d07"
                                }
                            }
                        ]
                    }
                }
            }
        }
    }
}'
{
   "entityAudits":[
      {
         "entityQualifiedName":"Wojd826Y8Iw2iz98XdMuM",
         "typeName":"AtlasGlossary",
         "entityId":"10f0cc44-45c5-449b-bc0e-0b3358989d07",
         "timestamp":1701679563047,
         "created":1701692514253,
         "user":"aarshi.arora",
         "action":"ENTITY_DELETE",
         "details":null,
         "eventKey":"10f0cc44-45c5-449b-bc0e-0b3358989d07:1701679563047",
         "entity":null,
         "type":null,
         "detail":{
            "typeName":"AtlasGlossary",
            "attributes":{
               "qualifiedName":"Wojd826Y8Iw2iz98XdMuM"
            },
            "guid":"10f0cc44-45c5-449b-bc0e-0b3358989d07",
            "isIncomplete":false,
            "provenanceType":0,
            "status":"DELETED",
            "createdBy":"ekta.varma",
            "updatedBy":"aarshi.arora",
            "createTime":1701678803307,
            "updateTime":1701679563047,
            "version":0,
            "meanings":[
               
            ],
            "deleteHandler":"DEFAULT",
            "proxy":false
         },
         "entityDetail":{
            "typeName":"AtlasGlossary",
            "attributes":{
               
            },
            "guid":"10f0cc44-45c5-449b-bc0e-0b3358989d07",
            "status":"DELETED",
            "isIncomplete":false,
            "createdBy":"ekta.varma",
            "updatedBy":"aarshi.arora",
            "createTime":1701678803307,
            "updateTime":1701692513730
         },
         "headers":{
            "x-atlan-request-id":"18214413-5553-4c51-3d30-5349daac5bd0",
            "x-atlan-via-ui":"true"
         }
      },
      {
         "entityQualifiedName":"Wojd826Y8Iw2iz98XdMuM",
         "typeName":"AtlasGlossary",
         "entityId":"10f0cc44-45c5-449b-bc0e-0b3358989d07",
         "timestamp":1701678803307,
         "created":1701678803823,
         "user":"ekta.varma",
         "action":"ENTITY_CREATE",
         "details":null,
         "eventKey":"10f0cc44-45c5-449b-bc0e-0b3358989d07:1701678803307",
         "entity":null,
         "type":null,
         "detail":{
            "typeName":"AtlasGlossary",
            "attributes":{
               "popularityScore":1.17549435E-38,
               "assetMcMonitorNames":[
                  
               ],
               "lastSyncRunAt":0,
               "__hasLineage":false,
               "sourceQueryComputeCostRecordList":[
                  
               ],
               "assetSodaLastSyncRunAt":0,
               "starredCount":0,
               "adminUsers":[
                  
               ],
               "lastRowChangedAt":0,
               "sourceReadRecentUserList":[
                  
               ],
               "assetMcIncidentQualifiedNames":[
                  
               ],
               "assetMcIncidentTypes":[
                  
               ],
               "assetSodaLastScanAt":0,
               "sourceUpdatedAt":0,
               "assetDbtJobLastRunArtifactsSaved":false,
               "starredDetailsList":[
                  
               ],
               "isEditable":true,
               "sourceReadCount":0,
               "announcementUpdatedAt":0,
               "sourceCreatedAt":0,
               "assetDbtJobLastRunDequedAt":0,
               "assetDbtTags":[
                  
               ],
               "sourceReadSlowQueryRecordList":[
                  
               ],
               "qualifiedName":"Wojd826Y8Iw2iz98XdMuM",
               "sourceQueryComputeCostList":[
                  
               ],
               "assetDbtJobLastRunNotificationsSent":false,
               "assetMcMonitorTypes":[
                  
               ],
               "assetSodaCheckCount":0,
               "assetMcMonitorStatuses":[
                  
               ],
               "starredBy":[
                  
               ],
               "sourceLastReadAt":0,
               "name":"test",
               "certificateUpdatedAt":1701678803307,
               "assetMcIncidentSeverities":[
                  
               ],
               "sourceReadQueryCost":0.0,
               "ownerUsers":[
                  "ekta.varma"
               ],
               "certificateStatus":"DRAFT",
               "assetDbtJobLastRunHasSourcesGenerated":false,
               "assetMcIncidentSubTypes":[
                  
               ],
               "isAIGenerated":false,
               "assetDbtJobLastRunHasDocsGenerated":false,
               "assetTags":[
                  
               ],
               "assetMcIncidentStates":[
                  
               ],
               "assetDbtJobLastRunUpdatedAt":0,
               "ownerGroups":[
                  
               ],
               "certificateUpdatedBy":"ekta.varma",
               "assetMcMonitorQualifiedNames":[
                  
               ],
               "sourceReadExpensiveQueryRecordList":[
                  
               ],
               "assetDbtJobLastRunStartedAt":0,
               "isDiscoverable":true,
               "isPartial":false,
               "sourceReadTopUserRecordList":[
                  
               ],
               "assetMcMonitorScheduleTypes":[
                  
               ],
               "viewerUsers":[
                  
               ],
               "viewScore":1.17549435E-38,
               "sourceReadTopUserList":[
                  
               ],
               "assetMcIncidentNames":[
                  
               ],
               "userDescription":"",
               "adminRoles":[
                  
               ],
               "adminGroups":[
                  
               ],
               "assetDbtJobLastRunCreatedAt":0,
               "assetDbtJobNextRun":0,
               "sourceReadRecentUserRecordList":[
                  
               ],
               "assetIcon":"atlanGlossary",
               "sourceReadPopularQueryRecordList":[
                  
               ],
               "sourceTotalCost":0.0,
               "assetMcLastSyncRunAt":0,
               "sourceReadUserCount":0,
               "viewerGroups":[
                  
               ],
               "assetDbtJobLastRun":0
            },
            "guid":"10f0cc44-45c5-449b-bc0e-0b3358989d07",
            "isIncomplete":false,
            "provenanceType":0,
            "createdBy":"ekta.varma",
            "updatedBy":"ekta.varma",
            "createTime":1701678803307,
            "updateTime":1701678803307,
            "version":0,
            "classifications":[
               
            ],
            "proxy":false
         },
         "entityDetail":{
            "typeName":"AtlasGlossary",
            "attributes":{
               
            },
            "guid":"10f0cc44-45c5-449b-bc0e-0b3358989d07",
            "status":"DELETED",
            "isIncomplete":false,
            "createdBy":"ekta.varma",
            "updatedBy":"aarshi.arora",
            "createTime":1701678803307,
            "updateTime":1701692513730
         },
         "headers":{
            "x-atlan-request-id":"c4977a17-2d96-4264-38ff-4c6509b299f6",
            "x-atlan-via-ui":"true"
         }
      }
   ],
   "aggregations":null,
   "count":2,
   "totalCount":2
}

@aarshi0301 aarshi0301 changed the title Hotfix/arshi/plt 373 PLT-373 : Fix updateBy field in deleteEvent Dec 4, 2023
@aarshi0301 aarshi0301 changed the title PLT-373 : Fix updateBy field in deleteEvent PLT-373 : Fix updateBy field in deleteEntityEvent Dec 4, 2023
@aarshi0301 aarshi0301 assigned n5nk and checkaayush and unassigned checkaayush and n5nk Dec 4, 2023
@aarshi0301 aarshi0301 self-assigned this Dec 4, 2023
@aarshi0301 aarshi0301 merged commit d8486bb into staging Dec 4, 2023
8 checks passed
@sumandas0 sumandas0 deleted the hotfix/arshi/PLT-373 branch December 6, 2023 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants