You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `trace-agent` integration tests have been repeatedly failing on
timeouts, for instance:
- https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1261246921
- https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1261237699
- https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1261226844
There are at least 2 culprits:
1. rebuilding the `trace-agent` binary from scratch for every test run.
When running with the race detector (`-race` flag), each build takes
time,
2. module cache contention when building, see #43207 for why.
This change implements the TODO at agent.go:94 by:
- ceating a temporary directory in `TestMain` (`BuildCachedBinaries`),
- building `trace-agent` and `secret-script` binaries once in that
directory, with `GOPRIVATE=*` and `GOPROXY=off` to prevent concurrent
module cache access,
- creating symlinks to the cached binaries in per-test subdirectories,
- cleaning up the entire temp directory tree after all tests complete.
This is expected to reduce test execution time, especially with race
detection enabled, and hopefully preventtimeouts in `TestTraces`.
0 commit comments