-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Describe the bug
When importing, the move-file part does not copy the ok file in the destination folder, breaking import.
Removing all move-file from the config fixes this.
To Reproduce
Steps to reproduce the behavior:
create a clean Mage env with composer
Create var/importexport
copy Pacemaker - Community Console Tool 3.8.53 to bin
Get https://raw.githubusercontent.com/techdivision/import-sample-data/master/generic/data/categories/add-update/category-import_20161024-194026_01.csv
Run ok:
~/dev$ php bin/import-cli-simple.phar import:create:ok-file
|__ | | | | __ () () ()
| | ___ | | | | | | ___ ___ _ ___ _ __
| |/ _ / | _ | | | | \ \ / / / | |/ _ | _
| | / (| | | | || | |\ V /| _ \ | () | | | |
||_|_|| ||/|| _/ ||/|___/|| |_|
Now start import with serial 2e025e12-398d-4012-b6d6-2c6578b01ada [none => create-ok-files]
Successfully executed command import:create:ok-file with serial 2e025e12-398d-4012-b6d6-2c6578b01ada in 00:00:00 s
Run import cat:
php bin/import-cli-simple.phar import:categories
|__ | | | | __ () () ()
| | ___ | | | | | | ___ ___ _ ___ _ __
| |/ _ / | _ | | | | \ \ / / / | |/ _ | _
| | / (| | | | || | |\ V /| _ \ | () | | | |
||_|_|| ||/|| _/ ||/|___/|| |_|
Now start import with serial 6c1e4939-f49e-4e46-b723-00270c9c6af3 [catalog_category => add-update]
[2021-12-05 16:10:08] logger/system.ERROR: TechDivision\Import\Exceptions\ApplicationStoppedException: Stop processing, because can't find the mandatory OK file to process at least one of 1 files in phar:///var/www/dev/bin/import-cli-simple.phar/vendor/techdivision/import-app-simple/src/Simple.php:751
Stack trace:
#0 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/techdivision/import/src/Plugins/SubjectPlugin.php(132): TechDivision\Import\App\Simple->stop('Stop processing...')
#1 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/techdivision/import/src/Plugins/PluginExecutor.php(117): TechDivision\Import\Plugins\SubjectPlugin->process()
#2 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/techdivision/import/src/Modules/PluginModule.php(144): TechDivision\Import\Plugins\PluginExecutor->execute(Object(TechDivision\Import\Configuration\Jms\Configuration\Plugin))
#3 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/techdivision/import-app-simple/src/Simple.php(622): TechDivision\Import\Modules\PluginModule->process()
#4 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/techdivision/import-cli/src/Command/AbstractImportCommand.php(114): TechDivision\Import\App\Simple->process('6c1e4939-f49e-4...')
#5 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/symfony/console/Command/Command.php(255): TechDivision\Import\Cli\Command\AbstractImportCommand->execute(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(TechDivision\Import\Cli\Command\ImportCategoriesCommand), Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 phar:///var/www/dev/bin/import-cli-simple.phar/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 phar:///var/www/dev/bin/import-cli-simple.phar/bootstrap.php(53): Symfony\Component\Console\Application->run(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/dev/bin/import-cli-simple.phar(41): require('phar:///var/www...')
#11 {main} {"serial":"6c1e4939-f49e-4e46-b723-00270c9c6af3","memory_peak_usage":"20 MB"}
[2021-12-05 16:10:08] logger/system.WARNING: Can't finish import with serial 6c1e4939-f49e-4e46-b723-00270c9c6af3 in 0.011563 s {"serial":"6c1e4939-f49e-4e46-b723-00270c9c6af3","memory_peak_usage":"20 MB"}
Stop processing, because can't find the mandatory OK file to process at least one of 1 files
[2021-12-05 16:10:08] logger/system.WARNING: Stop processing, because can't find the mandatory OK file to process at least one of 1 files {"serial":"6c1e4939-f49e-4e46-b723-00270c9c6af3","memory_peak_usage":"20 MB"}
It seems the script copies the CSV file, but not the OK file to the execution path.
PHP 7.2.34-23+020210701.63+debian101.gbpd7cd48
Expected behavior
Import working
Screenshots
Additional context
Add any other context about the problem here.