fix(internal/civisibility): fix agent UDS requests#4852
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: a279241 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-06-04 12:08:15 Comparing candidate commit a279241 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 297 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
b964609 to
d96103d
Compare
There was a problem hiding this comment.
Pull request overview
Fixes CI Visibility’s internal helper client when DD_TRACE_AGENT_URL is configured as a Unix domain socket by ensuring the raw socket path is preserved and reused via shared internal.UDSClient / internal.UnixDataSocketURL helpers, and adds agent-mode UDS regression coverage for the CI Visibility helper endpoints.
Changes:
- Replace the custom UDS transport/dialer logic with
internal.UDSClient(...)and base URL rewriting viainternal.UnixDataSocketURL(...). - Add comprehensive agent-mode UDS tests covering settings, known tests, search commits, skippable tests, test management, packfile upload, coverage upload, and logs upload endpoints.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/civisibility/utils/net/client.go | Switch agent-mode UDS handling to shared internal helpers to avoid losing the socket path. |
| internal/civisibility/utils/net/uds_client_test.go | Add end-to-end UDS agent-mode coverage for all CI Visibility helper endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d96103d to
a279241
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
### What does this PR do? Fixes the CI Visibility helper client when DD_TRACE_AGENT_URL is configured with a Unix domain socket. The helper client now captures the raw socket path before rewriting the base URL to the synthetic UDS host and reuses the shared internal.UDSClient and internal.UnixDataSocketURL helpers. Adds agent-mode UDS coverage for the CI Visibility helper endpoints: settings, known tests, search commits, skippable tests, test management, packfile upload, coverage upload, and logs upload. ### Motivation The previous UDS branch built a custom dialer that closed over agentURL.Path, then reassigned agentURL to the synthetic HTTP URL. By request time agentURL.Path was empty, causing agent-mode requests to fail with dial unix: missing address. ### Testing - go test ./internal/civisibility/utils/net -run 'TestClientAgentModeUDS' -count=1 - go test ./internal/civisibility/utils/net -count=1 - go test -race ./internal/civisibility/utils/net -count=1 - go test ./internal -run 'TestUnixDataSocketURL|TestUDSClientTransportConfig|TestUDSConcurrentConnectionReuse|TestUDSServerCloseRecovery' -count=1 - go test ./ddtrace/tracer -run 'TestCiVisibilityTransport|TestCIVisibilityTransportSecureLogging' -count=1 - go test ./internal/civisibility/... -count=1 - go test -race ./internal/civisibility/... -count=1 - git diff --check Co-authored-by: tony.redondo <[email protected]>
What does this PR do?
Fixes the CI Visibility helper client when DD_TRACE_AGENT_URL is configured with a Unix domain socket. The helper client now captures the raw socket path before rewriting the base URL to the synthetic UDS host and reuses the shared internal.UDSClient and internal.UnixDataSocketURL helpers.
Adds agent-mode UDS coverage for the CI Visibility helper endpoints: settings, known tests, search commits, skippable tests, test management, packfile upload, coverage upload, and logs upload.
Motivation
The previous UDS branch built a custom dialer that closed over agentURL.Path, then reassigned agentURL to the synthetic HTTP URL. By request time agentURL.Path was empty, causing agent-mode requests to fail with dial unix: missing address.
Testing