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

Bring dspace-oai Spring configuration / service handling in line with other modules #8432

Open
kshepherd opened this issue Jul 27, 2022 · 1 comment
Labels
code task Code cleanup task interface: OAI-PMH Related to the OAI-PMH interface (dspace-oai module) needs discussion Ticket or PR needs discussion before it can be moved forward. new feature

Comments

@kshepherd
Copy link
Member

While trying to find a good way to use a mock OAI Solr core for integration testing, I realised how differently the dspace-oai module uses spring compared to other modules. Something that seemed like it should be relatively simple (define a mock OAI solr core/service in solr-services.xml which will be autowired in place of the usual http service) ended up getting quite tricky to pull apart and plan.

See: org.dspace.app.xoai.BasicConfiguration, the resolvers, and usage in other classes.

This issue might be closely related to #8112 (dependency injection issues)
cc: @mwoodiupui

Solutions?
I wanted to open this ticket to discuss possible solutions... I think a refactor to bring dspace-oai closer to how the rest of the codebase works will make things easier for developers in general.

  • Application context (See dspace-oai can't inject dependencies from dspace-api #8112) - remove this idea entirely?
  • Load the BasicConfiguration info needed to run core OAI services from spring XML instead of a compiled class
  • Refactor code to use a Solr Service like discovery, statistics, authority and get rid of the 'Solr Resolver'
  • There are likely other things that can be moved to beans defined / referenced in XML and simplify configuration loading in the dspace-oai endpoint code
  • Anything else?
@kshepherd kshepherd added new feature needs triage New issue needs triage and/or scheduling labels Jul 27, 2022
@tdonohue tdonohue added code task Code cleanup task needs discussion Ticket or PR needs discussion before it can be moved forward. interface: OAI-PMH Related to the OAI-PMH interface (dspace-oai module) and removed needs triage New issue needs triage and/or scheduling labels Aug 23, 2022
@tdonohue tdonohue moved this from Triage to Unscheduled Backlog in DSpace Backlog (OLD - Migrated, see note above) Oct 17, 2022
@mwoodiupui
Copy link
Member

Much of this sounds like the way I wanted to address #8112. I've long thought that "configuration classes" are a weird notion anyway, and here this makes it a lot harder to do simple normal things. +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code task Code cleanup task interface: OAI-PMH Related to the OAI-PMH interface (dspace-oai module) needs discussion Ticket or PR needs discussion before it can be moved forward. new feature
Projects
Status: 👀 Needs Discussion / Analysis
Development

No branches or pull requests

3 participants