Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

desc_metadata_indexer: avoid error when genre value is nil #886

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

ndushay
Copy link
Contributor

@ndushay ndushay commented Aug 8, 2022

Why was this change made? 🤔

To address https://app.honeybadger.io/projects/49898/faults/87288421

While we don't want Cocina to have genres that have no value, we also don't want dor_indexing_app to blow up when it is sent them. This change will simply not try to capitalize a genre that lacks a value.

@arcadiafalcone not sure how to re-index all the affected items ...

How was this change tested? 🤨

⚡ ⚠ If this change has cross service impact, run integration tests that exercise indexing (e.g. searches in Argo for newly created/updated items, access_indexing_spec) and/or test in [stage|qa] environment, in addition to specs. ⚡

@ndushay
Copy link
Contributor Author

ndushay commented Aug 8, 2022

tagging @arcadiafalcone to make sure she's okay wth this. Seems like a new error probably for one set of objects ...

Copy link
Contributor

@jcoyne jcoyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a test that demonstrates how this change fixes the problem?

@arcadiafalcone
Copy link
Collaborator

@ndushay This error is possible when creating cocina without routing through MODS first. This also relates to the conversation about requiring certain properties in validation to catch orphan attributes without a corresponding value or value-equivalent property, which would be a more comprehensive way of addressing the issue.

Slack thread from when this was done for subject: https://stanfordlib.slack.com/archives/C09M7P91R/p1659439518438329

@ndushay
Copy link
Contributor Author

ndushay commented Aug 10, 2022

@jcoyne test added.

@arcadiafalcone I'll assume you'll make a ticket or whatever to address this problem with validation.

@ndushay
Copy link
Contributor Author

ndushay commented Aug 10, 2022

@arcadiafalcone also assume you or someone will reindex all the affected items? (fewer than 30, I think, per honeybadger alert.)

@arcadiafalcone
Copy link
Collaborator

Ticket for the general issue is here: sul-dlss/cocina-models#510

@arcadiafalcone
Copy link
Collaborator

I've added required property lists to sul-dlss/cocina-models#510.

@ndushay ndushay merged commit c2c63cb into main Aug 12, 2022
@ndushay ndushay deleted the ndushay-patch-1 branch August 12, 2022 18:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants