Skip to content

Separate static quality gates code into thematic modules#49865

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits intomainfrom
alopez/sqg-split-into-modules
Apr 27, 2026
Merged

Separate static quality gates code into thematic modules#49865
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits intomainfrom
alopez/sqg-split-into-modules

Conversation

@alopezz
Copy link
Copy Markdown
Contributor

@alopezz alopezz commented Apr 24, 2026

What does this PR do?

Splits code and test files for static quality gates into thematic modules. The change is intended to be purely mechanical.

Motivation

These files are growing beyond what's practical, which makes them hard to navigate. Particularly the test file, which was getting close to 3k lines.

I was about to make some changes and the code was somewhat hard to navigate.

Describe how you validated your changes

  • Tests in CI, also confirming that the number of tests is exactly the same (so it's unlikely anything got lost while moving).
  • Static quality gates run locally with dda inv invoke-unit-tests.run --directory tasks/unit_tests/static_quality_gates.

Additional Notes

As I said, this change is meant to be purely mechanical – chunks of code are essentially moved verbatim and imports adjusted. These might not be the "best" divisions and further refactors could further improve code organization, but it would've been a bad idea to try to do it in the same PR, as the diff is already large as-is.

Note for @agent-devx reviewers: you are pulled in for review due to the renaming of files putting some of the files under your ownership according to the existing codeowners file – this change should hopefully make it more robust to change in that sense.

@github-actions github-actions Bot added the long review PR is complex, plan time to review it label Apr 24, 2026
@alopezz alopezz added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels Apr 24, 2026
@alopezz alopezz marked this pull request as ready for review April 24, 2026 09:04
@alopezz alopezz requested review from a team as code owners April 24, 2026 09:04
@rdesgroppes rdesgroppes changed the title Separate static quality gates code into separate modules Separate static quality gates code into thematic modules Apr 24, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Apr 24, 2026

Files inventory check summary

File checks results against ancestor 0da860ec:

Results for datadog-agent_7.80.0~devel.git.227.07ad047.pipeline.109816566-1_amd64.deb:

No change detected

Copy link
Copy Markdown
Contributor

@rdesgroppes rdesgroppes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Apr 24, 2026

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 80534247-b69a-4fef-8e1b-85c3893c1d05

Baseline: 4f9b48f
Comparison: 1e50013
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +0.83 [-2.26, +3.91] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
tcp_syslog_to_blackhole ingress throughput +1.38 [+1.21, +1.55] 1 Logs
docker_containers_cpu % cpu utilization +0.83 [-2.26, +3.91] 1 Logs
otlp_ingest_logs memory utilization +0.77 [+0.67, +0.88] 1 Logs
ddot_metrics_sum_cumulative memory utilization +0.77 [+0.61, +0.93] 1 Logs
ddot_metrics_sum_delta memory utilization +0.56 [+0.38, +0.74] 1 Logs
otlp_ingest_metrics memory utilization +0.40 [+0.24, +0.56] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization +0.37 [+0.13, +0.61] 1 Logs
quality_gate_logs % cpu utilization +0.27 [-1.37, +1.92] 1 Logs bounds checks dashboard
quality_gate_idle_all_features memory utilization +0.23 [+0.19, +0.27] 1 Logs bounds checks dashboard
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization +0.12 [+0.07, +0.17] 1 Logs
quality_gate_idle memory utilization +0.08 [+0.03, +0.13] 1 Logs bounds checks dashboard
file_to_blackhole_100ms_latency egress throughput +0.06 [-0.03, +0.14] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.05 [-0.44, +0.53] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.04 [-0.36, +0.43] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.02 [-0.19, +0.22] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput +0.01 [-0.20, +0.22] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.11, +0.11] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.02 [-0.44, +0.40] 1 Logs
docker_containers_memory memory utilization -0.10 [-0.20, +0.00] 1 Logs
ddot_logs memory utilization -0.20 [-0.26, -0.14] 1 Logs
ddot_metrics memory utilization -0.22 [-0.41, -0.03] 1 Logs
file_tree memory utilization -0.30 [-0.35, -0.25] 1 Logs
quality_gate_metrics_logs memory utilization -0.85 [-1.11, -0.59] 1 Logs bounds checks dashboard

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed observed_value links
docker_containers_cpu simple_check_run 10/10 651 ≥ 26
docker_containers_memory memory_usage 10/10 244.97MiB ≤ 370MiB
docker_containers_memory simple_check_run 10/10 682 ≥ 26
file_to_blackhole_0ms_latency memory_usage 10/10 0.16GiB ≤ 1.20GiB
file_to_blackhole_0ms_latency missed_bytes 10/10 0B = 0B
file_to_blackhole_1000ms_latency memory_usage 10/10 0.20GiB ≤ 1.20GiB
file_to_blackhole_1000ms_latency missed_bytes 10/10 0B = 0B
file_to_blackhole_100ms_latency memory_usage 10/10 0.16GiB ≤ 1.20GiB
file_to_blackhole_100ms_latency missed_bytes 10/10 0B = 0B
file_to_blackhole_500ms_latency memory_usage 10/10 0.19GiB ≤ 1.20GiB
file_to_blackhole_500ms_latency missed_bytes 10/10 0B = 0B
quality_gate_idle intake_connections 10/10 3 ≤ 4 bounds checks dashboard
quality_gate_idle memory_usage 10/10 140.86MiB ≤ 147MiB bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 3 ≤ 4 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 465.59MiB ≤ 495MiB bounds checks dashboard
quality_gate_logs intake_connections 10/10 3 ≤ 6 bounds checks dashboard
quality_gate_logs memory_usage 10/10 176.87MiB ≤ 195MiB bounds checks dashboard
quality_gate_logs missed_bytes 10/10 0B = 0B bounds checks dashboard
quality_gate_metrics_logs cpu_usage 10/10 355.85 ≤ 2000 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 3 ≤ 6 bounds checks dashboard
quality_gate_metrics_logs memory_usage 10/10 376.72MiB ≤ 430MiB bounds checks dashboard
quality_gate_metrics_logs missed_bytes 10/10 0B = 0B bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.

@chouquette
Copy link
Copy Markdown
Contributor

that was much needed, thanks a lot 🙏

@alopezz alopezz added the ask-review Ask required teams to review this PR label Apr 27, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Apr 27, 2026

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 0da860e
📊 Static Quality Gates Dashboard
🔗 SQG Job

30 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
agent_deb_amd64 740.333 MiB
agent_deb_amd64_fips 698.767 MiB
agent_heroku_amd64 310.468 MiB
agent_rpm_amd64 740.317 MiB
agent_rpm_amd64_fips 698.751 MiB
agent_rpm_arm64 718.427 MiB
agent_rpm_arm64_fips 679.886 MiB
agent_suse_amd64 740.317 MiB
agent_suse_amd64_fips 698.751 MiB
agent_suse_arm64 718.427 MiB
agent_suse_arm64_fips 679.886 MiB
docker_agent_amd64 800.791 MiB
docker_agent_arm64 803.711 MiB
docker_agent_jmx_amd64 991.711 MiB
docker_agent_jmx_arm64 983.409 MiB
docker_cluster_agent_amd64 206.257 MiB
docker_cluster_agent_arm64 220.383 MiB
docker_cws_instrumentation_amd64 7.142 MiB
docker_cws_instrumentation_arm64 6.689 MiB
docker_dogstatsd_amd64 39.343 MiB
docker_dogstatsd_arm64 37.565 MiB
dogstatsd_deb_amd64 30.001 MiB
dogstatsd_deb_arm64 28.142 MiB
dogstatsd_rpm_amd64 30.001 MiB
dogstatsd_suse_amd64 30.001 MiB
iot_agent_deb_amd64 44.372 MiB
iot_agent_deb_arm64 41.361 MiB
iot_agent_deb_armhf 42.097 MiB
iot_agent_rpm_amd64 44.373 MiB
iot_agent_suse_amd64 44.373 MiB
On-wire sizes (compressed)
Quality gate Change Size (prev → curr → max)
agent_deb_amd64 -40.04 KiB (0.02% reduction) 175.155 → 175.116 → 179.160
agent_deb_amd64_fips neutral 166.955 MiB → 174.440
agent_heroku_amd64 neutral 75.088 MiB → 80.310
agent_rpm_amd64 +31.72 KiB (0.02% increase) 177.119 → 177.150 → 182.080
agent_rpm_amd64_fips -14.65 KiB (0.01% reduction) 168.311 → 168.297 → 174.140
agent_rpm_arm64 -2.77 KiB (0.00% reduction) 159.497 → 159.494 → 163.610
agent_rpm_arm64_fips -17.23 KiB (0.01% reduction) 151.676 → 151.659 → 156.850
agent_suse_amd64 +31.72 KiB (0.02% increase) 177.119 → 177.150 → 182.080
agent_suse_amd64_fips -14.65 KiB (0.01% reduction) 168.311 → 168.297 → 174.140
agent_suse_arm64 -2.77 KiB (0.00% reduction) 159.497 → 159.494 → 163.610
agent_suse_arm64_fips -17.23 KiB (0.01% reduction) 151.676 → 151.659 → 156.850
docker_agent_amd64 neutral 267.435 MiB → 272.990
docker_agent_arm64 neutral 254.474 MiB → 261.470
docker_agent_jmx_amd64 neutral 336.086 MiB → 341.610
docker_agent_jmx_arm64 neutral 319.118 MiB → 326.050
docker_cluster_agent_amd64 neutral 72.288 MiB → 73.460
docker_cluster_agent_arm64 neutral 67.757 MiB → 68.680
docker_cws_instrumentation_amd64 neutral 2.999 MiB → 3.330
docker_cws_instrumentation_arm64 neutral 2.729 MiB → 3.090
docker_dogstatsd_amd64 neutral 15.228 MiB → 15.870
docker_dogstatsd_arm64 neutral 14.544 MiB → 14.890
dogstatsd_deb_amd64 neutral 7.934 MiB → 8.830
dogstatsd_deb_arm64 neutral 6.818 MiB → 7.750
dogstatsd_rpm_amd64 neutral 7.946 MiB → 8.840
dogstatsd_suse_amd64 neutral 7.946 MiB → 8.840
iot_agent_deb_amd64 neutral 11.679 MiB → 13.210
iot_agent_deb_arm64 neutral 9.982 MiB → 11.620
iot_agent_deb_armhf neutral 10.187 MiB → 11.780
iot_agent_rpm_amd64 neutral 11.697 MiB → 13.230
iot_agent_suse_amd64 neutral 11.697 MiB → 13.230

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 1e50013 into main Apr 27, 2026
236 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the alopez/sqg-split-into-modules branch April 27, 2026 10:14
@github-actions github-actions Bot added this to the 7.80.0 milestone Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ask-review Ask required teams to review this PR changelog/no-changelog No changelog entry needed internal Identify a non-fork PR long review PR is complex, plan time to review it qa/no-code-change No code change in Agent code requiring validation team/agent-build team/agent-devx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants