Skip to content

improve GoDI test assertion #36770

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

Merged
merged 1 commit into from
May 8, 2025
Merged

Conversation

brycekahle
Copy link
Member

What does this PR do?

Improves GoDI test setup and assertion:

  • Stops process monitor on test cleanup/GoDI close
  • Adds support for SIGINT to sample_service
  • Ensures sample_service is cleanly stopped on test cleanup
  • Resets diagnostics global for each test
  • Removes arbitrary sleep values, use assert.EventuallyWithT which results in faster tests
  • Uses standard assertion for event snapshot comparison, which adds clearer test output on failure.
  • Stricter event snapshot comparison

Motivation

Faster, clearer, stricter tests.

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

With this change, the following tests are shown to be failing:

TestGoDI/test_array_of_arrays
TestGoDI/test_array_of_arrays_of_arrays
TestGoDI/test_array_of_structs
TestGoDI/test_method_receiver
TestGoDI/test_pointer_method_receiver
TestGoDI/test_string_array
TestGoDI/test_struct_with_arrays
TestGoDI/test_struct_with_a_slice
TestGoDI/test_struct_with_unsupported_fields

@brycekahle brycekahle requested a review from a team as a code owner May 7, 2025 19:34
@brycekahle brycekahle added changelog/no-changelog team/dynamic-instrumentation Dynamic Instrumentation qa/done QA done before merge and regressions are covered by tests labels May 7, 2025
@github-actions github-actions bot added the medium review PR review might take time label May 7, 2025
@agent-platform-auto-pr
Copy link
Contributor

Uncompressed package size comparison

Comparison with ancestor 6f4b965a2c1ade2639866c63b7d2c29e0eb32116

Diff per package
package diff status size ancestor threshold
datadog-agent-amd64-deb 0.00MB 775.98MB 775.98MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 784.92MB 784.92MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 784.92MB 784.92MB 0.50MB
datadog-agent-arm64-deb 0.00MB 765.77MB 765.77MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 774.69MB 774.69MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 31.20MB 31.20MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 31.28MB 31.28MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 31.28MB 31.28MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 30.03MB 30.03MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 377.85MB 377.85MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 60.52MB 60.52MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 60.60MB 60.60MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 60.60MB 60.60MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 57.81MB 57.81MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 57.89MB 57.89MB 0.50MB

Decision

✅ Passed

@agent-platform-auto-pr
Copy link
Contributor

Static quality checks

✅ Please find below the results from static quality gates

Successful checks

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 750.65 MiB 778.06 MiB 184.99 MiB 191.06 MiB
static_quality_gate_agent_deb_amd64_fips 748.63 MiB 776.09 MiB 184.68 MiB 190.72 MiB
static_quality_gate_agent_heroku_amd64 368.33 MiB 434.99 MiB 98.06 MiB 114.34 MiB
static_quality_gate_agent_msi 968.82 MiB 978.45 MiB 146.84 MiB 151.65 MiB
static_quality_gate_agent_rpm_amd64 750.7 MiB 778.06 MiB 186.81 MiB 193.42 MiB
static_quality_gate_agent_rpm_amd64_fips 748.48 MiB 776.06 MiB 185.74 MiB 192.61 MiB
static_quality_gate_agent_rpm_arm64 740.91 MiB 768.33 MiB 169.29 MiB 174.71 MiB
static_quality_gate_agent_rpm_arm64_fips 738.99 MiB 766.55 MiB 168.06 MiB 173.92 MiB
static_quality_gate_agent_suse_amd64 750.72 MiB 778.08 MiB 186.81 MiB 193.42 MiB
static_quality_gate_agent_suse_amd64_fips 748.63 MiB 776.11 MiB 185.74 MiB 192.78 MiB
static_quality_gate_agent_suse_arm64 740.92 MiB 768.31 MiB 169.29 MiB 174.71 MiB
static_quality_gate_agent_suse_arm64_fips 739.11 MiB 766.5 MiB 168.06 MiB 173.92 MiB
static_quality_gate_docker_agent_amd64 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_arm64 858.33 MiB 876.0 MiB 272.02 MiB 278.3 MiB
static_quality_gate_docker_agent_jmx_amd64 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_jmx_arm64 858.33 MiB 876.63 MiB 272.02 MiB 278.4 MiB
static_quality_gate_docker_agent_windows1809 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows1809_core 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows1809_core_jmx 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows1809_jmx 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022_core 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022_core_jmx 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_agent_windows2022_jmx 844.93 MiB 862.5 MiB 285.2 MiB 292.0 MiB
static_quality_gate_docker_cluster_agent_amd64 259.65 MiB 263.4 MiB 101.94 MiB 104.07 MiB
static_quality_gate_docker_cluster_agent_arm64 275.65 MiB 279.38 MiB 96.89 MiB 98.95 MiB
static_quality_gate_docker_cws_instrumentation_amd64 6.66 MiB 7.12 MiB 2.82 MiB 3.29 MiB
static_quality_gate_docker_cws_instrumentation_arm64 6.44 MiB 6.92 MiB 2.6 MiB 3.07 MiB
static_quality_gate_docker_dogstatsd_amd64 37.97 MiB 46.39 MiB 14.64 MiB 17.78 MiB
static_quality_gate_docker_dogstatsd_arm64 36.88 MiB 45.05 MiB 13.72 MiB 16.65 MiB
static_quality_gate_dogstatsd_deb_amd64 29.83 MiB 38.4 MiB 7.89 MiB 10.26 MiB
static_quality_gate_dogstatsd_deb_arm64 28.71 MiB 36.98 MiB 6.87 MiB 8.96 MiB
static_quality_gate_dogstatsd_rpm_amd64 29.83 MiB 38.4 MiB 7.9 MiB 10.27 MiB
static_quality_gate_dogstatsd_suse_amd64 29.83 MiB 38.4 MiB 7.9 MiB 10.27 MiB
static_quality_gate_iot_agent_deb_amd64 57.81 MiB 58.51 MiB 14.55 MiB 15.02 MiB
static_quality_gate_iot_agent_deb_arm64 55.22 MiB 55.94 MiB 12.56 MiB 13.05 MiB
static_quality_gate_iot_agent_deb_armhf 53.99 MiB 54.32 MiB 12.58 MiB 13.05 MiB
static_quality_gate_iot_agent_rpm_amd64 57.81 MiB 58.51 MiB 14.57 MiB 15.04 MiB
static_quality_gate_iot_agent_rpm_arm64 55.22 MiB 55.94 MiB 12.59 MiB 13.07 MiB
static_quality_gate_iot_agent_suse_amd64 57.81 MiB 58.51 MiB 14.57 MiB 15.04 MiB

Copy link
Member

@grantseltzer grantseltzer left a comment

Choose a reason for hiding this comment

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

💯

@brycekahle
Copy link
Member Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented May 8, 2025

View all feedbacks in Devflow UI.

2025-05-08 20:11:37 UTC ℹ️ Start processing command /merge


2025-05-08 20:11:42 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 45m (p90).


2025-05-08 20:42:30 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit e872bad into main May 8, 2025
349 checks passed
@dd-mergequeue dd-mergequeue bot deleted the bryce.kahle/improve-godi-test-assert branch May 8, 2025 20:42
@github-actions github-actions bot added this to the 7.67.0 milestone May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/dynamic-instrumentation Dynamic Instrumentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants