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

Migration of a work to Valkyrie causes workflow issues #7028

Open
5 tasks
laritakr opened this issue Feb 21, 2025 · 0 comments
Open
5 tasks

Migration of a work to Valkyrie causes workflow issues #7028

laritakr opened this issue Feb 21, 2025 · 0 comments
Labels

Comments

@laritakr
Copy link
Contributor

laritakr commented Feb 21, 2025

The Problem

When using lazy migration, Sipity is unable to find the Entity for the solr document correctly. This causes numerous problems... submissions list to approve don't show all the entries, the works don't show the workflow widgets, etc.

The solr document has code to find the resource model if using lazy migration. However this causes a problem finding the sipity entity, because works with non-valkyrie models can't find the sipity entity when using the new resource models.

The sipity entity is found by searching column proxy_for_global_id, and this needs to be the model of the actual work rather than the resource model found from the solr document.

This doesn't seem like it is just a lazy migration issue... when any work is migrated, the sipity entity would build a different proxy_for_global_id than what was stored in the Sipity::Entity table.

Proposed Solution

The solution will be implemented in Hyku, overriding the necessary Hyrax locations, and linking to this ticket so the fixes can be pulled into Hyrax at a later point. Known tasks include:

Handle the solr document case in sipity.rb for the lazy migration setting

In the case of using lazy migration variable but works that are not yet migrated, the solr document returns the wrong model. The suggested code below uses the actual work itself rather than the solr document.

 when SolrDocument
   Hyrax.logger.debug("Entity() got a SolrDocument, retrying on #{input.to_model}")
   if Hyrax.config.valkyrie_transition? # we need the actual item, not the mapped model
     item = Hyrax.query_service.find_by(id: input.id)
     Entity(item)
   else
     Entity(input.to_model)
   end 

Migrate the Sipity Entity's proxy_for_global_id

When a work is migrated, the link to sipity also needs to be migrated.

Testing

Test to ensure normal functionality of all workflow processing

  • Ensure the ability to find the sipity entity for all situations as defined in sipity.rb
  • Ensure the ability to find the work FROM the sipity entity
  • Ensure that the submission review page shows all works needing review
  • Ensure that any work shows the widget with the appropriate workflow actions.
  • Ensure appropriate behavior of all workflow functions through the app

Prior work to port to Hyrax main

in Hyrax branch main_before_rails_72 #7039
Hyrax overrides in Hyku: samvera/hyku#2471
Don't run sipity job multiple times if no Fedora record f4e2df7

@laritakr laritakr self-assigned this Feb 21, 2025
@laritakr laritakr removed their assignment Feb 21, 2025
@laritakr laritakr added the bug label Feb 21, 2025
@laritakr laritakr changed the title Lazy migration causes workflow issues Migration from ActiveFedora to Valkyrie causes workflow issues Feb 21, 2025
@laritakr laritakr changed the title Migration from ActiveFedora to Valkyrie causes workflow issues Migration a work to Valkyrie causes workflow issues Feb 21, 2025
@laritakr laritakr changed the title Migration a work to Valkyrie causes workflow issues Migration of a work to Valkyrie causes workflow issues Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant