magento-cloud-docker icon indicating copy to clipboard operation
magento-cloud-docker copied to clipboard

Add support for Elasticsearch 7.16 and 7.17

Open phoenix-bjoern opened this issue 2 years ago • 7 comments

Description

The images for Elasticsearch are outdated and versions are unsupported by recent Adobe Commerce / Magento releases (https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html). The PR adds support for Elasticsearch 7.16 and 7.17 to match system requirements.

Fixed Issues

The upstream images switched their base image from centos:8 to ubuntu:20.04. Furthermore the log4j vulnerability has been fixed in ES 7.16 (https://www.elastic.co/de/blog/new-elasticsearch-and-logstash-releases-upgrade-apache-log4j2). Hence the patching of the log4j class is not required and the Dockerfile can be simplified.

Manual testing scenarios

Build for both new Elastcisearch version can be tested by:

  1. docker build -f images/elasticsearch/7.16/Dockerfile images/elasticsearch/7.16
  2. docker build -f images/elasticsearch/7.17/Dockerfile images/elasticsearch/7.17

Release notes

  • Added support for Elasticsearch 7.16 and 7.17

phoenix-bjoern avatar Feb 06 '23 13:02 phoenix-bjoern

Functional Acceptance Test Results

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

PHP 7.2

  • :white_check_mark:  Elasticsearch72Cest
  • :white_check_mark:  Services72Cest
  • :x:  Acceptance72Cest

PHP 7.3

  • :white_check_mark:  ServicesCest
  • :white_check_mark:  Elasticsearch73Cest
  • :white_check_mark:  Acceptance73Cest

PHP 7.4

  • :white_check_mark:  Elasticsearch74Cest
  • :white_check_mark:  Acceptance74Cest

PHP 8.1

  • :white_check_mark:  DeveloperCest
  • :white_check_mark:  ElasticsearchCest
  • :white_check_mark:  MailHogCest
  • :white_check_mark:  OpensearchCest
  • :white_check_mark:  AcceptanceCest

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 160.

PHP 7.2 Acceptance72Cest Output

Codeception PHP Testing Framework v4.2.2 https://helpukrainewin.org
Powered by PHPUnit 8.5.32 by Sebastian Bergmann and contributors.

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.3.1"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-c...","1.3.1"
 I add ece tools git repo to composer 
 I get dependency version "magento/ece-tools"
 I add dependency to composer "magento/e...","dev-devel..."
 I get dependency version "magento/magento-cloud-components"
 I get dependency version "magento/magento-cloud-patches"
 I get dependency version "magento/quality-patches"
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.2"
sh: rsync: not found
 I generate docker compose "--mode=production"
 I assert true true,"Command build:compose failed"
 I replace images with custom 
 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 see "Home page"
 I run docker compose command "ps"
 I stop environment 
 I remove work dir 
 FAIL 

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.3.1"
 I add artifacts repo to composer 
 I add dependency to composer "magento/magento-c...","1.3.1"
 I add ece tools git repo to composer 
 I get dependency version "magento/ece-tools"
 I add dependency to composer "magento/e...","dev-devel..."
 I get dependency version "magento/magento-cloud-components"
 I get dependency version "magento/magento-cloud-patches"
 I get dependency version "magento/quality-patches"
 I composer update 
 I assert true true,"Composer update failed"
 I cache work dir "2.3.2"
sh: rsync: not found
 I update base url "http://magento2.test/"
 I generate docker compose "--mode=production --host=mag..."
 I assert true true,"Command build:compose failed"
 I replace images with custom 
 I start environment 
 I run docker compose command "run build cloud-build"
 I assert true false,"Build phase failed"
 I run docker compose command "ps"
 I stop environment 
 I remove work dir 
 FAIL 

------------------------------------------------------------
28x 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: 18.09 minutes, Memory: 18.00 MB

There were 2 failures:

---------
1) Acceptance72Cest: Test production mode
 Test  src/Test/Functional/Acceptance/Acceptance72Cest.php:testProductionMode
 Step  See "Home page"
 Fail  Failed asserting that  on page /
-->  Autoload error We can't read some files that are required to run the Magento application. This usually means file permissions are set incorrectly. 
--> contains "Home page".

Scenario Steps:

 29. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:72
 28. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:71
 27. $I->runDockerComposeCommand("ps") at src/Test/Functional/Acceptance/AbstractCest.php:70
 26. $I->see("Home page") at src/Test/Functional/Acceptance/AcceptanceCest.php:35
 25. $I->amOnPage("/") at src/Test/Functional/Acceptance/AcceptanceCest.php:34
 24. $I->runDockerComposeCommand("run deploy cloud-post...") at src/Test/Functional/Acceptance/AcceptanceCest.php:33

Artifacts:

Html: /app/tests/functional/_output/Magento.CloudDocker.Test.Functional.Acceptance.Acceptance72Cest.testProductionMode.fail.html
Response: /app/tests/functional/_output/Magento.CloudDocker.Test.Functional.Acceptance.Acceptance72Cest.testProductionMode.fail.html

---------
2) Acceptance72Cest: Test custom host
 Test  src/Test/Functional/Acceptance/Acceptance72Cest.php:testCustomHost
 Step  Assert true false,"Build phase failed"
 Fail  Build phase failed
Failed asserting that false is true.

Scenario Steps:

 27. $I->removeWorkDir() at src/Test/Functional/Acceptance/AbstractCest.php:72
 26. $I->stopEnvironment() at src/Test/Functional/Acceptance/AbstractCest.php:71
 25. $I->runDockerComposeCommand("ps") at src/Test/Functional/Acceptance/AbstractCest.php:70
 24. $I->assertTrue(false,"Build phase failed") at src/Test/Functional/Acceptance/AcceptanceCest.php:54
 23. $I->runDockerComposeCommand("run build cloud-build") at src/Test/Functional/Acceptance/AcceptanceCest.php:54
 22. $I->startEnvironment() at src/Test/Functional/Acceptance/AcceptanceCest.php:53


FAILURES!
Tests: 2, Assertions: 6, Failures: 2.
- XML report generated in file:///app/tests/functional/_output/junit.xml

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

@phoenix-bjoern thank you for your PR I will process this PR soon

BaDos avatar Feb 10 '23 00:02 BaDos

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

BaDos avatar Feb 13 '23 21:02 BaDos

@BaDos the Pull Request is successfully imported.

m2-github-services avatar Feb 13 '23 21:02 m2-github-services

@BaDos any update on processing the PR.

phoenix-bjoern avatar Feb 18 '23 09:02 phoenix-bjoern

@BaDos any update here?

phoenix-bjoern avatar Mar 31 '23 17:03 phoenix-bjoern