Closed gwharton closed 1 year ago
Hi @gwharton. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
php bin/magento results in the same exact stack trace. So is this something wrong with all cli commands?
1228bdbc118d:~/magento# php bin/magento -vvv
Magento CLI 2.4.5-p1
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Display help for a command
list List commands
admin
admin:user:create Creates an administrator
i18n
i18n:collect-phrases Discovers phrases in the codebase
i18n:pack Saves language package
info
info:adminuri Displays the Magento Admin URI
info:backups:list Prints list of available backup files
info:currency:list Displays the list of available currencies
info:dependencies:show-framework Shows number of dependencies on Magento framework
info:dependencies:show-modules Shows number of dependencies between modules
info:dependencies:show-modules-circular Shows number of circular dependencies between modules
info:language:list Displays the list of available language locales
info:timezone:list Displays the list of available timezones
module
module:config:status Checks the modules configuration in the 'app/etc/config.php' file and reports if they are up to date or not
module:disable Disables specified modules
module:enable Enables specified modules
module:status Displays status of modules
module:uninstall Uninstalls modules installed by composer
setup
setup:backup Takes backup of Magento Application code base, media and database
setup:config:set Creates or modifies the deployment configuration
setup:db-data:upgrade Installs and upgrades data in the DB
setup:db-schema:upgrade Installs and upgrades the DB schema
setup:db:status Checks if DB schema or data requires upgrade
setup:di:compile Generates DI configuration and all missing classes that can be auto-generated
setup:install Installs the Magento application
setup:performance:generate-fixtures Generates fixtures
setup:rollback Rolls back Magento Application codebase, media and database
setup:static-content:deploy Deploys static view files
setup:store-config:set Installs the store configuration. Deprecated since 2.2.0. Use config:set instead
setup:uninstall Uninstalls the Magento application
setup:upgrade Upgrades the Magento application, DB data, and schema
In Abstract.php line 144:
[Zend_Db_Adapter_Exception (2002)]
SQLSTATE[HY000] [2002] Invalid argument
Exception trace:
at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144
Zend_Db_Adapter_Pdo_Abstract->_connect() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php:111
Zend_Db_Adapter_Pdo_Mysql->_connect() at /home/lubefinder/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:428
Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460
Zend_Db_Adapter_Abstract->query() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:238
Zend_Db_Adapter_Pdo_Abstract->query() at /home/lubefinder/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:564
Magento\Framework\DB\Adapter\Pdo\Mysql->_query() at /home/lubefinder/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:634
Magento\Framework\DB\Adapter\Pdo\Mysql->query() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:737
Zend_Db_Adapter_Abstract->fetchAll() at /home/lubefinder/magento/vendor/magento/module-store/App/Config/Source/RuntimeConfigSource.php:101
Magento\Store\App\Config\Source\RuntimeConfigSource->getEntities() at /home/lubefinder/magento/vendor/magento/module-store/App/Config/Source/RuntimeConfigSource.php:61
Magento\Store\App\Config\Source\RuntimeConfigSource->get() at /home/lubefinder/magento/vendor/magento/framework/App/Config/ConfigSourceAggregated.php:42
Magento\Framework\App\Config\ConfigSourceAggregated->get() at /home/lubefinder/magento/generated/code/Magento/Framework/App/Config/ConfigSourceAggregated/Proxy.php:95
Magento\Framework\App\Config\ConfigSourceAggregated\Proxy->get() at /home/lubefinder/magento/vendor/magento/module-store/App/Config/Type/Scopes.php:63
Magento\Store\App\Config\Type\Scopes->get() at /home/lubefinder/magento/vendor/magento/framework/App/Config.php:132
Magento\Framework\App\Config->get() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreRepository.php:106
Magento\Store\Model\StoreRepository->getById() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreRepository.php:127
Magento\Store\Model\StoreRepository->getActiveStoreById() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreResolver.php:181
Magento\Store\Model\StoreResolver->getDefaultStoreById() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreResolver.php:126
Magento\Store\Model\StoreResolver->getCurrentStoreId() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreManager.php:160
Magento\Store\Model\StoreManager->getStore() at /home/lubefinder/magento/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php:119
Magento\Store\Model\StoreManagerInterface\Proxy->getStore() at /home/lubefinder/magento/vendor/magento/module-store/Model/Resolver/Store.php:30
Magento\Store\Model\Resolver\Store->getScope() at /home/lubefinder/magento/vendor/magento/framework/App/Config/ScopeCodeResolver.php:49
Magento\Framework\App\Config\ScopeCodeResolver->resolve() at /home/lubefinder/magento/vendor/magento/framework/App/Config.php:69
Magento\Framework\App\Config->getValue() at /home/lubefinder/magento/vendor/magento/framework/Locale/Resolver.php:111
Magento\Framework\Locale\Resolver->getDefaultLocale() at /home/lubefinder/magento/vendor/magento/framework/Locale/Resolver.php:129
Magento\Framework\Locale\Resolver->setLocale() at /home/lubefinder/magento/vendor/magento/framework/Locale/Resolver.php:83
Magento\Framework\Locale\Resolver->__construct() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:108
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/ObjectManager.php:56
Magento\Framework\ObjectManager\ObjectManager->create() at /home/lubefinder/magento/vendor/magento/framework/Console/Cli.php:154
Magento\Framework\Console\Cli->getApplicationCommands() at /home/lubefinder/magento/vendor/magento/framework/Console/Cli.php:135
Magento\Framework\Console\Cli->getDefaultCommands() at /home/lubefinder/magento/vendor/symfony/console/Application.php:1286
Symfony\Component\Console\Application->init() at /home/lubefinder/magento/vendor/symfony/console/Application.php:631
Symfony\Component\Console\Application->find() at /home/lubefinder/magento/vendor/symfony/console/Application.php:237
Symfony\Component\Console\Application->doRun() at /home/lubefinder/magento/vendor/magento/framework/Console/Cli.php:116
Magento\Framework\Console\Cli->doRun() at /home/lubefinder/magento/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /home/lubefinder/magento/bin/magento:23
In Abstract.php line 128:
[PDOException (2002)]
SQLSTATE[HY000] [2002] Invalid argument
Exception trace:
at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128
PDO->__construct() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128
Zend_Db_Adapter_Pdo_Abstract->_connect() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php:111
Zend_Db_Adapter_Pdo_Mysql->_connect() at /home/lubefinder/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:428
Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460
Zend_Db_Adapter_Abstract->query() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:238
Zend_Db_Adapter_Pdo_Abstract->query() at /home/lubefinder/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:564
Magento\Framework\DB\Adapter\Pdo\Mysql->_query() at /home/lubefinder/magento/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:634
Magento\Framework\DB\Adapter\Pdo\Mysql->query() at /home/lubefinder/magento/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:737
Zend_Db_Adapter_Abstract->fetchAll() at /home/lubefinder/magento/vendor/magento/module-store/App/Config/Source/RuntimeConfigSource.php:101
Magento\Store\App\Config\Source\RuntimeConfigSource->getEntities() at /home/lubefinder/magento/vendor/magento/module-store/App/Config/Source/RuntimeConfigSource.php:61
Magento\Store\App\Config\Source\RuntimeConfigSource->get() at /home/lubefinder/magento/vendor/magento/framework/App/Config/ConfigSourceAggregated.php:42
Magento\Framework\App\Config\ConfigSourceAggregated->get() at /home/lubefinder/magento/generated/code/Magento/Framework/App/Config/ConfigSourceAggregated/Proxy.php:95
Magento\Framework\App\Config\ConfigSourceAggregated\Proxy->get() at /home/lubefinder/magento/vendor/magento/module-store/App/Config/Type/Scopes.php:63
Magento\Store\App\Config\Type\Scopes->get() at /home/lubefinder/magento/vendor/magento/framework/App/Config.php:132
Magento\Framework\App\Config->get() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreRepository.php:106
Magento\Store\Model\StoreRepository->getById() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreRepository.php:127
Magento\Store\Model\StoreRepository->getActiveStoreById() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreResolver.php:181
Magento\Store\Model\StoreResolver->getDefaultStoreById() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreResolver.php:126
Magento\Store\Model\StoreResolver->getCurrentStoreId() at /home/lubefinder/magento/vendor/magento/module-store/Model/StoreManager.php:160
Magento\Store\Model\StoreManager->getStore() at /home/lubefinder/magento/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php:119
Magento\Store\Model\StoreManagerInterface\Proxy->getStore() at /home/lubefinder/magento/vendor/magento/module-store/Model/Resolver/Store.php:30
Magento\Store\Model\Resolver\Store->getScope() at /home/lubefinder/magento/vendor/magento/framework/App/Config/ScopeCodeResolver.php:49
Magento\Framework\App\Config\ScopeCodeResolver->resolve() at /home/lubefinder/magento/vendor/magento/framework/App/Config.php:69
Magento\Framework\App\Config->getValue() at /home/lubefinder/magento/vendor/magento/framework/Locale/Resolver.php:111
Magento\Framework\Locale\Resolver->getDefaultLocale() at /home/lubefinder/magento/vendor/magento/framework/Locale/Resolver.php:129
Magento\Framework\Locale\Resolver->setLocale() at /home/lubefinder/magento/vendor/magento/framework/Locale/Resolver.php:83
Magento\Framework\Locale\Resolver->__construct() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:108
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
Magento\Framework\ObjectManager\Factory\Compiled->get() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
Magento\Framework\ObjectManager\Factory\Compiled->create() at /home/lubefinder/magento/vendor/magento/framework/ObjectManager/ObjectManager.php:56
Magento\Framework\ObjectManager\ObjectManager->create() at /home/lubefinder/magento/vendor/magento/framework/Console/Cli.php:154
Magento\Framework\Console\Cli->getApplicationCommands() at /home/lubefinder/magento/vendor/magento/framework/Console/Cli.php:135
Magento\Framework\Console\Cli->getDefaultCommands() at /home/lubefinder/magento/vendor/symfony/console/Application.php:1286
Symfony\Component\Console\Application->init() at /home/lubefinder/magento/vendor/symfony/console/Application.php:631
Symfony\Component\Console\Application->find() at /home/lubefinder/magento/vendor/symfony/console/Application.php:237
Symfony\Component\Console\Application->doRun() at /home/lubefinder/magento/vendor/magento/framework/Console/Cli.php:116
Magento\Framework\Console\Cli->doRun() at /home/lubefinder/magento/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /home/lubefinder/magento/bin/magento:23
Can this issue be opened again? I am very confused for how to prepare a perfect to deploy container with Magento.
I'm on the side that a containerized application must never on deployment change it's state (it's files by "compiling on deployement").
As the steps for:
composer install -no-dev
bin/magento setup:di:compile
composer dump-autoload -o --apcu
bin/magento setup:static-content:deploy
are happening within the CI pipeline, which has no access to the production database, my question is how can I prepare an immutable container image?Also, same would be for a multiserver deployment, what guarantees that all instances will be 100% identical on deployment?
PS: not acceptable any idea with shared filesystem, not accepted in many organisations.
Edit: Adobe documentation gives understanding that all this should be possible, hopping I'm understanding right: https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/deployment/overview.html?lang=en
Build system—One system on which you deploy static assets and compile code for your production system. Because you build these assets on a system not in production, your production system’s downtime is minimized.
Your build system does not have to have Commerce installed on it. It needs only the Commerce code but no database connection is required. Also, your build system does not need to be a physically separate server.
composer setup:di:compile
will not even try to run without a fully working magento installation.
From my point of view, having to do build steps on deployment, breaks the Twelve Factor Apps which Magento says it is modelled after.
Found out faster some missing steps.
You need to have config.php, which you can get it with app:config:dump
.
Did not find anything in the official docs that dive deeper in this.
I managed to do my "production" build by using this (as a secret in the pipeline, as I saw it contains also some sensitive data), but I'm looking in how to ensure a better workflow, probably by figuring out what is actually only needed from it.
@madalinignisca & @gwharton Just reading through this and wanted to provide some additional thoughts / observations based off my own experiences in trying to setup a deployment pipeline.
setup:di:compile
and setup:static-content:deploy
setup:upgrade
in your deployment pipeline, be sure to provide the --keep-generated
flag so that the (just recently compiled) pub/static
, and generated/code
contents aren't blown away.setup:static-content:deploy
will encounter a problem due to the new theme not yet being registered into the theme
table of the default resource connection's database. This occurs via a RecurringData script within the setup:upgrade
command.install
, db
, and modules
. Knowing this, my current approach is for the pipeline to have the following during the compilation portion of our deployment pipeline:
app/etc/config.php
(resides in source control) returns associative array with keys modules
containing the status of enabled / disabled modules, as well as system
containing locked configuration values that do not differentiate between production and non-prod environmentsapp/etc/env.php
(placed there as part of pipeline) returns associative array with keys install
containing just a dummy value, indicating to magento that Magento has in fact been installed. As well as returns a db
array element containing read only permissions to the databasesetup:upgrade
, this env.php
file is then swapped out with the final env file to be used by the application. @dfelton in most of corporate systems, even read only access is forbidden to the build system.
Consider the following scenario, often met in SME and Corporations (example):
And I'll highlight again, build system to access even read only production stateful database is anti 12 app factor, which Adobe claims Magento follows.
For myself, after debugging the build system, I managed to get my enhanced config.php and build env.php and all works, but the work I went through to do this, made me realise that in certain corporate environments, such coding practices within Magento, might make it turned down as selected main component, including Adobe Commerce.
PS: the above enforcements where done by INFOSEC departments in both companies.
You guys might be interested in https://github.com/magento/magento2/pull/37424
I feel like it might solve the issue reported here as it has the same stacktrace I noticed in https://github.com/magento/magento2/issues/37409
The issue was fixed in https://github.com/magento/magento2/commit/4095595b63a7ce48a7d3a6302395ff75478d3284 (changes from https://github.com/magento/magento2/pull/37424).
@madalinignisca Just noticing your response. I agree with your sentiment and assertions here. A better wording than "acceptable" in my original comment would have been "I have found it to work with read-only..."
Really glad to see there has been progress on this front though. Thank you for the update @ihor-sviziev.
Preconditions and environment
Steps to reproduce
Deploy vanilla magento Dump database config to file - php bin/magento app:config:dump scopes themes system i18n Clear all caches - php bin/magento cache:clean Shutdown MySQL Server Attempt to Compile - php bin/magento setup:di:compile -vvv
Expected result
Actual result
Additional information
According to https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/deployment/build-system.html?lang=en a connection to the database is not required during the build phase if the config is stored in config.php
Release note
No response
Triage and priority