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

🐛 [I951] false object import bug #952

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

ShanaLMoore
Copy link
Contributor

@ShanaLMoore ShanaLMoore commented Apr 19, 2024

Summary

ActiveFedora based applications were unable to import works when they upgraded to v8.0.0 (the first Bulkrax version that supports valkyrie)

Issue:

BEFORE

image (61)

AFTER (successful import + re running of the importer)

Screenshot 2024-04-19 at 16-51-20 Show Entry __ Hyku Commons

Screenshot 2024-04-19 at 16-51-31 An Image

Sample testing files

af-embargo-test.zip

Shana Moore added 2 commits April 19, 2024 16:30
Imports were failing for active fedora applications because ordered_memebers is an undefined method for FalseClass. object gets assigned by #find, which intentionally returns false for new objects; we can't find something that doesn't exist.

Issue:
- #951
@ShanaLMoore ShanaLMoore added patch-ver for release notes bug-fix labels Apr 19, 2024
ContentUpdateEventJob would fail and retry over and over again. This is because we were passing it a nil user.

Similar issue (previously fixed):
- #656
@ShanaLMoore ShanaLMoore changed the title I951 false object bug 🐛 [I951] false object import bug Apr 20, 2024
@@ -119,7 +121,7 @@ def import_files_filenames
def destroy_existing_files
return unless object.present? && object.file_sets.present?
object.file_sets.each do |fs|
Hyrax::Actors::FileSetActor.new(fs, @user).destroy
Hyrax::Actors::FileSetActor.new(fs, user).destroy
Copy link
Contributor Author

@ShanaLMoore ShanaLMoore Apr 20, 2024

Choose a reason for hiding this comment

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

This fixes the issue seen in the screenshot. see: user
192014253-d586a10b-f36a-4080-a507-7668164696ad

@kerchner
Copy link
Contributor

kerchner commented Apr 21, 2024

I've tested this branch in combination with our app which is currently built on Hyrax 3.6.0 (branch here) using a Bulkrax CSV importer as attached. This successfully imported whereas with Bulkrax 8.0.0 we were getting the stack trace shown in #951
pals-with-files.zip

Unfortunately I'm not familiar enough with the bulkrax code to be able to comment on the code changes, but I'm happy that they work. Thank you @ShanaLMoore !

@ShanaLMoore ShanaLMoore merged commit bf7bc5c into main Apr 22, 2024
6 checks passed
@ShanaLMoore ShanaLMoore deleted the i951-false-object-bug branch April 22, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants