Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persisting third-party python integrations #27859

Merged
merged 105 commits into from
Oct 4, 2024

Conversation

jose-manuel-almaza
Copy link
Contributor

@jose-manuel-almaza jose-manuel-almaza commented Jul 23, 2024

What does this PR do?

Keep non-Core integrations that the user installed for the version they're upgrading.
The solution must be one that does not imply action by the user (or the minimum possible if no action is impossible). The process of maintaining updated integrations should be transparent to the user.

Motivation

Updating the Agent wipes all non-Core integrations: Customers continue to express frustration, because each time they upgrade a Datadog Agent, it wipes all non-core integrations, which causes gaps in monitoring, and unnecessary fire drills. This applies to all partner integrations as well as custom checks written by customers, which can be key to a customer’s observability.

Additional Notes

RFC: https://docs.google.com/document/d/1b_VAt17c4j6WCyMOfLc_M0qzRFKmyJ1Gq-aHDFP9Dvc/edit?usp=sharing

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

We'll prepare a set of VMs with different OS and PM in order to test this functionality in different scenarios automatically.

@pr-commenter
Copy link

pr-commenter bot commented Jul 23, 2024

Regression Detector

Regression Detector Results

Run ID: 12efa3e1-cc41-4d1b-9232-854dab48925f Metrics dashboard Target profiles

Baseline: d9895ca
Comparison: 82417a3

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.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
otel_to_otel_logs ingress throughput +1.78 [+0.96, +2.60] 1 Logs
basic_py_check % cpu utilization +1.45 [-1.28, +4.19] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.11, +0.10] 1 Logs
pycheck_lots_of_tags % cpu utilization -0.29 [-2.70, +2.11] 1 Logs
idle memory utilization -0.33 [-0.39, -0.27] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.33 [-1.07, +0.40] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.35 [-0.41, -0.30] 1 Logs
file_tree memory utilization -2.04 [-2.16, -1.92] 1 Logs
idle_all_features memory utilization -2.56 [-2.66, -2.46] 1 Logs

Bounds Checks

perf experiment bounds_check_name replicates_passed
idle memory_usage 10/10

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

@pducolin
Copy link
Contributor

pducolin commented Oct 4, 2024

Thank you for addressing the comments!

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Oct 4, 2024

[Fast Unit Tests Report]

On pipeline 45858024 (CI Visibility). The following jobs did not run any unit tests:

Jobs:
  • tests_deb-arm64-py3
  • tests_deb-x64-py3
  • tests_flavor_dogstatsd_deb-x64
  • tests_flavor_heroku_deb-x64
  • tests_flavor_iot_deb-x64
  • tests_rpm-arm64-py3
  • tests_rpm-x64-py3
  • tests_windows-x64

If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help

omnibus/package-scripts/agent-deb/prerm Outdated Show resolved Hide resolved
omnibus/package-scripts/agent-rpm/prerm Outdated Show resolved Hide resolved
omnibus/python-scripts/postinst.py Show resolved Hide resolved
Remove the specified files.
"""
for file in files:
if os.path.exists(file):
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that cleanup_files only remove 2 files at most (in the current setup at least) I'd also find it easier to reason about the code if it calls into a standard function.
Seeing a call to packages.cleanup_files I tend to assume that the function will do something more specific than just removing a file

omnibus/python-scripts/packages.py Show resolved Hide resolved
---
fixes:
- |
Fix the removal of 'non-core' integrations during Agent upgrades.
Copy link
Contributor

Choose a reason for hiding this comment

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

Given this is behind a flag, should it be advertised in release notes now?

# DO NOT REMOVE/MODIFY - used internally by installation process
grpcio==1.66.2
pynvml==11.5.3
datadog-nvml==1.0.0
Copy link
Member

Choose a reason for hiding this comment

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

🥜 you might want to get rid of the missing EOF comment

Copy link
Member

Choose a reason for hiding this comment

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

I don't see where this message is displayed but I just added a newline, I guess that should fix it.

@jose-manuel-almaza
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Oct 4, 2024

🚂 MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. 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.

Use /merge -c to cancel this operation!

@jose-manuel-almaza
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Oct 4, 2024

🚂 MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. 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.

Use /merge -c to cancel this operation!

@jose-manuel-almaza
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Oct 4, 2024

🚂 MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. 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.

Use /merge -c to cancel this operation!

@jose-manuel-almaza jose-manuel-almaza force-pushed the jose/persisting-python-integrations branch from 6d7a27e to 68f7601 Compare October 4, 2024 15:37
@dd-devflow
Copy link

dd-devflow bot commented Oct 4, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 23m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 27dc47a into main Oct 4, 2024
195 of 206 checks passed
@dd-mergequeue dd-mergequeue bot deleted the jose/persisting-python-integrations branch October 4, 2024 18:08
@github-actions github-actions bot added this to the 7.59.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants