Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .builders/images/linux-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ RUN yum install -y flex && \
VERSION="16.9" \
SHA256="07c00fb824df0a0c295f249f44691b86e3266753b380c96f633c3311e10bd005" \
RELATIVE_PATH="postgresql-{{version}}" \
bash install-from-source.sh --without-readline --with-openssl --without-icu
bash install-from-source.sh --without-readline --with-openssl --without-icu --with-gssapi
# Add paths to pg_config and to the library
ENV PATH="/usr/local/pgsql/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/pgsql/lib/:${LD_LIBRARY_PATH}"
Expand Down
2 changes: 1 addition & 1 deletion .builders/images/linux-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ RUN yum install -y flex && \
VERSION="16.9" \
SHA256="07c00fb824df0a0c295f249f44691b86e3266753b380c96f633c3311e10bd005" \
RELATIVE_PATH="postgresql-{{version}}" \
bash install-from-source.sh --without-readline --with-openssl --without-icu
bash install-from-source.sh --without-readline --with-openssl --without-icu --with-gssapi
# Add paths to pg_config and to the library
ENV PATH="/usr/local/pgsql/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/pgsql/lib/:${LD_LIBRARY_PATH}"
Expand Down
1 change: 1 addition & 0 deletions ddev/changelog.d/22965.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds validation to detect duplicate entries when running `ddev validate labeler`.
27 changes: 26 additions & 1 deletion ddev/src/ddev/cli/validate/labeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

import copy
import re
from typing import TYPE_CHECKING, cast

import click
Expand All @@ -18,6 +19,18 @@ def labeler_config_for_check(check: str) -> list[dict[str, list[dict[str, list[s
return [{"changed-files": [{"any-glob-to-any-file": [f"{check}/**/*"]}]}]


def _find_duplicate_keys(raw_yaml: str) -> list[str]:
"""Detect duplicate top-level keys that yaml.safe_load would silently discard."""
seen: set[str] = set()
duplicates: list[str] = []
for key in re.findall(r'^([a-zA-Z]\S*):(?:\s|$)', raw_yaml, re.MULTILINE):
if key in seen:
duplicates.append(key)
else:
seen.add(key)
return duplicates


def _extract_directory_from_config(config: list[dict]) -> str | None:
try:
return config[0]['changed-files'][0]['any-glob-to-any-file'][0].split('/')[0]
Expand Down Expand Up @@ -49,11 +62,23 @@ def labeler(app: Application, sync: bool):
if not pr_labels_config_path.exists():
app.abort('Unable to find the PR Labels config file')

pr_labels_config = yaml.safe_load(pr_labels_config_path.read_text())
raw_yaml = pr_labels_config_path.read_text()
pr_labels_config = yaml.safe_load(raw_yaml)
new_pr_labels_config = copy.deepcopy(pr_labels_config)

tracker = app.create_validation_tracker('labeler')

duplicate_keys = _find_duplicate_keys(raw_yaml)
for key in duplicate_keys:
if sync:
# Duplicates are removed by default as loading the yaml file discards the first occurrence
app.display_info(
f'Removing duplicate key `{key}` from labeler config. Only the last occurrence will be kept.'
)
else:
message = f'Duplicate key `{key}` found in labeler config; running `--sync` will keep the last occurrence'
tracker.error((str(pr_labels_config_path),), message=message)

# Build mapping from directory (in glob patterns) to label key
directory_to_label: dict[str, str] = {}
label_to_directory: dict[str, str] = {}
Expand Down
98 changes: 98 additions & 0 deletions ddev/tests/cli/validate/test_labeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,104 @@ def test_labeler_sync_long_label_replacement_still_too_long(fake_repo, ddev):
assert 'still too long' in result.output


def test_labeler_duplicate_yaml_key_reports_error(fake_repo, ddev):
(fake_repo.path / '.github' / 'workflows' / 'config' / 'labeler.yml').write_text(
"""\
changelog/no-changelog:
- changed-files:
- any-glob-to-any-file:
- requirements-agent-release.txt
- '*/__about__.py'
- all:
- changed-files:
- any-glob-to-any-file:
- '!*/datadog_checks/**'
- '!*/pyproject.toml'
- '!ddev/src/**'
integration/datadog_checks_tests_helper:
- changed-files:
- any-glob-to-any-file:
- datadog_checks_tests_helper/**/*
integration/dummy:
- changed-files:
- any-glob-to-any-file:
- dummy/stale/**/*
integration/dummy2:
- changed-files:
- any-glob-to-any-file:
- dummy2/**/*
integration/dummy:
- changed-files:
- any-glob-to-any-file:
- dummy/**/*
release:
- changed-files:
- any-glob-to-any-file:
- '*/__about__.py'
""",
)

result = ddev('validate', 'labeler')

assert result.exit_code == 1, result.output
output = re.sub(r"\s+", " ", result.output)
assert 'Duplicate key `integration/dummy`' in output
assert 'running `--sync` will keep the last occurrence' in output


def test_labeler_sync_removes_duplicate_yaml_key(fake_repo, ddev):
(fake_repo.path / '.github' / 'workflows' / 'config' / 'labeler.yml').write_text(
"""\
changelog/no-changelog:
- changed-files:
- any-glob-to-any-file:
- requirements-agent-release.txt
- '*/__about__.py'
- all:
- changed-files:
- any-glob-to-any-file:
- '!*/datadog_checks/**'
- '!*/pyproject.toml'
- '!ddev/src/**'
integration/datadog_checks_tests_helper:
- changed-files:
- any-glob-to-any-file:
- datadog_checks_tests_helper/**/*
integration/dummy:
- changed-files:
- any-glob-to-any-file:
- dummy/stale/**/*
integration/dummy2:
- changed-files:
- any-glob-to-any-file:
- dummy2/**/*
integration/dummy:
- changed-files:
- any-glob-to-any-file:
- dummy/**/*
release:
- changed-files:
- any-glob-to-any-file:
- '*/__about__.py'
""",
)

result = ddev('validate', 'labeler', '--sync')

assert result.exit_code == 0, result.output
output = re.sub(r"\s+", " ", result.output)
assert (
'Removing duplicate key `integration/dummy` from labeler config. Only the last occurrence will be kept.'
in output
)
assert 'Successfully updated' in output

labeler_content = (fake_repo.path / '.github' / 'workflows' / 'config' / 'labeler.yml').read_text()
assert labeler_content.count('integration/dummy:') == 1
assert 'dummy/**/*' in labeler_content
assert 'dummy/stale/**/*' not in labeler_content


def test_labeler_no_sync_long_label_reports_error(fake_repo, ddev):
long_check_dir = fake_repo.path / LONG_CHECK_NAME
long_check_dir.mkdir()
Expand Down
6 changes: 6 additions & 0 deletions rabbitmq/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

<!-- towncrier release notes start -->

## 8.5.1 / 2026-03-19

***Fixed***:

* Restore HTTP/TLS configuration options for the Management Plugin in the example configuration file. ([#22675](https://github.com/DataDog/integrations-core/pull/22675))

## 8.5.0 / 2026-02-19 / Agent 7.77.0

***Added***:
Expand Down
1 change: 0 additions & 1 deletion rabbitmq/changelog.d/22675.fixed

This file was deleted.

2 changes: 1 addition & 1 deletion rabbitmq/datadog_checks/rabbitmq/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)

__version__ = '8.5.0'
__version__ = '8.5.1'
9 changes: 9 additions & 0 deletions redisdb/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ files:
type: integer
example: 2
fleet_configurable: true
- name: ssl_check_hostname
description: |
Verify the server's SSL certificate hostname matches the connection target.
Redis-py 6.0+ defaults this to true. Set to false if your certificate
does not match the connection hostname (for example, if connecting by IP).
value:
type: boolean
example: true
fleet_configurable: true
- name: keys
description: |
Enter the list of keys to collect the lengths from.
Expand Down
1 change: 1 addition & 0 deletions redisdb/changelog.d/22972.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow for ssl_check_hostname to be turned off
4 changes: 4 additions & 0 deletions redisdb/datadog_checks/redisdb/config_models/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,9 @@ def instance_ssl_cert_reqs():
return 2


def instance_ssl_check_hostname():
return True


def instance_warn_on_missing_keys():
return True
1 change: 1 addition & 0 deletions redisdb/datadog_checks/redisdb/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class InstanceConfig(BaseModel):
ssl_ca_certs: Optional[str] = None
ssl_cert_reqs: Optional[int] = None
ssl_certfile: Optional[str] = None
ssl_check_hostname: Optional[bool] = None
ssl_keyfile: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
unix_socket_path: Optional[str] = None
Expand Down
7 changes: 7 additions & 0 deletions redisdb/datadog_checks/redisdb/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ instances:
#
# ssl_cert_reqs: 2

## @param ssl_check_hostname - boolean - optional - default: true
## Verify the server's SSL certificate hostname matches the connection target.
## Redis-py 6.0+ defaults this to true. Set to false if your certificate
## does not match the connection hostname (for example, if connecting by IP).
#
# ssl_check_hostname: true

## @param keys - list of strings - optional
## Enter the list of keys to collect the lengths from.
## The length is 1 for strings.
Expand Down
1 change: 1 addition & 0 deletions redisdb/datadog_checks/redisdb/redisdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def _get_conn(self, instance_config):
'ssl_keyfile',
'ssl_ca_certs',
'ssl_cert_reqs',
'ssl_check_hostname',
]

# Set a default timeout (in seconds) if no timeout is specified in the instance config
Expand Down
1 change: 1 addition & 0 deletions redisdb/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def test_check_all_available_config_options(check, aggregator, redis_instance, d
'ssl_keyfile': '/path',
'ssl_ca_certs': '/path',
'ssl_cert_reqs': 0,
'ssl_check_hostname': True,
}
redis_instance.update(connection_args)

Expand Down
2 changes: 1 addition & 1 deletion requirements-agent-release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ datadog-proxmox==2.4.1
datadog-proxysql==7.6.0
datadog-pulsar==3.5.0
datadog-quarkus==2.3.0
datadog-rabbitmq==8.5.0
datadog-rabbitmq==8.5.1
datadog-ray==3.3.0
datadog-redisdb==8.6.0
datadog-rethinkdb==5.4.0
Expand Down
1 change: 1 addition & 0 deletions snmp/changelog.d/22974.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Meraki Cloud Controller: use ``device_status`` tag instead of ``status`` for device-level online/offline to avoid confusion with uplink status (connected/not_connected) per Cisco Meraki API semantics.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ metrics:
OID: 1.3.6.1.4.1.29671.1.1.4.1.11
name: devNetworkName
tag: network
# Device-level status (online/offline). Use device_status to avoid confusion with
# uplink/component status (connected/not_connected) per Cisco Meraki API semantics.
- symbol:
OID: 1.3.6.1.4.1.29671.1.1.4.1.3
name: devStatus
tag: status
tag: device_status
mapping:
0: offline
1: online
Expand Down
2 changes: 1 addition & 1 deletion snmp/tests/test_e2e_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def test_e2e_meraki_cloud_controller(dd_agent_check):
'mac_address:02:02:00:66:f5:7f',
'network:L_NETWORK',
'product:MR16-HW',
'status:online',
'device_status:online',
],
]
for tag_row in tag_rows:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_e2e_profile_meraki_cloud_controller(dd_agent_check):
'mac_address:02:02:00:66:f5:7f',
'network:L_NETWORK',
'product:MR16-HW',
'status:online',
'device_status:online',
'device_name:Gymnasium',
],
]
Expand Down
2 changes: 1 addition & 1 deletion snmp/tests/test_e2e_core_vs_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def test_e2e_profile_isilon(dd_agent_check):

def test_e2e_profile_meraki_cloud_controller(dd_agent_check):
config = common.generate_container_profile_config('meraki-cloud-controller')
assert_python_vs_core(dd_agent_check, config, tags_to_skip=['mac_address', 'status'])
assert_python_vs_core(dd_agent_check, config, tags_to_skip=['mac_address', 'device_status'])


def test_e2e_profile_netapp(dd_agent_check):
Expand Down
Loading