Embed native fuzz seed fixtures #60275
[P1] Declare the embedded fixtures in both Bazel test targets
gosymname_test and amd_test currently list these fixtures only in data and have no embedsrcs. rules_go requires files referenced by //go:embed to be declared in embedsrcs; runtime data declarations do not supply the embed configuration. Consequently, both Bazel test targets fail to compile after this change. Add testdata/symbols.yaml to the gosymname target's embedsrcs and both GPU metrics files to the AMD target's embedsrcs.
AI review by Codex (OpenAI) - workflow run
The patch is incorrect: both new embed directives lack the corresponding Bazel embedsrcs declarations, breaking compilation of the affected Bazel test targets. The embedding approach otherwise preserves the existing fuzz seeds.
🎯 Code Coverage (<a target='_blank' href='https://app.datadoghq.com/ci/code-coverage/github.com%2Fdatadog%2Fdatadog-agent/pull-requests/60275'>details</a>)<br>• <strong><span title="Percentage of modified executable lines covered by tests in this PR">Patch Coverage</span></strong>: 100.00%<br>• <strong><span title="Percentage of all executable lines covered by tests in the entire codebase">Overall Coverage</span></strong>: 66.98% <span title="Change in overall coverage compared to the base branch">(+0.01%)</span><br>
<sub>
This comment will be updated automatically if new data arrives. <br />
🔗 Commit SHA: 6d62d47 | <a href="https://docs.datadoghq.com/integrations/guide/source-code-integration/#pr-comments">Docs</a> | Give us <a href="https://dd.enterprise.slack.com/archives/C07E3U2QRMM">feedback</a>!
</sub>
Static quality checks
✅ Please find below the results from static quality gates
Comparison made with ancestor 3aaabde0b6a9900a9e1f75b8b1383b2dbffec288
📊 Static Quality Gates Dashboard
🔗 SQG Job
<details>
<summary>33 successful checks with minimal change (< 2 KiB)</summary>
||Quality gate|Current Size|
|--|--|--|
|✅|agent_deb_amd64|766.085 MiB|
|✅|agent_deb_amd64_fips|696.576 MiB|
|✅|agent_heroku_amd64|314.345 MiB|
|✅|agent_msi|671.893 MiB|
|✅|agent_rpm_amd64|766.061 MiB|
|✅|agent_rpm_amd64_fips|696.552 MiB|
|✅|agent_rpm_arm64|735.287 MiB|
|✅|agent_rpm_arm64_fips|671.564 MiB|
|✅|agent_suse_amd64|766.061 MiB|
|✅|agent_suse_amd64_fips|696.552 MiB|
|✅|agent_suse_arm64|735.287 MiB|
|✅|agent_suse_arm64_fips|671.564 MiB|
|✅|docker_agent_amd64|821.724 MiB|
|✅|docker_agent_arm64|815.643 MiB|
|✅|docker_agent_jmx_amd64|1012.653 MiB|
|✅|docker_agent_jmx_arm64|995.288 MiB|
|✅|docker_cws_instrumentation_amd64|9.513 MiB|
|✅|docker_cws_instrumentation_arm64|8.877 MiB|
|✅|docker_dogstatsd_amd64|40.334 MiB|
|✅|docker_dogstatsd_arm64|38.334 MiB|
|✅|docker_host_profiler_amd64|282.577 MiB|
|✅|docker_host_profiler_arm64|295.263 MiB|
|✅|dogstatsd_deb_amd64|31.086 MiB|
|✅|dogstatsd_deb_arm64|28.997 MiB|
|✅|dogstatsd_rpm_amd64|31.086 MiB|
|✅|dogstatsd_suse_amd64|31.086 MiB|
|✅|iot_agent_deb_amd64|48.382 MiB|
|✅|iot_agent_deb_arm64|44.755 MiB|
|✅|iot_agent_deb_armhf|45.529 MiB|
|✅|iot_agent_rpm_amd64|48.383 MiB|
|✅|iot_agent_suse_amd64|48.382 MiB|
|✅|docker_cluster_agent_amd64|218.331 MiB|
|✅|docker_cluster_agent_arm64|231.046 MiB|
</details>
Regression Detector
Regression Detector Results
Metrics dashboard\
Target profiles\
Job ID: 842e091d-91eb-4377-92d3-1068a342ad77
Baseline: 9c2be34f89ccb66a29d4f0467bf371ceb758dc7b
Comparison: 162203553820caf8949cb7f6bd9445c6117e2ad5
[Diff](9c2be34f89ccb66a29d4f0467bf371ceb758dc7b...162203553820caf8949cb7f6bd9445c6117e2ad5)
Optimization Goals: ✅ No significant changes detected
<details>
<summary><h2>
Fine details of change detection per experiment
</h2></summary>
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|------|---------------------------------------------|--------------------|----------|----------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ➖ | quality_gate_metrics_logs | memory utilization | +0.32 | [+0.09, +0.54] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_logs | % cpu utilization | +0.29 | [-0.71, +1.28] | 1 | Logs bounds checks dashboard |
| ➖ | dsd_uds_10mb_3k_timestamped_contexts_cpu | % cpu utilization | +0.26 | [-0.04, +0.57] | 1 | Logs |
| ➖ | quality_gate_security_idle | memory utilization | +0.17 | [+0.12, +0.22] | 1 | Logs bounds checks dashboard |
| ➖ | dsd_uds_10mb_3k_timestamped_contexts_memory | memory utilization | +0.09 | [-0.14, +0.31] | 1 | Logs |
| ➖ | quality_gate_private_action_runner | memory utilization | +0.01 | [-0.11, +0.13] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_no_fs_load | memory utilization | -0.08 | [-0.14, -0.02] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle_all_features | memory utilization | -0.20 | [-0.24, -0.15] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_mean_fs_load | memory utilization | -0.25 | [-0.30, -0.19] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle | memory utilization | -0.27 | [-0.32, -0.22] | 1 | Logs bounds checks dashboard |
| ➖ | python_openmetrics | % cpu utilization | -0.32 | [-0.98, +0.34] | 1 | Logs bounds checks dashboard |
| ➖ | dsd_uds_client_drop_detector_cpu | % cpu utilization | -1.20 | [-1.91, -0.48] | 1 | Logs |
</details>
Bounds Checks: ❌ Failed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|------|------------------------------------|-----------------------|-------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ✅ | python_openmetrics | checks_execution_time | 10/10 | 82.69 ≤ 100 | bounds checks dashboard |
| ✅ | python_openmetrics | cpu_usage | 10/10 | 1344.13 ≤ 1500 | bounds checks dashboard |
| ✅ | python_openmetrics | memory_usage | 10/10 | 4.30GiB ≤ 4.75GiB | bounds checks dashboard |
| ✅ | quality_gate_idle | intake_connections | 10/10 | 5 ≤ 6 | bounds checks dashboard |
| ✅ | quality_gate_idle | memory_usage | 10/10 | 195.63MiB ≤ 202MiB | bounds checks dashboard |
| ❌ | quality_gate_idle | total_bytes_received | 8/10 | 822.41KiB > 819.20KiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | 2 ≤ 5 | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | memory_usage | 10/10 | 464.16MiB ≤ 544MiB | bounds checks dashboard |
| ❌ | quality_gate_idle_all_features | total_bytes_received | 9/10 | 1.25MiB > 1.25MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | intake_connections | 10/10 | 18 ≤ 40 | bounds checks dashboard |
| ✅ | quality_gate_logs | memory_usage | 10/10 | 224.97MiB ≤ 240MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | missed_bytes | 10/10 | 0B ≤ 0B | bounds checks dashboard |
| ✅ | quality_gate_logs | total_bytes_received | 10/10 | 264.11MiB ≤ 292MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | cpu_usage | 10/10 | 353.28 ≤ 2000 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | intake_connections | 10/10 | 20 ≤ 40 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | memory_usage | 10/10 | 431.91MiB ≤ 463MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | missed_bytes | 10/10 | 0B ≤ 0B | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | total_bytes_received | 10/10 | 953.43MiB ≤ 1.04GiB | bounds checks dashboard |
| ✅ | quality_gate_private_action_runner | memory_usage | 10/10 | 77.11MiB ≤ 80MiB | bounds checks dashboard |
| ✅ | quality_gate_security_idle | cpu_usage | 10/10 | 28.60 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_idle | memory_usage | 10/10 | 343.16MiB ≤ 365MiB | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | cpu_usage | 10/10 | 42.81 ≤ 200 | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | memory_usage | 10/10 | 325.68MiB ≤ 343MiB | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | cpu_usage | 10/10 | 23.64 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | memory_usage | 10/10 | 319.70MiB ≤ 356MiB | bounds checks dashboard |
<details>
<summary><h2>
Explanation
</h2></summary>
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
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
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".
</details>
CI Pass/Fail Decision
❌ Failed. Some Quality Gates were violated.
Approved these changes.
<!-- ccr-overview-v2 -->
🟢 Approval recommended
No active review issues remain for the changes embedding fuzz seed fixtures and declaring their Bazel inputs.
No open issues 🎉
<details>
<summary><strong>What changed in this PR</strong></summary>
Makes the GPU metrics and Go symbol fuzz targets self-contained by embedding their seed fixtures in the compiled test binaries, avoiding corpus setup failures on workers without a repository checkout.
Changes:
embedsrcs declarations so both test targets can compile the embedded data.| File | Description |
| ---- | ----------- |
| pkg/gpu/amd/gpumetrics_test.go | Embed GPU metrics seeds and use them in the fuzz target. |
| pkg/gpu/amd/BUILD.bazel | Declare the two embedded GPU metrics fixtures. |
| pkg/dyninst/gosymname/fuzz_test.go | Load symbol fuzz seeds from embedded YAML. |
| pkg/dyninst/gosymname/BUILD.bazel | Declare the embedded symbol fixture. |
</details>
<sub>Review effort: Balanced</sub>
Approved these changes.
grantseltzer
edznux-dd
<!-- dd-meta {"pullId":"00000000-0000-0000-0000-000000000000","source":"chat","resourceId":"7d4d4cec-b44a-4c1f-9fd5-af7099020f2f","workflowId":"78ddd5ee-dfa6-40ce-bfd4-ab72273ceed1","codeChangeId":"78ddd5ee-dfa6-40ce-bfd4-ab72273ceed1","sourceType":"bits_ai_sre"} -->
What does this PR do?
Bits AI SRE Investigation • View in Bits AI SRE Investigation
Embeds the seed fixtures used by the GPU metrics and Go symbol native fuzz targets into their compiled test binaries. Regular GPU tests continue to read their full filesystem fixtures unchanged. Declares the embedded files in the corresponding Bazel test targets so rules_go can compile them.
Motivation
The fuzzing platform uploads only
fuzz.test, so both targets failed during corpus setup when workers lacked the repositorytestdatadirectory. This caused jobs to error before executing fuzz inputs and produced zero useful coverage. Embedding the existing seed data makes the targets self-contained and prevents the recurring alert condition. The Bazel declarations ensure the same fix works under the repository's Bazel test graph.Describe how you validated your changes
go test -tags=test ./pkg/gpu/amd ./pkg/dyninst/gosymname/tmpwith-test.run=^$, confirming baseline coverage setup and a passing fuzz run without access to the repository fixtures.bazel test //pkg/dyninst/gosymname:gosymname_test //pkg/gpu/amd:amd_test --test_output=errorsAdditional Notes
The change addresses the fuzz target packaging incompatibility in code; it does not alter memory limits or fuzzing infrastructure configuration. The Bazel
embedsrcsdeclarations were added in response to review feedback becausedataalone does not satisfy rules_go'sgo:embedrequirements.---
PR by Bits - View session in Datadog
Comment @datadog to request changes