Skip to content

Commit f98903a

Browse files
committed
MCLOUD-6381: Update error messages
1 parent 3e0c1c3 commit f98903a

File tree

10 files changed

+22
-15
lines changed

10 files changed

+22
-15
lines changed

config/schema.error.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
step: validate-config
440440
type: warning
441441
!php/const Magento\MagentoCloud\App\Error::WARN_NOT_CORRECT_LOCAL_XML_FILE:
442-
title: 'Invalid file config ./pub/errors/local.xml'
442+
title: 'Invalid configuration in the ./pub/errors/local.xml file.'
443443
stage: deploy
444444
step: validate-config
445445
type: warning
@@ -544,7 +544,7 @@
544544
step: 'install-update:split-db'
545545
type: warning
546546
!php/const Magento\MagentoCloud\App\Error::WARN_NOT_ENOUGH_DATA_SPLIT_DB_VAR:
547-
title: 'The SPLIT_DB variable does not have data which were already split.'
547+
title: 'The SPLIT_DB variable is missing the configuration for split connection types.'
548548
stage: deploy
549549
step: 'install-update:split-db'
550550
type: warning

dist/error-codes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
| 2001 | pre-deploy:cache | Cache is configured for a Redis service that is not available. Configuration will be ignored. | |
122122
| 2002 | validate-config | The configured state is not ideal | |
123123
| 2003 | validate-config | The directory nesting level value for error reporting has not been configured | |
124-
| 2004 | validate-config | Invalid file config ./pub/errors/local.xml | |
124+
| 2004 | validate-config | Invalid configuration in the ./pub/errors/local.xml file. | |
125125
| 2005 | validate-config | Admin data is used to create an admin user during initial installation only. Any changes to Admin data are ignored during the upgrade process. | After the initial installation, you can remove admin data from the configuration. |
126126
| 2006 | validate-config | Admin user was not created as admin email was not set | After installation, you can create an admin user manually: Use ssh to connect to your environment. Then, run the `bin/magento admin:user:create` command. |
127127
| 2007 | validate-config | Update php version to recommended version | |
@@ -141,7 +141,7 @@
141141
| 2021 | install-update:db-connection | For split databases used custom connections | |
142142
| 2022 | install-update:db-connection | You have changed to a database configuration that is not compatible with the slave connection. | |
143143
| 2023 | install-update:split-db | Enabling a split database will be skipped. | |
144-
| 2024 | install-update:split-db | The SPLIT_DB variable does not have data which were already split. | |
144+
| 2024 | install-update:split-db | The SPLIT_DB variable is missing the configuration for split connection types. | |
145145
| 2025 | install-update:split-db | Slave connection not set. | |
146146

147147
### Post-deploy stage

src/Config/Validator/Deploy/ReportDirNestingLevel.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ public function validate(): Validator\ResultInterface
9292
} catch (FileSystemException $exception) {
9393
return $this->resultFactory->error($exception->getMessage());
9494
} catch (NotEncodableValueException $exception) {
95-
$message = sprintf('Config of the file %s is invalid. ', $reportConfigFile);
96-
$message .= $exception->getMessage();
95+
$message = sprintf(
96+
'Invalid configuration in the %s file. %s',
97+
$reportConfigFile,
98+
$exception->getMessage()
99+
);
100+
97101
return $this->resultFactory->error(
98102
$message,
99103
'Fix the directory nesting level configuration for error reporting in the file '

src/Step/Deploy/SplitDbConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function execute()
150150

151151
if (!empty($missedSplitTypes)) {
152152
$this->logger->warning(
153-
'Variable SPLIT_DB does not have data which were already split types: '
153+
'The SPLIT_DB variable is missing the configuration for split connection types: '
154154
. implode(', ', $missedSplitTypes),
155155
['errorCode' => Error::WARN_NOT_ENOUGH_DATA_SPLIT_DB_VAR]
156156
);

src/Step/Deploy/SplitDbConnection/SlaveConnection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public function update()
9696
$this->logger->warning(
9797
sprintf(
9898
'Slave connection for \'%s\' connection not set. '
99-
. 'Relationships do not have the configuration for this slave connection',
99+
. 'The `relationships` configuration in the .magento.app.yaml file '
100+
. 'is missing the configuration for this slave connection',
100101
$mageConnectionName
101102
),
102103
['errorCode' => Error::WARN_SLAVE_CONNECTION_NOT_SET]

src/Test/Functional/Acceptance/ReportDirNestingLevelCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function testWithInvalidLocalXmlFile(\CliTester $I): void
200200
$log
201201
);
202202
$I->assertContains(
203-
"Config of the file {$this->expectedPathLocalXml} is invalid.",
203+
"Invalid configuration in the {$this->expectedPathLocalXml} file.",
204204
$log
205205
);
206206
$I->assertContains(

src/Test/Functional/Acceptance/SplitDbCest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ private function variationsDataPartWithSplitDbArch(): array
162162
],
163163
'Split Db type was deleted' => [
164164
'splitDbTypes' => null,
165-
'messages' => 'Variable SPLIT_DB does not have data which were already split types: quote',
165+
'messages' => 'The SPLIT_DB variable is missing the configuration for split connection types: quote',
166166
'expectedExists' => ['checkout'],
167167
'expectedNotExist' => ['sales'],
168168
],
169169
'Split Db current type was deleted and new type added' => [
170170
'splitDbTypes' => ['sales'],
171-
'messages' => 'Variable SPLIT_DB does not have data which were already split types: quote',
171+
'messages' => 'The SPLIT_DB variable is missing the configuration for split connection types: quote',
172172
'expectedExists' => ['checkout'],
173173
'expectedNotExist' => ['sales'],
174174
],

src/Test/Unit/Config/Validator/Deploy/ReportDirNestingLevelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function testValidateWithoutEnvVarWithInvalidConfigFile()
166166
$this->resultFactoryMock->expects($this->once())
167167
->method('error')
168168
->with(
169-
sprintf('Config of the file %s is invalid. Invalid xml', $this->reportConfigFile),
169+
sprintf('Invalid configuration in the %s file. Invalid xml', $this->reportConfigFile),
170170
'Fix the directory nesting level configuration for error reporting in the file '
171171
. $this->reportConfigFile
172172
);

src/Test/Unit/Step/Deploy/SplitDbConnection/SlaveConnectionTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,13 @@ public function testUpdateSlaveConnectionsNotAvailable()
194194
->withConsecutive(
195195
[
196196
'Slave connection for \'checkout\' connection not set.'
197-
. ' Relationships do not have the configuration for this slave connection'
197+
. ' The `relationships` configuration in the .magento.app.yaml file'
198+
. ' is missing the configuration for this slave connection'
198199
],
199200
[
200201
'Slave connection for \'sales\' connection not set.'
201-
. ' Relationships do not have the configuration for this slave connection'
202+
. ' The `relationships` configuration in the .magento.app.yaml file'
203+
. ' is missing the configuration for this slave connection'
202204
]
203205
);
204206
$this->configWriterMock->create($mageConfig);

src/Test/Unit/Step/Deploy/SplitDbConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function testExecuteVarSplitDbDoesNotHaveSplitTypes(
250250
$this->loggerMock->expects($this->once())
251251
->method('warning')
252252
->with(
253-
'Variable SPLIT_DB does not have data which were already split types: '
253+
'The SPLIT_DB variable is missing the configuration for split connection types: '
254254
. implode(', ', $splitTypes)
255255
);
256256
$this->magentoShellMock->expects($this->never())

0 commit comments

Comments
 (0)