-
Notifications
You must be signed in to change notification settings - Fork 126
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
Lazy migrate sipity entity with work #7039
Merged
laritakr
merged 1 commit into
main_before_rails_72
from
lazy-migrate-sipity-entity-with-work
Mar 6, 2025
Merged
Lazy migrate sipity entity with work #7039
laritakr
merged 1 commit into
main_before_rails_72
from
lazy-migrate-sipity-entity-with-work
Mar 6, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Results 13 files ±0 13 suites ±0 2h 59m 0s ⏱️ - 1m 11s Results for commit c76132f. ± Comparison against base commit d4b8f81. This pull request removes 368 and adds 368 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
When lazy migration is used, the sipity entity cannot be found for works which are not yet migrated. Valkyrie resources have a `proxy_for_global_id` with the format: `gid://hyku/Hyrax::ValkyrieGlobalIdProxy/2f6da5dd-9314-421f-b0dd-fda84fec9ee3` while prior works used the model name such as: `gid://hyku/GenericWork/2f6da5dd-9314-421f-b0dd-fda84fec9ee3`. This commit introduces a lazy migration of the sipity entity via a job which is submitted after a work is migrated to valkyrie via the Freyja persister. Prior work in pull request samvera/hyku#2471 added some overrides in Hyku to resolve the sipity entity issues. These changes still needs to be backported. The prior work includes these changes: The MigrateResourceService introduced a migration of the entity along with the work's migration. This service is needed for direct migration calls, but is not adequate for lazy migration, as the Freyja persister does not call it for the work itself that was just migrated. Hyku overrides to sipity.rb support cases where the entity is not yet migrated and lazy migration is in use. This is necessary because the solr_document is used to find the Sipity::Entity. Due to the model mapping found in the solr document, the Entity method searches for the entity with the model name. This is problematic when the entity is not yet migrated and the entity is searched with a GenericWorkResource model rather than the model.
be530c4
to
c76132f
Compare
This was referenced Mar 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When lazy migration is used, the sipity entity cannot be found for works
which are not yet migrated. Valkyrie resources have a
proxy_for_global_id
with the format:
gid://hyku/Hyrax::ValkyrieGlobalIdProxy/2f6da5dd-9314-421f-b0dd-fda84fec9ee3
while prior works used the model name such as:
gid://hyku/GenericWork/2f6da5dd-9314-421f-b0dd-fda84fec9ee3
.Description of changes
Fixes notch8/palni_palci_knapsack#247
This commit introduces a lazy migration of the sipity entity via a job
which is submitted after a work is migrated to valkyrie via the Freyja
persister.
Prior work in pull request samvera/hyku#2471
added some overrides in Hyku to resolve the sipity entity issues. These
changes still needs to be backported.
The prior work includes these changes:
The MigrateResourceService introduced a migration of the entity along
with the work's migration. This service is needed for direct migration
calls, but is not adequate for lazy migration, as the Freyja persister
does not call it for the work itself that was just migrated.
Hyku overrides to sipity.rb support cases where the entity is not yet migrated
and lazy migration is in use. This is necessary because the solr_document
is used to find the Sipity::Entity. Due to the model mapping found in the
solr document, the Entity method searches for the entity with the model
name. This is problematic when the entity is not yet migrated and the
entity is searched with a GenericWorkResource model rather than the
model.