AtoM attempts to copy missing digital object and fails on csv:import
|Target version:||Release 2.5.0|
|Google Code Legacy ID:||Tested version:||2.3, 2.4|
1. Attempt to run csv:import task on a CSV that contains a digitalObjectPath column
2. digitalObjectPath values refer to file paths that don't exist
Result: Various "File write to /home/user/workspace/atom/uploads/r/TEST/////TEST.jpg failed. See setting directory and file permissions documentation." errors indicating we're trying to copy an asset (and its blank checksum hence the ///// issue) that doesn't exist to our uploads folder.
Note that in the cases I tested despite the bug, it didn't actually affect the end results of the csv import (just didn't link the missing digital objects). It still shouldn't be attempting to copy non-existent files though; there could be another code path where this breaks things worse.
Expected result: A warning about the digital object path not existing, and to ignore the column for that row.
#8 Updated by Dan Gillean over 4 years ago
- File fake-DO-path-test.csv added
- Status changed from QA/Review to Feedback
- Assignee changed from Dan Gillean to Mike Gale
My import worked, but there was nothing in the job output giving a warning about the fake DO path I used. Attaching my test CSV. I imported via the user interface, not the CLI, but expected the job details page to include any warning that would have been shown in the console. Here's the output:
[info] [2018-01-25 14:01:06] Job 2003034 "arFileImportJob": Job started. [info] [2018-01-25 14:01:06] Job 2003034 "arFileImportJob": Importing CSV file: fake-DO-path-test.csv. [info] [2018-01-25 14:01:06] Job 2003034 "arFileImportJob": Indexing imported records. [info] [2018-01-25 14:01:06] Job 2003034 "arFileImportJob": Update type: import-as-new [info] [2018-01-25 14:01:09] Job 2003034 "arFileImportJob": php '/usr/share/nginx/atom/symfony' 'csv:import' --index --quiet --source-name='fake-DO-path-test.csv' '/usr/share/nginx/atom/uploads/tmp/TMP41dacf2a' [info] [2018-01-25 14:01:09] Job 2003034 "arFileImportJob": Import complete. [info] [2018-01-25 14:01:09] Job 2003034 "arFileImportJob": Job finished.
Should I consider this the correct behavior, or should there in fact have been a warning?