Update Orchestrion to v1.12.0 and preserve partial uploads - #214
Update Orchestrion to v1.12.0 and preserve partial uploads#214tonyredondo wants to merge 37 commits into
Conversation
There was a problem hiding this comment.
Please try again by commenting @autotest review.
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
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.
🤖 Datadog Autotest · Commit 3222be1 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8c8def793
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bf79cd6a2
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74ef9cea46
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e852e47d3d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83e661437f
ℹ️ 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".
| if [[ "$DO_UPLOAD" -eq 1 ]]; then | ||
| UPLOAD_REPORT_JSON="$UPLOADER_REPORT_JSON" |
There was a problem hiding this comment.
Honor explicit uploader report paths during uploads
When --upload is combined with --uploader-report-json PATH (or DD_TEST_OPTIMIZATION_UPLOADER_REPORT_JSON) without --report-dir, this assignment never runs because it is nested inside the REPORT_DIR block. UPLOAD_REPORT_JSON therefore remains empty and the real uploader is invoked without --report-json, contrary to the option's documented dry-run-or-upload behavior in docs/Configuration_Reference.md:681; the PowerShell wrapper has the same nesting. Assign the selected uploader path for upload mode independently of whether a report directory was supplied.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89e28cb34e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3353f0c589
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a859700d6
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9d0009f16
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a366f97142
ℹ️ 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".
| log "error: BEP JSON not found for artifact staging: $bep_json; continuing with other BEP files" | ||
| continue |
There was a problem hiding this comment.
Count missing BEP staging inputs as failures
When artifact staging receives multiple --bep-json paths while freshness is disabled or uses the execution log, a missing path reaches this continue and is never processed by the BEP freshness parser that increments UPLOAD_FAILURES. The uploader can therefore stage/upload the available siblings and exit successfully even though an explicitly requested BEP invocation was omitted; record an aggregate failure before continuing, including in the equivalent PowerShell branch.
AGENTS.md reference: AGENTS.md:L160-L162
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ce7a9ed10
ℹ️ 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".
| $retryPayload.events = @($failedEvents.ToArray()) | ||
| } | ||
| Write-Utf8NoBomFile -Path $retryPath -Content (($retryPayload | ConvertTo-Json -Depth 100 -Compress) + "`n") | ||
| [System.IO.File]::Replace($retryPath, $SourcePath, $backupPath) |
There was a problem hiding this comment.
Clear read-only source before replacing partial retries
On Windows, when the payload file itself has the read-only attribute, File.Replace throws even though the parent directory was made writable; the catch then retains the original payload, so the next uploader run replays parts already accepted by the server. Fresh evidence after the earlier partial-retry fix is that Remove-PayloadFile clears the file's IsReadOnly flag, while this replacement path only clears that flag on the directory. Clear the source file attribute before replacing it so only failed parts remain.
AGENTS.md reference: AGENTS.md:L256-L259
Useful? React with 👍 / 👎.
Summary
.topttargets while preserving the existing manifest-driven dynamic mode.toptruns ignore ordinary outputs while retaining strict.toptmetadata checksOrchestrion 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, or upload failure.
Repository transitions reset Orchestrion for non-Go runtime data tools. The Go linker also recognizes a Test Optimization synthetic test main and does not route that already generated source through Orchestrion again. This keeps the recursive resolver available where required without applying it to unrelated tool binaries.
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.
The stdlib builder never exposes its declared cache TreeArtifact as a writable GOCACHE. Plain builds leave it empty, while Orchestrion builds publish only sorted, manifested
*-darchives from an action-private scratch cache. This removes nondeterministic Go cache metadata and scratch entries from Bazel outputs. Content-addressing the published archives also prevents environment-sensitive Go action IDs from changing declared output paths for byte-identical archives.Target-scoped activation keeps the ordinary target fully ordinary and makes the optimized target own the Orchestrion transition. Static consumers can register services explicitly and expose
<name>.toptclones without replacing the dynamic manifest path used by other consumers. Runtime doctor/uploader arguments select only the executed.toptlabels and their keyed service contexts, so the static repositories remain lazy and independently cacheable.Validation
python3 tools/dev/generate_rules_go_fork_maps.py --checkpython3 tools/dev/materialize_rules_go_fork.py check --allpython3 tools/dev/check_release_archive_contents.pypython3 tools/dev/verify_rules_go_profiles.py --public-denylist tools/dev/private_leak_public_denylist.txt --bazel <macOS Bazel wrapper>v2.9.1-rc.3offline-proxy coverage./bazelw test //... --noexperimental_split_xml_generation(490 tests passed)./bazelw test //tools/tests/python:python_tools_test --noexperimental_split_xml_generation(286 tests passed)./bazelw test //modules/go/tools/dd_topt_go_bootstrap:bootstrap_test --noexperimental_split_xml_generation.toptinvocations and real uploads of failed-test payloads to their mock backenda366f97142607c974d4cb848128614cc6d0f3378: all 50 checks passed