Skip to content

Revert "Add Battery Check for Mac"#44359

Merged
pducolin merged 1 commit into
mainfrom
revert-43986-brian.tu/battery-check-mac
Dec 17, 2025
Merged

Revert "Add Battery Check for Mac"#44359
pducolin merged 1 commit into
mainfrom
revert-43986-brian.tu/battery-check-mac

Conversation

@pducolin

@pducolin pducolin commented Dec 17, 2025

Copy link
Copy Markdown
Collaborator

Reverts #43986

Causing #incident-47253

@pducolin
pducolin requested review from a team as code owners December 17, 2025 16:41
@github-actions github-actions Bot added long review PR is complex, plan time to review it team/agent-runtimes labels Dec 17, 2025
@pducolin pducolin added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels Dec 17, 2025
@agent-platform-auto-pr

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 651c11c

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 DataNotFound $${705.89}$$ < $${707.13}$$ DataNotFound $${173.16}$$ < $${174.16}$$
agent_deb_amd64_fips DataNotFound $${702.11}$$ < $${702.86}$$ DataNotFound $${172.52}$$ < $${173.5}$$
agent_heroku_amd64 DataNotFound $${327.52}$$ < $${327.92}$$ DataNotFound $${87.23}$$ < $${88.21}$$
agent_msi DataNotFound $${570.45}$$ < $${982.08}$$ DataNotFound $${142.5}$$ < $${143.49}$$
agent_rpm_amd64 DataNotFound $${705.88}$$ < $${707.12}$$ DataNotFound $${176.29}$$ < $${177.29}$$
agent_rpm_amd64_fips DataNotFound $${702.1}$$ < $${702.85}$$ DataNotFound $${175.1}$$ < $${176.32}$$
agent_rpm_arm64 DataNotFound $${687.58}$$ < $${691.67}$$ DataNotFound $${159.4}$$ < $${160.7}$$
agent_rpm_arm64_fips DataNotFound $${684.62}$$ < $${687.54}$$ DataNotFound $${159.14}$$ < $${160.11}$$
agent_suse_amd64 DataNotFound $${705.88}$$ < $${707.12}$$ DataNotFound $${176.29}$$ < $${177.29}$$
agent_suse_amd64_fips DataNotFound $${702.1}$$ < $${702.85}$$ DataNotFound $${175.1}$$ < $${176.32}$$
agent_suse_arm64 DataNotFound $${687.58}$$ < $${691.67}$$ DataNotFound $${159.4}$$ < $${160.7}$$
agent_suse_arm64_fips DataNotFound $${684.62}$$ < $${687.54}$$ DataNotFound $${159.14}$$ < $${160.11}$$
docker_agent_amd64 DataNotFound $${768.14}$$ < $${769.38}$$ DataNotFound $${260.99}$$ < $${262.06}$$
docker_agent_arm64 DataNotFound $${774.39}$$ < $${778.35}$$ DataNotFound $${250.12}$$ < $${251.72}$$
docker_agent_jmx_amd64 DataNotFound $${959.02}$$ < $${960.26}$$ DataNotFound $${329.62}$$ < $${330.69}$$
docker_agent_jmx_arm64 DataNotFound $${953.98}$$ < $${957.95}$$ DataNotFound $${314.71}$$ < $${316.35}$$
docker_cluster_agent_amd64 DataNotFound $${179.41}$$ < $${179.56}$$ DataNotFound $${63.44}$$ < $${64.14}$$
docker_cluster_agent_arm64 DataNotFound $${195.37}$$ < $${196.79}$$ DataNotFound $${59.75}$$ < $${60.69}$$
docker_cws_instrumentation_amd64 DataNotFound $${7.13}$$ < $${7.18}$$ DataNotFound $${2.99}$$ < $${3.33}$$
docker_cws_instrumentation_arm64 DataNotFound $${6.69}$$ < $${6.92}$$ DataNotFound $${2.73}$$ < $${3.09}$$
docker_dogstatsd_amd64 DataNotFound $${38.75}$$ < $${39.38}$$ DataNotFound $${15.0}$$ < $${15.82}$$
docker_dogstatsd_arm64 DataNotFound $${37.06}$$ < $${37.94}$$ DataNotFound $${14.33}$$ < $${14.83}$$
dogstatsd_deb_amd64 DataNotFound $${29.98}$$ < $${30.61}$$ DataNotFound $${7.93}$$ < $${8.79}$$
dogstatsd_deb_arm64 DataNotFound $${28.13}$$ < $${29.11}$$ DataNotFound $${6.81}$$ < $${7.71}$$
dogstatsd_rpm_amd64 DataNotFound $${29.98}$$ < $${30.61}$$ DataNotFound $${7.94}$$ < $${8.8}$$
dogstatsd_suse_amd64 DataNotFound $${29.98}$$ < $${30.61}$$ DataNotFound $${7.94}$$ < $${8.8}$$
iot_agent_deb_amd64 DataNotFound $${42.74}$$ < $${43.29}$$ DataNotFound $${11.19}$$ < $${12.04}$$
iot_agent_deb_arm64 DataNotFound $${39.88}$$ < $${40.92}$$ DataNotFound $${9.57}$$ < $${10.45}$$
iot_agent_deb_armhf DataNotFound $${40.45}$$ < $${41.03}$$ DataNotFound $${9.77}$$ < $${10.62}$$
iot_agent_rpm_amd64 DataNotFound $${42.74}$$ < $${43.29}$$ DataNotFound $${11.21}$$ < $${12.06}$$
iot_agent_suse_amd64 DataNotFound $${42.74}$$ < $${43.29}$$ DataNotFound $${11.21}$$ < $${12.06}$$

@pducolin
pducolin merged commit ac61bc8 into main Dec 17, 2025
324 of 334 checks passed
@pducolin
pducolin deleted the revert-43986-brian.tu/battery-check-mac branch December 17, 2025 17:32
@github-actions github-actions Bot added this to the 7.75.0 milestone Dec 17, 2025
@cit-pr-commenter

Copy link
Copy Markdown

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 506ccae8-6713-47dc-96a4-a688eba42480

Baseline: 835c241
Comparison: fcf0af5
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 +1.62 [-1.43, +4.68] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
tcp_syslog_to_blackhole ingress throughput +1.94 [+1.86, +2.02] 1 Logs
docker_containers_cpu % cpu utilization +1.62 [-1.43, +4.68] 1 Logs
quality_gate_metrics_logs memory utilization +1.16 [+0.95, +1.38] 1 Logs bounds checks dashboard
otlp_ingest_logs memory utilization +0.59 [+0.49, +0.69] 1 Logs
otlp_ingest_metrics memory utilization +0.29 [+0.14, +0.44] 1 Logs
ddot_metrics_sum_cumulative memory utilization +0.29 [+0.14, +0.44] 1 Logs
ddot_metrics memory utilization +0.23 [+0.02, +0.44] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization +0.16 [-0.07, +0.39] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.10 [-0.32, +0.52] 1 Logs
file_tree memory utilization +0.10 [+0.02, +0.17] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.06 [-0.36, +0.48] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput +0.02 [-0.11, +0.16] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.01 [-0.37, +0.38] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.01 [-0.06, +0.08] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.13, +0.13] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.01 [-0.06, +0.04] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.02 [-0.07, +0.04] 1 Logs
quality_gate_idle_all_features memory utilization -0.18 [-0.22, -0.14] 1 Logs bounds checks dashboard
quality_gate_idle memory utilization -0.21 [-0.26, -0.17] 1 Logs bounds checks dashboard
ddot_logs memory utilization -0.27 [-0.35, -0.20] 1 Logs
docker_containers_memory memory utilization -0.42 [-0.50, -0.35] 1 Logs
ddot_metrics_sum_delta memory utilization -0.43 [-0.63, -0.23] 1 Logs
quality_gate_logs % cpu utilization -0.84 [-2.31, +0.63] 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".

CI Pass/Fail Decision

Passed. All Quality Gates 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.
  • quality_gate_logs, bounds check intake_connections: 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 cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check lost_bytes: 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_idle_all_features, 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.

dd-mergequeue Bot pushed a commit that referenced this pull request Dec 18, 2025
### What does this PR do?
Original PR (#43986) for adding the battery check was reverted (#44359) due to #incident-47253. The error was:
```2025-12-17T16:18:24.181035Z 01O Error:
2025-12-17T16:18:24.181036Z 01O 
2025-12-17T16:18:24.181036Z 01O     # github.com/DataDog/datadog-agent/pkg/collector/corechecks/system/battery
2025-12-17T16:18:24.181037Z 01O battery_darwin.m:12:61: error: 'kIOMainPortDefault' is only available on macOS 12.0 or newer [-Werror,-Wunguarded-availability-new]
2025-12-17T16:18:24.181057Z 01O /Applications/Xcode-16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:112:19: note: 'kIOMainPortDefault' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0
```

This PR includes the fix that caused the incident.
- kIOMainPortDefault was introduced in macOS 12.0, use kIOMasterPortDefault for older versions

### Motivation
https://datadoghq.atlassian.net/browse/WINA-2068

### Describe how you validated your changes
Ran full pipeline with the fix: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/pipelines/87391310/

### Additional Notes


Co-authored-by: mrafi97 <[email protected]>
Co-authored-by: brian.tu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed long review PR is complex, plan time to review it qa/no-code-change No code change in Agent code requiring validation team/agent-runtimes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant