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

🐛 Rerun importer causes error #210

Closed
1 task
ShanaLMoore opened this issue Jan 27, 2025 · 2 comments
Closed
1 task

🐛 Rerun importer causes error #210

ShanaLMoore opened this issue Jan 27, 2025 · 2 comments
Assignees

Comments

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Jan 27, 2025

Summary

Behavior observed here

When a user tried to re run a single bulkrax importer entry, it fails instantly with a Standard Error that says "CSV path empty"

Acceptance Criteria

  • A user should be able to re run a single entry without errors

Screenshots or Video

Image

Testing Instructions

On staging, login go navigate to /importers
Click on an importer with failures
Find an entry and click the re run button on its row
Verify it doesn't error out with Standard Error that says "CSV path empty"

go back to /importers
click on an importer that succeeded
Find an entry and click the re run button
Verify it doesn't error out with Standard Error that says "CSV path empty"
Once complete, verify the record did not attach duplicate files

Notes

@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Jan 27, 2025

file_for_import => nil on this line

PR started: https://github.com/samvera/bulkrax/pull/1012/files

However locally another error shows with this 'quick fix':

Image

@kirkkwang kirkkwang self-assigned this Jan 27, 2025
kirkkwang added a commit to samvera/bulkrax that referenced this issue Jan 28, 2025
Previously, when rerunning an entry that came from a zip file, the rerun
would fail because it would look for the CSV in an assumed location
which is based on it's last importer ID.  Since this was a rerun, it
does not do an unzip into the assumed location so the directory does not
exist.

This commit will first check if the assumed location exists, and if not,
it will look for the location of the last unizpped files and use that
for the rerun.

This does cause an interesting behavior where if the entry is a work
with a file attached, it will add the file again resulting in duplicate
files.  I feel this is such an edge case though because typically if the
entry is successful, the user will not rerun it.  I added a hint text to
the importer to let the user know this is a possibility.

Ref:
- notch8/palni_palci_knapsack#210
kirkkwang added a commit to samvera/bulkrax that referenced this issue Jan 28, 2025
Previously, when rerunning an entry that came from a zip file, the rerun
would fail because it would look for the CSV in an assumed location
which is based on it's last importer ID.  Since this was a rerun, it
does not do an unzip into the assumed location so the directory does not
exist.

This commit will first check if the assumed location exists, and if not,
it will look for the location of the last unizpped files and use that
for the rerun.

This does cause an interesting behavior where if the entry is a work
with a file attached, it will add the file again resulting in duplicate
files.  I feel this is such an edge case though because typically if the
entry is successful, the user will not rerun it.  I added a hint text to
the importer to let the user know this is a possibility.

Ref:
- notch8/palni_palci_knapsack#210
kirkkwang added a commit to samvera/bulkrax that referenced this issue Jan 29, 2025
Previously, when rerunning an entry that came from a zip file, the rerun
would fail because it would look for the CSV in an assumed location
which is based on it's last importer ID.  Since this was a rerun, it
does not do an unzip into the assumed location so the directory does not
exist.

This commit will first check if the assumed location exists, and if not,
it will look for the location of the last unizpped files and use that
for the rerun.

This does cause an interesting behavior where if the entry is a work
with a file attached, it will add the file again resulting in duplicate
files.  I feel this is such an edge case though because typically if the
entry is successful, the user will not rerun it.  I added a hint text to
the importer to let the user know this is a possibility.

Ref:
- notch8/palni_palci_knapsack#210
kirkkwang added a commit to samvera/bulkrax that referenced this issue Jan 29, 2025
Previously, when rerunning an entry that came from a zip file, the rerun
would fail because it would look for the CSV in an assumed location
which is based on it's last importer ID.  Since this was a rerun, it
does not do an unzip into the assumed location so the directory does not
exist.

This commit will first check if the assumed location exists, and if not,
it will look for the location of the last unizpped files and use that
for the rerun.

Ref:
- notch8/palni_palci_knapsack#210
kirkkwang added a commit to samvera/bulkrax that referenced this issue Jan 29, 2025
Previously, when rerunning an entry that came from a zip file, the rerun
would fail because it would look for the CSV in an assumed location
which is based on it's last importer ID.  Since this was a rerun, it
does not do an unzip into the assumed location so the directory does not
exist.

This commit will first check if the assumed location exists, and if not,
it will look for the location of the last unizpped files and use that
for the rerun.

Ref:
- notch8/palni_palci_knapsack#210
kirkkwang added a commit to samvera/hyku that referenced this issue Jan 29, 2025
This commit will bring in a fix for reruning Bulkrax entries

Ref:
- samvera/bulkrax#1013
- notch8/palni_palci_knapsack#210
kirkkwang added a commit that referenced this issue Jan 29, 2025
This commit will update the Hyku submodule to bring in the latest fix
for a Bulkrax bug for rerunning entries from zips.

Ref:
- samvera/bulkrax#1013
- #210
@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Jan 29, 2025

QA RESULTS: ✅ PASS

tested on STAGING

**NOTE: ⚠ Test passes if CSV path emtpy errors are no longer present - the entry still may fail for other reasons but at least it was able to re run which is what this bug is about **

Previously failed entry

build option

ref: https://demo.palni-palci-staging.notch8.cloud/importers/33?locale=en

  • A user should be able to re run a single entry without CSV path emtpy errors
    ✅ ⚠ Error: StandardError - failed_validation - Keyword can't be blank,Resource type can't be blank

remove and then build option

ref: https://demo.palni-palci-staging.notch8.cloud/importers/34?locale=en

  • A user should be able to re run a single entry without CSV path emtpy errors
    ✅ Succeeded on the re run

Previously successful entry

build option

  • A user should be able to re run a single entry without CSV path emtpy errors
  • Attached files will not be duplicated

ref: https://demo.palni-palci-staging.notch8.cloud/importers/42?locale=en

remove and then build option

  • A user should be able to re run a single entry without CSV path emtpy errors

ref: https://demo.palni-palci-staging.notch8.cloud/importers/42?locale=en

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

2 participants