datadog-agent
datadog-agent copied to clipboard
Enable omnibus build cache
What does this PR do?
This PR enables omnibus git cache, in order to stop rebuilding all of our dependencies during each CI job. All packages before the agent are expected to rarely change, and shouldn't have to be rebuilt every single time. On average, this saves about 15/20 minutes per job.
This also allows individual developers to skip rebuilding every single dependencies if they wish to add a new software dependency to the agent. All they need to do is to provide the OMNIBUS_GIT_CACHE_DIR environment variable to a directory of their chosing.
Motivation
This is part of the currently running initiative to reduce the median pipeline duration under 2 hours. This specific investigation is listed under https://datadoghq.atlassian.net/browse/APL-1805
Additional Notes
This is currently not ready for production, and we need to:
- define our cache eviction strategy. Should we systematically delete the cache when a new build image is built? Is there any other condition which warrants a cache removal?
- Updating the cache when a job runs in
mainisn't safe enough. If 2 PRs were to be pushed in a short time span, there is no guaranty that their respective pipeline will finish in order. This PR currently updates the cache on main unconditionally, and this will break eventually - We probably shouldn't regenerate the cache when a pipeline is run outside of a push event
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
Reviewer's Checklist
- [ ] If known, an appropriate milestone has been selected; otherwise the
Triagemilestone is set. - [ ] Use the
major_changelabel if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote. - [ ] A release note has been added or the
changelog/no-changeloglabel has been applied. - [ ] Changed code has automated tests for its functionality.
- [ ] Adequate QA/testing plan information is provided if the
qa/skip-qalabel is not applied. - [ ] At least one
team/..label has been applied, indicating the team(s) that should QA this change. - [ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
- [ ] If applicable, the
need-change/operatorandneed-change/helmlabels have been applied. - [ ] If applicable, the
k8s/<min-version>label, indicating the lowest Kubernetes version compatible with this feature. - [ ] If applicable, the config template has been updated.
Bloop Bleep... Dogbot Here
Regression Detector Results
Run ID: 6ad93a5c-18e7-4e1d-a6ad-f271790a3eac Baseline: d40837d7e242c9477647ca996bfdb6a9ac16c062 Comparison: 9f05afb1b3d8bfb68d1b640eb827c6171bad12c8
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
Experiments with missing or malformed data
- basic_py_check
Usually, this warning means that there is no usable optimization goal data for that experiment, which could be a result of misconfiguration.
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 | -0.26 | [-6.80, +6.29] |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +1.21 | [-0.25, +2.66] |
| ➖ | tcp_syslog_to_blackhole | ingress throughput | +1.17 | [+1.12, +1.22] |
| ➖ | process_agent_standard_check | memory utilization | +0.67 | [+0.63, +0.70] |
| ➖ | process_agent_real_time_mode | memory utilization | +0.25 | [+0.21, +0.28] |
| ➖ | otel_to_otel_logs | ingress throughput | +0.18 | [-0.44, +0.81] |
| ➖ | idle | memory utilization | +0.09 | [+0.05, +0.12] |
| ➖ | trace_agent_json | ingress throughput | +0.01 | [-0.03, +0.05] |
| ➖ | trace_agent_msgpack | ingress throughput | +0.01 | [-0.01, +0.02] |
| ➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.00, +0.00] |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.00, +0.00] |
| ➖ | file_tree | memory utilization | -0.17 | [-0.23, -0.10] |
| ➖ | file_to_blackhole | % cpu utilization | -0.26 | [-6.80, +6.29] |
| ➖ | process_agent_standard_check_with_stats | memory utilization | -0.39 | [-0.42, -0.35] |
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:
-
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".
Test changes on VM
Use this command from test-infra-definitions to manually test this PR changes on a VM:
inv create-vm --pipeline-id=31521461 --os-family=ubuntu
Regression Detector
Regression Detector Results
Run ID: 1eb5b777-6a43-4ad3-99e9-9242695e691e Baseline: 92d6c0a59fb1dfe48f96b9d66ce3aa67f85aa612 Comparison: 1e414d2d1f0d878838d293f04ca8a8d0c70dff95
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 | +0.24 | [-5.66, +6.15] |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | tcp_syslog_to_blackhole | ingress throughput | +1.32 | [+1.24, +1.39] |
| ➖ | process_agent_real_time_mode | memory utilization | +0.78 | [+0.74, +0.83] |
| ➖ | idle | memory utilization | +0.27 | [+0.23, +0.31] |
| ➖ | file_to_blackhole | % cpu utilization | +0.24 | [-5.66, +6.15] |
| ➖ | otel_to_otel_logs | ingress throughput | +0.23 | [-0.18, +0.64] |
| ➖ | process_agent_standard_check_with_stats | memory utilization | +0.23 | [+0.19, +0.28] |
| ➖ | trace_agent_json | ingress throughput | +0.03 | [-0.01, +0.07] |
| ➖ | file_tree | memory utilization | +0.01 | [-0.10, +0.13] |
| ➖ | trace_agent_msgpack | ingress throughput | +0.01 | [-0.01, +0.02] |
| ➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.20, +0.20] |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.02, +0.02] |
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.06 | [-3.11, +2.98] |
| ➖ | process_agent_standard_check | memory utilization | -0.22 | [-0.27, -0.17] |
| ➖ | basic_py_check | % cpu utilization | -1.62 | [-4.19, +0.95] |
| ➖ | pycheck_1000_100byte_tags | % cpu utilization | -2.47 | [-7.32, +2.39] |
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:
-
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".
[Fast Unit Tests Report]
On pipeline 32295921 (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-developer-experience
/merge
:steam_locomotive: MergeQueue
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!
:warning: MergeQueue
This merge request was unqueued
If you need support, contact us on Slack #devflow!
/merge
:steam_locomotive: MergeQueue
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!
/merge
:steam_locomotive: MergeQueue
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!
/merge -c
:warning: MergeQueue
This merge request was unqueued
If you need support, contact us on Slack #devflow!
/merge
:steam_locomotive: MergeQueue
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!
:steam_locomotive: MergeQueue
Pull request added to the queue.
This build is next! (estimated merge in less than 49m)
Use /merge -c to cancel this operation!