Closed sergeynezbritskiy closed 1 year ago
Hi @sergeynezbritskiy. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @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, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Additional information regarding this issue:
disabled
, the tests are running fine, so currently as a workaround I wrapped this command in try/catch in my Jenkinsfiles and run tests second time in catch
script {
try {
sh 'cd ${TMP_DIR}/dev/tests/integration && php ../../../vendor/bin/phpunit'
} catch (err) {
sh 'cd ${TMP_DIR}/dev/tests/integration && php ../../../vendor/bin/phpunit'
}
}
During the investigation I've found few issues:
When object manager first creates ResourceCollection object, it has a dependency DeploymentConfig $deploymentConfig with
$data = [
'cache_types' => [
'compiled_config' => 1
]
]
And this object is cached, but then I see that another instances of ResourceConnection is created with another instance of deploymentConfig as its dependency. The data of this new deploymentConfig get updated multiple times during installation, but when we go to the step "Disable maintenance mode" I see that at some place there is a call to the old object of resource connection with an old instance of deployment config. And when we try to get db connection, there is no info about db connection in the old version of deployment config. https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/App/ResourceConnection.php#L141
I see 3 possible solutions:
I think that the third solution is preferable in this case, but think that someone from Adobe team need to approve this solution, no ?
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @engcom-Echo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @sergeynezbritskiy We tried to reproduce this issue on 2.4-develop & were unable to do so. Also as per your comments, you have confirmed that issue is not reproducible on 2.4-develop, Hence we are closing this issue. We request you to create separate issues for any new issues identified during development/debugging. Thank you.
@engcom-Echo, please double-check on 2.4.3, as this release wasn't yet merged to the 2.4-develop branch, or we can wait and then re-check again after merging.
I can confirm that this issue exists. I just updated to magento 2.4.3 and then tried to run integration tests. I get the exact same error as @sergeynezbritskiy stated in the issue.
The same bug also appears when trying to install magento with the file app/etc/config.php
present.
To reproduce try the following:
app/etc/env.php
bin/magento setup:install ...
againYou'll get the the error:
In ResourceConnection.php line 148:
[DomainException]
Connection "default" is not defined
I think that these errors are related as the setup process for integration tests tries to install magento with an env.php and config.php present, so I think both errors are fixable at once.
Should I still create an extra issue for it or not, what do you think @ihor-sviziev?
No need to create a separate issue. I reopened this one
Hi @engcom-Lima. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@ihor-sviziev Is anyone at Adobe working on that issue. It's currently blocking the deployment of several (also commerce) projects, because our build pipelines are broken. That's a core issue which should be prioritized by the core team.
We have that issue if the config.php is checked in and if we run that in the CI pipeline.
php bin/magento setup:install --cleanup-database --db-host=localhost --db-user=root --db-password=root --db-name=magento
On the local machine we can run the command twice. The second run fixes the (maybe cache) issue. In the CI it's not the idea to run the installation process twice.
New information. If we delete the app/etc/config.php
in the pipeline, the installation finishes without a failure. But that's not a solution.
We can confirm that the PR #33803 fixes the issue. We added the code changes a patch in our project. The pipeline is then "green".
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1405 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Alfa. Thank you for verifying the issue.
Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
We are struggling with the same issue, and i can confirm that the PR #33803 fixes it.
i too can confirm, that the PR #33803 fixes the issue.
For a reason I do not have time to investigate for, I have removed the package magento/composer-root-update-plugin
from my integration tests pipeline and it works now:
composer remove magento/composer-root-update-plugin
Maybe it will help someone!
Any updates on this issue? I can reproduce it in a pipeline on Magento 2.4.4.
I also confirm that https://github.com/magento/magento2/pull/33803/ fixes the issue with installation in pipelines in our case
Any updates on this issue? I can reproduce it in a pipeline on Magento 2.4.4.
Hello @pawan-mittal,
The related PR https://github.com/magento/magento2/pull/33803 is in Merge in progress
status.
Thanks
Reproduced on 2.4.5
Does anybody by chance already have a patch file to fix this?
Here's one for Magento 2.4.5 which I've created earlier today, it's based on https://github.com/magento/magento2/pull/33803 but had to fix some merge conflicts, so hopefully those were solved correctly, but it seems to work on our end at least.
@hostep , thanks a lot, awesome. Works fine for me.
Reproduced on 2.4.5-p1.
The patch provided by @hostep works.
The current pull request here does not work on 2.4.3 currently since the load() function differs between 2.4.3 and 2.4.4;
FWIW i've just got this on 2.4.7-beta1
My CI tooling can fix it by re-running composer install --no-interaction
(which I discovered when playing with this comment https://github.com/magento/magento2/issues/33802#issuecomment-1112369298)
This problem has indeed returned in 2.4.7-beta1, but also in 2.4.6-p2 (which is now available in pre-release and will be available from the 8th of August for everyone).
I've opened a new issue for this: https://github.com/magento/magento2/issues/37805
Here's one for Magento 2.4.5 which I've created earlier today, it's based on #33803 but had to fix some merge conflicts, so hopefully those were solved correctly, but it seems to work on our end at least.
@hostep your patch is very useful. Thank you
Preconditions (*)
Steps to reproduce (*)
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
bin/magento module:enable --all
update the configuration in
dev/tests/integration/etc/install-config-mysql.php` (no RabbitMQ configuration)mysql -e "DROP DATABASE IF EXISTS magento_integration_tests"
mysql -e "CREATE DATABASE magento_integration_tests"
cd dev/tests/integration && php ../../../vendor/bin/phpunit
Expected result (*)
dev/tests/integration/phpunit.xml.dist
should start runningActual result (*)
When running magento installation command, this command fails during the step "Disabling Maintenance Mode" with an error
Log file is attached below
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.