CDLUC3 / ezid

CDLUC3 ezid
MIT License
10 stars 4 forks source link

[TEST] Verify data fields updated by "link checker update" is updated in OpenSearch #703

Closed jsjiang closed 2 months ago

jsjiang commented 3 months ago

The link checker update job updates the hasIssues and linkIsBroken fields of an identifier in theezidapp_searchIdentifier table. Make sure these updates are reflected in the OpenSearch index as well.

jsjiang commented 3 months ago

How to test:

sfisher commented 3 months ago

Thanks Jing,

I see that there is code to update these values in OpenSearch, also. I'd be curious how you go about testing an item successfully updates values with the link checker.

Maybe we can do something like:

  1. Set some values to their opposite for a few items in the database and opensearch manually for hasIssues and linkIsBroken. I can do this pretty easily.
  2. Run the link checker.
  3. Check after the link checker is done to be sure values have been corrected for the items we changed.

Maybe you can point me toward how to run the link checker on stage where the OpenSearch code is currently running. Is it just a proc- daemon that I can start from cdlsysctl or what is the best way to go about it? Maybe we can just run it overnight and check the next day.

sfisher commented 3 months ago

OK. I've updated 5 items to be set to hasIssues: True and linkIsBroken: True which is the opposite of what they were before. It is these items:

ark:/13030/m5ps2hw4
ark:/88122/kxxw0099
ark:/88122/yjlx0083
ark:/13030/qt601312m8
doi:10.25345/C59R4D

Screenshot 2024-08-13 at 3 14 40 PM

Screenshot 2024-08-13 at 3 31 47 PM

These are the things I put in for the DB and opensearch:

_id: "ark:/13030/m5ps2hw4" OR _id:"ark:/88122/kxxw0099" OR _id:"ark:/88122/yjlx0083" OR _id: "ark:/13030/qt601312m8" OR _id:"doi:10.25345/C59R4D"
IN ("doi:10.25345/C59R4D", "ark:/13030/m5ps2hw4", "ark:/88122/kxxw0099", "ark:/88122/yjlx0083", "ark:/13030/qt601312m8")

Then after we run the linkChecker it should revert these?

sfisher commented 3 months ago

The linkchecker ran last night and tool the steps that re-checked the failures and reset the items with linkIsBroken=1 to linkIsBroken=0 in both the database and in OpenSearch. When it re-checks broken links it also re-checks the hasIssues flag and reset it. (We tried one with just hasIssues=1 and the link checker doesn't seem to recheck these and neither changed in the DB or in OpenSearch).

Screenshot 2024-08-14 at 9 54 15 AM

Screenshot 2024-08-14 at 9 55 48 AM

I believe we can call this working.

adambuttrick commented 2 months ago

Test passed as part of release https://github.com/CDLUC3/ezid/releases/tag/v3.2.19