Repository navigation
Add configurable log levels for Test Optimization tooling - #271
Merged
Merged
Conversation
There was a problem hiding this comment.
Please try again by commenting @autotest review.
Member
Author
|
@autotest review |
There was a problem hiding this comment.
Please try again by commenting @autotest review.
gnufede
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
The uploader currently prints one INFO message for every cached or non-current test output it skips. On a large workspace, those paths bury the useful results. There is also no single way to reduce diagnostics across metadata sync, doctor, and the uploader.
This PR adds
DD_TEST_OPTIMIZATION_LOG_LEVELand moves individual cached-output paths to DEBUG. INFO keeps a count of skipped outputs and the upload summary.ERRORWARNINFODEBUGBehavior
The setting covers metadata-sync diagnostics, doctor, schema validation, and the Python, Bash, and PowerShell uploaders. Values are case-insensitive. An explicit level overrides the existing debug attributes, environment switches, and uploader
--debug; those options still work when the new variable is unset. Invalid values fail with a configuration error.For example:
The variable controls human-readable diagnostics on their existing streams. It does not filter JSON reports or helper return values, change payload selection or uploads, or change exit codes. Errors remain visible at every level, and existing secret redaction stays in place.
It is not forwarded to tests or build actions. Changing a tracked repository environment value can still cause Bazel to reevaluate and refetch metadata; the regression test checks that identical backend responses produce identical test inputs at all four levels. Post-test telemetry request timings are excluded from that comparison. Uploader analysis-time messages are removed so runtime logging does not require an environment-dependent analysis setting.
Bazel output, compiler/Orchestrion subprocess diagnostics, explicit bootstrap probe records, and test/tracer logs retain their own controls. There are no GitLab folding or consumer-repository changes in this PR.
Validation
runpystartup is covered too.rules_test_optimization_testspassed: disabled mode, ordinary and optimized targets, doctor, static services, and uploads to the mock backend.git diff --checkpassed.The full local Bash harness reached its guided Go bootstrap fixture but stopped because
dd-trace-go v2.9.1did not exposeinternal/civisibility/integrations/gotesting. The same failure reproduces in a separate, unmodified worktree at base commit42caa5c, so it is not introduced by this change. The preceding logging and uploader scenarios passed. The full local harness is not claimed as green; the complete Ubuntu harness passed in PR CI.Release readiness