Skip to content

Detect stale and unreleased entries in Agent release requirements#23813

Merged
AAraKKe merged 6 commits into
masterfrom
aarakke-agent-reqs-stale-release-entry
May 26, 2026
Merged

Detect stale and unreleased entries in Agent release requirements#23813
AAraKKe merged 6 commits into
masterfrom
aarakke-agent-reqs-stale-release-entry

Conversation

@AAraKKe
Copy link
Copy Markdown
Collaborator

@AAraKKe AAraKKe commented May 22, 2026

What does this PR do?

Makes ddev validate agent-reqs fail when requirements-agent-release.txt pins a datadog-* package whose integration folder is gone, and lets Agent release generation skip integrations that were pinned but never actually shipped, via a new [overrides.release.agent.unreleased-integrations] section in .ddev/config.toml.

Motivation

Snowflake remained in Agent release output after its folder was removed, and the historical cleanup in #23387 / #23412 resurrected integrations that had not shipped. The first failure mode now hard-fails; the second has an explicit per-Agent-release allowlist so generated files stay correct.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@AAraKKe AAraKKe added the qa/skip-qa Automatically skip this PR for the next QA label May 22, 2026
@datadog-prod-us1-4
Copy link
Copy Markdown
Contributor

datadog-prod-us1-4 Bot commented May 22, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

PR All | test / j06ca546 / SNMP   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). AssertionError: Needed at least 1 candidates for 'datadog.snmp.check_duration', got 0 in test_e2e_snmp_listener at tests/test_e2e_snmp_listener.py:118

PR All | test / j8d5404b / MarkLogic   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). AssertionError: Some metrics are collected but not asserted in tests/test_marklogic.py.

🧪 2 Tests failed in 1 job

PR All | run   GitHub Actions

test_check_with_filters from test_marklogic.py   View in Datadog (Fix with Cursor)
Some metrics are collected but not asserted:
Asserted Metrics:
	- marklogic.databases.average-forest-size
	- marklogic.databases.backup-count
	- marklogic.databases.backup-read-load
	- marklogic.databases.backup-read-rate
	- marklogic.databases.backup-write-load
	- marklogic.databases.backup-write-rate
	- marklogic.databases.compressed-tree-cache-hit-rate
	- marklogic.databases.compressed-tree-cache-miss-rate
...
❄️ Known flaky: test_e2e_snmp_listener from test_e2e_snmp_listener.py   View in Datadog (Fix with Cursor)
Needed at least 1 candidates for &#39;datadog.snmp.check_duration&#39;, got 0
Expected:
        MetricStub(name=&#39;datadog.snmp.check_duration&#39;, type=0, value=None, tags=[&#39;autodiscovery_subnet:172.18.0.0/28&#39;, &#39;device_vendor:apc&#39;, &#39;firmware_version:2.0.3-test&#39;, &#39;loader:python&#39;, &#39;model:APC Smart-UPS 600&#39;, &#39;serial_num:test_serial&#39;, &#39;snmp_device:172.18.0.1&#39;, &#39;snmp_profile:apc_ups&#39;, &#39;ups_name:testIdentName&#39;], hostname=None, device=None, flush_first_value=None)
Difference to closest:
        Expected tag snmp_device:172.18.0.1
        Found snmp_device:172.18.0.2

Similar submitted:
Score   Most similar
1.00    MetricStub(name=&#39;datadog.snmp.check_duration&#39;, type=0, value=0.18474292755126953, tags=[&#39;autodiscovery_subnet:172.18.0.0/28&#39;, &#39;device_vendor:apc&#39;, &#39;firmware_version:2.0.3-test&#39;, &#39;loader:python&#39;, &#39;model:APC Smart-UPS 600&#39;, &#39;serial_num:test_serial&#39;, &#39;snmp_device:172.18.0.2&#39;, &#39;snmp_profile:apc_ups&#39;, &#39;ups_name:testIdentName&#39;], hostname=&#39;runnervmyxb0g&#39;, device=None, flush_first_value=False)
...

Not introduced in this PR.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 94.21%
Overall Coverage: 87.44% (+0.09%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: af286e9 | Docs | Datadog PR Page | Give us feedback!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 94.21488% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.91%. Comparing base (1a6870a) to head (af286e9).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

AAraKKe added 2 commits May 22, 2026 18:00
- Validate that by-agent-version-range keys contain the '..' separator and raise a clear ValueError naming the offending key.
- Drop the redundant else branch in exclude_unreleased_integrations and move the historical folder-name comment back next to normalize_catalog.
- mkdir(exist_ok=True) in the write_repo_config helper for consistency with neighbours.
- Parametrize test_agent_version_in_range_is_inclusive (now covers below/above bounds and the malformed-range error path).
- Add a direct unit test on get_unreleased_integrations that exercises by-integration and by-agent-version-range together.
- Add a clean-pass test for validate agent-reqs and pull the set_root teardown into an isolated_root yield fixture.
- Add changelog entries for ddev and datadog_checks_dev.
- Drop the redundant empty parent table header in .ddev/config.toml; the two sub-tables imply it.
- Catch ValueError from agent_version_in_range at every command entry point that triggers the lookup (integrations, changelog, integrations_changelog) and surface it via app.abort so config authors get a clean message instead of a Python traceback.
- Document that exclude_unreleased_integrations accepts both raw and folder-normalized catalog keys.
@AAraKKe AAraKKe marked this pull request as ready for review May 22, 2026 16:21
@AAraKKe AAraKKe requested a review from a team as a code owner May 22, 2026 16:21
When the user runs `ddev validate agent-reqs <check>`, only the requested check should be validated; previously the new stale-entry detection still scanned the whole requirements file and surfaced unrelated stale packages, defeating per-check pre-commit usage.
@AAraKKe AAraKKe enabled auto-merge May 22, 2026 16:46
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 25, 2026

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and Codecov settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@AAraKKe AAraKKe added this pull request to the merge queue May 26, 2026
Merged via the queue into master with commit 9e89c6f May 26, 2026
364 of 367 checks passed
@AAraKKe AAraKKe deleted the aarakke-agent-reqs-stale-release-entry branch May 26, 2026 17:51
@dd-octo-sts dd-octo-sts Bot added this to the 7.81.0 milestone May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants