From f0862789d38f98a0f6a82a93d057558738e44449 Mon Sep 17 00:00:00 2001 From: Alyssa Mui Date: Fri, 11 Jul 2025 12:55:41 -0400 Subject: [PATCH 1/2] Revert "[MINPROC-2319] remove the integration exception mapper (#20697)" This reverts commit b76c5f5070d12694c44c5f4bef02310ea39b1d8c. --- datadog_checks_dev/changelog.d/20697.fixed | 1 - .../datadog_checks/dev/tooling/manifest_utils.py | 10 ++++++++++ ddev/changelog.d/20697.fixed | 1 - ddev/src/ddev/integration/core.py | 10 ++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) delete mode 100644 datadog_checks_dev/changelog.d/20697.fixed delete mode 100644 ddev/changelog.d/20697.fixed diff --git a/datadog_checks_dev/changelog.d/20697.fixed b/datadog_checks_dev/changelog.d/20697.fixed deleted file mode 100644 index 16a41b7795bc7..0000000000000 --- a/datadog_checks_dev/changelog.d/20697.fixed +++ /dev/null @@ -1 +0,0 @@ -[MINPROC-2319] remove the integration exception mapper diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/manifest_utils.py b/datadog_checks_dev/datadog_checks/dev/tooling/manifest_utils.py index 3162f7f1303f8..8a584fb0512ac 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/manifest_utils.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/manifest_utils.py @@ -19,6 +19,15 @@ "ddev", ] +# The manifest.json file can contain the source_type_name field that the validation uses to validate different parts +# of the integration. For example Zabbix was renamed to Zabbix (Community Version) in the manifest.json file, so we +# need to map it back to Zabbix for validations to pass. +EXCEPTION_MAPPER = { + 'Zabbix (Community Version)': 'Zabbix', + 'Scalr (Community Version)': 'Scalr', + 'Zscaler (Community Version)': 'Zscaler', +} + class Manifest: """ @@ -140,6 +149,7 @@ def get_path(self, path): def get_display_name(self): display_name = self._manifest_json.get_path("/assets/integration/source_type_name") + display_name = EXCEPTION_MAPPER.get(display_name, display_name) return display_name def get_app_id(self): diff --git a/ddev/changelog.d/20697.fixed b/ddev/changelog.d/20697.fixed deleted file mode 100644 index 16a41b7795bc7..0000000000000 --- a/ddev/changelog.d/20697.fixed +++ /dev/null @@ -1 +0,0 @@ -[MINPROC-2319] remove the integration exception mapper diff --git a/ddev/src/ddev/integration/core.py b/ddev/src/ddev/integration/core.py index 549b6fb67c4a2..a0b12252c7c33 100644 --- a/ddev/src/ddev/integration/core.py +++ b/ddev/src/ddev/integration/core.py @@ -16,6 +16,15 @@ from ddev.integration.manifest import Manifest from ddev.repo.config import RepositoryConfig +# The manifest.json file can contain the source_type_name field that the validation uses to validate different parts +# of the integration. Zabbix was renamed to Zabbix (Community Version) in the manifest.json file, so we need to map +# it back to Zabbix for validations to pass +EXCEPTION_MAPPER = { + 'Zabbix (Community Version)': 'Zabbix', + 'Scalr (Community Version)': 'Scalr', + 'Zscaler (Community Version)': 'Zscaler', +} + class Integration: def __init__(self, path: Path, repo_path: Path, repo_config: RepositoryConfig): @@ -95,6 +104,7 @@ def display_name(self) -> str: @cached_property def normalized_display_name(self) -> str: display_name = self.manifest.get('/assets/integration/source_type_name', self.name) + display_name = EXCEPTION_MAPPER.get(display_name, display_name) normalized_integration = re.sub("[^0-9A-Za-z-]", "_", display_name) normalized_integration = re.sub("_+", "_", normalized_integration) normalized_integration = normalized_integration.strip("_") From 960bb1eebb77b552cf1b7127b088c8378208c1cf Mon Sep 17 00:00:00 2001 From: Alyssa Mui Date: Fri, 11 Jul 2025 12:57:06 -0400 Subject: [PATCH 2/2] leave ddev changes --- ddev/changelog.d/20697.fixed | 1 + ddev/src/ddev/integration/core.py | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) create mode 100644 ddev/changelog.d/20697.fixed diff --git a/ddev/changelog.d/20697.fixed b/ddev/changelog.d/20697.fixed new file mode 100644 index 0000000000000..16a41b7795bc7 --- /dev/null +++ b/ddev/changelog.d/20697.fixed @@ -0,0 +1 @@ +[MINPROC-2319] remove the integration exception mapper diff --git a/ddev/src/ddev/integration/core.py b/ddev/src/ddev/integration/core.py index a0b12252c7c33..549b6fb67c4a2 100644 --- a/ddev/src/ddev/integration/core.py +++ b/ddev/src/ddev/integration/core.py @@ -16,15 +16,6 @@ from ddev.integration.manifest import Manifest from ddev.repo.config import RepositoryConfig -# The manifest.json file can contain the source_type_name field that the validation uses to validate different parts -# of the integration. Zabbix was renamed to Zabbix (Community Version) in the manifest.json file, so we need to map -# it back to Zabbix for validations to pass -EXCEPTION_MAPPER = { - 'Zabbix (Community Version)': 'Zabbix', - 'Scalr (Community Version)': 'Scalr', - 'Zscaler (Community Version)': 'Zscaler', -} - class Integration: def __init__(self, path: Path, repo_path: Path, repo_config: RepositoryConfig): @@ -104,7 +95,6 @@ def display_name(self) -> str: @cached_property def normalized_display_name(self) -> str: display_name = self.manifest.get('/assets/integration/source_type_name', self.name) - display_name = EXCEPTION_MAPPER.get(display_name, display_name) normalized_integration = re.sub("[^0-9A-Za-z-]", "_", display_name) normalized_integration = re.sub("_+", "_", normalized_integration) normalized_integration = normalized_integration.strip("_")