diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3394747..fd7f749 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,12 @@ Added ----- * Adds search script datadog_search.py, for searching Datadog monitors and dashboards. +[5.2.0] - 2024-12-05 +~~~~~~~~~~~~~~~~~~~~ +Removed +------- +* Removed code_owner optional path prefixes because edx-platform shims are no longer in use. See change for more details. + [5.1.0] - 2024-11-21 ~~~~~~~~~~~~~~~~~~~~ Added diff --git a/edx_arch_experiments/__init__.py b/edx_arch_experiments/__init__.py index 5a61fdb..8fba891 100644 --- a/edx_arch_experiments/__init__.py +++ b/edx_arch_experiments/__init__.py @@ -2,4 +2,4 @@ A plugin to include applications under development by the architecture team at 2U. """ -__version__ = '5.1.0' +__version__ = '5.2.0' diff --git a/edx_arch_experiments/datadog_monitoring/code_owner/utils.py b/edx_arch_experiments/datadog_monitoring/code_owner/utils.py index ecff3af..72ca14f 100644 --- a/edx_arch_experiments/datadog_monitoring/code_owner/utils.py +++ b/edx_arch_experiments/datadog_monitoring/code_owner/utils.py @@ -2,7 +2,6 @@ Utilities for monitoring code_owner_2 """ import logging -import re from django.conf import settings from edx_django_utils.monitoring import set_custom_attribute @@ -95,11 +94,6 @@ def get_code_owner_mappings(): path_list = code_owner_mappings[code_owner] for path in path_list: path_to_code_owner_mapping[path] = code_owner - optional_module_prefix_match = _OPTIONAL_MODULE_PREFIX_PATTERN.match(path) - # if path has an optional prefix, also add the module name without the prefix - if optional_module_prefix_match: - path_without_prefix = path[optional_module_prefix_match.end():] - path_to_code_owner_mapping[path_without_prefix] = code_owner except TypeError as e: log.exception( 'Error processing CODE_OWNER_MAPPINGS. {}'.format(e) # pylint: disable=logging-format-interpolation @@ -157,12 +151,6 @@ def clear_cached_mappings(): _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS = None -# TODO: Retire this once edx-platform import_shims is no longer used. -# Note: This should be ready for removal because import_shims has been removed. -# See https://github.com/openedx/edx-platform/tree/854502b560bda74ef898501bb2a95ce238cf794c/import_shims -_OPTIONAL_MODULE_PREFIX_PATTERN = re.compile(r'^(lms|common|openedx\.core)\.djangoapps\.') - - # Cached lookup table for code owner theme and squad given a code owner. # - Although code owner is "theme-squad", a hyphen may also be in the theme or squad name, so this ensures we get both # correctly from config. diff --git a/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py index be17856..68357f4 100644 --- a/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py +++ b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py @@ -36,13 +36,10 @@ def setUp(self): @ddt.data( ('xbl', None), ('xblock_2', None), - ('xblock', 'team-red'), ('openedx.core.djangoapps', None), ('openedx.core.djangoapps.xblock', 'team-red'), ('openedx.core.djangoapps.xblock.views', 'team-red'), - ('grades', 'team-red'), ('lms.djangoapps.grades', 'team-red'), - ('xblock_django', 'team-blue'), ('common.djangoapps.xblock_django', 'team-blue'), ) @ddt.unpack