M24 - AWS - Patched data records incorrectly soft-deleted when previous legal tag is deleted
We just saw the issue in Shell M22 OSDU environment:
When the data records are patched from the old legal tag to another legal tag and when the old legal tag is deleted from the data platform, the data records are incorrectly soft-deleted.
I reproduced the issue in M24 AWS pre-shipping environment. I have not tested on other CSPs.
Please check and fix it.
Thanks, Dadong
Here are the steps to reproduce it:
(1) create a test legal tag "osdu-dz-test-patch-delete"
(2) create a test data record with the default data groups and the test legal tag:
"kind": "osdu:wks:master-data--Well:1.0.0",
"id": "osdu:master-data--Well:dz-test-patch-delete",
"acl": {
"viewers": [
data.default.viewers@osdu.shell.com
],
"owners": [
data.default.owners@osdu.shell.com
]
},
"legal": {
"legaltags": [
"osdu-dz-test-patch-delete"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
}
(3) check the test data record with Storage api that the data record is associated with the test legal tag:
"legal": {
"legaltags": [
"osdu-dz-test-patch-delete"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
}
(4) patch the test data record from the legal tag "osdu-dz-test-patch-delete" to "osdu-public-usa-dataset":
{
"recordCount": 1,
"recordIds": [
"osdu:master-data--Well:dz-test-patch-delete"
],
"notFoundRecordIds": [],
"unAuthorizedRecordIds": [],
"lockedRecordIds": []
}
(5) check the test data record with Storage api that the data record is associated with the new legal tag:
"legal": {
"legaltags": [
"osdu-public-usa-dataset"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
}
(6) delete the test legal tag "osdu-dz-test-patch-delete"
(7) check the test data record with Storage and Search apis: The data record is gone! (Soft-deleted)