rules_go: make instrumented artifacts deterministic - #251
Merged
Conversation
There was a problem hiding this comment.
More details
The change removes variable paths and build IDs only from Test Optimization outputs. The check compares action keys and all declared output bytes for each affected action type.
🤖 Datadog Autotest · Commit b1741e5 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
This comment has been minimized.
This comment has been minimized.
gnufede
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GoStdlib,GoSyntheticTestmainHelpers, testmainGoCompilePkg, andGoLinkrules_goversion on Linux x86-64 and ARM64Why
Reprise showed stable-looking Bazel actions whose declared outputs still differed between cold roots. The differences came from temporary module-cache paths in Go and assembly objects plus action-specific package build IDs. Reusing those outputs through remote cache was therefore unsafe even though the build graph itself was stable.
The fix is limited to Test Optimization builds. Plain stdlib compilation and ordinary assembler invocations retain their previous behavior, and no remote-download or test-execution policy changes are included.
Validation
v0.60.0,v0.61.1,v0.62.0, andv0.63.0; the first three parallel commands were interrupted only during temporary-directory cleanup after reportingverifiedpython3.12 -m unittest discover -s tools/tests/python -p test_rules_go_profile_tools.py(14 passed)./bazelw test //tools/tests/python:python_tools_test --noexperimental_split_xml_generation --test_env=PYTHON=/Users/tony.redondo/.pyenv/shims/python3.12(504 passed, 1 platform skip)compilepkg_testandorchestrion_testpassed for all four vendored forks./bazelw test //... --noexperimental_split_xml_generation --test_env=PYTHON=/Users/tony.redondo/.pyenv/shims/python3.12 --java_runtime_version=remotejdk_21(491 passed)rules_go v0.63.0, including disabled mode, instrumented tests, cache replay, payload validation, doctor, uploader, and static.topttargetsgit diff --checkpassed