AuditTechnicalMetadataFileList: only consider preserved files, touchups for recent data model changes #5048
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why was this change made? 🤔
Dro
, since we've gotten rid of that model (follow on from Refactors AuditTechnicalMetadataFileList to use RepositoryObjects. #5013)part of sul-dlss/technical-metadata-service#515
How was this change tested? 🤨
techmd:generate_for_moab
for a druid in the new result list, and saw it get remediated (job got queued and executed in techMD service, audit detected no error when re-run after that).druid:wy216td0310
on QA, i originally got the resultdruid:wy216td0310: found technical-metadata-service database; inconsistencies with v1 cocina: {"missing_filenames"=>["example.jp2"]}
. but after this change, the non-preservedexample.jp2
was no longer sent to techMD, and the audit then detected no errors for that druid (before this change logs showedauditing {:druid=>"druid:wy216td0310", :file_list=>[{:filename=>"example.tiff", :md5=>"7c35bef13c1fdc201ff0c93a42085bc8"}, {:filename=>"example.jp2", :md5=>"8ff299eda08d7c506273840d52a03bf3"}]}
, and after this change they showedauditing {:druid=>"druid:wy216td0310", :preserved_file_list=>[{:filename=>"example.tiff", :md5=>"7c35bef13c1fdc201ff0c93a42085bc8"}]}
, and logged a response likedruid:wy216td0310: audited technical-metadata-service; response status: 200; response body: {"missing_filenames":[],"unexpected_filenames":[],"mismatched_checksum_file_infos":[]}
).percent complete
messages still show up in the logs⚡ ⚠ If this change has cross service impact, including data writes to shared file systems, run integration tests and/or test in [stage|qa] environment, in addition to specs. ⚡