Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better model resolution for wings #4358

Merged
merged 1 commit into from
Jun 12, 2020
Merged

Better model resolution for wings #4358

merged 1 commit into from
Jun 12, 2020

Conversation

no-reply
Copy link
Contributor

@no-reply no-reply commented Jun 8, 2020

since we introduced proper handling for valkyrie models without AF equivalents,
we've been casting Valkyrie models to DefaultWork directly in the
ActiveFedoraConverter. this is a bit fragile, since anything that looks them
up (like the Wings::WorkSearchBuilder), is going to miss in the registry,
leaking nil about where folks might see it! instead, let the registry handle
resolution to the appropriate class even in case of misses.

this points to a further refactor, extracting (and probably renaming)
DefaultWork from Wings::ActiveFedoraConverter, since it's no longer (and
never really was) neatly encapsulated there.

this fixes an intermittent failure in the test suite.

@samvera/hyrax-code-reviewers

@no-reply no-reply force-pushed the better-model-resolution branch 2 times, most recently from 81f57ee to e010702 Compare June 8, 2020 20:46
@no-reply no-reply added the wings label Jun 8, 2020
@no-reply no-reply force-pushed the better-model-resolution branch 2 times, most recently from a65bf02 to a611662 Compare June 12, 2020 16:20
@no-reply no-reply requested a review from jeremyf June 12, 2020 16:21
jeremyf
jeremyf previously approved these changes Jun 12, 2020
since we introduced proper handling for valkyrie models without AF equivalents,
we've been casting Valkyrie models to `DefaultWork` directly in the
`ActiveFedoraConverter`. this is a bit fragile, since anything that looks them
up (like the `Wings::WorkSearchBuilder`), is going to miss in the registry,
leaking `nil` about where folks might see it! instead, let the registry handle
resolution to the appropriate class even in case of misses.

this points to a further refactor, extracting (and probably renaming)
`DefaultWork` from `Wings::ActiveFedoraConverter`, since it's no longer (and
never really was) neatly encapsulated there.

this fixes an intermittent failure in the test suite.
@no-reply no-reply merged commit 5a4802f into master Jun 12, 2020
@no-reply no-reply deleted the better-model-resolution branch June 12, 2020 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants