[Backport 7.73.x] Don't fail builds when non-critical actions fail
Backport 27fb8a1bacf735b1d1bea513172b911e5a6c6558 from #43594.
What does this PR do?
Wrap metric and event sending calls on omnibus build task in try-except's to avoid failing (and retrying) builds when those non-critical actions fail in any way.
Motivation
Failures such as https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1260394723#L1801, where we have occasional failures to retrieve API keys from SSM. It doesn't happen with a huge frequency (logs), but it still makes no sense to fail a build job when the build succeeded, even if we failed to send some sort of telemetry.
The culprit being usually this call to get_dd_api_key here: https://github.com/DataDog/datadog-agent/blob/01bb62da4dc0e147ab2cb6beca9910bbd9f300f7/tasks/libs/common/omnibus.py#L303
Describe how you validated your changes
If CI passes, there should be no harm in this, and we should be able to observe its effects over the coming days.
Additional Notes
I'm avoiding spending to much time in doing this cleanly because this is code that we expect to get rid of not too far in the future, so, on the basis of cost-effort merits, I'm deliberately:
- Not adding tests.
- Not taking care of cleaning up the flow of code (for example, there's other places where errors result in something being printed and just continuing).
- Not looking into better, more up-to-date ways to send this telemetry (assuming they exist).
Regression Detector
Regression Detector Results
Metrics dashboard
Target profiles
Run ID: 64ba0aa6-f70a-413f-9d2b-65477ccb3d87
Baseline: a27d525f20bb93d3ced9e330b8908eba63ff1c44 Comparison: c0f66597cd4377facac5a8cf57d9020910bf34f7 Diff
Optimization Goals: ❌ Regression(s) detected
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ❌ | docker_containers_memory | memory utilization | +5.61 | [+5.13, +6.09] | 1 | Logs |
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.34 | [-2.24, +1.55] | 1 | Logs |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ❌ | docker_containers_memory | memory utilization | +5.61 | [+5.13, +6.09] | 1 | Logs |
| ➖ | ddot_metrics_sum_delta | memory utilization | +0.77 | [+0.60, +0.94] | 1 | Logs |
| ➖ | quality_gate_metrics_logs | memory utilization | +0.67 | [+0.43, +0.91] | 1 | Logs bounds checks dashboard |
| ➖ | ddot_metrics | memory utilization | +0.45 | [+0.27, +0.63] | 1 | Logs |
| ➖ | ddot_metrics_sum_cumulative | memory utilization | +0.28 | [+0.15, +0.41] | 1 | Logs |
| ➖ | ddot_metrics_sum_cumulativetodelta_exporter | memory utilization | +0.27 | [+0.06, +0.49] | 1 | Logs |
| ➖ | file_tree | memory utilization | +0.25 | [+0.21, +0.30] | 1 | Logs |
| ➖ | otlp_ingest_logs | memory utilization | +0.18 | [+0.09, +0.28] | 1 | Logs |
| ➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.13 | [-0.48, +0.74] | 1 | Logs |
| ➖ | quality_gate_idle_all_features | memory utilization | +0.10 | [+0.06, +0.14] | 1 | Logs bounds checks dashboard |
| ➖ | file_to_blackhole_100ms_latency | egress throughput | +0.06 | [-0.54, +0.66] | 1 | Logs |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | Logs |
| ➖ | uds_dogstatsd_to_api | ingress throughput | -0.01 | [-0.23, +0.20] | 1 | Logs |
| ➖ | file_to_blackhole_0ms_latency | egress throughput | -0.05 | [-0.65, +0.56] | 1 | Logs |
| ➖ | file_to_blackhole_500ms_latency | egress throughput | -0.05 | [-0.65, +0.55] | 1 | Logs |
| ➖ | quality_gate_idle | memory utilization | -0.06 | [-0.10, -0.02] | 1 | Logs bounds checks dashboard |
| ➖ | docker_containers_cpu | % cpu utilization | -0.34 | [-2.24, +1.55] | 1 | Logs |
| ➖ | uds_dogstatsd_20mb_12k_contexts_20_senders | memory utilization | -0.38 | [-0.43, -0.33] | 1 | Logs |
| ➖ | otlp_ingest_metrics | memory utilization | -0.70 | [-0.85, -0.56] | 1 | Logs |
| ➖ | ddot_logs | memory utilization | -0.97 | [-1.04, -0.90] | 1 | Logs |
| ➖ | tcp_syslog_to_blackhole | ingress throughput | -1.55 | [-1.62, -1.48] | 1 | Logs |
| ➖ | quality_gate_logs | % cpu utilization | -1.76 | [-4.49, +0.97] | 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 | 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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_metrics_logs, bounds check lost_bytes: 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 cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_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.
- 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.
- 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_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
Static quality checks
✅ Please find below the results from static quality gates Comparison made with ancestor 5f4276dd918279b1aa88316e908dcc75ef809ac8
Successful checks
Info
| Quality gate | Delta | On disk size (MiB) | Delta | On wire size (MiB) | |
|---|---|---|---|---|---|
| ✅ | agent_deb_amd64 | DataNotFound | $${693.67}$$ < $${702.15}$$ | DataNotFound | $${170.16}$$ < $${177.79}$$ |
| ✅ | agent_deb_amd64_fips | DataNotFound | $${688.03}$$ < $${696.65}$$ | DataNotFound | $${167.89}$$ < $${176.53}$$ |
| ✅ | agent_heroku_amd64 | DataNotFound | $${328.51}$$ < $${340.18}$$ | DataNotFound | $${87.43}$$ < $${91.08}$$ |
| ✅ | agent_msi | DataNotFound | $${1009.03}$$ < $${1015.38}$$ | DataNotFound | $${147.03}$$ < $${150.78}$$ |
| ✅ | agent_rpm_amd64 | DataNotFound | $${693.66}$$ < $${702.14}$$ | DataNotFound | $${171.77}$$ < $${180.53}$$ |
| ✅ | agent_rpm_amd64_fips | DataNotFound | $${688.02}$$ < $${696.64}$$ | DataNotFound | $${170.29}$$ < $${178.79}$$ |
| ✅ | agent_rpm_arm64 | DataNotFound | $${682.84}$$ < $${686.31}$$ | DataNotFound | $${157.5}$$ < $${161.22}$$ |
| ✅ | agent_rpm_arm64_fips | DataNotFound | $${678.28}$$ < $${681.84}$$ | DataNotFound | $${155.56}$$ < $${160.18}$$ |
| ✅ | agent_suse_amd64 | DataNotFound | $${693.66}$$ < $${702.14}$$ | DataNotFound | $${171.77}$$ < $${180.53}$$ |
| ✅ | agent_suse_amd64_fips | DataNotFound | $${688.02}$$ < $${696.64}$$ | DataNotFound | $${170.29}$$ < $${178.79}$$ |
| ✅ | agent_suse_arm64 | DataNotFound | $${682.84}$$ < $${686.31}$$ | DataNotFound | $${157.5}$$ < $${161.22}$$ |
| ✅ | agent_suse_arm64_fips | DataNotFound | $${678.28}$$ < $${681.84}$$ | DataNotFound | $${155.56}$$ < $${160.18}$$ |
| ✅ | docker_agent_amd64 | DataNotFound | $${746.18}$$ < $${773.59}$$ | DataNotFound | $${251.71}$$ < $${266.06}$$ |
| ✅ | docker_agent_arm64 | DataNotFound | $${760.12}$$ < $${781.7}$$ | DataNotFound | $${242.3}$$ < $${251.85}$$ |
| ✅ | docker_agent_jmx_amd64 | DataNotFound | $${937.06}$$ < $${964.45}$$ | DataNotFound | $${320.35}$$ < $${334.68}$$ |
| ✅ | docker_agent_jmx_arm64 | DataNotFound | $${939.72}$$ < $${961.17}$$ | DataNotFound | $${306.92}$$ < $${316.44}$$ |
| ✅ | docker_cluster_agent_amd64 | DataNotFound | $${206.19}$$ < $${213.74}$$ | DataNotFound | $${69.15}$$ < $${73.14}$$ |
| ✅ | docker_cluster_agent_arm64 | DataNotFound | $${222.06}$$ < $${229.68}$$ | DataNotFound | $${65.37}$$ < $${69.41}$$ |
| ✅ | docker_cws_instrumentation_amd64 | DataNotFound | $${7.08}$$ < $${7.12}$$ | DataNotFound | $${2.95}$$ < $${3.29}$$ |
| ✅ | docker_cws_instrumentation_arm64 | DataNotFound | $${6.69}$$ < $${6.92}$$ | DataNotFound | $${2.71}$$ < $${3.07}$$ |
| ✅ | docker_dogstatsd_amd64 | DataNotFound | $${38.52}$$ < $${39.3}$$ | DataNotFound | $${14.86}$$ < $${15.76}$$ |
| ✅ | docker_dogstatsd_arm64 | DataNotFound | $${37.19}$$ < $${37.94}$$ | DataNotFound | $${14.31}$$ < $${14.83}$$ |
| ✅ | dogstatsd_deb_amd64 | DataNotFound | $${29.74}$$ < $${30.53}$$ | DataNotFound | $${7.83}$$ < $${8.75}$$ |
| ✅ | dogstatsd_deb_arm64 | DataNotFound | $${28.26}$$ < $${29.11}$$ | DataNotFound | $${6.77}$$ < $${7.71}$$ |
| ✅ | dogstatsd_rpm_amd64 | DataNotFound | $${29.74}$$ < $${30.53}$$ | DataNotFound | $${7.85}$$ < $${8.76}$$ |
| ✅ | dogstatsd_suse_amd64 | DataNotFound | $${29.74}$$ < $${30.53}$$ | DataNotFound | $${7.85}$$ < $${8.76}$$ |
| ✅ | iot_agent_deb_amd64 | DataNotFound | $${42.18}$$ < $${54.97}$$ | DataNotFound | $${11.02}$$ < $${14.45}$$ |
| ✅ | iot_agent_deb_arm64 | DataNotFound | $${39.94}$$ < $${51.9}$$ | DataNotFound | $${9.5}$$ < $${12.63}$$ |
| ✅ | iot_agent_deb_armhf | DataNotFound | $${39.87}$$ < $${51.84}$$ | DataNotFound | $${9.6}$$ < $${12.74}$$ |
| ✅ | iot_agent_rpm_amd64 | DataNotFound | $${42.18}$$ < $${54.97}$$ | DataNotFound | $${11.04}$$ < $${14.47}$$ |
| ✅ | iot_agent_suse_amd64 | DataNotFound | $${42.18}$$ < $${54.97}$$ | DataNotFound | $${11.04}$$ < $${14.47}$$ |
/merge
View all feedbacks in Devflow UI.
2025-12-19 08:42:24 UTC :information_source: Start processing command /merge
2025-12-19 08:42:28 UTC :information_source: MergeQueue: waiting for PR to be ready
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.
2025-12-19 08:44:13 UTC :information_source: MergeQueue: merge request added to the queue
The expected merge time in 7.73.x is approximately 56m (p90).
2025-12-19 08:57:14 UTC :information_source: MergeQueue: This merge request was merged