From becbf9dd9c13640006f66ff6f029860218090525 Mon Sep 17 00:00:00 2001 From: nrostrow-meta <132953571+nrostrow-meta@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:56:50 -0500 Subject: [PATCH 1/2] Removing meta logging related config values from extension to have them always enabled. (#572) Co-authored-by: Noah Ostrowski --- .../BusinessExtension/Helper/FBEHelper.php | 6 +-- .../BusinessExtension/Model/System/Config.php | 37 ------------------- .../etc/adminhtml/system.xml | 12 ------ .../Meta/BusinessExtension/etc/config.xml | 2 - 4 files changed, 3 insertions(+), 54 deletions(-) diff --git a/app/code/Meta/BusinessExtension/Helper/FBEHelper.php b/app/code/Meta/BusinessExtension/Helper/FBEHelper.php index 126c94b3..bbee3748 100644 --- a/app/code/Meta/BusinessExtension/Helper/FBEHelper.php +++ b/app/code/Meta/BusinessExtension/Helper/FBEHelper.php @@ -263,7 +263,7 @@ public function getFBEExternalBusinessId($storeId) */ public function log($info, array $context = []) { - if (!isset($context['log_type']) || !$this->systemConfig->isMetaTelemetryLoggingEnabled()) { + if (!isset($context['log_type'])) { $this->logger->info($info); return; } @@ -311,8 +311,8 @@ public function logException(Throwable $e, array $context = []) public function logExceptionDetails($code, $message, $traceAsString, array $context = []) { - // If the log type is not set or Meta extension logging is not enabled just log the error message and trace. - if (!isset($context['log_type']) || !$this->systemConfig->isMetaExceptionLoggingEnabled()) { + // If the log type is not set just log the error message and trace. + if (!isset($context['log_type'])) { $this->logger->error($message); $this->logger->error($traceAsString); return; diff --git a/app/code/Meta/BusinessExtension/Model/System/Config.php b/app/code/Meta/BusinessExtension/Model/System/Config.php index 655b271c..03a7fdbb 100644 --- a/app/code/Meta/BusinessExtension/Model/System/Config.php +++ b/app/code/Meta/BusinessExtension/Model/System/Config.php @@ -117,11 +117,6 @@ class Config private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_COMMERCE_EXTENSION_BASE_URL = 'facebook/internal/extension_base_url'; - private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_EXCEPTION_LOGGING = - 'facebook/business_extension/meta_exception_logging_enabled'; - private const XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_TELEMETRY_LOGGING = - 'facebook/business_extension/meta_telemetry_logging_enabled'; - /** * @var StoreManagerInterface */ @@ -978,38 +973,6 @@ public function getServerTestCode(int $scopeId = null, string $scope = null): ?s ); } - /** - * Check if persisting exception logs to Meta is enabled - * - * @param int|null $scopeId - * @param string|null $scope - * @return string|null - */ - public function isMetaExceptionLoggingEnabled(int $scopeId = null, string $scope = null): ?string - { - return $this->getConfig( - self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_EXCEPTION_LOGGING, - $scopeId, - $scope - ); - } - - /** - * Check if persisting telemetry logs to Meta is enabled - * - * @param int|null $scopeId - * @param string|null $scope - * @return string|null - */ - public function isMetaTelemetryLoggingEnabled(int $scopeId = null, string $scope = null): ?string - { - return $this->getConfig( - self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_META_TELEMETRY_LOGGING, - $scopeId, - $scope - ); - } - /** * Get store weight unit * diff --git a/app/code/Meta/BusinessExtension/etc/adminhtml/system.xml b/app/code/Meta/BusinessExtension/etc/adminhtml/system.xml index 957e9e31..10aa509f 100644 --- a/app/code/Meta/BusinessExtension/etc/adminhtml/system.xml +++ b/app/code/Meta/BusinessExtension/etc/adminhtml/system.xml @@ -45,18 +45,6 @@ facebook/business_extension/pixel_id Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden - - facebook/business_extension/meta_exception_logging_enabled - Magento\Config\Model\Config\Source\Yesno - Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden - - - facebook/business_extension/meta_telemetry_logging_enabled - Magento\Config\Model\Config\Source\Yesno - Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden - facebook/business_extension/installed diff --git a/app/code/Meta/BusinessExtension/etc/config.xml b/app/code/Meta/BusinessExtension/etc/config.xml index 2488fc4c..f9a90ed6 100644 --- a/app/code/Meta/BusinessExtension/etc/config.xml +++ b/app/code/Meta/BusinessExtension/etc/config.xml @@ -6,8 +6,6 @@ 1 0 - 1 - 0 195311308289826|52dcd04d6c7ed113121b5eb4be23b4a7 From f56670a3ff61ceec72877a4eacd4f122a790247b Mon Sep 17 00:00:00 2001 From: singhramanpreett <129768663+singhramanpreett@users.noreply.github.com> Date: Thu, 30 Nov 2023 18:16:10 +0100 Subject: [PATCH 2/2] Update added catalog module CODEOWNERS in repo (#574) * Update added catalog module CODEOWNERS in repo As title * Update CODEOWNERS * Update CODEOWNERS --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 884f7d7e..cb314d67 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,3 +6,7 @@ # @global-owner1 and @global-owner2 will be requested for # review when someone opens a pull request. * @zlik @dabramovici @sol-loup @camcuz97 @agmurari @yang17 @nrostrow-meta @dalongi @palak-ana @n-nayak @singhramanpreett @luizmramosmeta @cristiannancumeta @singhalavi @jczhuoMeta @swinard-meta @strygo @fabik-meta @hsimsandhu + +# These owners will be owning Catalog Directory, one would require to have +# approval for making catalog related changes +/app/code/Meta/Catalog/ @singhramanpreett @luizmramosmeta @cristiannancumeta @singhalavi @fabik-meta @ankurvjym @alexchertovmeta @somnotsam @danigirimeta @nanaasiedu