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

Not importing sample data, ok file creation succeeded (Move file issue) #266

Open
styx-tdo opened this issue Dec 5, 2021 · 1 comment
Open

Comments

@styx-tdo
Copy link

styx-tdo commented Dec 5, 2021

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.

@styx-tdo
Copy link
Author

styx-tdo commented Dec 5, 2021

It runs, tells it has copied stuff:

`stat("/var/www/dev/var/importexport/category-import.ok", 0x7fff8eb13670) = -1 ENOENT (No such file or directory)
stat("/var/www/dev/var/importexport/category-import_20161024-194026.ok", {st_mode=S_IFREG|0644, st_size=38, ...}) = 0
stat("/var/www/dev/var/importexport/category-import_20161024-194026_01.ok", 0x7fff8eb13670) = -1 ENOENT (No such file or directory)
stat("/var/www/dev/var/importexport/category-import_20161024-194026.ok", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat("/var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466", 0x7fff8eb13970) = -1 ENOENT (No such file or directory)
stat("/var/www/dev/var/importexport", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[2021-12-05 16:17:59] logger/system.DEBUG: Subject TechDivision\Import\Subjects\MoveFilesSubject successfully updated source directory to /var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466 {"serial":"fd28ddf7-a08b-4a98-8f40-613762b96466","memory_peak_usage":"20 MB"}
[2021-12-05 16:17:59] logger/system.DEBUG: Subject TechDivision\Import\Subjects\MoveFilesSubject successfully updated status data for import fd28ddf7-a08b-4a98-8f40-613762b96466 {"serial":"fd28ddf7-a08b-4a98-8f40-613762b96466","memory_peak_usage":"20 MB"}
[2021-12-05 16:17:59] logger/system.DEBUG: Successfully processed subject "import.subject.move.files" with "1" files)! {"serial":"fd28ddf7-a08b-4a98-8f40-613762b96466","memory_peak_usage":"20 MB"}
stat("/var/www/dev/var/importexport/system.log", {st_mode=S_IFREG|0644, st_size=1841, ...}) = 0
stat("/var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466/system.log", {st_mode=S_IFREG|0644, st_size=1841, ...}) = 0
stat("/var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0

stat("/var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466/category-import.ok", 0x7fff8eb13670) = -1 ENOENT (No such file or directory)
stat("/var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466/category-import_20161024-194026.ok", 0x7fff8eb13670) = -1 ENOENT (No such file or directory)
stat("/var/www/dev/var/importexport/fd28ddf7-a08b-4a98-8f40-613762b96466/category-import_20161024-194026_01.ok", 0x7fff8eb13670) = -1 ENOENT (No such file or directory)`

@styx-tdo styx-tdo changed the title Not importing sample data, ok file creation succeeded Not importing sample data, ok file creation succeeded (Move file issue) Dec 5, 2021
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

1 participant