Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAGETWO-87531: [EngCom Team] Batch 27. Forwardports to 2.3-develop #1342
- Merge Pull Request magento-engcom/magento2ce#1342 from magento-engcom-team/magento2:batch-27-forwardport-2.3-develop - Merged commits: 1. aa93f83 2. 0b76fcd 3. be77fdd 4. 4bad8be 5. 59e1020 6. ef63b3a 7. a278aaf 8. f7c00d7 9. f1ecb11 10. 74aabb4 11. 1d66e5e 12. dc4977d 13. 99f982c 14. 76c4f0d 15. 9e2cc5e 16. 82d488b
- Loading branch information
Showing
16 changed files
with
167 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,8 +146,8 @@ switch ($type = $block->getType()) { | |
} | ||
break; | ||
|
||
case 'other': | ||
break; | ||
default: | ||
$exist = null; | ||
} | ||
?> | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
app/code/Magento/Customer/view/frontend/web/js/invalidation-processor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/code/Magento/Customer/view/frontend/web/js/invalidation-rules/website-rule.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
app/code/Magento/NewRelicReporting/Console/Command/DeployMarker.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\NewRelicReporting\Console\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Magento\NewRelicReporting\Model\Apm\DeploymentsFactory; | ||
use Magento\NewRelicReporting\Model\ServiceShellUser; | ||
|
||
class DeployMarker extends Command | ||
{ | ||
/** | ||
* @var DeploymentsFactory | ||
*/ | ||
private $deploymentsFactory; | ||
|
||
/** | ||
* @var ServiceShellUser | ||
*/ | ||
private $serviceShellUser; | ||
|
||
/** | ||
* Initialize dependencies. | ||
* | ||
* @param DeploymentsFactory $deploymentsFactory | ||
* @param ServiceShellUser $serviceShellUser | ||
* @param null $name | ||
*/ | ||
public function __construct( | ||
DeploymentsFactory $deploymentsFactory, | ||
ServiceShellUser $serviceShellUser, | ||
$name = null | ||
) { | ||
$this->deploymentsFactory = $deploymentsFactory; | ||
$this->serviceShellUser = $serviceShellUser; | ||
parent::__construct($name); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function configure() | ||
{ | ||
$this->setName("newrelic:create:deploy-marker"); | ||
$this->setDescription("Check the deploy queue for entries and create an appropriate deploy marker.") | ||
->addArgument( | ||
'message', | ||
InputArgument::REQUIRED, | ||
'Deploy Message?' | ||
) | ||
->addArgument( | ||
'change_log', | ||
InputArgument::REQUIRED, | ||
'Change Log?' | ||
) | ||
->addArgument( | ||
'user', | ||
InputArgument::OPTIONAL, | ||
'Deployment User' | ||
); | ||
parent::configure(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$this->deploymentsFactory->create()->setDeployment( | ||
$input->getArgument('message'), | ||
$input->getArgument('change_log'), | ||
$this->serviceShellUser->get($input->getArgument('user')) | ||
); | ||
$output->writeln('<info>NewRelic deployment information sent</info>'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/code/Magento/NewRelicReporting/Model/ServiceShellUser.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\NewRelicReporting\Model; | ||
|
||
class ServiceShellUser | ||
{ | ||
/** | ||
* Default user name; | ||
*/ | ||
const DEFAULT_USER = 'cron'; | ||
|
||
/** | ||
* Get use name. | ||
* | ||
* @param bool $userFromArgument | ||
* @return string | ||
*/ | ||
public function get($userFromArgument = false) | ||
{ | ||
if ($userFromArgument) { | ||
return $userFromArgument; | ||
} | ||
|
||
$user = "echo \$USER"; | ||
if ($user) { | ||
return $user; | ||
} | ||
|
||
return self::DEFAULT_USER; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters