Skip to content

Update Orchestrion to v1.12.0 and preserve partial uploads - #214

Open
tonyredondo wants to merge 11 commits into
mainfrom
tony/orchestrion-v1.12.0
Open

Update Orchestrion to v1.12.0 and preserve partial uploads#214
tonyredondo wants to merge 11 commits into
mainfrom
tony/orchestrion-v1.12.0

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • update the maintained Orchestrion integration from v1.9.0 to v1.12.0 and the default dd-trace-go/v2 pin from v2.9.0 to v2.9.1
  • preserve Orchestrion's upstream test-variant resolver while retaining the Bazel execroot/tempdir and resolver-context compatibility patches
  • make the resolver cycle-guard source patch work with both LF and CRLF checkouts
  • preserve exact configured dd-trace-go module versions in the offline proxy, including prerelease pins that differ from the module graph's selected stable version
  • regenerate the public profiles for rules_go v0.60.0, v0.61.1, and v0.62.0, and update fixtures, onboarding helpers, docs, and skills
  • keep processing every available fresh valid payload when another target or validation phase fails, while preserving the earliest failure as the command result
  • apply the same partial-result behavior to Bash, PowerShell, generated Go validation scripts, documentation, and onboarding skills

Orchestrion v1.12.0 requires Go 1.25.0 or newer.

Why

The v1.12 resolver tracks test variants for generated test mains and recursively resolves the correct dependency archives. The previous v1.9 integration disabled that recursive toolexec path for Bazel compatibility; this update keeps the upstream behavior and narrows the local patch to Bazel filesystem and invocation-context differences.

The offline proxy downloads both the resolved module graph and the exact configured dd-trace-go pins. This keeps normal Go module resolution intact while ensuring synthetic Orchestrion dependencies can resolve a consumer's prerelease pin without network access.

A failed test can still produce a valid Test Optimization payload containing the failure details. Validation failures and missing sibling outputs are therefore reported without discarding valid fresh payloads from the same invocation. The final status still reports the earliest test, doctor, dry-run, or upload failure.

The resolver source downloaded by the repository rule can use the checkout's native line endings. Building the replacement text with the detected line ending keeps the same patch semantics on Linux, macOS, and Windows.

Validation

  • python3 tools/dev/generate_rules_go_fork_maps.py --check
  • python3 tools/dev/materialize_rules_go_fork.py check --all
  • python3 tools/dev/check_release_archive_contents.py
  • python3 tools/dev/verify_rules_go_profiles.py --public-denylist tools/dev/private_leak_public_denylist.txt --bazel <macOS Bazel wrapper>
  • focused bootstrap, onboarding pin, workspace helper, and profile-tool tests
  • focused resolver-cycle patch tests for LF and CRLF across rules_go v0.60.0, v0.61.1, and v0.62.0
  • WORKSPACE and Bzlmod Go integration scripts for rules_go v0.60.0, v0.61.1, and v0.62.0, including exact v2.9.1-rc.3 offline-proxy coverage
  • ./bazelw test //... --noexperimental_split_xml_generation (476 tests passed before the partial-upload follow-up)
  • ./bazelw test //tools/tests/python:python_tools_test --noexperimental_split_xml_generation
  • ./bazelw test //modules/go/tools/dd_topt_go_bootstrap:bootstrap_test --noexperimental_split_xml_generation
  • local-archive WORKSPACE and Bzlmod consumer fixtures, including real uploads of failed-test payloads to their mock backend

@tonyredondo
tonyredondo requested a review from a team as a code owner August 7, 2026 18:09

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Autotest was unable to complete this review. View session

Please try again by commenting @autotest review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73172ce3bf

ℹ️ 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".

defaultOrchestrionVersion = "v1.9.0"
defaultDDTraceGoVersion = "v2.9.0"
defaultOrchestrionVersion = "v1.12.0"
defaultDDTraceGoVersion = "v2.9.1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pin a tracer that supports the generated wrapper

In a newly guided workspace that accepts this default, bootstrap generates a central wrapper with orchestrion_mode = "test_optimization", but the changed integration harness itself states at tools/tests/integration/run_mock_server_tests.sh:4035-4041 that v2.9.1 lacks the required Go-testing Orchestrion package and therefore tests the hidden raw target instead. Consequently, the normal --config=test-optimization target produced by guided onboarding cannot build; use a tracer version containing that package or avoid generating this mode until one is available.

AGENTS.md reference: AGENTS.md:L168-L170

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d719c47e34

ℹ️ 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".

Comment thread README.md
Comment on lines +289 to +290
DD_TRACE_GO_VERSION="v2.9.1"
ORCHESTRION_VERSION="v1.12.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore versions that match the published archive

The advertised v1.2.0 tuple still pins commit 69953536..., whose bootstrap defaults to Orchestrion v1.9.0 and whose vendored integration predates the v1.12-specific source patches, but these two lines now advertise v2.9.1/v1.12.0. Consumers copying this published tuple therefore combine an older archive with unsupported newer tool versions instead of reproducing the release; keep the old values here until the archive commit is updated, or publish a commit containing this integration.

AGENTS.md reference: AGENTS.md:L20-L22

Useful? React with 👍 / 👎.

defaultRulesGoRepoName = "io_bazel_rules_go"
defaultOrchestrionVersion = "v1.9.0"
defaultDDTraceGoVersion = "v2.9.0"
defaultOrchestrionVersion = "v1.12.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject runtimes below the new Orchestrion minimum

When guided bootstrap or WORKSPACE snippet generation receives --runtime-version below 1.25.0, this new default is still emitted even though Orchestrion v1.12.0 requires Go 1.25.0 or newer. Guided bootstrap can consequently finish after modifying MODULE.bazel, go.mod, and generated files, only for the first enabled Bazel build to fail while building Orchestrion with the requested older SDK; validate the selected Orchestrion/runtime pair before any writes.

Useful? React with 👍 / 👎.

@tonyredondo
tonyredondo marked this pull request as draft August 8, 2026 08:08
@tonyredondo tonyredondo changed the title go: update Orchestrion integration to v1.12.0 Update Orchestrion to v1.12.0 and preserve partial uploads Aug 8, 2026
@tonyredondo
tonyredondo marked this pull request as ready for review August 22, 2026 23:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3222be11d9

ℹ️ 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".

Comment on lines +410 to 413
if [[ "$DO_UPLOAD" -eq 1 ]]; then
upload_runtime_args=("${runtime_args[@]}")
if [[ -n "$UPLOAD_REPORT_JSON" ]]; then
upload_runtime_args+=("--report-json=$UPLOAD_REPORT_JSON")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip payloads that fail enrichment validation

When --upload is used and the dry run fails because --validate-enrichment found missing required tags, this unconditional branch immediately reruns the uploader without --validate-enrichment; the normal upload path only calls validate_payload, so the same enrichment-invalid payload is posted rather than skipped while other valid payloads continue. The PowerShell wrapper has the same behavior. Preserve the dry-run per-payload result or enforce equivalent validation during the real upload so only fresh valid payloads are sent.

AGENTS.md reference: AGENTS.md:L158-L161

Useful? React with 👍 / 👎.

Comment on lines +105 to +106
if !stale {
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop waiting before an active cache lock becomes stale

When a cache-producing action holds this lock for longer than cacheLockStaleAfter (10 minutes), a waiter now loops past the 60-second timeout until the lock ages into the stale state, removes it even though the original owner is still running, and acquires a second lock. The original owner's deferred release can then delete the new owner's lock, allowing concurrent promoteCacheTempDir calls that remove and replace the same cache entry while readers use it. Long Orchestrion builds should either time out without stealing an active lock or maintain an owner/heartbeat mechanism; the identical change affects all three vendored forks.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: FAIL

Two edge cases can lose valid data. A missing BEP stops partial uploads, and a cache owner that runs for more than ten minutes can lose its active lock.

Open Bits AI session

🤖 Datadog Autotest · Commit 3222be1 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

fi

if [[ "$doctor_status" -eq 0 && "$dry_run_status" -eq 0 && "$DO_UPLOAD" -eq 1 ]]; then
if [[ "$DO_UPLOAD" -eq 1 ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing BEP files still stop partial upload

One failed or interrupted target can prevent the upload of valid sibling failure data.

Assertion details
  • Input: One test invocation does not create a usable BEP. Another invocation creates a valid fresh payload and BEP.
  • Expected: Report the bad target. Upload valid fresh payloads from other targets. Apply the fix to the Bash, PowerShell, and generated Go flows. Add missing-BEP coverage for each flow.
  • Actual: The upload call passes all planned BEP paths. Required artifact staging exits on the first missing or invalid BEP before it scans valid payloads.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

}
continue
}
if !stale {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Active cache locks become stale after ten minutes

Concurrent writers can corrupt the shared Orchestrion cache or read incomplete cache content.

Assertion details
  • Input: Two actions use the same cache entry. The first action holds the lock for more than ten minutes.
  • Expected: Do not remove a lock while its owner is active. Use an owner check or a heartbeat. Apply the fix to all three vendored rules_go trees and generated patches. Add a test where the owner stays active past the stale limit.
  • Actual: The new retry loop waits until the lock directory is ten minutes old. It then removes the directory without proof that the owner stopped. The first owner can later remove a new owner's lock too.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-datadog-prod-us1

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba0c3dd263

ℹ️ 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".

Comment on lines +410 to 413
if [[ "$DO_UPLOAD" -eq 1 ]]; then
upload_runtime_args=("${runtime_args[@]}")
if [[ -n "$UPLOAD_REPORT_JSON" ]]; then
upload_runtime_args+=("--report-json=$UPLOAD_REPORT_JSON")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip remote-only outputs before uploading local payloads

When one target has a remote-only test.outputs reference while another has a valid local payload, this unconditional upload attempt still cannot deliver the local payload: the wrapper always passes --freshness-mode=required, and validate_bep_remote_only_outputs exits before any upload loop as soon as it sees the remote-only row. Thus both the dry run and this real-upload invocation abort wholesale instead of preserving the available payload; the PowerShell path has the same behavior. Handle the unavailable row as a per-output failure and continue with locally available fresh outputs while preserving the failure status.

AGENTS.md reference: AGENTS.md:L158-L161

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant