Repository navigation
go: preserve target compatibility on payload helpers - #270
Merged
Merged
Conversation
anmarchenko
approved these changes
Sep 23, 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.
Why
Marking the generated Go payload helpers
manualkept them out of wildcardbuildandtestruns, but did not protectcquery //....A consumer can make its optimized test incompatible when Test Optimization is
disabled. The macro already forwards that
target_compatible_withvalue tothe public wrapper and hidden raw test, but not to the payload selector or
metadata helper.
cquerycan select those helpers independently and fail whilevalidating their disabled metadata repository.
Change
Forward the caller's
target_compatible_withunchanged to both helpers.The production change is two lines; lists,
select(...), and composedconstraints keep their existing meaning.
build/testquerymanualis not a query filter.cquerybuild/testThe consumer still owns the compatibility condition. This PR adds no enable
flag, environment variable, transition, or target-discovery query. Compatible
targets retain the existing repository enablement and identity checks.
Regression coverage
omitted, empty, literal, selected, and composed constraints, plus the disabled
export's raw-test behavior.
cqueryagainst a disabledrepository, checks every returned configuration, exercises explicit-target
failures, and verifies that opening the compatibility gate preserves strict
metadata validation.
manualandcompatibility, including what
queryandcqueryreturn.Validation
cqueryfailed with
selected Test Optimization repository ... is disabled.assertions; the command-level regression passed.
git diff --checkpassed._testsBzlmod monorepo runner passed against a local archive of thischange: disabled mode, fresh/cached tests, doctor, mock uploads, and the full
static
.toptE2E. The ordinary uploader pass sent 8 test payloads and 12telemetry files successfully to the fixture server.
_testsWORKSPACE monorepo runner is blocked before the enabled tests:GoSyntheticTestmainHelperscannot findgithub.com/DataDog/dd-trace-go/v2/internal/civisibility/integrations/gotestingin
v2.9.1. The same runner fails with the same error against unmodified rulemain (
42caa5c). This PR does not change the toolchain or dependency pins towork around that separate failure.