Skip to content
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

Add elasticsearch params to integration tests config #29799

Conversation

ihor-sviziev
Copy link
Contributor

@ihor-sviziev ihor-sviziev commented Aug 28, 2020

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Try to run integration tests
  2. During magento installation get an error about missing elasticsearch params, example https://github.com/magento/magento2/runs/1040453352?check_suite_focus=true:
2020-08-28T07:48:30.7632492Z Module 'Magento_WebapiSecurity':
2020-08-28T07:48:30.7632619Z [Progress: 438 / 894]
2020-08-28T07:48:30.7632859Z Module 'Magento_Weee':
2020-08-28T07:48:30.7632980Z Running schema recurring...
2020-08-28T07:48:30.7633100Z [Progress: 439 / 894]
2020-08-28T07:48:30.7633583Z Module 'Magento_WeeeGraphQl':
2020-08-28T07:48:30.7633691Z [Progress: 440 / 894]
2020-08-28T07:48:30.7633944Z Module 'Magento_CatalogWidget':
2020-08-28T07:48:30.7634065Z [Progress: 441 / 894]
2020-08-28T07:48:30.7634311Z Module 'Magento_Wishlist':
2020-08-28T07:48:30.7634442Z Running schema recurring...
2020-08-28T07:48:30.7634562Z [Progress: 442 / 894]
2020-08-28T07:48:30.7634820Z Module 'Magento_WishlistAnalytics':
2020-08-28T07:48:30.7634924Z [Progress: 443 / 894]
2020-08-28T07:48:30.7635174Z Module 'Magento_WishlistGraphQl':
2020-08-28T07:48:30.7635298Z [Progress: 444 / 894]
2020-08-28T07:48:30.7635414Z [Progress: 445 / 894]
2020-08-28T07:48:30.7635534Z Installing search configuration...
2020-08-28T07:48:30.7635598Z 
2020-08-28T07:48:30.7635717Z In SearchConfig.php line 81:
2020-08-28T07:48:30.7635804Z 
2020-08-28T07:48:30.7635929Z   [Magento\Framework\Validation\ValidationException]
2020-08-28T07:48:30.7636052Z   Could not validate a connection to Elasticsearch. No alive nodes found in y
2020-08-28T07:48:30.7636186Z   our cluster
2020-08-28T07:48:30.7636263Z 
2020-08-28T07:48:30.7636318Z 
2020-08-28T07:48:30.7636431Z Exception trace:
2020-08-28T07:48:30.7636560Z   at /__w/magento2/magento2/setup/src/Magento/Setup/Model/SearchConfig.php:81
2020-08-28T07:48:30.7637116Z  Magento\Setup\Model\SearchConfig->validateSearchEngine() at /__w/magento2/magento2/setup/src/Magento/Setup/Model/SearchConfig.php:69
2020-08-28T07:48:30.7637536Z  Magento\Setup\Model\SearchConfig->saveConfiguration() at /__w/magento2/magento2/setup/src/Magento/Setup/Model/Installer.php:1184
2020-08-28T07:48:30.7637874Z  Magento\Setup\Model\Installer->installSearchConfiguration() at n/a:n/a
2020-08-28T07:48:30.7638032Z  call_user_func_array() at /__w/magento2/magento2/setup/src/Magento/Setup/Model/Installer.php:388
2020-08-28T07:48:30.7638506Z  Magento\Setup\Model\Installer->install() at /__w/magento2/magento2/setup/src/Magento/Setup/Console/Command/InstallCommand.php:231
2020-08-28T07:48:30.7638926Z  Magento\Setup\Console\Command\InstallCommand->execute() at /__w/magento2/magento2/vendor/symfony/console/Command/Command.php:255
2020-08-28T07:48:30.7639319Z  Symfony\Component\Console\Command\Command->run() at /__w/magento2/magento2/vendor/symfony/console/Application.php:1000
2020-08-28T07:48:30.7639718Z  Symfony\Component\Console\Application->doRunCommand() at /__w/magento2/magento2/vendor/symfony/console/Application.php:271
2020-08-28T07:48:30.7640106Z  Symfony\Component\Console\Application->doRun() at /__w/magento2/magento2/lib/internal/Magento/Framework/Console/Cli.php:115
2020-08-28T07:48:30.7640475Z  Magento\Framework\Console\Cli->doRun() at /__w/magento2/magento2/vendor/symfony/console/Application.php:147
2020-08-28T07:48:30.7640819Z  Symfony\Component\Console\Application->run() at /__w/magento2/magento2/bin/magento:23
2020-08-28T07:48:30.7640920Z 
2020-08-28T07:48:30.7646579Z setup:install [--consumers-wait-for-messages CONSUMERS-WAIT-FOR-MESSAGES] [--backend-frontname BACKEND-FRONTNAME] [--enable-debug-logging ENABLE-DEBUG-LOGGING] [--enable-syslog-logging ENABLE-SYSLOG-LOGGING] [--amqp-host AMQP-HOST] [--amqp-port AMQP-PORT] [--amqp-user AMQP-USER] [--amqp-password AMQP-PASSWORD] [--amqp-virtualhost AMQP-VIRTUALHOST] [--amqp-ssl AMQP-SSL] [--amqp-ssl-options AMQP-SSL-OPTIONS] [--key KEY] [--db-host DB-HOST] [--db-name DB-NAME] [--db-user DB-USER] [--db-engine DB-ENGINE] [--db-password DB-PASSWORD] [--db-prefix DB-PREFIX] [--db-model DB-MODEL] [--db-init-statements DB-INIT-STATEMENTS] [-s|--skip-db-validation] [--http-cache-hosts HTTP-CACHE-HOSTS] [--db-ssl-key DB-SSL-KEY] [--db-ssl-cert DB-SSL-CERT] [--db-ssl-ca DB-SSL-CA] [--db-ssl-verify] [--session-save SESSION-SAVE] [--session-save-redis-host SESSION-SAVE-REDIS-HOST] [--session-save-redis-port SESSION-SAVE-REDIS-PORT] [--session-save-redis-password SESSION-SAVE-REDIS-PASSWORD] [--session-save-redis-timeout SESSION-SAVE-REDIS-TIMEOUT] [--session-save-redis-persistent-id SESSION-SAVE-REDIS-PERSISTENT-ID] [--session-save-redis-db SESSION-SAVE-REDIS-DB] [--session-save-redis-compression-threshold SESSION-SAVE-REDIS-COMPRESSION-THRESHOLD] [--session-save-redis-compression-lib SESSION-SAVE-REDIS-COMPRESSION-LIB] [--session-save-redis-log-level SESSION-SAVE-REDIS-LOG-LEVEL] [--session-save-redis-max-concurrency SESSION-SAVE-REDIS-MAX-CONCURRENCY] [--session-save-redis-break-after-frontend SESSION-SAVE-REDIS-BREAK-AFTER-FRONTEND] [--session-save-redis-break-after-adminhtml SESSION-SAVE-REDIS-BREAK-AFTER-ADMINHTML] [--session-save-redis-first-lifetime SESSION-SAVE-REDIS-FIRST-LIFETIME] [--session-save-redis-bot-first-lifetime SESSION-SAVE-REDIS-BOT-FIRST-LIFETIME] [--session-save-redis-bot-lifetime SESSION-SAVE-REDIS-BOT-LIFETIME] [--session-save-redis-disable-locking SESSION-SAVE-REDIS-DISABLE-LOCKING] [--session-save-redis-min-lifetime SESSION-SAVE-REDIS-MIN-LIFETIME] [--session-save-redis-max-lifetime SESSION-SAVE-REDIS-MAX-LIFETIME] [--session-save-redis-sentinel-master SESSION-SAVE-REDIS-SENTINEL-MASTER] [--session-save-redis-sentinel-servers SESSION-SAVE-REDIS-SENTINEL-SERVERS] [--session-save-redis-sentinel-verify-master SESSION-SAVE-REDIS-SENTINEL-VERIFY-MASTER] [--session-save-redis-sentinel-connect-retries SESSION-SAVE-REDIS-SENTINEL-CONNECT-RETRIES] [--cache-backend CACHE-BACKEND] [--cache-backend-redis-server CACHE-BACKEND-REDIS-SERVER] [--cache-backend-redis-db CACHE-BACKEND-REDIS-DB] [--cache-backend-redis-port CACHE-BACKEND-REDIS-PORT] [--cache-backend-redis-password CACHE-BACKEND-REDIS-PASSWORD] [--cache-backend-redis-compress-data CACHE-BACKEND-REDIS-COMPRESS-DATA] [--cache-backend-redis-compression-lib CACHE-BACKEND-REDIS-COMPRESSION-LIB] [--cache-id-prefix CACHE-ID-PREFIX] [--allow-parallel-generation] [--page-cache PAGE-CACHE] [--page-cache-redis-server PAGE-CACHE-REDIS-SERVER] [--page-cache-redis-db PAGE-CACHE-REDIS-DB] [--page-cache-redis-port PAGE-CACHE-REDIS-PORT] [--page-cache-redis-password PAGE-CACHE-REDIS-PASSWORD] [--page-cache-redis-compress-data PAGE-CACHE-REDIS-COMPRESS-DATA] [--page-cache-redis-compression-lib PAGE-CACHE-REDIS-COMPRESSION-LIB] [--page-cache-id-prefix PAGE-CACHE-ID-PREFIX] [--lock-provider LOCK-PROVIDER] [--lock-db-prefix LOCK-DB-PREFIX] [--lock-zookeeper-host LOCK-ZOOKEEPER-HOST] [--lock-zookeeper-path LOCK-ZOOKEEPER-PATH] [--lock-file-path LOCK-FILE-PATH] [--document-root-is-pub DOCUMENT-ROOT-IS-PUB] [--base-url BASE-URL] [--language LANGUAGE] [--timezone TIMEZONE] [--currency CURRENCY] [--use-rewrites USE-REWRITES] [--use-secure USE-SECURE] [--base-url-secure BASE-URL-SECURE] [--use-secure-admin USE-SECURE-ADMIN] [--admin-use-security-key ADMIN-USE-SECURITY-KEY] [--admin-user [ADMIN-USER]] [--admin-password [ADMIN-PASSWORD]] [--admin-email [ADMIN-EMAIL]] [--admin-firstname [ADMIN-FIRSTNAME]] [--admin-lastname [ADMIN-LASTNAME]] [--search-engine SEARCH-ENGINE] [--elasticsearch-host ELASTICSEARCH-HOST] [--elasticsearch-port ELASTICSEARCH-PORT] [--elasticsearch-enable-auth ELASTICSEARCH-ENABLE-AUTH] [--elasticsearch-username ELASTICSEARCH-USERNAME] [--elasticsearch-password ELASTICSEARCH-PASSWORD] [--elasticsearch-index-prefix ELASTICSEARCH-INDEX-PREFIX] [--elasticsearch-timeout ELASTICSEARCH-TIMEOUT] [--cleanup-database] [--sales-order-increment-prefix SALES-ORDER-INCREMENT-PREFIX] [--use-sample-data] [--enable-modules [ENABLE-MODULES]] [--disable-modules [DISABLE-MODULES]] [--convert-old-scripts [CONVERT-OLD-SCRIPTS]] [-i|--interactive] [--safe-mode [SAFE-MODE]] [--data-restore [DATA-RESTORE]] [--dry-run [DRY-RUN]] [--magento-init-params MAGENTO-INIT-PARAMS]
2020-08-28T07:48:30.7648026Z  in /__w/magento2/magento2/lib/internal/Magento/Framework/Shell.php:63
2020-08-28T07:48:30.7648162Z Stack trace:
2020-08-28T07:48:30.7648639Z #0 /__w/magento2/magento2/dev/tests/integration/framework/Magento/TestFramework/Application.php(519): Magento\Framework\Shell->execute('/usr/local/bin/...', Array)
2020-08-28T07:48:30.7649045Z #1 /__w/magento2/magento2/dev/tests/integration/framework/bootstrap.php(89): Magento\TestFramework\Application->install(true)
2020-08-28T07:48:30.7649423Z #2 /__w/magento2/magento2/vendor/phpunit/phpunit/src/Util/FileLoader.php(56): include_once('/__w/magento2/m...')
2020-08-28T07:48:30.7651018Z #3 /__w/magento2/magento2/vendor/phpunit/phpunit/src/Util/FileLoader.php(44): PHPUnit\Util\FileLoader::load('/__w/magento2/m...')
2020-08-28T07:48:30.7651794Z #4 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(552): PHPUnit\Util\FileLoader::checkAndLoad('dev/tests/integ...')
2020-08-28T07:48:30.7652229Z #5 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(360): PHPUnit\TextUI\Command->handleBootstrap('dev/tests/integ...')
2020-08-28T07:48:30.7652624Z #6 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(76): PHPUnit\TextUI\Command->handleArguments(Array)
2020-08-28T07:48:30.7653004Z #7 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run(Array, true)
2020-08-28T07:48:30.7653180Z #8 /__w/magento2/magento2/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
2020-08-28T07:48:30.7653318Z #9 {main}
2020-08-28T07:48:30.7653377Z 
2020-08-28T07:48:30.7653703Z Next Magento\Framework\Exception\LocalizedException: Command returned non-zero exit code:
2020-08-28T07:48:30.7657222Z `/usr/local/bin/php -f '/__w/magento2/magento2/bin/magento' setup:install -vvv --db-host='mysql' --db-user='root' --db-password='123123q' --db-name='magento_integration_tests' --db-prefix='' --backend-frontname='backend' --admin-user='user' --admin-password='password1' --admin-email='admin@example.com' --admin-firstname='firstname' --admin-lastname='lastname' --amqp-host='rabbitmq' --amqp-port='5672' --amqp-user='guest' --amqp-password='guest' --magento-init-params='MAGE_DIRS[etc][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/etc&MAGE_DIRS[var][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var&MAGE_DIRS[var_export][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/export&MAGE_DIRS[media][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/pub/media&MAGE_DIRS[static][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/pub/static&MAGE_DIRS[view_preprocessed][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/view_preprocessed/pub/static&MAGE_DIRS[code][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/generated/code&MAGE_DIRS[cache][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/cache&MAGE_DIRS[log][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/log&MAGE_DIRS[session][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/session&MAGE_DIRS[tmp][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/tmp&MAGE_DIRS[upload][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/var/upload&MAGE_DIRS[pub][path]=/__w/magento2/magento2/dev/tests/integration/tmp/sandbox-0-6238c64cb5109030028ba77d88eb71c2a2d010871cf5318430e8f46c75f0f97a/pub&MAGE_MODE=developer' 2>&1` in /__w/magento2/magento2/lib/internal/Magento/Framework/Shell.php:64
2020-08-28T07:48:30.7657938Z Stack trace:
2020-08-28T07:48:30.7658407Z #0 /__w/magento2/magento2/dev/tests/integration/framework/Magento/TestFramework/Application.php(519): Magento\Framework\Shell->execute('/usr/local/bin/...', Array)
2020-08-28T07:48:30.7658815Z #1 /__w/magento2/magento2/dev/tests/integration/framework/bootstrap.php(89): Magento\TestFramework\Application->install(true)
2020-08-28T07:48:30.7659191Z #2 /__w/magento2/magento2/vendor/phpunit/phpunit/src/Util/FileLoader.php(56): include_once('/__w/magento2/m...')
2020-08-28T07:48:30.7659808Z #3 /__w/magento2/magento2/vendor/phpunit/phpunit/src/Util/FileLoader.php(44): PHPUnit\Util\FileLoader::load('/__w/magento2/m...')
2020-08-28T07:48:30.7690258Z #4 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(552): PHPUnit\Util\FileLoader::checkAndLoad('dev/tests/integ...')
2020-08-28T07:48:30.7690909Z #5 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(360): PHPUnit\TextUI\Command->handleBootstrap('dev/tests/integ...')
2020-08-28T07:48:30.7691343Z #6 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(76): PHPUnit\TextUI\Command->handleArguments(Array)
2020-08-28T07:48:30.7691734Z #7 /__w/magento2/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run(Array, true)
2020-08-28T07:48:30.7691915Z #8 /__w/magento2/magento2/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
2020-08-28T07:48:30.7692035Z #9 {main}

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)
  • All automated tests passed successfully (all builds are green)

@ihor-sviziev ihor-sviziev added the Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. label Aug 28, 2020
@m2-assistant
Copy link

m2-assistant bot commented Aug 28, 2020

Hi @ihor-sviziev. Thank you for your contribution
Here is 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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, 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, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

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

@ghost ghost added this to Pending Review in Pull Requests Dashboard Aug 28, 2020
@ihor-sviziev
Copy link
Contributor Author

@magento run all tests

Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

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

✔️ @ihor-sviziev Thank you for that adjustment.

I forgot to update Magento, when updated @davidalger 's Warden documentation for running Intergration tests: https://docs.warden.dev/configuration/magento2-testing.html#running-integration-tests

@ghost ghost moved this from Pending Review to Ready for Testing in Pull Requests Dashboard Aug 28, 2020
@ghost ghost assigned lbajsarowicz Aug 28, 2020
@magento-engcom-team
Copy link
Contributor

Hi @lbajsarowicz, thank you for the review.
ENGCOM-8096 has been created to process this Pull Request
✳️ @lbajsarowicz, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@sidolov sidolov added the Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. label Aug 31, 2020
@sidolov sidolov moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Aug 31, 2020
@sidolov sidolov moved this from Testing in Progress to Merge in Progress in Pull Requests Dashboard Aug 31, 2020
@lbajsarowicz
Copy link
Contributor

@magento run Functional Tests B2B

@sidolov sidolov added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 2, 2020
@magento-engcom-team magento-engcom-team merged commit fe65f0d into magento:2.4-develop Sep 2, 2020
@m2-assistant
Copy link

m2-assistant bot commented Sep 2, 2020

Hi @ihor-sviziev, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Sep 2, 2020
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 Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: accept Release Line: 2.4 Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

None yet

4 participants