From c342686fe0086e23bcac42dcd75b919f7e9b1f32 Mon Sep 17 00:00:00 2001 From: HadhemiDD <43783545+HadhemiDD@users.noreply.github.com> Date: Fri, 6 Feb 2026 09:52:41 +0100 Subject: [PATCH 1/3] Add legacy field for integrations: etcd mongo coredns (#22529) * add legacy field for integrations * add coredns --- coredns/assets/configuration/spec.yaml | 4 ++++ etcd/assets/configuration/spec.yaml | 1 + mongo/assets/configuration/spec.yaml | 2 ++ 3 files changed, 7 insertions(+) diff --git a/coredns/assets/configuration/spec.yaml b/coredns/assets/configuration/spec.yaml index d83672d6d26dc..448d7cb14d4bf 100644 --- a/coredns/assets/configuration/spec.yaml +++ b/coredns/assets/configuration/spec.yaml @@ -46,6 +46,7 @@ files: See documentation: https://docs.datadoghq.com/integrations/coredns enabled: true + legacy: true value: type: string example: "http://%%host%%:9153/metrics" @@ -63,6 +64,7 @@ files: - "dns-pod:%%host%%" - name: send_histograms_buckets description: (Legacy OpenMetricsBaseCheckV1) Set send_histograms_buckets to true to send the histograms bucket. + legacy: true value: type: boolean example: True @@ -70,6 +72,7 @@ files: description: | (Legacy OpenMetricsBaseCheckV1) To send counters as monotonic counter see: https://github.com/DataDog/integrations-core/issues/1303 + legacy: true value: type: boolean example: True @@ -79,6 +82,7 @@ files: are enabled by default, however in order to scrape metrics for optional plugins, enable the plugin in the CoreDNS corefile and then add the metric below. As an example, the 'template' plugin's metrics are below + legacy: true value: type: array items: diff --git a/etcd/assets/configuration/spec.yaml b/etcd/assets/configuration/spec.yaml index 4a6cb6fd2a7bf..fa44e7448cba1 100644 --- a/etcd/assets/configuration/spec.yaml +++ b/etcd/assets/configuration/spec.yaml @@ -8,6 +8,7 @@ files: - template: instances options: - name: use_preview + legacy: true description: | Deprecated and unused. The Prometheus-based check is the default and only implementation. hidden: true diff --git a/mongo/assets/configuration/spec.yaml b/mongo/assets/configuration/spec.yaml index 2f842c1570520..8030ce0b11ba6 100644 --- a/mongo/assets/configuration/spec.yaml +++ b/mongo/assets/configuration/spec.yaml @@ -81,6 +81,7 @@ files: type: object properties: [] - name: dbnames + legacy: true deprecation: Agent version: "7.56.0" Migration: | @@ -637,6 +638,7 @@ files: type: string example: mydocdb - name: server + legacy: true deprecation: Agent version: "8.0.0" Migration: | From 5fa76fc4a111e9f8dc29bf3d6bfd30e23c463637 Mon Sep 17 00:00:00 2001 From: jedupau <72938258+jedupau@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:50:51 +0100 Subject: [PATCH 2/3] [NDMC-191] collect is physical from cisco aci (#22537) * collect is physical from cisco aci * add test * fix test --- cisco_aci/datadog_checks/cisco_aci/models.py | 1 + cisco_aci/datadog_checks/cisco_aci/ndm.py | 1 + cisco_aci/tests/fixtures/metadata.py | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/cisco_aci/datadog_checks/cisco_aci/models.py b/cisco_aci/datadog_checks/cisco_aci/models.py index 0e4798b9f41f3..4fefddaf4d3d0 100644 --- a/cisco_aci/datadog_checks/cisco_aci/models.py +++ b/cisco_aci/datadog_checks/cisco_aci/models.py @@ -226,6 +226,7 @@ class InterfaceMetadata(BaseModel): admin_status: Optional[AdminStatus] = Field(default=None) oper_status: Optional[OperStatus] = Field(default=None) integration: Optional[str] = Field(default='cisco-aci') + is_physical: Optional[bool] = Field(default=None) model_config = ConfigDict(validate_assignment=True, use_enum_values=True) diff --git a/cisco_aci/datadog_checks/cisco_aci/ndm.py b/cisco_aci/datadog_checks/cisco_aci/ndm.py index de910e13c58f3..c0a09bd61b0ff 100644 --- a/cisco_aci/datadog_checks/cisco_aci/ndm.py +++ b/cisco_aci/datadog_checks/cisco_aci/ndm.py @@ -65,6 +65,7 @@ def create_interface_metadata(phys_if, address, namespace): description=eth.attributes.desc, mac_address=eth.attributes.router_mac, admin_status=eth.attributes.admin_st, + is_physical=True, ) if eth.ethpm_phys_if: interface.oper_status = eth.ethpm_phys_if.attributes.oper_st diff --git a/cisco_aci/tests/fixtures/metadata.py b/cisco_aci/tests/fixtures/metadata.py index a5b1be5e60061..3f5dbc88be474 100644 --- a/cisco_aci/tests/fixtures/metadata.py +++ b/cisco_aci/tests/fixtures/metadata.py @@ -145,6 +145,7 @@ 'name': 'eth1/1', 'oper_status': 1, 'status': 'up', + 'is_physical': True, }, { 'admin_status': 1, @@ -160,6 +161,7 @@ 'name': 'eth1/2', 'oper_status': 1, 'status': 'up', + 'is_physical': True, }, { 'admin_status': 1, @@ -175,6 +177,7 @@ 'name': 'eth1/3', 'oper_status': 2, 'status': 'down', + 'is_physical': True, }, { 'admin_status': 1, @@ -190,6 +193,7 @@ 'name': 'eth1/1', 'oper_status': 1, 'status': 'up', + 'is_physical': True, }, { 'admin_status': 1, @@ -205,6 +209,7 @@ 'name': 'eth1/2', 'oper_status': 1, 'status': 'up', + 'is_physical': True, }, { 'admin_status': 1, @@ -220,6 +225,7 @@ 'name': 'eth1/3', 'oper_status': 2, 'status': 'down', + 'is_physical': True, }, { 'admin_status': 1, @@ -235,6 +241,7 @@ 'name': 'eth5/1', 'oper_status': 1, 'status': 'up', + 'is_physical': True, }, { 'admin_status': 1, @@ -250,6 +257,7 @@ 'name': 'eth5/2', 'oper_status': 1, 'status': 'up', + 'is_physical': True, }, { 'admin_status': 1, @@ -265,6 +273,7 @@ 'name': 'eth7/1', 'oper_status': 2, 'status': 'down', + 'is_physical': True, }, ] From f3e67530ab47e4b6ec0c7e986ed6c887a29237bd Mon Sep 17 00:00:00 2001 From: dkirov-dd <166512750+dkirov-dd@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:55:41 +0100 Subject: [PATCH 3/3] [Fix CI] Improve license parsing in `ddev` validation (#22559) * Improve license parsing * Add changelog * fix(licenses): Fix validation of SPDX identifiers containing -or- and -and- - Update _OP_SPLIT regex to use negative lookbehind/lookahead assertions - Prevent matching "-or-" or "-and-" inside identifiers like "GPL-2.0-or-later" - Fix fallback logic to check per-chunk instead of entire parts list - Ensure all license identifiers are extracted from compound expressions Rationale: The _OP_SPLIT regex was incorrectly splitting SPDX identifiers like GPL-2.0-or-later into fragments (GPL-2.0- and -later) because \bOR\b with re.IGNORECASE matched the lowercase "or" between hyphens. This caused valid licenses with -or-later or -and- segments to be rejected by ddev validate licenses. Additionally, the fallback logic bug prevented proper extraction of multiple license identifiers from compound expressions, resulting in only the first identifier being extracted. This commit made by [/dd:git:commit:atomic](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/atomic.md) * Add type hint to parts * fix(licenses): Remove comma as a separator in license expressions - Remove comma from _OP_SPLIT regex separator list - Fixes incorrect splitting of license names containing commas - Addresses validation failures for licenses like "Apache License, Version 2.0" Rationale: Commas are not part of the SPDX expression syntax (only AND, OR, and WITH are valid operators). When commas appear in license strings, they are part of the license name itself, not expression separators. The previous implementation incorrectly split "Apache License, Version 2.0" into ["Apache License", "Version 2.0"], causing validation failures. This commit made by [/dd:git:commit:atomic](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/atomic.md) --- ddev/changelog.d/22559.fixed | 1 + ddev/src/ddev/cli/validate/licenses.py | 44 ++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 ddev/changelog.d/22559.fixed diff --git a/ddev/changelog.d/22559.fixed b/ddev/changelog.d/22559.fixed new file mode 100644 index 0000000000000..d2bad8f3d3473 --- /dev/null +++ b/ddev/changelog.d/22559.fixed @@ -0,0 +1 @@ +Improve license parsing in validation diff --git a/ddev/src/ddev/cli/validate/licenses.py b/ddev/src/ddev/cli/validate/licenses.py index 64c4c010ae060..7fe1c8849eb52 100644 --- a/ddev/src/ddev/cli/validate/licenses.py +++ b/ddev/src/ddev/cli/validate/licenses.py @@ -3,6 +3,7 @@ # Licensed under a 3-clause BSD style license (see LICENSE) from __future__ import annotations +import re from typing import TYPE_CHECKING import click @@ -10,6 +11,14 @@ if TYPE_CHECKING: from ddev.cli.application import Application +# Split license expressions on operators (AND, OR, and/or) and separators (/, +). +# Use negative lookbehind (? list[str]: + # Normalize parens to spaces + expr = expr.replace("(", " ").replace(")", " ") + + parts: list[str] = [] + for chunk in _OP_SPLIT.split(expr): + chunk = chunk.strip() + if not chunk: + continue + + # Handle "WITH" exceptions by taking the left side license id. + chunk = re.split(r"\s+\bWITH\b\s+", chunk, flags=re.IGNORECASE)[0].strip() + + # Extract tokens; keep ones that look like SPDX-ish ids + chunk_start_len = len(parts) + for token in _ID.findall(chunk): + if token: + parts.append(token if isinstance(token, str) else token[0]) + if len(parts) == chunk_start_len: + # If we couldn't extract any ID from this chunk, try to use the whole chunk + # as a fallback, stripping any remaining noise. + fallback = re.sub(r'\s+', ' ', chunk).strip() + if fallback: + parts.append(fallback) + return parts + + @click.command(short_help='Validate third-party license list') @click.option('--sync', '-s', is_flag=True, help='Generate the `LICENSE-3rdparty.csv` file') @click.pass_obj @@ -420,13 +456,7 @@ def licenses(app: Application, sync: bool): for package_license in data['licenses']: package_license = package_license.strip('"') - expanded_licenses = [] - for separator in (' and/or ', '/', ' OR ', ' or '): - if separator in package_license: - expanded_licenses.extend(package_license.split(separator)) - break - else: - expanded_licenses.append(package_license) + expanded_licenses = split_license_expression_simple(package_license) for expanded_license in expanded_licenses: normalized_license = expanded_license.lower()