OpenConceptLab / ocl_issues

Issues for all OCL repos. NOTE: Install ZenHub Browser Extension and request access to the OCL Roadmap board to view all issues and to contribute
4 stars 1 forks source link

[Checksums] Test Import (using CIEL) with duplicate resources #1844

Closed snyaggarwal closed 2 weeks ago

snyaggarwal commented 1 month ago

This ticket is a followup on #1746.

Goal is to test duplicate resources should not get created from import using checksums.

Tasks:

snyaggarwal commented 1 month ago

Test 1: Same content upload should not create any new/duplicate resource versions - PASS

Import v2023-07-12 again and should not create any new concepts/mappings versions.

Result:

Test 2.a: New content upload should not create any changed resource versions only and should tally up with $compare results - PASS

Import v2023-09-11 should create few concepts/mappings versions and skip unchanged. This should match with $compare results

Result:

Test 2.b: $compare results should match with duplicate resources and without. - PASS

Staging has v2023-09-11 and v2023-07-12 generated with duplicate resources while QA without duplicate. $compare results should match:

Results from $compare in Staging --

{
    "version1": {
      "uri": "/orgs/CIEL/sources/CIEL/v2023-09-11/",
      "concepts": 54298,
      "mappings": 228092
    },
    "version2": {
      "uri": "/orgs/CIEL/sources/CIEL/v2023-07-12/",
      "concepts": 54141,
      "mappings": 227463
    },
    "diff": {
      "concepts": {
        "new": 158,
        "removed": 0,
        "changed_total": 95,
        "changed_retired": 1,
        "changed_major": 51,
        "changed_minor": 43
      },
      "mappings": {
        "new": 655,
        "removed": 0,
        "changed_total": 52,
        "changed_retired": 26,
        "changed_major": 0,
        "changed_minor": 26
      }
    }
  }

full $changelog - https://json.link/8tCtP4hmNd.json

bmamlin commented 1 month ago

FWIW, here's the diff my script created for CIEL v2023-09-11. Changes appear to match your findings (noting that I'm inferring and manually retiring mappings before bulk imports, so without that step QA is going to have some extra mappings compared to the actual content).