Skip to content

[SQG] Add missing expression attribute#45124

Merged
dd-mergequeue[bot] merged 1 commit intomainfrom
jsgette/sqg_fix_new_bump_task
Jan 15, 2026
Merged

[SQG] Add missing expression attribute#45124
dd-mergequeue[bot] merged 1 commit intomainfrom
jsgette/sqg_fix_new_bump_task

Conversation

@JSGette
Copy link
Copy Markdown
Contributor

@JSGette JSGette commented Jan 15, 2026

What does this PR do?

This fixes a newly introduced SQG bump task that was always reporting no failing gates to bump. The issue was in lack of expression attribute that is crucial to determine which metric we want to use. Also, instead of heavily relying on Reflection API we now use attributes directly which makes the code cleaner and easier to read and maintain.

Describe how you validated your changes

  1. I have reduced the maximum for one of the gates.
  2. Waited the pipeline to complete (so that SQG job reports the results)
  3. Ran dd-auth -- dda inv quality-gates.exception-threshold-bump 45124
    to see that failing gate was bumped:
Fetching metrics for PR #45124...
Found metrics for 31 gates
Found 1 failing gates:
  - agent_deb_amd64: disk +4.86 MiB, wire +-1.18 MiB
Fetching main branch metrics for headroom calculation...

[SUCCESS] Updated 1 gate thresholds:
  - agent_deb_amd64: disk: 700.41 MiB → 708.41 MiB
  - agent_deb_amd64: wire: 174.49 MiB → 174.49 MiB
  1. Verified that static_quality_gates.yml contained unstaged changes.

Additional Notes

This task doesn't work with pipelines anymore. Instead, it relies on Datadog and reported metrics meaning that if a PR doesn't have a run of SQG job and metrics weren't uploaded in the last 24 hours the task will fail. This is to ensure that PR is as close to the current state of the main branch as possible to improve accuracy of the size calculation.

@JSGette JSGette self-assigned this Jan 15, 2026
@JSGette JSGette added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels Jan 15, 2026
@github-actions github-actions bot added team/agent-build short review PR is simple enough to be reviewed quickly labels Jan 15, 2026
@agent-platform-auto-pr
Copy link
Copy Markdown
Contributor

agent-platform-auto-pr bot commented Jan 15, 2026

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor ccd903c
📊 Static Quality Gates Dashboard

31 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
agent_deb_amd64 705.269 MiB
agent_deb_amd64_fips 700.554 MiB
agent_heroku_amd64 326.908 MiB
agent_msi 571.532 MiB
agent_rpm_amd64 705.255 MiB
agent_rpm_amd64_fips 700.540 MiB
agent_rpm_arm64 686.832 MiB
agent_rpm_arm64_fips 682.941 MiB
agent_suse_amd64 705.255 MiB
agent_suse_amd64_fips 700.540 MiB
agent_suse_arm64 686.832 MiB
agent_suse_arm64_fips 682.941 MiB
docker_agent_amd64 767.464 MiB
docker_agent_arm64 773.619 MiB
docker_agent_jmx_amd64 958.342 MiB
docker_agent_jmx_arm64 953.217 MiB
docker_cluster_agent_amd64 180.684 MiB
docker_cluster_agent_arm64 196.557 MiB
docker_cws_instrumentation_amd64 7.135 MiB
docker_cws_instrumentation_arm64 6.689 MiB
docker_dogstatsd_amd64 38.808 MiB
docker_dogstatsd_arm64 37.128 MiB
dogstatsd_deb_amd64 30.027 MiB
dogstatsd_deb_arm64 28.176 MiB
dogstatsd_rpm_amd64 30.027 MiB
dogstatsd_suse_amd64 30.027 MiB
iot_agent_deb_amd64 42.983 MiB
iot_agent_deb_arm64 40.108 MiB
iot_agent_deb_armhf 40.685 MiB
iot_agent_rpm_amd64 42.983 MiB
iot_agent_suse_amd64 42.983 MiB
On-wire sizes (compressed)
Quality gate Change Size (prev → curr → max)
agent_deb_amd64 neutral 173.315 MiB
agent_deb_amd64_fips -14.36 KiB (0.01% reduction) 172.250 → 172.236 → 173.750
agent_heroku_amd64 -3.88 KiB (0.00% reduction) 87.106 → 87.102 → 88.450
agent_msi +4.0 KiB (0.00% increase) 142.930 → 142.934 → 143.020
agent_rpm_amd64 +28.59 KiB (0.02% increase) 176.137 → 176.165 → 177.660
agent_rpm_amd64_fips +10.85 KiB (0.01% increase) 174.929 → 174.940 → 176.600
agent_rpm_arm64 -11.72 KiB (0.01% reduction) 159.359 → 159.348 → 161.260
agent_rpm_arm64_fips +19.7 KiB (0.01% increase) 158.752 → 158.771 → 160.550
agent_suse_amd64 +28.59 KiB (0.02% increase) 176.137 → 176.165 → 177.660
agent_suse_amd64_fips +10.85 KiB (0.01% increase) 174.929 → 174.940 → 176.600
agent_suse_arm64 -11.72 KiB (0.01% reduction) 159.359 → 159.348 → 161.260
agent_suse_arm64_fips +19.7 KiB (0.01% increase) 158.752 → 158.771 → 160.550
docker_agent_amd64 neutral 261.029 MiB
docker_agent_arm64 neutral 250.047 MiB
docker_agent_jmx_amd64 neutral 329.668 MiB
docker_agent_jmx_arm64 neutral 314.678 MiB
docker_cluster_agent_amd64 neutral 63.830 MiB
docker_cluster_agent_arm64 neutral 60.124 MiB
docker_cws_instrumentation_amd64 neutral 2.994 MiB
docker_cws_instrumentation_arm64 neutral 2.726 MiB
docker_dogstatsd_amd64 neutral 15.025 MiB
docker_dogstatsd_arm64 neutral 14.354 MiB
dogstatsd_deb_amd64 neutral 7.944 MiB
dogstatsd_deb_arm64 neutral 6.822 MiB
dogstatsd_rpm_amd64 neutral 7.956 MiB
dogstatsd_suse_amd64 neutral 7.956 MiB
iot_agent_deb_amd64 +2.33 KiB (0.02% increase) 11.260 → 11.262 → 12.040
iot_agent_deb_arm64 +2.26 KiB (0.02% increase) 9.631 → 9.634 → 10.450
iot_agent_deb_armhf neutral 9.824 MiB
iot_agent_rpm_amd64 neutral 11.275 MiB
iot_agent_suse_amd64 neutral 11.275 MiB

@cit-pr-commenter
Copy link
Copy Markdown

cit-pr-commenter bot commented Jan 15, 2026

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: bd3d7609-1da0-4a9c-b1c3-9e9e7dcc83dc

Baseline: ccd903c
Comparison: 10102fc
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 +5.24 [+2.20, +8.28] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization +5.24 [+2.20, +8.28] 1 Logs
ddot_metrics_sum_delta memory utilization +0.93 [+0.73, +1.13] 1 Logs
otlp_ingest_metrics memory utilization +0.46 [+0.31, +0.61] 1 Logs
quality_gate_idle_all_features memory utilization +0.44 [+0.40, +0.47] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput +0.44 [+0.37, +0.51] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.03 [-0.10, +0.16] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.03 [-0.02, +0.07] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.03 [-0.38, +0.43] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.01 [-0.38, +0.39] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.09, +0.09] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput -0.00 [-0.14, +0.13] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.04 [-0.56, +0.48] 1 Logs
quality_gate_idle memory utilization -0.04 [-0.08, +0.00] 1 Logs bounds checks dashboard
ddot_metrics_sum_cumulative memory utilization -0.04 [-0.20, +0.12] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.06 [-0.12, -0.01] 1 Logs
otlp_ingest_logs memory utilization -0.06 [-0.17, +0.04] 1 Logs
quality_gate_metrics_logs memory utilization -0.11 [-0.33, +0.10] 1 Logs bounds checks dashboard
docker_containers_memory memory utilization -0.14 [-0.21, -0.07] 1 Logs
file_tree memory utilization -0.28 [-0.34, -0.22] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization -0.36 [-0.59, -0.13] 1 Logs
ddot_metrics memory utilization -0.37 [-0.58, -0.16] 1 Logs
ddot_logs memory utilization -0.93 [-1.00, -0.86] 1 Logs
quality_gate_logs % cpu utilization -1.67 [-3.11, -0.22] 1 Logs bounds checks dashboard

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency lost_bytes 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_logs memory_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs cpu_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 bounds checks dashboard
quality_gate_metrics_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_metrics_logs memory_usage 10/10 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".

Replicate Execution Details

We run multiple replicates for each experiment/variant. However, we allow replicates to be automatically retried if there are any failures, up to 8 times, at which point the replicate is marked dead and we are unable to run analysis for the entire experiment. We call each of these attempts at running replicates a replicate execution. This section lists all replicate executions that failed due to the target crashing or being oom killed.

Note: In the below tables we bucket failures by experiment, variant, and failure type. For each of these buckets we list out the replicate indexes that failed with an annotation signifying how many times said replicate failed with the given failure mode. In the below example the baseline variant of the experiment named experiment_with_failures had two replicates that failed by oom kills. Replicate 0, which failed 8 executions, and replicate 1 which failed 6 executions, all with the same failure mode.

Experiment Variant Replicates Failure Logs Debug Dashboard
experiment_with_failures baseline 0 (x8) 1 (x6) Oom killed Debug Dashboard

The debug dashboard links will take you to a debugging dashboard specifically designed to investigate replicate execution failures.

❌ Retried Profiling Replicate Execution Failures (target internal profiling)

Note: Profiling replicas may still be executing. See the debug dashboard for up to date status.

Experiment Variant Replicates Failure Debug Dashboard
quality_gate_idle_all_features baseline 11 (x4) Oom killed Debug Dashboard
quality_gate_idle_all_features comparison 11 (x2) Oom killed Debug Dashboard

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle, 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_metrics_logs, bounds check cpu_usage: 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_metrics_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 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.

@github-actions github-actions bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Jan 15, 2026
Add missing expression attribute & simplify logic
@JSGette JSGette force-pushed the jsgette/sqg_fix_new_bump_task branch from 71639cb to 10102fc Compare January 15, 2026 12:21
@github-actions github-actions bot added short review PR is simple enough to be reviewed quickly and removed medium review PR review might take time labels Jan 15, 2026
@JSGette JSGette changed the title Reduce the gate for test purposes Add missing expressions attribute Jan 15, 2026
@JSGette JSGette added the ask-review Ask required teams to review this PR label Jan 15, 2026
@JSGette JSGette changed the title Add missing expressions attribute [SQG] Add missing expressions attribute Jan 15, 2026
for point in reversed(pointlist):
if point and len(point) >= 2 and point[1] is not None:
return point[1]
if point and point.value and point.value[1] is not None:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a little bit weird but just to avoid the situation when metric point was indeed reported but with empty value. First (0) element of the value is a timestamp when the metric was reported that's why it's important to check the second element (1)

@JSGette JSGette marked this pull request as ready for review January 15, 2026 12:39
@JSGette JSGette requested review from a team as code owners January 15, 2026 12:39
@JSGette JSGette added ask-review Ask required teams to review this PR and removed ask-review Ask required teams to review this PR labels Jan 15, 2026
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.

OK for me

@JSGette JSGette changed the title [SQG] Add missing expressions attribute [SQG] Add missing expression attribute Jan 15, 2026
@JSGette
Copy link
Copy Markdown
Contributor Author

JSGette commented Jan 15, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Jan 15, 2026

View all feedbacks in Devflow UI.

2026-01-15 14:05:07 UTC ℹ️ Start processing command /merge


2026-01-15 14:05:18 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 60m (p90).


2026-01-15 14:07:37 UTC ℹ️ MergeQueue: Readding this merge request to the queue because another merge request processed with yours failed. No action is needed from your side.


2026-01-15 14:14:47 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for d9961e5:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@JSGette
Copy link
Copy Markdown
Contributor Author

JSGette commented Jan 15, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Jan 15, 2026

View all feedbacks in Devflow UI.

2026-01-15 14:54:47 UTC ℹ️ Start processing command /merge


2026-01-15 14:55:12 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 60m (p90).


2026-01-15 15:30:14 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 624d2a6 into main Jan 15, 2026
308 checks passed
@dd-mergequeue dd-mergequeue bot deleted the jsgette/sqg_fix_new_bump_task branch January 15, 2026 15:30
@github-actions github-actions bot added this to the 7.76.0 milestone Jan 15, 2026
theomagellan pushed a commit that referenced this pull request Jan 19, 2026
### What does this PR do?
This fixes a newly introduced SQG bump task that was always reporting no failing gates to bump. The issue was in lack of `expression` attribute that is crucial to determine which metric we want to use. Also, instead of heavily relying on Reflection API we now use attributes directly which makes the code cleaner and easier to read and maintain.

### Describe how you validated your changes
1. I have reduced the maximum for one of the gates.
2. Waited the pipeline to complete (so that SQG job reports the results)
3. Ran `dd-auth -- dda inv quality-gates.exception-threshold-bump 45124`
to see that failing gate was bumped:
```shell
Fetching metrics for PR #45124...
Found metrics for 31 gates
Found 1 failing gates:
  - agent_deb_amd64: disk +4.86 MiB, wire +-1.18 MiB
Fetching main branch metrics for headroom calculation...

[SUCCESS] Updated 1 gate thresholds:
  - agent_deb_amd64: disk: 700.41 MiB → 708.41 MiB
  - agent_deb_amd64: wire: 174.49 MiB → 174.49 MiB
```
4. Verified that `static_quality_gates.yml` contained unstaged changes.

### Additional Notes
This task doesn't work with pipelines anymore. Instead, it relies on Datadog and reported metrics meaning that if a PR doesn't have a run of SQG job and metrics weren't uploaded in the last 24 hours the task will fail. This is to ensure that PR is as close to the current state of the main branch as possible to improve accuracy of the size calculation.

Co-authored-by: joseph.gette <joseph.gette@datadoghq.com>
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 qa/no-code-change No code change in Agent code requiring validation short review PR is simple enough to be reviewed quickly team/agent-build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants