feat(civisibility): Bazel offline cache and payload-file modes#4503
feat(civisibility): Bazel offline cache and payload-file modes#4503tonyredondo wants to merge 9 commits intomainfrom
Conversation
- Add unified test optimization env vars and mode resolver with Bazel manifest lookup - Read settings/known/skippable/test-management from cache/http in manifest mode with no network fallback - Disable git upload paths and selected CI enrichment in offline/file modes - Write test-cycle and coverage payloads as JSON files in payload-files mode - Add/extend unit tests for mode resolution, cache-first APIs, payload writing, and tag stripping
|
✨ Fix all issues with BitsAI or with Cursor
|
BenchmarksBenchmark execution time: 2026-03-06 19:58:35 Comparing candidate commit 63ea609 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 157 metrics, 7 unstable metrics.
|
- Add deterministic seams and reset helpers for offline/file mode tests - Cover missing output-dir failures for test-cycle and coverage payload files - Assert payload-file mode skips git enrichment and offline init skips upload/logs - Fix malformed manifest settings cache handling discovered by the new tests
- Apply local import grouping expected by Static Checks - Reformat the affected CI visibility test files without changing behavior Tests: go test -count=1 ./internal/civisibility/utils/net/... && go test -count=1 ./internal/civisibility/integrations/... && go test -count=1 ./ddtrace/tracer -run 'TestCiVisibilityTransportPayloadFilesMode'
- Narrow the offline log test to a direct helper instead of re-running global CI visibility init - Stop resetting package-wide init state in the new integration test helper - Keep the offline/upload assertions while preserving manual_api_mocktracer test stability Tests: INTEGRATION=true go test -shuffle=on -count=20 ./internal/civisibility/integrations && INTEGRATION=true go test -count=1 ./internal/civisibility/integrations && go test -count=1 ./internal/civisibility/utils/net/... && go test -count=1 ./ddtrace/tracer -run 'TestCiVisibilityTransportPayloadFilesMode'
Summary
This PR implements Bazel-focused offline test optimization support in
dd-trace-goby adding:DD_TEST_OPTIMIZATION_MANIFEST_FILE) with strict v1 manifest resolution and cache-first behavior.DD_TEST_OPTIMIZATION_PAYLOADS_IN_FILES) writing JSON payload envelopes to Bazel undeclared outputs (TEST_UNDECLARED_OUTPUTS_DIR).internal/civisibility/utils/test_optimization_mode.go.Main changes
sync.Once) with fixed manifest path and version rules.CacheHTTPFile,MsgpackToJSON, andWritePayloadFilehelpers.Tests
Added/extended tests for:
Focused validation commands run:
go test -count=1 ./internal/civisibility/utils/net/...go test -count=1 ./internal/civisibility/integrations/...go test -count=1 ./ddtrace/tracer -run 'TestCiVisibilityTransport|TestCiVisibilityTransportPayloadFilesModeWritesJSON'go test -count=1 ./internal/civisibility/utils -run 'TestCurrentTestOptimizationMode|TestCacheHTTPFile|TestMsgpackToJSON'Scope notes
TEST_OPTIMIZATION_*aliases and no legacyhttp/*cache layout are introduced.