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

importer tries, fails to create FileSets before Works are persisted (tested in 5.5.1, 7.0.0) #955

Closed
aploshay opened this issue May 14, 2024 · 7 comments

Comments

@aploshay
Copy link
Contributor

aploshay commented May 14, 2024

Behavior occurs running this branch of essi, with bulkrax 5.5.0:

  • on the first run of an importer, all the FileSet imports fail with error:
NoMethodError - undefined method `permissions' for nil:NilClass

which occurs because a nil value is returned for work by find_record called in create_file_set, since apparently the work hasn't been persisted yet. All the work imports do, however, succeed.

  • on the second run of that same importer (running with "Update metadata and replace files"), all the FileSet records do import, because now the parent works are persisted and found.

I've also tested bulkrax 7.0.0 -- the same issue occurs on the first run, but the second run now also fails to import FileSet records.

I'm surprised that it's possible for the Work, FileSet creation sequencing to get flipped around somehow -- any notions of what could be causing this?

@bkiahstroud
Copy link
Contributor

  1. Which parser are you using? CSV, etc.
  2. If CSV, how are the files being imported? Does each FileSet have its own row, or are the files listed in a column on the work's row?

@aploshay
Copy link
Contributor Author

  1. CSV
  2. Each FileSet in its own row -- Method 2

@kirkkwang
Copy link
Contributor

Hi @aploshay, I added this commit which worked for me, however, I'm seeing different results in other applications which could be a configuration issue. Do you mind give main a try?

@bkiahstroud
Copy link
Contributor

This ticket might be related to this other one:

@aploshay
Copy link
Contributor Author

aploshay commented May 30, 2024

Thanks, @kirkkwang! I ran into unrelated problems trying to upgrade from 5.5.1 to main, so I switched tracks to cherry-picking your change in that commit back into 5.5.1 and it's working.

@kirkkwang
Copy link
Contributor

That's great to hear @aploshay ! Do you think we can close this issue now?

@aploshay
Copy link
Contributor Author

aploshay commented Jun 3, 2024

@kirkkwang I believe so, thanks

@aploshay aploshay closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants