Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a0b7add
go: update Orchestrion integration to v1.12.0
tonyredondo Aug 7, 2026
73172ce
go: preserve exact tracer pins in offline proxy
tonyredondo Aug 7, 2026
a283283
fix: invalidate incomplete Orchestrion bootstrap caches
tonyredondo Aug 7, 2026
d719c47
go: wait for active Orchestrion cache owners
tonyredondo Aug 7, 2026
df41e65
build: refresh Orchestrion extension lock
tonyredondo Aug 8, 2026
3222be1
uploader: preserve valid payloads after partial failures
tonyredondo Aug 8, 2026
7837867
go: guard Orchestrion resolver package cycles
tonyredondo Aug 23, 2026
5fc4e4b
go: expose SDK headers to instrumented links
tonyredondo Aug 23, 2026
4be1deb
go: make resolver cycle patch line-ending safe
tonyredondo Aug 23, 2026
cf728d3
go: isolate runtime data tools from Orchestrion
tonyredondo Aug 24, 2026
ba0c3dd
uploader: batch CODEOWNERS enrichment
tonyredondo Aug 24, 2026
a8c8def
go: mirror rules_go inferred test importpaths
tonyredondo Aug 25, 2026
3f4cb74
test: make importpath assertion module-relative
tonyredondo Aug 25, 2026
99974ae
runfiles: preserve external repository aliases
tonyredondo Aug 25, 2026
15c9687
python: materialize selected metadata runfiles
tonyredondo Aug 25, 2026
e969a8b
tests: share Python selector stub repository
tonyredondo Aug 25, 2026
15539c5
uploader: split and validate outbound test payloads
tonyredondo Aug 26, 2026
e743cb8
uploader: remove payloads from read-only output trees
tonyredondo Aug 26, 2026
be7487e
tests: isolate uploader transport fixtures
tonyredondo Aug 26, 2026
bf470d7
go: add Test Optimization stdlib warmup target
tonyredondo Aug 26, 2026
f9c1453
go: make disabled stdlib warmup a no-op
tonyredondo Aug 26, 2026
e18db80
go: match go_test transitions in stdlib warmup
tonyredondo Aug 26, 2026
564723a
Address remaining review feedback
tonyredondo Aug 26, 2026
8bf79cd
docs: plan deterministic stdlib cache publication
tonyredondo Aug 26, 2026
74ef9ce
Fix final review findings
tonyredondo Aug 26, 2026
e852e47
docs: align validated uploader guidance
tonyredondo Aug 26, 2026
83e6614
rules_go: make stdlib cache outputs deterministic
tonyredondo Aug 26, 2026
89e28cb
rules_go: stabilize declared stdlib cache paths
tonyredondo Aug 26, 2026
3353f0c
uploader: preserve partial upload progress
tonyredondo Aug 26, 2026
8a85970
uploader: persist retries from read-only outputs
tonyredondo Aug 26, 2026
a9d0009
uploader: support Windows PowerShell partial retries
tonyredondo Aug 26, 2026
30c52bd
uploader: support PowerShell 5.1 payload cleanup
tonyredondo Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bazel-out
bazel-testlogs
third_party/rgo/v0_60_0/base
third_party/rgo/v0_61_1/base
third_party/rgo/v0_62_0/base
tools/tests/rules_go_variant_regressions
modules/go/bazel-bin
modules/go/bazel-out
Expand Down
33 changes: 14 additions & 19 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,13 @@ The sync rule creates `@test_optimization_data//` containing:
```bash
# Tests write payloads to TEST_UNDECLARED_OUTPUTS_DIR automatically
# Bazel collects them to bazel-testlogs/<target>/test.outputs/
./bazelw test //... || test_status=$?; test_status=${test_status:-0}
./bazelw run //<topt-package>:dd_test_optimization_doctor || doctor_status=$?; doctor_status=${doctor_status:-0}
if [ "$doctor_status" -ne 0 ]; then
if [ "$test_status" -ne 0 ]; then exit "$test_status"; fi
exit "$doctor_status"
fi
./bazelw run //<topt-package>:dd_upload_payloads -- --dry-run --validate-enrichment || dry_run_status=$?; dry_run_status=${dry_run_status:-0}
if [ "$dry_run_status" -ne 0 ]; then
if [ "$test_status" -ne 0 ]; then exit "$test_status"; fi
exit "$dry_run_status"
fi
DD_API_KEY="$DD_API_KEY" DD_SITE="$DD_SITE" ./bazelw run //<topt-package>:dd_upload_payloads
upload_status=$?
if [ "$test_status" -ne 0 ]; then exit "$test_status"; fi
exit "$upload_status"
test_status=0; doctor_status=0; uploader_status=0
./bazelw test //... || test_status=$?
./bazelw run //<topt-package>:dd_test_optimization_doctor || doctor_status=$?
DD_API_KEY="$DD_API_KEY" DD_SITE="$DD_SITE" ./bazelw run //<topt-package>:dd_upload_payloads -- --validate-enrichment || uploader_status=$?
for status in "$test_status" "$doctor_status" "$uploader_status"; do
if [ "$status" -ne 0 ]; then exit "$status"; fi
done
```
- Force refetch of test optimization data:
```bash
Expand Down Expand Up @@ -163,8 +155,11 @@ The sync rule creates `@test_optimization_data//` containing:
- Tests write payloads to `$TEST_UNDECLARED_OUTPUTS_DIR/payloads/{tests,coverage}` (Bazel's built-in writable directory).
- Bazel automatically collects these to `bazel-testlogs/<package>/<target>/test.outputs/`.
- In consumer workspaces, run `./bazelw run //<topt-package>:dd_test_optimization_doctor`
after tests complete, then run `./bazelw run //<topt-package>:dd_upload_payloads -- --dry-run --validate-enrichment`, then upload with `./bazelw run //<topt-package>:dd_upload_payloads`.
Do not run the real upload if doctor or dry-run enrichment validation fails.
after tests complete, then run the uploader once with `--validate-enrichment`.
Add `--dry-run` to that invocation only when upload is disabled.
When upload is authorized, process every available fresh valid payload even if
tests or doctor fail, and preserve the earliest test, doctor, or uploader
failure as the job result.
- For Go, route the repository's central `dd_go_test` wrapper through
`dd_topt_go_test`; `--config=test-optimization` is the only user-facing
enable switch.
Expand All @@ -190,8 +185,8 @@ The sync rule creates `@test_optimization_data//` containing:
)
```
- In the repository's central Go wrapper: load `dd_topt_go_test` and the generated `topt_data`, then delegate every public `dd_go_test(...)` call to the Datadog macro. Do not create separate plain and optimized onboarding paths.
- Import path inference (preferred): add a `go_library` and set `embed = [":<that_library>"]` in the central wrapper call. The macro reads rules_go's provider to compute the same `importpath` `go_test` uses and selects the matching per-module payload group. Inferred misses use the core bundle. When synchronized metadata exposes module groups, an explicit `importpath` or `module_label_override` that does not match one fails analysis; when no groups exist, the canonical full bundle remains valid.
- Fallback (no embed): if neither `embed` nor explicit `importpath` is provided, the macro computes `<go module path>/<bazel package>` using the exported `topt_data["runtimes"]["go"]["module_path"]`. In this fallback mode only, it consults `topt_data["runtimes"]["go"]["module_included"]` as a coarse gate before attempting permodule selection.
- Import path inference (preferred): add a `go_library` with an explicit `importpath` and set `embed = [":<that_library>"]` in the central wrapper call. The macro reads rules_go's provider to compute the same `importpath` `go_test` uses and selects the matching per-module payload group. Inferred misses use the core bundle. When synchronized metadata exposes module groups, an explicit `importpath` or `module_label_override` that does not match one fails analysis; when no groups exist, the canonical full bundle remains valid.
- Fallback (no embed): if neither `embed` nor explicit `importpath` is provided, the macro computes the label-derived importpath that `rules_go` assigns to the hidden raw `go_test` target. In this fallback mode only, it consults `topt_data["runtimes"]["go"]["module_included"]` as a coarse gate before attempting per-module selection.
- Tests can read `DD_TEST_OPTIMIZATION_MANIFEST_FILE` to resolve the manifest directory (via `filepath.Dir()`) and access synced payloads.
- For Python/Java/NodeJS/.NET/Ruby companions, follow the corresponding quickstart sections in `README.md` (`Bzlmod + Python companion`, `Bzlmod + Java companion`, `Bzlmod + NodeJS companion`, `Bzlmod + .NET companion`, `Bzlmod + Ruby companion`).

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ versioning.
Orchestrion integration and public consumer patch profile.

### Changed
- Updated the maintained `rules_go` Orchestrion integration to Orchestrion
`v1.12.0` and `dd-trace-go/v2` `v2.9.1`, preserving upstream test-variant
resolution while retaining the Bazel-specific resolver compatibility layer.
Orchestrion `v1.12.0` requires Go `1.25.0` or newer.
- The public Go Bzlmod extension now defaults `enabled_by_env` to `True`, so
omitting `--config=test-optimization` disables metadata sync and Orchestrion
together while the named config enables both.
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading