feat(ci): pilot native Datadog test instrumentation#4911
Conversation
Co-authored-by: darccio <d@rio.hn>
|
I can only run on private repositories. |
|
BenchmarksBenchmark execution time: 2026-06-29 16:09:08 Comparing candidate commit 084643d in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 321 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
Co-authored-by: darccio <d@rio.hn>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0cb6f3397
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add continue-on-error: true so a failure in the datadog/test-visibility-github-action (network, telemetry, or module download) does not abort the ubuntu-latest lane before tests run or the JUnit upload fallback executes.
Replaces the mutable @v2 branch reference with the reviewed SHA for v2.10.0, consistent with how other external actions are pinned in this repo per .github/dependabot.yml policy.
dd-trace-go is the library that reads DD_CIVISIBILITY_*/DD_ENV at runtime, so running tests with those env vars set (as the test-visibility-github-action exports them into GITHUB_ENV) corrupts the suite: mocktracer type-assert panics, a 15m agentless-writer timeout, and DD_ENV=ci polluting config-precedence tests. Split the pilot into a separate job (test-multi-os-instrumented) with job-level continue-on-error:true so it is non-gating. The gating test-multi-os job is restored to a clean, un-instrumented state.
What does this PR do?
Tightens Datadog CI test uploads and adds a native Test Optimization pilot in one workflow lane.
Summary
Improve reliability and signal quality of Datadog CI test data by narrowing JUnit upload scope, fixing inconsistent tags, and introducing a low-risk native instrumentation pilot while keeping the existing JUnit upload path as fallback.
Changes
.github/workflows/multios-unit-tests.ymlto:/tmp/test-resultsdirectory${{ env.TEST_RESULT_PATH }}to Datadog instead of scanning./datadog/test-visibility-github-action@v2) right before the test step forubuntu-latestruns when API key credentials are availableJOB_ID: ${{ job.check_run_id }}on the test step for native instrumentation correlation.github/workflows/appsec.yml(AppSec disabled job) to sendgo:stableinstead of an emptygo:tag when uploading JUnit results.datadog-ci junit upload-based reporting in place during the pilot to avoid regressions and allow comparison.Motivation
Current uploads included weak points:
multios-unit-testsusedpath: ./, which is broader than necessary and can pick up unrelated files.go:tag, reducing Datadog filtering/grouping quality.This change keeps uploads focused, normalizes tags, and starts a controlled native instrumentation rollout for one lane.
Testing
make lint/actionsuccessfully after each workflow edit set..github/workflows/multios-unit-tests.yml.github/workflows/appsec.ymlReviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!
PR by Bits - View session in Datadog
Comment @DataDog to request changes