-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
427: System configuration full and updates export. #15
427: System configuration full and updates export. #15
Conversation
app/code/Magento/ConfigurationDataExporter/Console/Command/FullSyncCommand.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Model/ChangedConfigMessageBuilder.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Observer/ConfigChange.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Observer/ConfigChange.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Plugin/ConfigUpdateExport.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Plugin/ConfigUpdateExport.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Plugin/ConfigUpdateExport.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurationDataExporter/Setup/RecurringData.php
Outdated
Show resolved
Hide resolved
Looks good to me! Regarding AC Ideally need to have possibility to accept paths from env variables (can be done be adding "init_paramter" const) |
$whitelistedPaths = $this->whitelistProviderPool->getWhitelist(); | ||
|
||
foreach ($configData as $item) { | ||
if (in_array($item['path'], $whitelistedPaths)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add the ability to add configuration with partial match, like "path/"?
E.g. to provide all paths for layered navigation from app/code/Magento/LayeredNavigation/etc/config.xml we can use "catalog/layered_navigation/" path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mslabko partial match added
*/ | ||
private function publishMessage(array $configData, string $evenType): void | ||
{ | ||
$message = $this->messageBuilder->build($evenType, $configData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add check if message present, since we can receive empty results after filtration by whitelist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mslabko added check to do not publish empty message to queue
*/ | ||
class FullSyncCommand extends \Symfony\Component\Console\Command\Command | ||
{ | ||
const COMMAND_NAME = 'config-export:sync:full'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets rename command to "commerce-data-export::config:export"
{ | ||
if (empty($this->whitelist)) { | ||
try { | ||
$this->whitelist = $this->deploymentConfig->get(self::WHITELIST_CONFIG_KEY, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add CLI command which will add configuration to env.php ? `bin/magento commerce-data-export::config:add-paths-to-whitelist"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mslabko command added.
Avoid publishing message to queue if message is empty after filtration by whitelist.
… receiving of incorrect message
@mslabko i added clean up queue before test run. |
…on' into story-427-configuation-propagation
@owlsmage please add https://github.com/magento-commerce/magento2-infrastructure/pull/1395 in the list of Related Pull Requests |
@magento import pr to magento-commerce/commerce-data-export |
@RuslanKostiv1 the pull request successfully imported. |
MDEE-57: Handle is_deleted updates. Unassign by chunks
Module to observe and export configuration changes to message queue.
Description (*)
Related Pull Requests
https://github.com/magento-commerce/magento2-infrastructure/pull/1395v
Fixed Issues (if relevant)
Code Review Checklist (*)