emory-libraries / OpenEmory

open-access repository for scholarly articles, based on Fedora Commons
open.library.emory.edu
2 stars 2 forks source link

Test using Bulkrax to create works (ActiveFedora) in Fedora 6 #198

Closed eporter23 closed 1 year ago

eporter23 commented 1 year ago

Configure a basic Bulkrax CSV importer that supports:

We will try to use as many default options as possible to reduce complexity for prototyping.

We may also want to look at #199 to ensure that if we run an import, we can generate thumbnails.

eporter23 commented 1 year ago

@bwatson78 added some basic specs to this ticket but we can revise as needed

bwatson78 commented 1 year ago

PR ready for review: https://github.com/emory-libraries/fedora6-hyrax-prototype/pull/15

bwatson78 commented 1 year ago

The above PR has been merged and deployed, and these are some observations so far:

Error: Ldp::NotFound - Error: Path /prod/34/e8/fc/62/34e8fc62-0194-40e9-b2a7-afc125f0c34c not found

Error Trace:

/opt/sandbox/shared/bundle/ruby/3.1.0/gems/ldp-1.2.0/lib/ldp/client/methods.rb:119:in `block in check_for_errors'

:90:in `tap' /opt/sandbox/shared/bundle/ruby/3.1.0/gems/ldp-1.2.0/lib/ldp/client/methods.rb:117:in `check_for_errors' /opt/sandbox/shared/bundle/ruby/3.1.0/gems/ldp-1.2.0/lib/ldp/client/methods.rb:82:in `block in post' /opt/sandbox/shared/bundle/ruby/3.1.0/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:205:in `instrument' /opt/sandbox/shared/bundle/ruby/3.1.0/gems/ldp-1.2.0/lib/ldp.rb:43:in `instrument' /opt/sandbox/shared/bundle/ruby/3.1.0/gems/ldp-1.2.0/lib/ldp/client/methods.rb:74:in `post' /opt/sandbox/shared/bundle/ruby/3.1.0/bundler/gems/active_fedora-3a8ff7b0384d/lib/active_fedora/caching_connection.rb:19:in `post' /usr/local/rbenv/versions/3.1.2/lib/ruby/3.1.0/delegate.rb:87:in `method_missing' ``` I looked that object up in Fedora6 and found it did exist, but it was not stored in a pairtree structure--it was stored in root. I'm reaching out now in Samvera's Slack to see if this is the new normal for just `Hydra::AccessControl` objects, but not all others.
bwatson78 commented 1 year ago

Proof of Hydra::AccessControl: http://10.65.19.21:8080/fcrepo-webapp-6.4.0/rest/prod/34e8fc62-0194-40e9-b2a7-afc125f0c34c

Screenshot 2023-07-31 at 3.21.54 PM.png

bwatson78 commented 1 year ago

Further Findings: The FileSets created by the Importer are fully-formed and persisted, but two associated processes (fileset associating to work, and work associating to collection) do not happen, and they both exist within the same Bulkrax Job: https://github.com/samvera-labs/bulkrax/blob/817e4bb826260c2b402f730e7696dd90027f0c0c/app/jobs/bulkrax/create_relationships_job.rb#L149 My suspicion is that it's erring on that line above. That's where the current user's ability is tested and where a Hydra::AccessControl would come into play in this situation. I'm now digging through logs to confirm this.

bwatson78 commented 1 year ago

Also, I have been able to run both processes from rails console, and the associations occur. The only error that occurs is tied to the expectation of HydraRolesManagement being installed.

I've also found that 500s occur whenever I attempt to edit FileSets.

eporter23 commented 1 year ago

@bwatson78 I was able to create a work and metadata successfully, and as expected the FileSets failed to attach. I did try to deposit into the OpenEmory Test Collection, but that association didn't seem to get assigned: https://sandbox3.libraries.emory.edu/concern/generic_works/1v53jw96n?locale=en

https://sandbox3.libraries.emory.edu/importers/3?locale=en