Data:Import doesn't work in the current suite


#1

Hi,

in the current suite i get this error while the command data:import:
Propel\Runtime\Connection\Exception\RollbackException - Exception: Cannot commit because a nested transaction was rolled back
in /data/build/current/vendor/propel/propel/src/Propel/Runtime/Connection/ConnectionWrapper.php (230)

Command: vendor/bin/console data:import -vvv

Trace:
#0 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Dependency/Propel/DataImportToPropelConnectionBridge.php(46): Propel\Runtime\Connection\ConnectionWrapper->commit()
#1 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php(93): Spryker\Zed\DataImport\Dependency\Propel\DataImportToPropelConnectionBridge->endTransaction()
#2 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/DataImportFacade.php(29): Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerTransactionAware->__destruct()
#3 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Communication/Console/DataImportConsole.php(110): Spryker\Zed\DataImport\Business\DataImportFacade->import(Object(Generated\Shared\Transfer\DataImporterConfigurationTransfer))
#4 /data/build/current/vendor/symfony/console/Command/Command.php(251): Spryker\Zed\DataImport\Communication\Console\DataImportConsole->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /data/build/current/vendor/symfony/console/Application.php(964): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /data/build/current/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(Spryker\Zed\DataImport\Communication\Console\DataImportConsole), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /data/build/current/vendor/spryker/console/src/Spryker/Zed/Console/Communication/ConsoleBootstrap.php(150): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /data/build/current/vendor/symfony/console/Application.php(148): Spryker\Zed\Console\Communication\ConsoleBootstrap->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /data/build/current/vendor/spryker/console/bin/console(21): Symfony\Component\Console\Application->run()

Do you have an idea, what the problem could be?


#2

Hi @nxsbertram,

Please pull latest changes, it should be fixed already.

Best regards
Valerii


#3

Hi @tvalerii,

my last deployment to a clear ubuntu machine from https://github.com/spryker-shop/suite.git also runs into this error.

I deploy via ansible:
ASK [spryker_deploy : Deploy Spryker] *****************************************************************************************************************************************************************************************************************************************
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=log:clear)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=cache:empty-all)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=setup:jenkins:disable)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=transfer:generate)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=twig:cache:warmer)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=navigation:build-cache)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=propel:config:convert)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=propel:schema:copy)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=propel:model:build)

TASK [spryker_deploy : Clean migration files] **********************************************************************************************************************************************************************************************************************************
ok: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com]

TASK [spryker_deploy : Deploy Spryker Part 2] **********************************************************************************************************************************************************************************************************************************
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=propel:diff)
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=propel:migrate)
failed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] (item=data:import) => {“changed”: true, “cmd”: “vendor/bin/console data:import”, “delta”: “0:00:19.237108”, “end”: “2018-09-10 07:44:59.452390”, “item”: “data:import”, “msg”: “non-zero return code”, “rc”: 255, “start”: “2018-09-10 07:44:40.215282”, “stderr”: “”, “stderr_lines”: [], “stdout”: “Store: DE | Environment: development\nStart “full” import\nPropel\Runtime\Connection\Exception\RollbackException - Exception: Cannot commit because a nested transaction was rolled back \nin /data/build/current/vendor/propel/propel/src/Propel/Runtime/Connection/ConnectionWrapper.php (230)\n\nCommand: vendor/bin/console data:import\n\nTrace: \n#0 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Dependency/Propel/DataImportToPropelConnectionBridge.php(46): Propel\Runtime\Connection\ConnectionWrapper->commit()\n#1 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php(93): Spryker\Zed\DataImport\Dependency\Propel\DataImportToPropelConnectionBridge->endTransaction()\n#2 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/DataImportFacade.php(29): Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerTransactionAware->__destruct()\n#3 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Communication/Console/DataImportConsole.php(110): Spryker\Zed\DataImport\Business\DataImportFacade->import(Object(Generated\Shared\Transfer\DataImporterConfigurationTransfer))\n#4 /data/build/current/vendor/symfony/console/Command/Command.php(251): Spryker\Zed\DataImport\Communication\Console\DataImportConsole->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#5 /data/build/current/vendor/symfony/console/Application.php(964): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#6 /data/build/current/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(Spryker\Zed\DataImport\Communication\Console\DataImportConsole), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#7 /data/build/current/vendor/spryker/console/src/Spryker/Zed/Console/Communication/ConsoleBootstrap.php(150): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#8 /data/build/current/vendor/symfony/console/Application.php(148): Spryker\Zed\Console\Communication\ConsoleBootstrap->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))\n#9 /data/build/current/vendor/spryker/console/bin/console(21): Symfony\Component\Console\Application->run()\n#10 {main}”, “stdout_lines”: [“Store: DE | Environment: development”, “Start “full” import”, "Propel\Runtime\Connection\Exception\RollbackException - Exception: Cannot commit because a nested transaction was rolled back ", “in /data/build/current/vendor/propel/propel/src/Propel/Runtime/Connection/ConnectionWrapper.php (230)”, “”, “Command: vendor/bin/console data:import”, “”, "Trace: ", “#0 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Dependency/Propel/DataImportToPropelConnectionBridge.php(46): Propel\Runtime\Connection\ConnectionWrapper->commit()”, “#1 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php(93): Spryker\Zed\DataImport\Dependency\Propel\DataImportToPropelConnectionBridge->endTransaction()”, “#2 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/DataImportFacade.php(29): Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerTransactionAware->__destruct()”, “#3 /data/build/current/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Communication/Console/DataImportConsole.php(110): Spryker\Zed\DataImport\Business\DataImportFacade->import(Object(Generated\Shared\Transfer\DataImporterConfigurationTransfer))”, “#4 /data/build/current/vendor/symfony/console/Command/Command.php(251): Spryker\Zed\DataImport\Communication\Console\DataImportConsole->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))”, “#5 /data/build/current/vendor/symfony/console/Application.php(964): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))”, “#6 /data/build/current/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(Spryker\Zed\DataImport\Communication\Console\DataImportConsole), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))”, “#7 /data/build/current/vendor/spryker/console/src/Spryker/Zed/Console/Communication/ConsoleBootstrap.php(150): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))”, “#8 /data/build/current/vendor/symfony/console/Application.php(148): Spryker\Zed\Console\Communication\ConsoleBootstrap->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))”, “#9 /data/build/current/vendor/spryker/console/bin/console(21): Symfony\Component\Console\Application->run()”, “#10 {main}”]}
changed: [ec2-3-120-115-4.eu-central-1.compute.amazonaws.com] => (item=transfer:generate)

Best regards
Mike


#4

Hi Mike,

It seems like you don’t have next commands that should be executed after propel migrate

vendor/bin/console transfer:generate
vendor/bin/console setup:init-db
vendor/bin/console setup:search

Could you please try to add them into command stack before data:import?

Best regards
Valerii


#5

Ok, i’ve got it working. Thank’s for your help.