From a8ce88621217ea9ce5cc0997532e098fe6702b02 Mon Sep 17 00:00:00 2001
From: Heather Guthrie
Date: Wed, 5 Apr 2023 11:59:43 -0500
Subject: [PATCH 01/10] MAGECLOUD-9766 update error code schema
---
config/schema.error.yaml | 68 ++++++++++++-------------
config/schema.yaml | 8 +--
src/Command/DbDump.php | 2 +-
src/Command/Dev/GenerateSchemaError.php | 1 -
4 files changed, 39 insertions(+), 40 deletions(-)
diff --git a/config/schema.error.yaml b/config/schema.error.yaml
index 6c0cd68bc..2e57576a2 100644
--- a/config/schema.error.yaml
+++ b/config/schema.error.yaml
@@ -1,12 +1,12 @@
# Critical errors
!php/const Magento\MagentoCloud\App\Error::BUILD_ENV_PHP_IS_NOT_WRITABLE:
- title: 'Cannot write to the `./app/etc/env.php` file'
- suggestion: 'Deployment script cannot make required changes to the `/app/etc/env.php` file. Check your filesystem permissions.'
+ title: 'Can not write to the `./app/etc/env.php` file'
+ suggestion: 'Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_CONFIG_NOT_DEFINED:
- title: 'Configuration isn''t defined in the `schema.yaml` file'
- suggestion: 'Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined.'
+ title: 'Configuration is not defined in the `schema.yaml` file'
+ suggestion: 'Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct and defined.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_CONFIG_PARSE_FAILED:
@@ -26,32 +26,32 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_CONFIG_PHP_IS_NOT_WRITABLE:
step: refresh-modules
- title: 'Cannot write to the `./app/etc/config.php` file'
- suggestion: 'The deployment script cannot make required changes to the `/app/etc/config.php` file. Check your filesystem permissions.'
+ title: 'Can not write to the `./app/etc/config.php` file'
+ suggestion: 'The deployment script can not make required changes to the `/app/etc/config.php` file. Check your filesystem permissions.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_CANT_READ_COMPOSER_JSON:
step: validate-config
- title: 'Cannot read the `composer.json` file'
+ title: 'Can not read the `composer.json` file'
suggestion: 'Unable to read the `./composer.json` file. Check file permissions.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_COMPOSER_MISSED_REQUIRED_AUTOLOAD:
step: validate-config
- title: 'Composer.json is missing required autoload section'
+ title: 'The `composer.json` file is missing required autoload section'
suggestion: 'Required `autoload` section is missing from the `composer.json` file. Compare the autoload section to the `composer.json` file in the Cloud template, and add the missing configuration.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_WRONG_CONFIGURATION_MAGENTO_ENV_YAML:
step: validate-config
- title: 'The file `.magento.env.yaml` contains an option that is not declared in the schema, or an option configured with an invalid value or stage'
+ title: 'The `.magento.env.yaml` file contains an option that is not declared in the schema, or an option configured with an invalid value or stage'
suggestion: 'The `./.magento.env.yaml` file contains invalid configuration. Check the error log for detailed info.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_MODULE_ENABLE_COMMAND_FAILED:
step: refresh-modules
title: 'Command failed: `/bin/magento module:enable --all`'
- suggestion: 'Try to run `composer update` locally. Then, commit and push the updated `composer.lock` file. Also check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: ''-vvv''` option to the `.magento.env.yaml` file.'
+ suggestion: 'Try to run `composer update` locally. Then, commit and push the updated `composer.lock` file. Also, check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: ''-vvv''` option to the `.magento.env.yaml` file.'
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_PATCH_APPLYING_FAILED:
@@ -62,7 +62,7 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_FILE_LOCAL_XML_IS_NOT_WRITABLE:
step: set-report-dir-nesting-level
- title: 'Cannot write to the file `/pub/errors/local.xml`'
+ title: 'Can not write to the file `/pub/errors/local.xml`'
suggestion: ''
stage: build
type: critical
@@ -92,7 +92,7 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_UTILITY_NOT_FOUND:
step: compress-static-content
- title: 'Required utility wasn''t found (timeout, bash)'
+ title: 'Required utility was not found (timeout, bash)'
suggestion: ''
stage: build
type: critical
@@ -132,7 +132,7 @@
stage: build
type: critical
!php/const Magento\MagentoCloud\App\Error::BUILD_COMPOSER_PACKAGE_NOT_FOUND:
- title: 'Cannot find the Composer package'
+ title: 'Can not find the Composer package'
suggestion: 'If you installed the Adobe Commerce application version directly from the GitHub repository, verify that the `DEPLOYED_MAGENTO_VERSION_FROM_GIT` environment variable is configured.'
stage: build
type: critical
@@ -149,12 +149,12 @@
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_ENV_PHP_IS_NOT_WRITABLE:
- title: 'Cannot write to the `./app/etc/env.php` file'
- suggestion: 'Deployment script cannot make required changes to the `/app/etc/env.php` file. Check your filesystem permissions.'
+ title: 'Can not write to the `./app/etc/env.php` file'
+ suggestion: 'Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions.'
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_CONFIG_NOT_DEFINED:
- title: 'Configuration isn''t defined in the `schema.yaml` file'
+ title: 'Configuration is not defined in the `schema.yaml` file'
suggestion: 'Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined.'
stage: deploy
type: critical
@@ -175,7 +175,7 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_REDIS_CACHE_CLEAN_FAILED:
title: 'Failed to clean the Redis cache'
- suggestion: 'Failed to clean the Redis cache. Check that the Redis cache configuration is correct and that the Redis service is available. See [Setup Redis service](https://devdocs.magento.com/cloud/project/services-redis.html).'
+ suggestion: 'Failed to clean the Redis cache. Check that the Redis cache configuration is correct and that the Redis service is available. See [Setup Redis service](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/service/redis.html).'
step: 'pre-deploy: clean-redis-cache'
stage: deploy
type: critical
@@ -239,7 +239,7 @@
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_UTILITY_NOT_FOUND:
- title: 'Required utility wasn''t found (timeout, bash)'
+ title: 'Required utility was not found (timeout, bash)'
suggestion: ''
stage: deploy
type: critical
@@ -257,8 +257,8 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_SCD_CANNOT_UPDATE_VERSION:
step: 'deploy-static-content:generate'
- title: 'Cannot update the deployed version'
- suggestion: 'Cannot update the `./pub/static/deployed_version.txt` file. Check your filesystem permissions.'
+ title: 'Can not update the deployed version'
+ suggestion: 'Can not update the `./pub/static/deployed_version.txt` file. Check your filesystem permissions.'
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_SCD_CLEAN_FAILED:
@@ -318,7 +318,7 @@
!php/const Magento\MagentoCloud\App\Error::DEPLOY_CRYPT_KEY_IS_ABSENT:
step: install-update
title: 'The `crypt/key` key value does not exist in the `./app/etc/env.php` file or the `CRYPT_KEY` cloud environment variable'
- suggestion: "This error occurs if the `./app/etc/env.php` file is not present when Adobe Commerce deployment begins, or if the `crypt/key` value is undefined. If you migrated the database from another environment, retrieve the crypt key value from that environment. Then, add the value to the [CRYPT_KEY](https://devdocs.magento.com/cloud/env/variables-deploy.html#crypt_key) cloud environment variable in your current environment. See [Add the Magento encryption key](https://devdocs.magento.com/cloud/setup/first-time-setup-import-import.html#encryption-key). If you accidentally removed the `./app/etc/env.php` file, use the following command to restore it from the backup files created from a previous deployment: `./vendor/bin/ece-tools backup:restore` CLI command .\""
+ suggestion: "This error occurs if the `./app/etc/env.php` file is not present when Adobe Commerce deployment begins, or if the `crypt/key` value is undefined. If you migrated the database from another environment, retrieve the crypt key value from that environment. Then, add the value to the [CRYPT_KEY](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/env/stage/variables-deploy.html#crypt_key) cloud environment variable in your current environment. See [Adobe Commerce encryption key](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/overview.html#gather-credentials). If you accidentally removed the `./app/etc/env.php` file, use the following command to restore it from the backup files created from a previous deployment: `./vendor/bin/ece-tools backup:restore` CLI command .\""
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_ES_CANNOT_CONNECT:
@@ -327,8 +327,8 @@
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_OS_CANNOT_CONNECT:
- title: 'Can not connect to the Opensearch service'
- suggestion: 'Check for valid Opensearch credentials and verify that the service is running'
+ title: 'Can not connect to the OpenSearch service'
+ suggestion: 'Check for valid OpenSearch credentials and verify that the service is running'
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_WRONG_BRAINTREE_VARIABLE:
@@ -345,8 +345,8 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_OS_SERVICE_NOT_INSTALLED:
step: validate-config
- title: 'Adobe Commerce and Magento Open Source 2.4.4 requires Opensearch or Elasticsearch service to be installed'
- suggestion: 'Install Opensearch service'
+ title: 'Adobe Commerce and Magento Open Source 2.4.4 requires OpenSearch or Elasticsearch service to be installed'
+ suggestion: 'Install OpenSearch service'
stage: deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::DEPLOY_WRONG_SEARCH_ENGINE:
@@ -369,11 +369,11 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::PD_ENV_PHP_IS_NOT_WRITABLE:
title: 'The `./app/etc/env.php` file is not writable'
- suggestion: 'Deployment script cannot make required changes to the `/app/etc/env.php` file. Check your filesystem permissions.'
+ suggestion: 'Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions.'
stage: post-deploy
type: critical
!php/const Magento\MagentoCloud\App\Error::PD_CONFIG_NOT_DEFINED:
- title: 'Configuration isn''t defined in the `schema.yaml` file'
+ title: 'Configuration is not defined in the `schema.yaml` file'
suggestion: 'Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined.'
stage: post-deploy
type: critical
@@ -394,7 +394,7 @@
type: critical
!php/const Magento\MagentoCloud\App\Error::PD_DURING_PAGE_WARM_UP:
step: warm-up
- title: 'Failed to warm-up some pages'
+ title: 'Failed to preload some warm-up pages'
suggestion: ''
stage: post-deploy
type: critical
@@ -472,7 +472,7 @@
step: validate-config
type: warning
!php/const Magento\MagentoCloud\App\Error::WARN_BALER_CANNOT_BE_USED:
- title: 'Baler JS bundling cannot be used'
+ title: 'Baler JS bundling can not be used'
stage: build
step: run-baler
type: warning
@@ -583,7 +583,7 @@
type: warning
!php/const Magento\MagentoCloud\App\Error::WARN_ENV_PHP_MISSED:
title: 'Adobe Commerce installation completed, but the `app/etc/env.php` configuration file was missing or empty.'
- suggestion: 'Required data will be restored from environment configurations and from .magento.env.yaml file.'
+ suggestion: 'Required data will be restored from environment configurations and from the .magento.env.yaml file.'
stage: deploy
step: install-update
type: warning
@@ -647,7 +647,7 @@
step: warm-up
type: warning
!php/const Magento\MagentoCloud\App\Error::WARN_CREATE_CONFIG_BACKUP_FAILED:
- title: 'Cannot create backup files'
+ title: 'Can not create backup files'
stage: post-deploy
step: backup
type: warning
@@ -656,14 +656,14 @@
type: warning
stage: general
!php/const Magento\MagentoCloud\App\Error::WARN_OS_ES_SERVICES_BOTH_INSTALLED:
- title: 'Elasticsearch and Opensearch services are both installed at infrastructure layer. Adobe Commerce and Magento Open Source 2.4.4 and higher use Opensearch by default'
- suggestion: 'Consider removing the Elasticsearch or Opensearch service from the infrastructure layer to optimize resource usage.'
+ title: 'Elasticsearch and OpenSearch services are both installed at infrastructure layer. Adobe Commerce and Magento Open Source 2.4.4 and later use OpenSearch by default'
+ suggestion: 'Consider removing the Elasticsearch or OpenSearch service from the infrastructure layer to optimize resource usage.'
stage: deploy
step: validate-config
type: warning
!php/const Magento\MagentoCloud\App\Error::DEPLOY_MAGENTO_VERSION_DOES_NOT_SUPPORT_OS:
step: validate-config
title: 'Incorrect search engine'
- suggestion: 'This Adobe Commerce or Magento Open Source version does not support Opensearch. You must use versions 2.3.7-p3, 2.4.3-p2, or higher'
+ suggestion: 'This Adobe Commerce or Magento Open Source version does not support OpenSearch. You must use versions 2.3.7-p3, 2.4.3-p2, or later'
stage: deploy
type: critical
diff --git a/config/schema.yaml b/config/schema.yaml
index 1d8e3fb82..5317b4d4f 100644
--- a/config/schema.yaml
+++ b/config/schema.yaml
@@ -57,9 +57,9 @@ variables:
build:
SCD_COMPRESSION_TIMEOUT: 900
SCD_STRATEGY:
- description: Customize the deployment strategy for static content. The value "standard" will deploy all static view
- files for all packages, "quick" will minimize deployment time, and "compact" will conserve space on the server.
- Compact is not compatible with multi-threaded deployment and will set the value of `SCD_THREADS` to 1. The default
+ description: Customize the deployment strategy for static content. The value "standard" deploys all static view
+ files for all packages, "quick" minimizes deployment time, and "compact" conserves space on the server.
+ Compact is not compatible with multi-threaded deployment and sets the value of `SCD_THREADS` to 1. The default
value is "quick".
type: string
magento_version: '>=2.2.0'
@@ -218,7 +218,7 @@ variables:
MIN_LOGGING_LEVEL:
description: Use to override the minimum logging level for all output streams without making changes to the code.
This helps to improve troubleshooting problems with deployment. For example, if your deployment fails,
- you can use this variable to increase the logging granularity globally. Doesn't affect log level for the file output.
+ you can use this variable to increase the logging granularity globally. Does not affect log level for the file output.
See Set up notifications—Log levels.
type: string
allowed:
diff --git a/src/Command/DbDump.php b/src/Command/DbDump.php
index 128b9e3d0..d56f5cf1a 100644
--- a/src/Command/DbDump.php
+++ b/src/Command/DbDump.php
@@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$questionParts = [
'The db-dump operation switches the site to maintenance mode, stops all active cron jobs ' .
- 'and consumer queue processes, and disables cron jobs before starting the the dump process.',
+ 'and consumer queue processes, and disables cron jobs before starting the dump process.',
'Your site will not receive any traffic until the operation completes.',
'Do you wish to proceed with this process? (y/N)?',
];
diff --git a/src/Command/Dev/GenerateSchemaError.php b/src/Command/Dev/GenerateSchemaError.php
index f33ba0437..22739dbab 100644
--- a/src/Command/Dev/GenerateSchemaError.php
+++ b/src/Command/Dev/GenerateSchemaError.php
@@ -137,7 +137,6 @@ private function generateDocs(array $errors): string
foreach ($typeErrors as $stage => $stageErrors) {
$result .= sprintf("\n### %s%s\n", ucfirst($stage), $stage === 'general' ? '' : ' stage');
- $table = "\n{:.error-table}\n";
$table .= sprintf(
"| Error code | %s step | Error description (Title) | Suggested action |\n",
ucfirst($stage)
From 722d86131020772efd062f1ac1e0b332fa4a0d6b Mon Sep 17 00:00:00 2001
From: Heather Guthrie
Date: Tue, 18 Apr 2023 11:31:50 -0500
Subject: [PATCH 02/10] remove footer
---
src/Command/Dev/GenerateSchemaError.php | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/src/Command/Dev/GenerateSchemaError.php b/src/Command/Dev/GenerateSchemaError.php
index 22739dbab..b1f002e0e 100644
--- a/src/Command/Dev/GenerateSchemaError.php
+++ b/src/Command/Dev/GenerateSchemaError.php
@@ -33,28 +33,6 @@ class GenerateSchemaError extends Command
*/
private $fileList;
- /**
- * CSS style which appends in the bottom of the file
- */
- private const FOOTER_SCRIPTS = <<
-
-
-
-
-
-EOT;
-
/**
*
* @param File $file
@@ -156,7 +134,7 @@ private function generateDocs(array $errors): string
}
}
- return $result . self::FOOTER_SCRIPTS;
+ return $result;
}
/**
From 392e1427cd2d28750dca4f6c140ae0c68b424be2 Mon Sep 17 00:00:00 2001
From: Heather Guthrie
Date: Tue, 18 Apr 2023 11:37:20 -0500
Subject: [PATCH 03/10] errant operand
---
src/Command/Dev/GenerateSchemaError.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Command/Dev/GenerateSchemaError.php b/src/Command/Dev/GenerateSchemaError.php
index b1f002e0e..c70f3047e 100644
--- a/src/Command/Dev/GenerateSchemaError.php
+++ b/src/Command/Dev/GenerateSchemaError.php
@@ -115,7 +115,7 @@ private function generateDocs(array $errors): string
foreach ($typeErrors as $stage => $stageErrors) {
$result .= sprintf("\n### %s%s\n", ucfirst($stage), $stage === 'general' ? '' : ' stage');
- $table .= sprintf(
+ $table = sprintf(
"| Error code | %s step | Error description (Title) | Suggested action |\n",
ucfirst($stage)
);
From 80241c62f73b01c86b8ed958ef81cc2738ace250 Mon Sep 17 00:00:00 2001
From: Bohdan Korablov
Date: Fri, 14 Jul 2023 11:29:30 -0500
Subject: [PATCH 04/10] MCLOUD-10692: Improve the ece tools to be able to use
custom Redis backend model (#114)
* MCLOUD-10692: Improve the ece tools to be able to use custom Redis backend model
---
src/Step/Deploy/PreDeploy/CleanRedisCache.php | 3 +-
.../Deploy/PreDeploy/ConfigUpdate/Cache.php | 9 +-
.../Functional/Acceptance/BackupDb24Cest.php | 2 +-
.../Functional/Acceptance/Redis74Cest.php | 47 +++++++-
.../Functional/Acceptance/Redis81Cest.php | 49 ++++++++-
src/Test/Functional/Acceptance/RedisCest.php | 103 +++++++++++++++++-
.../Functional/Acceptance/RedisPhp72Cest.php | 23 +++-
.../Acceptance/RedisPhp72GoodConfigCest.php | 57 ++++++++--
.../Functional/Acceptance/RedisPhp73Cest.php | 24 +++-
.../Acceptance/RedisPhp73GoodConfigCest.php | 53 ++++++++-
.../Deploy/PreDeploy/CleanRedisCacheTest.php | 21 ++--
.../PreDeploy/ConfigUpdate/CacheTest.php | 31 ++++++
12 files changed, 384 insertions(+), 38 deletions(-)
diff --git a/src/Step/Deploy/PreDeploy/CleanRedisCache.php b/src/Step/Deploy/PreDeploy/CleanRedisCache.php
index 24b0059fa..b2f45e5e9 100644
--- a/src/Step/Deploy/PreDeploy/CleanRedisCache.php
+++ b/src/Step/Deploy/PreDeploy/CleanRedisCache.php
@@ -68,8 +68,9 @@ public function execute(): void
foreach ($cacheConfigs['frontend'] as $cacheType => $cacheConfig) {
$backend = $cacheConfig['backend'];
+ $customRedisBackend = $cacheConfig['_custom_redis_backend'] ?? false;
- if (!in_array($backend, CacheConfig::AVAILABLE_REDIS_BACKEND, true)) {
+ if (!$customRedisBackend && !in_array($backend, CacheConfig::AVAILABLE_REDIS_BACKEND, true)) {
continue;
}
diff --git a/src/Step/Deploy/PreDeploy/ConfigUpdate/Cache.php b/src/Step/Deploy/PreDeploy/ConfigUpdate/Cache.php
index 009fc4ec9..8055fbc14 100644
--- a/src/Step/Deploy/PreDeploy/ConfigUpdate/Cache.php
+++ b/src/Step/Deploy/PreDeploy/ConfigUpdate/Cache.php
@@ -19,6 +19,8 @@
/**
* Processes cache configuration.
+ *
+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
class Cache implements StepInterface
{
@@ -81,9 +83,10 @@ public function execute()
if (isset($cacheConfig['frontend'])) {
$cacheConfig['frontend'] = array_filter($cacheConfig['frontend'], function ($cacheFrontend) {
$backend = $cacheFrontend['backend'];
+ $customRedisBackend = $cacheFrontend['_custom_redis_backend'] ?? false;
$this->checkBackendModel($backend);
- if (!in_array($backend, CacheFactory::AVAILABLE_REDIS_BACKEND, true)) {
+ if (!$customRedisBackend && !in_array($backend, CacheFactory::AVAILABLE_REDIS_BACKEND, true)) {
return true;
}
@@ -93,6 +96,10 @@ public function execute()
return $this->testRedisConnection($backendOptions);
});
+
+ foreach (array_keys($cacheConfig['frontend']) as $cacheConfigType) {
+ unset($cacheConfig['frontend'][$cacheConfigType]['_custom_redis_backend']);
+ }
}
if (empty($cacheConfig)) {
diff --git a/src/Test/Functional/Acceptance/BackupDb24Cest.php b/src/Test/Functional/Acceptance/BackupDb24Cest.php
index 5c6cae4cd..f0a8f86ca 100644
--- a/src/Test/Functional/Acceptance/BackupDb24Cest.php
+++ b/src/Test/Functional/Acceptance/BackupDb24Cest.php
@@ -71,7 +71,7 @@ public function testBackUpDb(CliTester $I, Example $data): void
protected function dataProviderMagentoCloudVersions(): array
{
return [
- ['version' => 'master'],
+ ['version' => '2.4.3'],
];
}
diff --git a/src/Test/Functional/Acceptance/Redis74Cest.php b/src/Test/Functional/Acceptance/Redis74Cest.php
index bfccb394d..2f728f509 100644
--- a/src/Test/Functional/Acceptance/Redis74Cest.php
+++ b/src/Test/Functional/Acceptance/Redis74Cest.php
@@ -31,7 +31,7 @@ protected function defaultConfigurationDataProvider(): array
/**
* @return array
*/
- protected function wrongConfigurationDataProvider(): array
+ protected function wrongConfigurationRedisBackendDataProvider(): array
{
return [
[
@@ -63,7 +63,7 @@ protected function goodConfigurationDataProvider(): array
return [
[
'version' => '2.4.3',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -81,7 +81,27 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.4.3',
- 'backendModel' => [
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ 'backend' => '\CustomRedisModel',
+ 'backend_options' => [],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'expectedBackend' => '\CustomRedisModel',
+ 'expectedConfig' => [],
+ ],
+ [
+ 'version' => '2.4.3',
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -109,4 +129,25 @@ protected function goodConfigurationDataProvider(): array
],
];
}
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
}
diff --git a/src/Test/Functional/Acceptance/Redis81Cest.php b/src/Test/Functional/Acceptance/Redis81Cest.php
index 05b57670e..ab582d912 100644
--- a/src/Test/Functional/Acceptance/Redis81Cest.php
+++ b/src/Test/Functional/Acceptance/Redis81Cest.php
@@ -18,6 +18,7 @@ class Redis81Cest extends RedisCest
{
/**
* @inheritdoc
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function _before(\CliTester $I): void
{
@@ -111,7 +112,7 @@ protected function defaultConfigurationDataProvider(): array
* @param \CliTester $I
* @param \Codeception\Example $data
* @throws \Robo\Exception\TaskException
- * @dataProvider wrongConfigurationDataProvider
+ * @dataProvider wrongConfigurationRedisBackendDataProvider
*/
public function testWrongConfiguration(\CliTester $I, \Codeception\Example $data): void
{
@@ -170,7 +171,7 @@ public function testGoodConfiguration(\CliTester $I, \Codeception\Example $data)
$I->getExposedPort()
));
- $I->writeEnvMagentoYaml($data['backendModel']);
+ $I->writeEnvMagentoYaml($data['configuration']);
$I->assertTrue($I->runDockerComposeCommand('run build cloud-build'), 'Build phase was failed');
$I->assertTrue($I->startEnvironment(), 'Docker could not start');
@@ -204,7 +205,7 @@ protected function goodConfigurationDataProvider(): array
return [
[
'version' => '2.4.4',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -222,7 +223,27 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.4.4',
- 'backendModel' => [
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ 'backend' => '\CustomRedisModel',
+ 'backend_options' => [],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'expectedBackend' => '\CustomRedisModel',
+ 'expectedConfig' => [],
+ ],
+ [
+ 'version' => '2.4.4',
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -250,4 +271,24 @@ protected function goodConfigurationDataProvider(): array
],
];
}
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
}
diff --git a/src/Test/Functional/Acceptance/RedisCest.php b/src/Test/Functional/Acceptance/RedisCest.php
index f0249c759..c3de4d888 100644
--- a/src/Test/Functional/Acceptance/RedisCest.php
+++ b/src/Test/Functional/Acceptance/RedisCest.php
@@ -111,9 +111,9 @@ protected function defaultConfigurationDataProvider(): array
* @param \CliTester $I
* @param \Codeception\Example $data
* @throws \Robo\Exception\TaskException
- * @dataProvider wrongConfigurationDataProvider
+ * @dataProvider wrongConfigurationRedisBackendDataProvider
*/
- public function testWrongConfiguration(\CliTester $I, \Codeception\Example $data): void
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
{
$this->prepareWorkplace($I, $data['version']);
$I->generateDockerCompose(sprintf(
@@ -133,7 +133,7 @@ public function testWrongConfiguration(\CliTester $I, \Codeception\Example $data
/**
* @return array
*/
- protected function wrongConfigurationDataProvider(): array
+ protected function wrongConfigurationRedisBackendDataProvider(): array
{
return [
[
@@ -156,6 +156,77 @@ protected function wrongConfigurationDataProvider(): array
];
}
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @throws \Robo\Exception\TaskException
+ * @dataProvider redisWrongConnectionDataProvider
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ $this->prepareWorkplace($I, $data['version']);
+ $I->generateDockerCompose(sprintf(
+ '--mode=production --expose-db-port=%s',
+ $I->getExposedPort()
+ ));
+
+ $I->writeEnvMagentoYaml($data['configuration']);
+
+ $I->assertTrue($I->runDockerComposeCommand('run build cloud-build'), 'Build phase was failed');
+ $I->assertTrue($I->startEnvironment(), 'Docker could not start');
+ $I->assertFalse($I->runDockerComposeCommand('run deploy cloud-deploy'), 'Deploy phase was successful');
+ }
+
+ /**
+ * @return array
+ */
+ protected function redisWrongConnectionDataProvider(): array
+ {
+ return [
+ [
+ 'version' => '2.4.6',
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ 'backend' => '\Magento\Framework\Cache\Backend\Redis',
+ 'backend_options' => [
+ 'port' => 9999,
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ [
+ 'version' => '2.4.6',
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ '_custom_redis_backend' => true,
+ 'backend' => '\CustomRedisModel',
+ 'backend_options' => [
+ 'port' => 9999,
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ];
+ }
+
/**
* @param \CliTester $I
* @param \Codeception\Example $data
@@ -170,7 +241,7 @@ public function testGoodConfiguration(\CliTester $I, \Codeception\Example $data)
$I->getExposedPort()
));
- $I->writeEnvMagentoYaml($data['backendModel']);
+ $I->writeEnvMagentoYaml($data['configuration']);
$I->assertTrue($I->runDockerComposeCommand('run build cloud-build'), 'Build phase was failed');
$I->assertTrue($I->startEnvironment(), 'Docker could not start');
@@ -204,7 +275,7 @@ protected function goodConfigurationDataProvider(): array
return [
[
'version' => '2.4.6',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -222,7 +293,27 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.4.6',
- 'backendModel' => [
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ 'backend' => '\CustomRedisModel',
+ 'backend_options' => [],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'expectedBackend' => '\CustomRedisModel',
+ 'expectedConfig' => [],
+ ],
+ [
+ 'version' => '2.4.6',
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
diff --git a/src/Test/Functional/Acceptance/RedisPhp72Cest.php b/src/Test/Functional/Acceptance/RedisPhp72Cest.php
index 43ad867b5..fdc1bb3d3 100644
--- a/src/Test/Functional/Acceptance/RedisPhp72Cest.php
+++ b/src/Test/Functional/Acceptance/RedisPhp72Cest.php
@@ -33,7 +33,7 @@ protected function defaultConfigurationDataProvider(): array
/**
* @return array
*/
- protected function wrongConfigurationDataProvider(): array
+ protected function wrongConfigurationRedisBackendDataProvider(): array
{
return [
[
@@ -76,11 +76,30 @@ protected function wrongConfigurationDataProvider(): array
/**
* @param \CliTester $I
* @param \Codeception\Example $data
- * @throws \Robo\Exception\TaskException
* @skip
*/
public function testGoodConfiguration(\CliTester $I, \Codeception\Example $data): void
{
return;
}
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
}
diff --git a/src/Test/Functional/Acceptance/RedisPhp72GoodConfigCest.php b/src/Test/Functional/Acceptance/RedisPhp72GoodConfigCest.php
index 611445eb9..f4e822b64 100644
--- a/src/Test/Functional/Acceptance/RedisPhp72GoodConfigCest.php
+++ b/src/Test/Functional/Acceptance/RedisPhp72GoodConfigCest.php
@@ -16,6 +16,7 @@ class RedisPhp72GoodConfigCest extends RedisCest
* @param \CliTester $I
* @param \Codeception\Example $data
* @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function testDefaultConfiguration(\CliTester $I, \Codeception\Example $data): void
{
@@ -27,6 +28,7 @@ public function testDefaultConfiguration(\CliTester $I, \Codeception\Example $da
* @param \Codeception\Example $data
* @throws \Robo\Exception\TaskException
* @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function testWrongConfiguration(\CliTester $I, \Codeception\Example $data): void
{
@@ -42,7 +44,7 @@ protected function goodConfigurationDataProvider(): array
return [
[
'version' => '2.3.0',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => 'Cm_Cache_Backend_Redis',
@@ -60,7 +62,27 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.0',
- 'backendModel' => [
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ 'backend' => '\CustomRedisModel',
+ 'backend_options' => [],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'expectedBackend' => '\CustomRedisModel',
+ 'expectedConfig' => [],
+ ],
+ [
+ 'version' => '2.3.0',
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -78,7 +100,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.0',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -106,7 +128,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.1',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -124,7 +146,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.1',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -152,7 +174,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.2',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -170,7 +192,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.2',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -198,4 +220,25 @@ protected function goodConfigurationDataProvider(): array
],
];
}
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
}
diff --git a/src/Test/Functional/Acceptance/RedisPhp73Cest.php b/src/Test/Functional/Acceptance/RedisPhp73Cest.php
index 7d1730e29..e1cbde4ef 100644
--- a/src/Test/Functional/Acceptance/RedisPhp73Cest.php
+++ b/src/Test/Functional/Acceptance/RedisPhp73Cest.php
@@ -19,6 +19,7 @@ class RedisPhp73Cest extends RedisCest
* @param \Codeception\Example $data
* @throws \Robo\Exception\TaskException
* @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function testGoodConfiguration(\CliTester $I, \Codeception\Example $data): void
{
@@ -43,7 +44,7 @@ protected function defaultConfigurationDataProvider(): array
/**
* @return array
*/
- protected function wrongConfigurationDataProvider(): array
+ protected function wrongConfigurationRedisBackendDataProvider(): array
{
return [
[
@@ -82,4 +83,25 @@ protected function wrongConfigurationDataProvider(): array
],
];
}
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
}
diff --git a/src/Test/Functional/Acceptance/RedisPhp73GoodConfigCest.php b/src/Test/Functional/Acceptance/RedisPhp73GoodConfigCest.php
index 42637fde1..20fec6a0d 100644
--- a/src/Test/Functional/Acceptance/RedisPhp73GoodConfigCest.php
+++ b/src/Test/Functional/Acceptance/RedisPhp73GoodConfigCest.php
@@ -16,6 +16,7 @@ class RedisPhp73GoodConfigCest extends RedisCest
* @param \CliTester $I
* @param \Codeception\Example $data
* @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function testDefaultConfiguration(\CliTester $I, \Codeception\Example $data): void
{
@@ -27,6 +28,7 @@ public function testDefaultConfiguration(\CliTester $I, \Codeception\Example $da
* @param \Codeception\Example $data
* @throws \Robo\Exception\TaskException
* @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function testWrongConfiguration(\CliTester $I, \Codeception\Example $data): void
{
@@ -42,7 +44,7 @@ protected function goodConfigurationDataProvider(): array
return [
[
'version' => '2.3.4',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => 'Cm_Cache_Backend_Redis',
@@ -60,7 +62,27 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.4',
- 'backendModel' => [
+ 'configuration' => [
+ 'stage' => [
+ 'deploy' => [
+ 'CACHE_CONFIGURATION' => [
+ '_merge' => true,
+ 'frontend' => [
+ 'default' => [
+ 'backend' => '\CustomRedisModel',
+ 'backend_options' => [],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'expectedBackend' => '\CustomRedisModel',
+ 'expectedConfig' => [],
+ ],
+ [
+ 'version' => '2.3.4',
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -78,7 +100,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.4',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -106,7 +128,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.5',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
@@ -124,7 +146,7 @@ protected function goodConfigurationDataProvider(): array
],
[
'version' => '2.3.5',
- 'backendModel' => [
+ 'configuration' => [
'stage' => [
'deploy' => [
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
@@ -152,4 +174,25 @@ protected function goodConfigurationDataProvider(): array
],
];
}
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ public function testRedisWrongConnection(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
+
+ /**
+ * @param \CliTester $I
+ * @param \Codeception\Example $data
+ * @skip
+ */
+ public function testWrongConfigurationRedisBackend(\CliTester $I, \Codeception\Example $data): void
+ {
+ return;
+ }
}
diff --git a/src/Test/Unit/Step/Deploy/PreDeploy/CleanRedisCacheTest.php b/src/Test/Unit/Step/Deploy/PreDeploy/CleanRedisCacheTest.php
index 868ed7862..92c2c68d3 100644
--- a/src/Test/Unit/Step/Deploy/PreDeploy/CleanRedisCacheTest.php
+++ b/src/Test/Unit/Step/Deploy/PreDeploy/CleanRedisCacheTest.php
@@ -104,36 +104,43 @@ public function testExecute(): void
],
'some_type3' => [
'backend' => 'SomeClase',
- ]
+ ],
+ 'some_type4' => [
+ 'backend' => 'SomeClase',
+ '_custom_redis_backend' => true,
+ 'backend_options' => []
+ ],
]
]);
- $this->loggerMock->expects($this->exactly(5))
+ $this->loggerMock->expects($this->exactly(6))
->method('info')
->withConsecutive(
['Clearing redis cache: default'],
['Clearing redis cache: page_cache'],
['Clearing redis cache: some_type0'],
['Clearing redis cache: some_type1'],
- ['Clearing redis cache: some_type2']
+ ['Clearing redis cache: some_type2'],
+ ['Clearing redis cache: some_type4']
);
/** @var Credis_Client|MockObject $credisClient */
$credisClient = $this->getMockBuilder(Credis_Client::class)
->setMethods(['connect', 'flushDb'])
->getMock();
- $this->credisFactoryMock->expects($this->exactly(5))
+ $this->credisFactoryMock->expects($this->exactly(6))
->method('create')
->withConsecutive(
['localhost', '1234', 0],
['127.0.0.1', 1234, 1],
['localhost', 6379, 2, 'password'],
['localhost', 1234, 0],
- ['127.0.0.1', 6379, 0]
+ ['127.0.0.1', 6379, 0],
+ []
)->willReturn($credisClient);
- $credisClient->expects($this->exactly(5))
+ $credisClient->expects($this->exactly(6))
->method('connect');
- $credisClient->expects($this->exactly(5))
+ $credisClient->expects($this->exactly(6))
->method('flushDb');
$this->step->execute();
diff --git a/src/Test/Unit/Step/Deploy/PreDeploy/ConfigUpdate/CacheTest.php b/src/Test/Unit/Step/Deploy/PreDeploy/ConfigUpdate/CacheTest.php
index 9f727330b..baeefb2c9 100644
--- a/src/Test/Unit/Step/Deploy/PreDeploy/ConfigUpdate/CacheTest.php
+++ b/src/Test/Unit/Step/Deploy/PreDeploy/ConfigUpdate/CacheTest.php
@@ -324,6 +324,37 @@ public function executeDataProvider(): array
'address' => 'localhost',
'port' => 6379
],
+ 'Custom redis model' => [
+ 'configFromFile' => [],
+ 'config' => [
+ 'frontend' => [
+ 'frontName' => [
+ 'backend' => 'SomeCustomRedisModel',
+ '_custom_redis_backend' => true,
+ 'backend_options' => [
+ 'server' => 'localhost',
+ 'port' => 6370,
+ ],
+ ],
+ ],
+ ],
+ 'finalConfig' => [
+ 'cache' => [
+ 'frontend' => [
+ 'frontName' => [
+ 'backend' => 'SomeCustomRedisModel',
+ 'backend_options' => [
+ 'server' => 'localhost',
+ 'port' => 6370,
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'isGreaterOrEqual' => true,
+ 'address' => 'localhost',
+ 'port' => 6370
+ ],
];
}
From 34b0dd7215345e70e8379f946fae7349707f6376 Mon Sep 17 00:00:00 2001
From: sasank <82241533+haal9000@users.noreply.github.com>
Date: Mon, 17 Jul 2023 22:05:17 -0700
Subject: [PATCH 05/10] MCLOUD-10250: update broken onboarding docs link in
email template (#115)
MCLOUD-10250: update broken onboarding docs link in email template
---
views/reset_password.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/reset_password.html b/views/reset_password.html
index dbb43178a..b3dfab041 100644
--- a/views/reset_password.html
+++ b/views/reset_password.html
@@ -100,7 +100,7 @@
Need help? See Onboarding
+ href="https://experienceleague.adobe.com/docs/commerce-cloud-service/start/onboarding.html">Onboarding
tasks in the Magento Commerce Cloud documentation.
From 20408280e073365914d15b348dce071d42ddb8e9 Mon Sep 17 00:00:00 2001
From: snekkalapudi
Date: Tue, 18 Jul 2023 22:06:06 +0530
Subject: [PATCH 06/10] update validator for rabbit mq
---
src/Service/Validator.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Service/Validator.php b/src/Service/Validator.php
index d3fcd3ace..02db51cc3 100644
--- a/src/Service/Validator.php
+++ b/src/Service/Validator.php
@@ -90,6 +90,7 @@ class Validator
'<2.3.0' => '~3.5.0',
'>=2.3.0 <2.3.7-p4 || >=2.4.0 <2.4.3-p3' => '~3.5.0 || ~3.7.0 || ~3.8.0',
'>=2.4.4 || ~2.4.3-p3 || ~2.3.7-p4' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0',
+ '>=2.4.7 <2.4.8' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ~3.11.0',
],
ServiceInterface::NAME_NODE => [
'*' => '^6 || ^8 || ^10 || ^11',
From 5f5dc6d8e97c64fd206576db738bacbe19cc27e6 Mon Sep 17 00:00:00 2001
From: Bohdan Korablov
Date: Tue, 18 Jul 2023 16:10:16 -0500
Subject: [PATCH 07/10] MCLOUD-10314: Update ece-tools validator for RabbitMQ
3.11
---
src/Service/Validator.php | 5 ++-
src/Test/Unit/Service/ValidatorTest.php | 54 +++++++++++++++++++++++--
2 files changed, 54 insertions(+), 5 deletions(-)
diff --git a/src/Service/Validator.php b/src/Service/Validator.php
index 02db51cc3..903a32bde 100644
--- a/src/Service/Validator.php
+++ b/src/Service/Validator.php
@@ -89,8 +89,9 @@ class Validator
ServiceInterface::NAME_RABBITMQ => [
'<2.3.0' => '~3.5.0',
'>=2.3.0 <2.3.7-p4 || >=2.4.0 <2.4.3-p3' => '~3.5.0 || ~3.7.0 || ~3.8.0',
- '>=2.4.4 || ~2.4.3-p3 || ~2.3.7-p4' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0',
- '>=2.4.7 <2.4.8' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ~3.11.0',
+ '>=2.4.3-p3 <2.4.5-p3 || ~2.3.7-p4' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0',
+ '>=2.4.5-p3 <2.4.7' => '~3.9.0 || ~3.11.0',
+ '>=2.4.7' => '~3.11.0',
],
ServiceInterface::NAME_NODE => [
'*' => '^6 || ^8 || ^10 || ^11',
diff --git a/src/Test/Unit/Service/ValidatorTest.php b/src/Test/Unit/Service/ValidatorTest.php
index 6e2113cc3..64be48406 100644
--- a/src/Test/Unit/Service/ValidatorTest.php
+++ b/src/Test/Unit/Service/ValidatorTest.php
@@ -110,7 +110,7 @@ public function testValidateNonexistentService()
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
- public function validateVersionsDataProvider(): array
+ protected function validateVersionsDataProvider(): array
{
return [
[
@@ -152,9 +152,9 @@ public function validateVersionsDataProvider(): array
ServiceInterface::NAME_VARNISH => '7.1.1',
ServiceInterface::NAME_REDIS => 'latest',
ServiceInterface::NAME_ELASTICSEARCH => '6.7', // wrong
- ServiceInterface::NAME_RABBITMQ => '3.7'
+ ServiceInterface::NAME_RABBITMQ => '3.7' // wrong
],
- 2
+ 3
],
[
'2.4.0',
@@ -486,6 +486,54 @@ public function validateVersionsDataProvider(): array
],
0
],
+ [
+ '2.4.6',
+ [
+ ServiceInterface::NAME_PHP => '8.2.0',
+ ServiceInterface::NAME_DB_MARIA => '10.6.0',
+ ServiceInterface::NAME_VARNISH => '7.1.1',
+ ServiceInterface::NAME_REDIS => '7.0.0',
+ ServiceInterface::NAME_OPENSEARCH => '2.3.0',
+ ServiceInterface::NAME_RABBITMQ => '3.11.0'
+ ],
+ 0
+ ],
+ [
+ '2.4.6',
+ [
+ ServiceInterface::NAME_PHP => '8.2.0',
+ ServiceInterface::NAME_DB_MARIA => '10.6.0',
+ ServiceInterface::NAME_VARNISH => '7.1.1',
+ ServiceInterface::NAME_REDIS => '7.0.0',
+ ServiceInterface::NAME_OPENSEARCH => '2.3.0',
+ ServiceInterface::NAME_RABBITMQ => '3.8.0' // wrong
+ ],
+ 1
+ ],
+ [
+ '2.4.7',
+ [
+ ServiceInterface::NAME_PHP => '8.2.0',
+ ServiceInterface::NAME_DB_MARIA => '10.6.0',
+ ServiceInterface::NAME_VARNISH => '7.1.1',
+ ServiceInterface::NAME_REDIS => '7.0.0',
+ ServiceInterface::NAME_OPENSEARCH => '2.3.0',
+ ServiceInterface::NAME_RABBITMQ => '3.9.0' // wrong
+ ],
+ 1
+ ],
+ [
+ '2.4.7',
+ [
+ ServiceInterface::NAME_PHP => '8.2.0',
+ ServiceInterface::NAME_DB_MARIA => '10.6.0',
+ ServiceInterface::NAME_VARNISH => '7.1.1',
+ ServiceInterface::NAME_REDIS => '7.0.0',
+ ServiceInterface::NAME_OPENSEARCH => '2.3.0',
+ ServiceInterface::NAME_RABBITMQ => '3.11.0'
+ ],
+ 0
+ ],
];
}
}
From 84c931552ea76f30f80d7b0ef94a42442e3f376b Mon Sep 17 00:00:00 2001
From: Bohdan Korablov
Date: Mon, 24 Jul 2023 13:21:45 -0500
Subject: [PATCH 08/10] Update error codes
---
dist/error-codes.md | 83 ++++++++++++++-------------------------------
1 file changed, 26 insertions(+), 57 deletions(-)
diff --git a/dist/error-codes.md b/dist/error-codes.md
index b36a6d36b..1d531b7b9 100644
--- a/dist/error-codes.md
+++ b/dist/error-codes.md
@@ -5,48 +5,44 @@
Critical errors indicate a problem with the Commerce on cloud infrastructure project configuration that causes deployment failure, for example incorrect, unsupported, or missing configuration for required settings. Before you can deploy, you must update the configuration to resolve these errors.
### Build stage
-
-{:.error-table}
| Error code | Build step | Error description (Title) | Suggested action |
| - | - | - | - |
-| 2 | | Cannot write to the `./app/etc/env.php` file | Deployment script cannot make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
-| 3 | | Configuration isn't defined in the `schema.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined. |
+| 2 | | Can not write to the `./app/etc/env.php` file | Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
+| 3 | | Configuration is not defined in the `schema.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct and defined. |
| 4 | | Failed to parse the `.magento.env.yaml` file | The `./.magento.env.yaml` file format is invalid. Use a YAML parser to check the syntax and fix any errors. |
| 5 | | Unable to read the `.magento.env.yaml` file | Unable to read the `./.magento.env.yaml` file. Check file permissions. |
| 6 | | Unable to read the `.schema.yaml` file | Unable to read the `./vendor/magento/ece-tools/config/magento.env.yaml` file. Check file permissions and redeploy (`magento-cloud environment:redeploy`). |
-| 7 | refresh-modules | Cannot write to the `./app/etc/config.php` file | The deployment script cannot make required changes to the `/app/etc/config.php` file. Check your filesystem permissions. |
-| 8 | validate-config | Cannot read the `composer.json` file | Unable to read the `./composer.json` file. Check file permissions. |
-| 9 | validate-config | Composer.json is missing required autoload section | Required `autoload` section is missing from the `composer.json` file. Compare the autoload section to the `composer.json` file in the Cloud template, and add the missing configuration. |
-| 10 | validate-config | The file `.magento.env.yaml` contains an option that is not declared in the schema, or an option configured with an invalid value or stage | The `./.magento.env.yaml` file contains invalid configuration. Check the error log for detailed info. |
-| 11 | refresh-modules | Command failed: `/bin/magento module:enable --all` | Try to run `composer update` locally. Then, commit and push the updated `composer.lock` file. Also check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
+| 7 | refresh-modules | Can not write to the `./app/etc/config.php` file | The deployment script can not make required changes to the `/app/etc/config.php` file. Check your filesystem permissions. |
+| 8 | validate-config | Can not read the `composer.json` file | Unable to read the `./composer.json` file. Check file permissions. |
+| 9 | validate-config | The `composer.json` file is missing required autoload section | Required `autoload` section is missing from the `composer.json` file. Compare the autoload section to the `composer.json` file in the Cloud template, and add the missing configuration. |
+| 10 | validate-config | The `.magento.env.yaml` file contains an option that is not declared in the schema, or an option configured with an invalid value or stage | The `./.magento.env.yaml` file contains invalid configuration. Check the error log for detailed info. |
+| 11 | refresh-modules | Command failed: `/bin/magento module:enable --all` | Try to run `composer update` locally. Then, commit and push the updated `composer.lock` file. Also, check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
| 12 | apply-patches | Failed to apply patch | |
-| 13 | set-report-dir-nesting-level | Cannot write to the file `/pub/errors/local.xml` | |
+| 13 | set-report-dir-nesting-level | Can not write to the file `/pub/errors/local.xml` | |
| 14 | copy-sample-data | Failed to copy sample data files | |
| 15 | compile-di | Command failed: `/bin/magento setup:di:compile` | Check the `cloud.log` for more information. Add `VERBOSE_COMMANDS: '-vvv'` into `.magento.env.yaml` for more detailed command output. |
| 16 | dump-autoload | Command failed: `composer dump-autoload` | The `composer dump-autoload` command failed. Check the `cloud.log` for more information. |
| 17 | run-baler | The command to run `Baler` for Javascript bundling failed | Check the `SCD_USE_BALER` environment variable to verify that the Baler module is configured and enabled for JS bundling. If you do not need the Baler module, set `SCD_USE_BALER: false`. |
-| 18 | compress-static-content | Required utility wasn't found (timeout, bash) | |
+| 18 | compress-static-content | Required utility was not found (timeout, bash) | |
| 19 | deploy-static-content | Command `/bin/magento setup:static-content:deploy` failed | Check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
| 20 | compress-static-content | Static content compression failed | Check the `cloud.log` for more information. |
| 21 | backup-data: static-content | Failed to copy static content into the `init` directory | Check the `cloud.log` for more information. |
| 22 | backup-data: writable-dirs | Failed to copy some writable directories into the `init` directory | Failed to copy writable directories into the `./init` folder. Check your filesystem permissions. |
| 23 | | Unable to create a logger object | |
| 24 | backup-data: static-content | Failed to clean the `./init/pub/static/` directory | Failed to clean `./init/pub/static` folder. Check your filesystem permissions. |
-| 25 | | Cannot find the Composer package | If you installed the Adobe Commerce application version directly from the GitHub repository, verify that the `DEPLOYED_MAGENTO_VERSION_FROM_GIT` environment variable is configured. |
+| 25 | | Can not find the Composer package | If you installed the Adobe Commerce application version directly from the GitHub repository, verify that the `DEPLOYED_MAGENTO_VERSION_FROM_GIT` environment variable is configured. |
| 26 | validate-config | Remove Magento Braintree module configuration which is no longer supported in Adobe Commerce and Magento Open Source 2.4 and later versions. | Support for the Braintree module is no longer included with Magento 2.4.0 and later. Remove the CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL variable from the variables section of the `.magento.app.yaml` file. For Braintree payment support, use an official extension from the Commerce Marketplace instead. |
### Deploy stage
-
-{:.error-table}
| Error code | Deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 101 | pre-deploy: cache | Incorrect cache configuration (missing port or host) | Cache configuration is missing required parameters `server` or `port`. Check the `cloud.log` for more information. |
-| 102 | | Cannot write to the `./app/etc/env.php` file | Deployment script cannot make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
-| 103 | | Configuration isn't defined in the `schema.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined. |
+| 102 | | Can not write to the `./app/etc/env.php` file | Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
+| 103 | | Configuration is not defined in the `schema.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined. |
| 104 | | Failed to parse the `.magento.env.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined. |
| 105 | | Unable to read the `.magento.env.yaml` file | Unable to read the `./.magento.env.yaml` file. Check file permissions. |
| 106 | | Unable to read the `.schema.yaml` file | |
-| 107 | pre-deploy: clean-redis-cache | Failed to clean the Redis cache | Failed to clean the Redis cache. Check that the Redis cache configuration is correct and that the Redis service is available. See [Setup Redis service](https://devdocs.magento.com/cloud/project/services-redis.html). |
+| 107 | pre-deploy: clean-redis-cache | Failed to clean the Redis cache | Failed to clean the Redis cache. Check that the Redis cache configuration is correct and that the Redis service is available. See [Setup Redis service](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/service/redis.html). |
| 108 | pre-deploy: set-production-mode | Command `/bin/magento maintenance:enable` failed | Check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
| 109 | validate-config | Incorrect database configuration | Check that the `DATABASE_CONFIGURATION` environment variable is configured correctly. |
| 110 | validate-config | Incorrect session configuration | Check that the `SESSION_CONFIGURATION` environment variable is configured correctly. The configuration must contain at least the `save` parameter. |
@@ -57,10 +53,10 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
| 115 | | Database query execution failed | |
| 116 | install-update: setup | Command `/bin/magento setup:install` failed | Check the `cloud.log` and `install_upgrade.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
| 117 | install-update: config-import | Command `app:config:import` failed | Check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
-| 118 | | Required utility wasn't found (timeout, bash) | |
+| 118 | | Required utility was not found (timeout, bash) | |
| 119 | install-update: deploy-static-content | Command `/bin/magento setup:static-content:deploy` failed | Check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
| 120 | compress-static-content | Static content compression failed | Check the `cloud.log` for more information. |
-| 121 | deploy-static-content:generate | Cannot update the deployed version | Cannot update the `./pub/static/deployed_version.txt` file. Check your filesystem permissions. |
+| 121 | deploy-static-content:generate | Can not update the deployed version | Can not update the `./pub/static/deployed_version.txt` file. Check your filesystem permissions. |
| 122 | clean-static-content | Failed to clean static content files | |
| 123 | install-update: split-db | Command `/bin/magento setup:db-schema:split` failed | Check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
| 124 | clean-view-preprocessed | Failed to clean the `var/view_preprocessed` folder | Unable to clean the `./var/view_preprocessed` folder. Check your filesystem permissions. |
@@ -70,34 +66,30 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
| 128 | disable-maintenance-mode | Command `/bin/magento maintenance:disable` failed | Check the `cloud.log` for more information. Add `VERBOSE_COMMANDS: '-vvv'` into `.magento.env.yaml` for more detailed command output. |
| 129 | install-update: reset-password | Unable to read reset password template | |
| 130 | install-update: cache_type | Command failed: `php ./bin/magento cache:enable` | Command `php ./bin/magento cache:enable` runs only when Adobe Commerce was installed but `./app/etc/env.php` file was absent or empty at the beginning of the deployment. Check the `cloud.log` for more information. Add `VERBOSE_COMMANDS: '-vvv'` into `.magento.env.yaml` for more detailed command output. |
-| 131 | install-update | The `crypt/key` key value does not exist in the `./app/etc/env.php` file or the `CRYPT_KEY` cloud environment variable | This error occurs if the `./app/etc/env.php` file is not present when Adobe Commerce deployment begins, or if the `crypt/key` value is undefined. If you migrated the database from another environment, retrieve the crypt key value from that environment. Then, add the value to the [CRYPT_KEY](https://devdocs.magento.com/cloud/env/variables-deploy.html#crypt_key) cloud environment variable in your current environment. See [Add the Magento encryption key](https://devdocs.magento.com/cloud/setup/first-time-setup-import-import.html#encryption-key). If you accidentally removed the `./app/etc/env.php` file, use the following command to restore it from the backup files created from a previous deployment: `./vendor/bin/ece-tools backup:restore` CLI command ." |
+| 131 | install-update | The `crypt/key` key value does not exist in the `./app/etc/env.php` file or the `CRYPT_KEY` cloud environment variable | This error occurs if the `./app/etc/env.php` file is not present when Adobe Commerce deployment begins, or if the `crypt/key` value is undefined. If you migrated the database from another environment, retrieve the crypt key value from that environment. Then, add the value to the [CRYPT_KEY](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/env/stage/variables-deploy.html#crypt_key) cloud environment variable in your current environment. See [Adobe Commerce encryption key](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/overview.html#gather-credentials). If you accidentally removed the `./app/etc/env.php` file, use the following command to restore it from the backup files created from a previous deployment: `./vendor/bin/ece-tools backup:restore` CLI command ." |
| 132 | | Can not connect to the Elasticsearch service | Check for valid Elasticsearch credentials and verify that the service is running |
-| 137 | | Can not connect to the Opensearch service | Check for valid Opensearch credentials and verify that the service is running |
+| 137 | | Can not connect to the OpenSearch service | Check for valid OpenSearch credentials and verify that the service is running |
| 133 | validate-config | Remove Magento Braintree module configuration which is no longer supported in Adobe Commerce or Magento Open Source 2.4 and later versions. | Support for the Braintree module is no longer included with Adobe Commerce or Magento Open Source 2.4.0 and later. Remove the CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL variable from the variables section of the `.magento.app.yaml` file. For Braintree support, use an official Braintree Payments extension from the Commerce Marketplace instead. |
| 134 | validate-config | Adobe Commerce and Magento Open Source 2.4.0 require Elasticsearch service to be installed | Install Elasticsearch service |
-| 138 | validate-config | Adobe Commerce and Magento Open Source 2.4.4 requires Opensearch or Elasticsearch service to be installed | Install Opensearch service |
+| 138 | validate-config | Adobe Commerce and Magento Open Source 2.4.4 requires OpenSearch or Elasticsearch service to be installed | Install OpenSearch service |
| 135 | validate-config | The search engine must be set to Elasticsearch for Adobe Commerce and Magento Open Source >= 2.4.0 | Check the SEARCH_CONFIGURATION variable for the `engine` option. If it is configured, remove the option, or set the value to "elasticsearch". |
| 136 | validate-config | Split Database was removed starting from Adobe Commerce and Magento Open Source 2.5.0. | If you use split database you have to revert to or migrate to a single database or use an alternative approach. |
-| 139 | validate-config | Incorrect search engine | This Adobe Commerce or Magento Open Source version does not support Opensearch. You must use versions 2.3.7-p3, 2.4.3-p2, or higher |
+| 139 | validate-config | Incorrect search engine | This Adobe Commerce or Magento Open Source version does not support OpenSearch. You must use versions 2.3.7-p3, 2.4.3-p2, or later |
### Post-deploy stage
-
-{:.error-table}
| Error code | Post-deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 201 | is-deploy-failed | Deploy stage failed | |
-| 202 | | The `./app/etc/env.php` file is not writable | Deployment script cannot make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
-| 203 | | Configuration isn't defined in the `schema.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined. |
+| 202 | | The `./app/etc/env.php` file is not writable | Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
+| 203 | | Configuration is not defined in the `schema.yaml` file | Configuration is not defined in the `./vendor/magento/ece-tools/config/schema.yaml` file. Check that the config variable name is correct, and that it is defined. |
| 204 | | Failed to parse the `.magento.env.yaml` file | The `./.magento.env.yaml` file format is invalid. Use a YAML parser to check the syntax and fix any errors. |
| 205 | | Unable to read the `.magento.env.yaml` file | Check file permissions. |
| 206 | | Unable to read the `.schema.yaml` file | |
-| 207 | warm-up | Failed to warm-up some pages | |
+| 207 | warm-up | Failed to preload some warm-up pages | |
| 208 | time-to-firs-byte | Failed to test time to first byte (TTFB) | |
| 227 | clean-cache | Command `/bin/magento cache:flush` failed | Check the `cloud.log` for more information. Add `VERBOSE_COMMANDS: '-vvv'` into `.magento.env.yaml` for more detailed command output. |
### General
-
-{:.error-table}
| Error code | General step | Error description (Title) | Suggested action |
| - | - | - | - |
| 243 | | Configuration is not defined in the `schema.yaml` file | Check that the config variable name is correct, and that it defined. |
@@ -112,8 +104,6 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
Warning errors indicate a problem with the Commerce on cloud infrastructure project configuration such as incorrect, deprecated, unsupported, or missing configuration settings for optional features that can affect site operation. Although a warning does not cause deployment failure, you should review warning messages and update the configuration to resolve them.
### Build stage
-
-{:.error-table}
| Error code | Build step | Error description (Title) | Suggested action |
| - | - | - | - |
| 1001 | validate-config | File app/etc/config.php does not exist | |
@@ -122,11 +112,9 @@ Warning errors indicate a problem with the Commerce on cloud infrastructure proj
| 1004 | validate-config | The configuration is not compatible with this version of Magento | |
| 1005 | validate-config | SCD options ignored | |
| 1006 | validate-config | The configured state is not ideal | |
-| 1007 | run-baler | Baler JS bundling cannot be used | |
+| 1007 | run-baler | Baler JS bundling can not be used | |
### Deploy stage
-
-{:.error-table}
| Error code | Deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 2001 | pre-deploy:cache | Cache is configured for a Redis service that is not available. Configuration will be ignored. | |
@@ -149,7 +137,7 @@ Warning errors indicate a problem with the Commerce on cloud infrastructure proj
| 2018 | validate-config | Some services have passed EOL | |
| 2019 | validate-config | The MySQL search configuration option is deprecated | Use Elasticsearch instead. |
| 2029 | validate-config | Split Database was deprecated in the Adobe Commerce and Magento Open Source 2.4.2 and will be removed in 2.5. | If you use split database you should start planning to revert to or migrate to a single database or use an alternative approach. |
-| 2020 | install-update | Adobe Commerce installation completed, but the `app/etc/env.php` configuration file was missing or empty. | Required data will be restored from environment configurations and from .magento.env.yaml file. |
+| 2020 | install-update | Adobe Commerce installation completed, but the `app/etc/env.php` configuration file was missing or empty. | Required data will be restored from environment configurations and from the .magento.env.yaml file. |
| 2021 | install-update:db-connection | For split databases used custom connections | |
| 2022 | install-update:db-connection | You have changed to a database configuration that is not compatible with the slave connection. | |
| 2023 | install-update:split-db | Enabling a split database will be skipped. | |
@@ -158,36 +146,17 @@ Warning errors indicate a problem with the Commerce on cloud infrastructure proj
| 2026 | pre-deploy:restore-writable-dirs | Failed to restore some data generated during the build phase to the mounted directories | Check the `cloud.log` for more information. |
| 2027 | validate-config:mage-mode-variable | Mode value for MAGE_MODE environment variable not supported | Remove the MAGE_MODE environment variable, or change its value to "production". Adobe Commerce on cloud infrastructure supports "production" mode only. |
| 2028 | remote-storage | Remote storage could not be enabled. | Verify remote storage credentials. |
-| 2030 | validate-config | Elasticsearch and Opensearch services are both installed at infrastructure layer. Adobe Commerce and Magento Open Source 2.4.4 and higher use Opensearch by default | Consider removing the Elasticsearch or Opensearch service from the infrastructure layer to optimize resource usage. |
+| 2030 | validate-config | Elasticsearch and OpenSearch services are both installed at infrastructure layer. Adobe Commerce and Magento Open Source 2.4.4 and later use OpenSearch by default | Consider removing the Elasticsearch or OpenSearch service from the infrastructure layer to optimize resource usage. |
### Post-deploy stage
-
-{:.error-table}
| Error code | Post-deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 3001 | validate-config | Debug logging is enabled in Adobe Commerce | To save disk space, do not enable debug logging for your production environments. |
| 3002 | warm-up | Can not fetch store urls | |
| 3003 | warm-up | Can not fetch store url | |
-| 3004 | backup | Cannot create backup files | |
+| 3004 | backup | Can not create backup files | |
### General
-
-{:.error-table}
| Error code | General step | Error description (Title) | Suggested action |
| - | - | - | - |
| 4001 | | Can not get system processor count: | |
-
-
-
-
-
-
From 1b2e562bf2e2a27b2fe2cc8fe69dd9f3cb85fc5d Mon Sep 17 00:00:00 2001
From: Bohdan Korablov
Date: Mon, 24 Jul 2023 13:40:57 -0500
Subject: [PATCH 09/10] Update error codes
---
dist/error-codes.md | 8 ++++++++
src/Command/Dev/GenerateSchemaError.php | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dist/error-codes.md b/dist/error-codes.md
index 1d531b7b9..17355c388 100644
--- a/dist/error-codes.md
+++ b/dist/error-codes.md
@@ -5,6 +5,7 @@
Critical errors indicate a problem with the Commerce on cloud infrastructure project configuration that causes deployment failure, for example incorrect, unsupported, or missing configuration for required settings. Before you can deploy, you must update the configuration to resolve these errors.
### Build stage
+
| Error code | Build step | Error description (Title) | Suggested action |
| - | - | - | - |
| 2 | | Can not write to the `./app/etc/env.php` file | Deployment script can not make required changes to the `/app/etc/env.php` file. Check your filesystem permissions. |
@@ -34,6 +35,7 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
| 26 | validate-config | Remove Magento Braintree module configuration which is no longer supported in Adobe Commerce and Magento Open Source 2.4 and later versions. | Support for the Braintree module is no longer included with Magento 2.4.0 and later. Remove the CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL variable from the variables section of the `.magento.app.yaml` file. For Braintree payment support, use an official extension from the Commerce Marketplace instead. |
### Deploy stage
+
| Error code | Deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 101 | pre-deploy: cache | Incorrect cache configuration (missing port or host) | Cache configuration is missing required parameters `server` or `port`. Check the `cloud.log` for more information. |
@@ -77,6 +79,7 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
| 139 | validate-config | Incorrect search engine | This Adobe Commerce or Magento Open Source version does not support OpenSearch. You must use versions 2.3.7-p3, 2.4.3-p2, or later |
### Post-deploy stage
+
| Error code | Post-deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 201 | is-deploy-failed | Deploy stage failed | |
@@ -90,6 +93,7 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
| 227 | clean-cache | Command `/bin/magento cache:flush` failed | Check the `cloud.log` for more information. Add `VERBOSE_COMMANDS: '-vvv'` into `.magento.env.yaml` for more detailed command output. |
### General
+
| Error code | General step | Error description (Title) | Suggested action |
| - | - | - | - |
| 243 | | Configuration is not defined in the `schema.yaml` file | Check that the config variable name is correct, and that it defined. |
@@ -104,6 +108,7 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro
Warning errors indicate a problem with the Commerce on cloud infrastructure project configuration such as incorrect, deprecated, unsupported, or missing configuration settings for optional features that can affect site operation. Although a warning does not cause deployment failure, you should review warning messages and update the configuration to resolve them.
### Build stage
+
| Error code | Build step | Error description (Title) | Suggested action |
| - | - | - | - |
| 1001 | validate-config | File app/etc/config.php does not exist | |
@@ -115,6 +120,7 @@ Warning errors indicate a problem with the Commerce on cloud infrastructure proj
| 1007 | run-baler | Baler JS bundling can not be used | |
### Deploy stage
+
| Error code | Deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 2001 | pre-deploy:cache | Cache is configured for a Redis service that is not available. Configuration will be ignored. | |
@@ -149,6 +155,7 @@ Warning errors indicate a problem with the Commerce on cloud infrastructure proj
| 2030 | validate-config | Elasticsearch and OpenSearch services are both installed at infrastructure layer. Adobe Commerce and Magento Open Source 2.4.4 and later use OpenSearch by default | Consider removing the Elasticsearch or OpenSearch service from the infrastructure layer to optimize resource usage. |
### Post-deploy stage
+
| Error code | Post-deploy step | Error description (Title) | Suggested action |
| - | - | - | - |
| 3001 | validate-config | Debug logging is enabled in Adobe Commerce | To save disk space, do not enable debug logging for your production environments. |
@@ -157,6 +164,7 @@ Warning errors indicate a problem with the Commerce on cloud infrastructure proj
| 3004 | backup | Can not create backup files | |
### General
+
| Error code | General step | Error description (Title) | Suggested action |
| - | - | - | - |
| 4001 | | Can not get system processor count: | |
diff --git a/src/Command/Dev/GenerateSchemaError.php b/src/Command/Dev/GenerateSchemaError.php
index c70f3047e..3083098b6 100644
--- a/src/Command/Dev/GenerateSchemaError.php
+++ b/src/Command/Dev/GenerateSchemaError.php
@@ -116,7 +116,7 @@ private function generateDocs(array $errors): string
$result .= sprintf("\n### %s%s\n", ucfirst($stage), $stage === 'general' ? '' : ' stage');
$table = sprintf(
- "| Error code | %s step | Error description (Title) | Suggested action |\n",
+ "\n| Error code | %s step | Error description (Title) | Suggested action |\n",
ucfirst($stage)
);
$table .= "| - | - | - | - |\n";
From 30d416c6765b9080feb85e1a727368a377a66eb5 Mon Sep 17 00:00:00 2001
From: Bohdan Korablov
Date: Tue, 25 Jul 2023 17:35:56 -0500
Subject: [PATCH 10/10] MCLOUD-10863: Release ece-tools 2002.1.15
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 944f219af..3d6248c0c 100755
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"name": "magento/ece-tools",
"description": "Provides tools to build and deploy Magento 2 Enterprise Edition",
"type": "magento2-component",
- "version": "2002.1.14",
+ "version": "2002.1.15",
"license": "OSL-3.0",
"repositories": {
"repo.magento.com": {