datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Call updater purge on package removal

Open raphaelgavache opened this issue 1 year ago • 1 comments
trafficstars

What does this PR do?

Add a purge command to delete all files created by the updater, especially systemd units. Purge never errors and prints warn when the commands fails to execute.

Following, the updater purge needs to be called on prerm called with a remove argumentpackage removal doc

5.2.2.2. Package Removal
The steps to remove a package are analogous to the installation steps. The main difference is that the removal scripts of the package are called:
dpkg calls the prerm script and passes the remove argument.
dpkg removes all of the package's files, with the exception of the configuration files and maintainer scripts.
dpkg executes the postrm script and passes remove as argument. Afterwards, all of the maintainer scripts, except the postrm script, are removed. If the user has not used the “purge” option, the process stops here.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

raphaelgavache avatar Mar 12 '24 12:03 raphaelgavache

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 6f1ca251-392c-4244-a977-338eaacf3acc Baseline: 0e32c8b2a616246f662746fea6a3a055f5ae0f3d Comparison: 6de89440d197329bc1d4863006872562472803c4

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

No significant changes in experiment optimization goals

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

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

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

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization -34.44 [-39.76, -29.12]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
uds_dogstatsd_to_api_cpu % cpu utilization +2.03 [+0.59, +3.47]
process_agent_real_time_mode memory utilization +0.53 [+0.49, +0.57]
basic_py_check % cpu utilization +0.40 [-1.86, +2.65]
process_agent_standard_check memory utilization +0.24 [+0.21, +0.27]
tcp_syslog_to_blackhole ingress throughput +0.05 [-0.01, +0.10]
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.00, +0.00]
uds_dogstatsd_to_api ingress throughput -0.00 [-0.00, +0.00]
idle memory utilization -0.00 [-0.04, +0.03]
trace_agent_json ingress throughput -0.00 [-0.03, +0.02]
trace_agent_msgpack ingress throughput -0.02 [-0.02, -0.01]
file_tree memory utilization -0.35 [-0.43, -0.28]
process_agent_standard_check_with_stats memory utilization -0.46 [-0.49, -0.43]
otel_to_otel_logs ingress throughput -1.05 [-1.65, -0.44]
file_to_blackhole % cpu utilization -34.44 [-39.76, -29.12]

Explanation

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".

pr-commenter[bot] avatar Mar 12 '24 14:03 pr-commenter[bot]