-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix for #23577. Check if db tables for config data exists before fetch #24959
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
Fix for #23577. Check if db tables for config data exists before fetch #24959
Conversation
|
Hi @ivan-koliadynskyy. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Update to PHPUnit test scenrio (some methods launched by condition after update).
|
Hi @aleron75, thank you for the review. |
Hi @engcom-Delta , thanks for information about testing. Checking it now. |
…able exists before fetch data from table.
|
Updates to fix this issue done in |
it would be great if you manage to do that |
…WebsiteTest New unit test \Magento\Store\Test\Unit\Model\ResourceModel\StoreTest
New tests for |
|
Hi @aleron75, thank you for the review. |
|
✔️ QA passed |
|
Hi @ivan-koliadynskyy, thank you for your contribution! |
|
@ivan-koliadynskyy This commit seems to be getting the blame for slow page loads (3x slower) from a couple of users in this issue #26692 have you got any thoughts on this? |

Description (*)
Added checking if db table exists before fetch config data from db table. This fix for issue in case db data defined in configuration but required tables not exists in db.
Fixed Issues (if relevant)
Manual testing scenarios (*)
composer install)bin/magento setup:install {config})bin/magento maintenance:enableQuestions or comments
This issue appear in case when env.php file exists and contain credentials for db connection but db has no required tables to fetch config data used on deployment steps. Current fix contain update for checking if table exists before fetch data in
\Magento\Store\App\Config\Source\RuntimeConfigSource::getEntities(app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php: Line 84).Code execution for enabling maintenance mode have validation if db available several times but this validation checks if db credentials available on config and has no checking if db tables available:
\Magento\Framework\App\DeploymentConfig::isDbAvailableand\Magento\Store\App\Config\Source\RuntimeConfigSource::canUseDatabase. Maybe would be good to make checking if required to fetch config data db tables exist in\Magento\Framework\App\DeploymentConfig::isDbAvailableto get more global solution in this case.Contribution checklist (*)