sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

add validator for languageTerm of type code with no authority, or no authority matching iso-639* #677

Closed ndushay closed 9 months ago

ndushay commented 9 months ago

motived by https://app.honeybadger.io/projects/50568/faults/103801039

image

I did PR sul-dlss/mods/pull/59 to silence this in the MODS gem, which is the wrong approach.

JLitt suggested in slack: "write a validator, then run validation with a cocina gem branch and see what fails. Avoids the need for a report."

The work for this ticket is

arcadiafalcone commented 9 months ago

We also use the code list rfc5646, and there are probably still some with marclanguage floating around in our data. Those are the ones I know are in use, but everything on this list is valid: https://www.loc.gov/standards/sourcelist/language.html. So the validation should either check for all of those codes or not check the code value.

peetucket commented 9 months ago

Example druid with issue from HB:

{"identifier" => "druid:dv940wx4544"}
ndushay commented 9 months ago

I believe the problem was actually that dor-services-app had stanford-mods pinned to version 2.6; version 3.3.9 does NOT give this error for sw_language_facet.

sul-dlss/dor-services-app/pull/4689 addresses this and has been deployed to prod

I'm closing this. If we need such a thing, Arcadia will ask for it. :-P