Skip to content

Commit 8c89f2f

Browse files
committed
MC-42026: [Cloud] Custom theme is not applied and the default LUMA theme is used.
1 parent d4f83c8 commit 8c89f2f

File tree

3 files changed

+15
-28
lines changed

3 files changed

+15
-28
lines changed

app/code/Magento/Deploy/Process/Queue.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ class Queue
4646
*/
4747
private $inProgress = [];
4848

49+
/**
50+
* @var Package[]
51+
*/
52+
private $failed = [];
53+
4954
/**
5055
* @var int
5156
*/
@@ -193,8 +198,13 @@ public function process()
193198

194199
$this->awaitForAllProcesses();
195200

196-
if (!empty($packages)) {
197-
throw new TimeoutException('Not all packages are deployed.');
201+
$failedPackages = array_merge($this->failed, $packages);
202+
if (!empty($failedPackages)) {
203+
throw new \RuntimeException(
204+
'The following packages have failed to deploy '
205+
.PHP_EOL
206+
.implode(PHP_EOL, array_keys($failedPackages))
207+
);
198208
}
199209

200210
return $returnStatus;
@@ -280,9 +290,7 @@ private function awaitForAllProcesses()
280290
$isDeployed = $this->isDeployed($package);
281291

282292
if ($isDeployed === false) {
283-
throw new \RuntimeException(
284-
"Deploy of the package " . $package->getPath() . " has failed."
285-
);
293+
$this->failed[$package->getPath()]= $this->packages[$package->getPath()];
286294
} elseif ($isDeployed) {
287295
unset($this->inProgress[$name]);
288296
}
@@ -363,9 +371,7 @@ function () use ($package) {
363371
} else {
364372
$isDeployed = $this->deployPackageService->deploy($package, $this->options);
365373
if ($isDeployed === false) {
366-
throw new \RuntimeException(
367-
"Deploy of the package " . $package->getPath() . " has failed."
368-
);
374+
$this->failed[$package->getPath()]= $this->packages[$package->getPath()];
369375
}
370376
return $isDeployed;
371377
}

app/code/Magento/Deploy/Process/TimeoutException.php

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/code/Magento/Deploy/Service/DeployPackage.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ public function deploy(Package $package, array $options, $skipLogging = false)
9999
function () use ($package, $options, $skipLogging) {
100100
// emulate application locale needed for correct file path resolving
101101
$this->localeResolver->setLocale($package->getLocale());
102-
/**
103-
* \Magento\Framework\App\State::emulateAreaCode was returning the result of this
104-
* anonymous function, and the result wasn't provided
105-
*/
106102
return $this->deployEmulated($package, $options, $skipLogging);
107103
}
108104
);
@@ -154,7 +150,7 @@ public function deployEmulated(Package $package, array $options, $skipLogging =
154150
foreach ($package->getPostProcessors() as $processor) {
155151
$processor->process($package, $options);
156152
}
157-
// $this->errorsCount was counted but never checked in the end. Return was always true.
153+
158154
return !(bool)$this->errorsCount;
159155
}
160156

0 commit comments

Comments
 (0)