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

🐛 Fix FileSet csv rows for AF imports #954

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

kirkkwang
Copy link
Contributor

@kirkkwang kirkkwang commented May 10, 2024

Summary

This commit will fix the functionality for adding a FileSet row in the CSV to add additional metadata to FileSets. The problem was located in Bulkrax::ObjectFactory#create_file_set. When it tries to find a record, it actually comes back as a FalseClass because of the new logic introduced recently which breaks further down. If we add raise an error in our Bulkrax::ImportFileSetJob#find_parent_record which is at a higher point than before, then we can requeue the job and check again. If the parent record is created by then, we will execute the rest of the job.

Issue:

Screenshots

image

image

Testing Instructions

This fix was made in the PALs repo, here is the CSV used:
pals-with-file-row.zip

This commit will fix the functionality for adding a FileSet row in the
CSV to add additional metadata to FileSets.  The problem was located in
`Bulkrax::ObjectFactory#create_file_set`.  When it tries to find a
record, it actually comes back as a `FalseClass` because of the new
logic introduced recently which breaks further down.  If we add raise an
error in our `Bulkrax::ImportFileSetJob#find_parent_record` which is at
a higher point than before, then we can requeue the job and check again.
If the parent record is created by then, we will execute the rest of the
job.
@kirkkwang kirkkwang added the patch-ver for release notes label May 10, 2024
@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented May 10, 2024

Relevant ticket: scientist-softserv/hykuup_knapsack#216

@kirkkwang could you attach the sample csv for QA purposes?

@kirkkwang kirkkwang merged commit 0de8ee0 into main May 10, 2024
7 checks passed
@kirkkwang kirkkwang deleted the fix-file-set-rows-for-af branch May 10, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants