magento / magento-cloud-docker

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
Open Software License 3.0
257 stars 192 forks source link

Make <host.docker.internal> platform independent #298

Closed IgorVitol closed 3 years ago

IgorVitol commented 3 years ago

Description

It is not possible to generate unified docker-compose script for different operation systems because of requirement to set additional ENV variable for Ubuntu - "SET_DOCKER_HOST" (if you want to use XDEBUG). If it is set - docker container will install additional package "iproute2" and override /etc/hosts file (will add - "host.docker.internal" line).

On Windows/Mac it is available by in-built DNS server, so this variable should be used only on Linux. Currently my goal to setup single behavior for all our devs and the only thing which I need to solve by workaround is this variable.

This PR includes:

  1. "iproute2" package added to FPM image during image build (removed it's installing from startup entry-point script).
  2. Added check for "host.docker.internal" availability - if not available - add it. This will be done once at first container startup - on the next startup for the same container - "host.docker.internal" will be available already.
  3. Removed additional option - "--set-docker-host" and it's ENV variable "SET_DOCKER_HOST", since this is not needed anymore.
  4. Tested on Ubuntu/Windows/Mac

Manual testing scenarios

  1. Configure Xdebug on Windows / Ubuntu - it should work using same behavior. You don't need to use custom XDEBUG_HOST value or "--set-docker-host" option.

Contribution checklist

shiftedreality commented 3 years ago

@mattskr could you help with this review?

shiftedreality commented 3 years ago

@IgorVitol thank you for your submisssion! Overall looks good, please merge the latest changes and solve conflicts

IgorVitol commented 3 years ago

@shiftedreality Done, pls check again

IgorVitol commented 3 years ago

@NadiyaS Just in case letting you know, that this PR is updated as well

NadiyaS commented 3 years ago

@magento import pr to magento-commerce/magento-cloud-docker

NadiyaS commented 3 years ago

Thank you @IgorVitol This PR will be added after 1.2.1 release as we need more time to process it.

magento-engcom-team commented 3 years ago

@NadiyaS the pull request successfully imported.

magento-cloud-ft-jenkins-svc commented 3 years ago

Static Analysis & Code Style Results

:white_check_mark: All static analysis and code style checks have passed.

PHP Codesniffer Output

............................................................ 60 / 90 (67%)
..............................                               90 / 90 (100%)

Time: 2.59 secs; Memory: 12MB

PHP Mess Detector Output


Found 0 violations and 0 errors in 1526ms

No mess detected

PHPStan Output


������  You're running a really old version of PHPStan.���

The last release in the 0.11.x series with new features
and bugfixes was released on October 22nd 2019,
that's 445 days ago.

Since then more than 50 new PHPStan versions were released
with hundreds of new features, bugfixes, and other
quality of life improvements.

To learn about what you're missing out on, check out
this blog with articles about the latest major releases:
https://phpstan.org/blog

Historically, the main two blockers preventing
people from upgrading were:
1) Composer conflicts with other dependencies.
2) Errors discovered by the new PHPStan version and no time
   to fix them to get to a green build again.

Today, neither of them is a problem anymore thanks to:
1) phpstan/phpstan package having zero external dependencies.
2) Baseline feature letting you use the latest release
   right away even with pre-existing errors.
   Read more about it here: https://phpstan.org/user-guide/baseline

Upgrade today to PHPStan 0.12 by using
"phpstan/phpstan": "^0.12" in your composer.json.

������  You're running a really old version of PHPStan.���

The last release in the 0.11.x series with new features
and bugfixes was released on October 22nd 2019,
that's 445 days ago.

Since then more than 50 new PHPStan versions were released
with hundreds of new features, bugfixes, and other
quality of life improvements.

To learn about what you're missing out on, check out
this blog with articles about the latest major releases:
https://phpstan.org/blog

Historically, the main two blockers preventing
people from upgrading were:
1) Composer conflicts with other dependencies.
2) Errors discovered by the new PHPStan version and no time
   to fix them to get to a green build again.

Today, neither of them is a problem anymore thanks to:
1) phpstan/phpstan package having zero external dependencies.
2) Baseline feature letting you use the latest release
   right away even with pre-existing errors.
   Read more about it here: https://phpstan.org/user-guide/baseline

Upgrade today to PHPStan 0.12 by using
"phpstan/phpstan": "^0.12" in your composer.json.

 [OK] No errors                                                                 

This comment was generated by Jenkins job magento-cloud-docker/static build 4.

magento-cloud-ft-jenkins-svc commented 3 years ago

Unit & Integration Test Results

:white_check_mark: All unit and integration tests have passed.

Unit Test Output

PHPUnit 8.5.13 by Sebastian Bergmann and contributors.

.....                                                               5 / 5 (100%)

Time: 170 ms, Memory: 12.00 MB

OK (5 tests, 16 assertions)

Generating code coverage report in Clover XML format ... done [415 ms]

Integration Test Output

PHPUnit 8.5.13 by Sebastian Bergmann and contributors.

............                                                      12 / 12 (100%)

Time: 3.36 seconds, Memory: 34.00 MB

OK (12 tests, 12 assertions)

This comment was generated by Jenkins job magento-cloud-docker/unit build 3.

magento-cloud-ft-jenkins-svc commented 3 years ago

Functional Acceptance Test Results

:x:  One or more functional acceptance tests have failed.

PHP 7.2

PHP 7.3

PHP 7.4

Output for failed tests is below. If many tests have failed only the first 5 will be included. If you need additional information please reach out to the Magento Cloud team for more details.

This comment was generated by Jenkins job magento-cloud-docker/functional build 6.

magento-cloud-ft-jenkins-svc commented 3 years ago

PHP 7.2 SplitDb72Cest Output

Codeception PHP Testing Framework v4.1.14
Powered by PHPUnit 8.5.13 by Sebastian Bergmann and contributors.
Running with seed: 

Acceptance Tests (1) ---------------------------------------
SplitDb72Cest: Test split db on production mode
Signature: Magento\CloudDocker\Test\Functional\Acceptance\SplitDb72Cest:testSplitDbOnProductionMode
Test: src/Test/Functional/Acceptance/SplitDb72Cest.php:testSplitDbOnProductionMode
Scenario --
 I cleanup work dir 
 I is cache work dir exists "2.3.2"
 I clone template to work dir "2.3.2"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.2"
 I read services yaml 
 I read app magento yaml 
 I write services yaml {"mysql":{"type":"mysql:10.2","di...}
 I write app magento yaml {"name":"mymagento","type":"ph...}
 I write env magento yaml {"stage":{"global":{"SCD_ON_DE...}
 I get exposed port 
 I get exposed port "db_quote"
 I get exposed port "db_sales"
 I run ece docker command "build:compose --mode=producti..."
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I run docker compose command "run deploy cloud-deploy"
 I am connected to database "db_quote"
 I grab num records "quote_id_mask"
 I grab num records "quote_address_item"
 I grab num records "quote_address"
 I grab num records "quote"
 I am connected to database "db_sales"
 I grab num records "sales_invoice"
 I grab num records "sales_invoice_grid"
 I grab num records "sales_invoice_item"
 I grab num records "sales_order"
 I grab num records "sales_order_grid"
 I grab num records "sales_order_tax"
 I run docker compose command "run deploy cloud-post-deploy"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

------------------------------------------------------------
13x DEPRECATION: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. /app/vendor/symfony/process/Process.php:147
4x DEPRECATION: The Robo\Common\ProcessUtils::escapeArgument() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0. /app/vendor/consolidation/robo/src/Common/ProcessUtils.php:39

Time: 13.93 minutes, Memory: 16.00 MB

There was 1 error:

---------
1) SplitDb72Cest: Test split db on production mode
 Test  src/Test/Functional/Acceptance/SplitDb72Cest.php:testSplitDbOnProductionMode

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.docker port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.docker/  

Scenario Steps:

 42. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 41. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 40. $I->amOnPage("/") at src/Test/Functional/Acceptance/SplitDbCest.php:80
 39. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/SplitDbCest.php:79
 38. $I->grabNumRecords("sales_order_tax") at src/Test/Functional/Acceptance/SplitDbCest.php:77
 37. $I->grabNumRecords("sales_order_grid") at src/Test/Functional/Acceptance/SplitDbCest.php:77

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

ERRORS!
Tests: 1, Assertions: 1, Errors: 1.
- XML report generated in file:///app/tests/functional/_output/junit.xml

This comment was generated by Jenkins job magento-cloud-docker/functional build 6.

magento-cloud-ft-jenkins-svc commented 3 years ago

PHP 7.2 Acceptance72Cest Output

Codeception PHP Testing Framework v4.1.14
Powered by PHPUnit 8.5.13 by Sebastian Bergmann and contributors.
Running with seed: 

Acceptance Tests (2) ---------------------------------------
Acceptance72Cest: Test production mode
Signature: Magento\CloudDocker\Test\Functional\Acceptance\Acceptance72Cest:testProductionMode
Test: src/Test/Functional/Acceptance/Acceptance72Cest.php:testProductionMode
Scenario --
 I cleanup work dir 
 I is cache work dir exists "2.3.2"
 I clone template to work dir "2.3.2"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.2"
 I run ece docker command "build:compose --mode=production"
 I assert true true,"Command build:compose failed"
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I run docker compose command "run deploy cloud-deploy"
 I run docker compose command "run deploy cloud-post-deploy"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

Acceptance72Cest: Test custom host
Signature: Magento\CloudDocker\Test\Functional\Acceptance\Acceptance72Cest:testCustomHost
Test: src/Test/Functional/Acceptance/Acceptance72Cest.php:testCustomHost
Scenario --
 I cleanup work dir 
 I is cache work dir exists "2.3.2"
 I clone template to work dir "2.3.2"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.2"
 I update base url "http://magento2.test:8080/"
 I run ece docker command "build:compose --mode=producti..."
 I assert true true,"Command build:compose failed"
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I assert true true,"Build phase failed"
 I run docker compose command "run deploy cloud-deploy"
 I assert true true,"Deploy phase failed"
 I run docker compose command "run deploy cloud-post-deploy"
 I assert true true,"Post deploy phase failed"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

------------------------------------------------------------
26x DEPRECATION: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. /app/vendor/symfony/process/Process.php:147
8x DEPRECATION: The Robo\Common\ProcessUtils::escapeArgument() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0. /app/vendor/consolidation/robo/src/Common/ProcessUtils.php:39

Time: 20.63 minutes, Memory: 16.00 MB

There were 2 errors:

---------
1) Acceptance72Cest: Test production mode
 Test  src/Test/Functional/Acceptance/Acceptance72Cest.php:testProductionMode

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.docker port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.docker/  

Scenario Steps:

 23. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 22. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 21. $I->amOnPage("/") at src/Test/Functional/Acceptance/AcceptanceCest.php:29
 20. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/AcceptanceCest.php:28
 19. $I->runDockerComposeCommand("run deploy cloud-deploy") at src/Test/Functional/Acceptance/AcceptanceCest.php:27
 18. $I->runDockerComposeCommand("run build cloud-build") at src/Test/Functional/Acceptance/AcceptanceCest.php:26

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

---------
2) Acceptance72Cest: Test custom host
 Test  src/Test/Functional/Acceptance/Acceptance72Cest.php:testCustomHost

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.test port 8080: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.test:8080/  

Scenario Steps:

 27. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 26. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 25. $I->amOnPage("/") at src/Test/Functional/Acceptance/AcceptanceCest.php:52
 24. $I->assertTrue(true,"Post deploy phase failed") at src/Test/Functional/Acceptance/AcceptanceCest.php:51
 23. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/AcceptanceCest.php:51
 22. $I->assertTrue(true,"Deploy phase failed") at src/Test/Functional/Acceptance/AcceptanceCest.php:50

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

ERRORS!
Tests: 2, Assertions: 7, Errors: 2.
- XML report generated in file:///app/tests/functional/_output/junit.xml

This comment was generated by Jenkins job magento-cloud-docker/functional build 6.

magento-cloud-ft-jenkins-svc commented 3 years ago

PHP 7.3 SplitDb73Cest Output

Codeception PHP Testing Framework v4.1.14
Powered by PHPUnit 8.5.13 by Sebastian Bergmann and contributors.
Running with seed: 

Acceptance Tests (1) ---------------------------------------
SplitDb73Cest: Test split db on production mode
Signature: Magento\CloudDocker\Test\Functional\Acceptance\SplitDb73Cest:testSplitDbOnProductionMode
Test: src/Test/Functional/Acceptance/SplitDb73Cest.php:testSplitDbOnProductionMode
Scenario --
 I cleanup work dir 
 I is cache work dir exists "2.3.5"
 I clone template to work dir "2.3.5"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.5"
 I read services yaml 
 I read app magento yaml 
 I write services yaml {"mysql":{"type":"mysql:10.2","di...}
 I write app magento yaml {"name":"mymagento","type":"ph...}
 I write env magento yaml {"stage":{"global":{"SCD_ON_DE...}
 I get exposed port 
 I get exposed port "db_quote"
 I get exposed port "db_sales"
 I run ece docker command "build:compose --mode=producti..."
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I run docker compose command "run deploy cloud-deploy"
 I am connected to database "db_quote"
 I grab num records "quote_id_mask"
 I grab num records "quote_address_item"
 I grab num records "quote_address"
 I grab num records "quote"
 I am connected to database "db_sales"
 I grab num records "sales_invoice"
 I grab num records "sales_invoice_grid"
 I grab num records "sales_invoice_item"
 I grab num records "sales_order"
 I grab num records "sales_order_grid"
 I grab num records "sales_order_tax"
 I run docker compose command "run deploy cloud-post-deploy"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

------------------------------------------------------------
13x DEPRECATION: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. /app/vendor/symfony/process/Process.php:147
4x DEPRECATION: The Robo\Common\ProcessUtils::escapeArgument() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0. /app/vendor/consolidation/robo/src/Common/ProcessUtils.php:39

Time: 16.94 minutes, Memory: 16.00 MB

There was 1 error:

---------
1) SplitDb73Cest: Test split db on production mode
 Test  src/Test/Functional/Acceptance/SplitDb73Cest.php:testSplitDbOnProductionMode

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.docker port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.docker/  

Scenario Steps:

 42. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 41. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 40. $I->amOnPage("/") at src/Test/Functional/Acceptance/SplitDbCest.php:80
 39. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/SplitDbCest.php:79
 38. $I->grabNumRecords("sales_order_tax") at src/Test/Functional/Acceptance/SplitDbCest.php:77
 37. $I->grabNumRecords("sales_order_grid") at src/Test/Functional/Acceptance/SplitDbCest.php:77

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

ERRORS!
Tests: 1, Assertions: 1, Errors: 1.
- XML report generated in file:///app/tests/functional/_output/junit.xml

This comment was generated by Jenkins job magento-cloud-docker/functional build 6.

magento-cloud-ft-jenkins-svc commented 3 years ago

PHP 7.3 Acceptance73Cest Output

Codeception PHP Testing Framework v4.1.14
Powered by PHPUnit 8.5.13 by Sebastian Bergmann and contributors.
Running with seed: 

Acceptance Tests (2) ---------------------------------------
Acceptance73Cest: Test production mode
Signature: Magento\CloudDocker\Test\Functional\Acceptance\Acceptance73Cest:testProductionMode
Test: src/Test/Functional/Acceptance/Acceptance73Cest.php:testProductionMode
Scenario --
 I cleanup work dir 
 I is cache work dir exists "2.3.5"
 I clone template to work dir "2.3.5"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.5"
 I run ece docker command "build:compose --mode=production"
 I assert true true,"Command build:compose failed"
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I run docker compose command "run deploy cloud-deploy"
 I run docker compose command "run deploy cloud-post-deploy"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

Acceptance73Cest: Test custom host
Signature: Magento\CloudDocker\Test\Functional\Acceptance\Acceptance73Cest:testCustomHost
Test: src/Test/Functional/Acceptance/Acceptance73Cest.php:testCustomHost
Scenario --
 I cleanup work dir 
 I is cache work dir exists "2.3.5"
 I clone template to work dir "2.3.5"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.5"
 I update base url "http://magento2.test:8080/"
 I run ece docker command "build:compose --mode=producti..."
 I assert true true,"Command build:compose failed"
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I assert true true,"Build phase failed"
 I run docker compose command "run deploy cloud-deploy"
 I assert true true,"Deploy phase failed"
 I run docker compose command "run deploy cloud-post-deploy"
 I assert true true,"Post deploy phase failed"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

------------------------------------------------------------
26x DEPRECATION: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. /app/vendor/symfony/process/Process.php:147
8x DEPRECATION: The Robo\Common\ProcessUtils::escapeArgument() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0. /app/vendor/consolidation/robo/src/Common/ProcessUtils.php:39

Time: 22.59 minutes, Memory: 16.00 MB

There were 2 errors:

---------
1) Acceptance73Cest: Test production mode
 Test  src/Test/Functional/Acceptance/Acceptance73Cest.php:testProductionMode

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.docker port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.docker/  

Scenario Steps:

 23. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 22. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 21. $I->amOnPage("/") at src/Test/Functional/Acceptance/AcceptanceCest.php:29
 20. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/AcceptanceCest.php:28
 19. $I->runDockerComposeCommand("run deploy cloud-deploy") at src/Test/Functional/Acceptance/AcceptanceCest.php:27
 18. $I->runDockerComposeCommand("run build cloud-build") at src/Test/Functional/Acceptance/AcceptanceCest.php:26

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

---------
2) Acceptance73Cest: Test custom host
 Test  src/Test/Functional/Acceptance/Acceptance73Cest.php:testCustomHost

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.test port 8080: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.test:8080/  

Scenario Steps:

 27. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 26. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 25. $I->amOnPage("/") at src/Test/Functional/Acceptance/AcceptanceCest.php:52
 24. $I->assertTrue(true,"Post deploy phase failed") at src/Test/Functional/Acceptance/AcceptanceCest.php:51
 23. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/AcceptanceCest.php:51
 22. $I->assertTrue(true,"Deploy phase failed") at src/Test/Functional/Acceptance/AcceptanceCest.php:50

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

ERRORS!
Tests: 2, Assertions: 7, Errors: 2.
- XML report generated in file:///app/tests/functional/_output/junit.xml

This comment was generated by Jenkins job magento-cloud-docker/functional build 6.

magento-cloud-ft-jenkins-svc commented 3 years ago

PHP 7.4 SplitDbCest Output

Codeception PHP Testing Framework v4.1.14
Powered by PHPUnit 8.5.13 by Sebastian Bergmann and contributors.
Running with seed: 

Acceptance Tests (1) ---------------------------------------
SplitDbCest: Test split db on production mode
Signature: Magento\CloudDocker\Test\Functional\Acceptance\SplitDbCest:testSplitDbOnProductionMode
Test: src/Test/Functional/Acceptance/SplitDbCest.php:testSplitDbOnProductionMode
Scenario --
 I cleanup work dir 
 I is cache work dir exists "master"
 I clone template to work dir "master"
 I create auth json 
 I create artifacts dir 
 I create artifact current tested code "docker","1.2.99"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-...","1.2.99"
 I add ece tools git repo to composer 
 I add dependency to composer "magento/e...","dev-devel..."
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "master"
 I read services yaml 
 I read app magento yaml 
 I write services yaml {"mysql":{"type":"mysql:10.3","di...}
 I write app magento yaml {"name":"mymagento","type":"ph...}
 I write env magento yaml {"stage":{"global":{"SCD_ON_DE...}
 I get exposed port 
 I get exposed port "db_quote"
 I get exposed port "db_sales"
 I run ece docker command "build:compose --mode=producti..."
 I replace images with generated 
 I start environment 
 I run docker compose command "run build cloud-build"
 I run docker compose command "run deploy cloud-deploy"
 I am connected to database "db_quote"
 I grab num records "quote_id_mask"
 I grab num records "quote_address_item"
 I grab num records "quote_address"
 I grab num records "quote"
 I am connected to database "db_sales"
 I grab num records "sales_invoice"
 I grab num records "sales_invoice_grid"
 I grab num records "sales_invoice_item"
 I grab num records "sales_order"
 I grab num records "sales_order_grid"
 I grab num records "sales_order_tax"
 I run docker compose command "run deploy cloud-post-deploy"
 I am on page "/"
 I stop environment 
 I remove work dir 
 ERROR 

------------------------------------------------------------
13x DEPRECATION: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. /app/vendor/symfony/process/Process.php:147
4x DEPRECATION: The Robo\Common\ProcessUtils::escapeArgument() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0. /app/vendor/consolidation/robo/src/Common/ProcessUtils.php:39

Time: 15.14 minutes, Memory: 16.00 MB

There was 1 error:

---------
1) SplitDbCest: Test split db on production mode
 Test  src/Test/Functional/Acceptance/SplitDbCest.php:testSplitDbOnProductionMode

  [GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to magento2.docker port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://magento2.docker/  

Scenario Steps:

 42. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:53
 41. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:52
 40. $I->amOnPage("/") at src/Test/Functional/Acceptance/SplitDbCest.php:80
 39. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/SplitDbCest.php:79
 38. $I->grabNumRecords("sales_order_tax") at src/Test/Functional/Acceptance/SplitDbCest.php:77
 37. $I->grabNumRecords("sales_order_grid") at src/Test/Functional/Acceptance/SplitDbCest.php:77

#1  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
#2  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
#3  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
#4  /app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
#5  /app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
#6  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:37
#7  /app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:55
#8  /app/vendor/guzzlehttp/guzzle/src/Middleware.php:63
#9  /app/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
#10 /app/vendor/guzzlehttp/guzzle/src/Client.php:331

ERRORS!
Tests: 1, Assertions: 1, Errors: 1.
- XML report generated in file:///app/tests/functional/_output/junit.xml

This comment was generated by Jenkins job magento-cloud-docker/functional build 6.

oshmyheliuk commented 3 years ago

@IgorVitol Thank you for your contribution, your pr has been merged from our internal repository. This one wasn't automatically marked as merged as it has an additional merge commit which was added after this PR was imported in our internal repo.