discovery: improve e2e test output in case of failures
What does this PR do?
This PR makes the E2E test output for service discovery show more information about the running services, as well as being more precise as to what the actual issue is, and for which services.
Here are some examples:
Service not found
Before
Error: Expected value not to be nil.
After
Error: Expected value not to be nil.
Test: TestLinuxTestSuite/TestServiceDiscoveryCheck
Messages: could not find service "rails_hello"
host.go:131: 23-10-2024 16:32:46 - TestLinuxTestSuite/TestServiceDiscoveryCheck - Executing command `sudo systemctl status rails-svc`
host.go:131: 23-10-2024 16:32:47 - TestLinuxTestSuite/TestServiceDiscoveryCheck - Executing command `sudo journalctl -u rails-svc`
linux_test.go:130: Service "rails-svc" status:
:● rails-svc.service - rails-svc
Loaded: loaded (/etc/systemd/system/rails-svc.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2024-10-23 14:31:34 UTC; 1min 12s ago
Main PID: 27339 (ruby3.0)
Tasks: 15 (limit: 4586)
Memory: 66.0M
CPU: 2.537s
CGroup: /system.slice/rails-svc.service
└─27339 "puma 5.6.9 (tcp://localhost:7777) [rails-hello]"
Oct 23 14:31:37 ip-10-1-59-25 rails[27339]: => Run `bin/rails server --help` for more startup options
Oct 23 14:31:37 ip-10-1-59-25 rails[27339]: Puma starting in single mode...
Oct 23 14:31:37 ip-10-1-59-25 rails[27339]: * Puma version: 5.6.9 (ruby 3.0.2-p107) ("Birdie's Version")
Field with unexpected value
Before
Error: Not equal:
expected: "python.intrumented"
actual : "python.instrumented"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-python.intrumented
+python.instrumented
Test: TestLinuxTestSuite/TestServiceDiscoveryCheck
After
Error: Not equal:
expected: "python.intrumented"
actual : "python.instrumented"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-python.intrumented
+python.instrumented
Test: TestLinuxTestSuite/TestServiceDiscoveryCheck
Messages: service "python.instrumented": service name
Motivation
USMON-1297
Describe how to test/QA your changes
Possible Drawbacks / Trade-offs
Additional Notes
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=47592551 --os-family=ubuntu
Note: This applies to commit 7eda563e
[Fast Unit Tests Report]
On pipeline 47592551 (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
Regression Detector
Regression Detector Results
Run ID: 7eb460be-6f00-4d64-8b87-f2653af17b3b Metrics dashboard Target profiles
Baseline: aac52bfde035df419009c2ad9a2833fbef6213b9 Comparison: 7eda563ebe86a7fe1e182f0de2847efa3a7b47af
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 |
|---|---|---|---|---|---|---|
| ➖ | basic_py_check | % cpu utilization | +1.08 | [-1.65, +3.82] | 1 | Logs |
| ➖ | quality_gate_idle_all_features | memory utilization | +0.98 | [+0.87, +1.09] | 1 | Logs bounds checks dashboard |
| ➖ | file_to_blackhole_100ms_latency | egress throughput | +0.03 | [-0.20, +0.25] | 1 | Logs |
| ➖ | uds_dogstatsd_to_api | ingress throughput | +0.01 | [-0.09, +0.11] | 1 | Logs |
| ➖ | file_to_blackhole_300ms_latency | egress throughput | +0.01 | [-0.18, +0.19] | 1 | Logs |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | Logs |
| ➖ | file_to_blackhole_0ms_latency | egress throughput | -0.02 | [-0.36, +0.32] | 1 | Logs |
| ➖ | quality_gate_idle | memory utilization | -0.03 | [-0.08, +0.01] | 1 | Logs bounds checks dashboard |
| ➖ | file_to_blackhole_500ms_latency | egress throughput | -0.07 | [-0.32, +0.18] | 1 | Logs |
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.16 | [-0.89, +0.56] | 1 | Logs |
| ➖ | idle_all_features | memory utilization | -0.23 | [-0.34, -0.12] | 1 | Logs bounds checks dashboard |
| ➖ | tcp_syslog_to_blackhole | ingress throughput | -0.25 | [-0.30, -0.20] | 1 | Logs |
| ➖ | idle | memory utilization | -0.43 | [-0.47, -0.38] | 1 | Logs bounds checks dashboard |
| ➖ | file_tree | memory utilization | -0.43 | [-0.55, -0.30] | 1 | Logs |
| ➖ | file_to_blackhole_1000ms_latency | egress throughput | -0.45 | [-0.94, +0.03] | 1 | Logs |
| ➖ | otel_to_otel_logs | ingress throughput | -0.49 | [-1.29, +0.32] | 1 | Logs |
| ➖ | pycheck_lots_of_tags | % cpu utilization | -2.71 | [-5.23, -0.20] | 1 | Logs |
Bounds Checks
| perf | experiment | bounds_check_name | replicates_passed |
|---|---|---|---|
| ✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 |
| ✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 |
| ✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 |
| ✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 |
| ✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 |
| ✅ | idle | memory_usage | 10/10 |
| ✅ | idle_all_features | memory_usage | 10/10 |
| ✅ | quality_gate_idle | memory_usage | 10/10 |
| ✅ | quality_gate_idle_all_features | 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:
-
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".
/merge
:steam_locomotive: MergeQueue: pull request added to the queue
The median merge time in main is 24m.
Use /merge -c to cancel this operation!