Skip to content

Conversation

lbajsarowicz
Copy link
Contributor

@lbajsarowicz lbajsarowicz commented Aug 15, 2022

Description (*)

This Pull Request adds --no-interaction flag in order to avoid the situation when setup:install (or any other command) gets stuck due to the question asked in a non-interactive environment.

Related Pull Requests

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

  1. Add class that asks question after Magento installation (e.g. about Config import)
  2. Execute Magento Integration Tests

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Integration Tests: setup:install command hangs when question provided #36539: Integration Tests: setup:install command hangs when question provided

@m2-assistant
Copy link

m2-assistant bot commented Aug 15, 2022

Hi @lbajsarowicz. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests 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.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@lbajsarowicz
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@lbajsarowicz, shouldn't we add similar for setup:install?

@lbajsarowicz
Copy link
Contributor Author

@ihor-sviziev I added it here:
https://github.com/magento/magento2/pull/35948/files#diff-f52136b2dfa5c36438fc1969770d5a968b040984ee336dc9362854e53193b071R552

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix unit tests failure

@ihor-sviziev ihor-sviziev added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Aug 15, 2022
@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Aug 15, 2022

I also had similar issue on GitHub Actions, it was just now showing any result for a long time and then was just cancelled by me. It was really hard to debug such case doe to missing any output and logs.
The real issue was caused by incorrect credentials to MySQL server for integration tests

@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Aug 17, 2022
@ihor-sviziev
Copy link
Contributor

@lbajsarowicz any updates?

@lbajsarowicz
Copy link
Contributor Author

@magento run Unit Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@lbajsarowicz
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@lbajsarowicz
Copy link
Contributor Author

@ihor-sviziev I updated Unit Tests.

@ihor-sviziev
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@lbajsarowicz still failing :(

@ishakhsuvarov
Copy link
Contributor

ishakhsuvarov commented Oct 20, 2022

Moving to extended testing in hopes that someone would be able to stabilize the tests and get it delivered.

@engcom-Delta
Copy link
Contributor

@magento create issue

@engcom-Delta
Copy link
Contributor

Hi @lbajsarowicz,
Thanks for the collaboration & contribution!
We have tried to reproduce the issue in magento 2.4-develop it is not reproducible and following steps are followed to reproduce.

  1. Add class that asks question after Magento installation
    a. Enabled magento production mode.
    b. Created website, store, and storeview from backend
    c. Magento setup:upgrade && di:compile
    d. bin/magento app:config:dump
    e. change the store name.
    f. bin/magento app:config:import (command line)after these steps we are getting as below

Screenshot 2022-11-28 at 4 43 03 PM

  1. Run Magento Integration Tests we are getting as below

Screenshot 2022-11-28 at 4 50 36 PM

If there are any steps missing or we are following a different approach, please let us know.

Thanks.

@engcom-Delta engcom-Delta added the Issue: needs update Additional information is require, waiting for response label Nov 28, 2022
@lbajsarowicz
Copy link
Contributor Author

@engcom-Delta Even if you cannot reproduce the issue, the headless processes should be run in --non-interactive mode, because you can not interact with the CLI during Integration Tests execution. Saying that, please proceed with processing this Pull Request.

@engcom-Lima engcom-Lima added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Dec 5, 2022
@engcom-Echo engcom-Echo self-assigned this Dec 14, 2022
@engcom-Echo
Copy link
Contributor

@lbajsarowicz
Thanks for the collaboration & contribution!

✔️ QA Passed
Integration Tests: setup:install command hangs when question provided

Manual Scenario Steps

  1. Add class that asks question after Magento installation
  2. Execute Magento Integration Tests

Before: ✖️
installation is not successful.
before

After: ✔️
Test gets executed after successful installation.
after

@engcom-Charlie
Copy link
Contributor

It seems bot moved this PR from Merge in Progress to Ready for Testing hence moving it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Issue: needs update Additional information is require, waiting for response Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Status: Recently Merged
Development

Successfully merging this pull request may close these issues.

[Issue] Integration Tests: setup:install command hangs when question provided
8 participants