Skip to content

[8.6.0] Add short_uncached and detailed_uncached options to --test_summary#28343

Merged
iancha1992 merged 1 commit intobazelbuild:release-8.6.0from
Silic0nS0ldier:uncached-test-summary-options_8.6.0
Jan 20, 2026
Merged

[8.6.0] Add short_uncached and detailed_uncached options to --test_summary#28343
iancha1992 merged 1 commit intobazelbuild:release-8.6.0from
Silic0nS0ldier:uncached-test-summary-options_8.6.0

Conversation

@Silic0nS0ldier
Copy link
Contributor

These options exclude cached test results from the summary.

With short (default)

vscode ➜ /workspaces/bazel/bazel (uncached-test-summary-options) $ bazel-bin/src/bazel test //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests --test_filter=shortUncachedOption_allPassed
INFO: Analyzed target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests up-to-date:
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests.jar
INFO: Elapsed time: 0.770s, Critical Path: 0.00s
INFO: 1 process: 1 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
//src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (cached) PASSED in 2.8s

Executed 0 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.

With short_uncached

vscode ➜ /workspaces/bazel/bazel (uncached-test-summary-options) $ bazel-bin/src/bazel test //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests --test_filter=shortUncachedOption_allPassed --test_summary=short_uncached
INFO: Analyzed target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests up-to-date:
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests.jar
INFO: Elapsed time: 0.264s, Critical Path: 0.00s
INFO: 1 process: 1 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action

Executed 0 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.

Resolves #28062

RELNOTES: Reporting of cached test results can now be suppressed with --test_summary=short_uncached or --test_summary=detailed_uncached.

Backport of #28290.

…ry` (bazelbuild#28290)

These options exclude cached test results from the summary.

With `short` (default)
```
vscode ➜ /workspaces/bazel/bazel (uncached-test-summary-options) $ bazel-bin/src/bazel test //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests --test_filter=shortUncachedOption_allPassed
INFO: Analyzed target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests up-to-date:
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests.jar
INFO: Elapsed time: 0.770s, Critical Path: 0.00s
INFO: 1 process: 1 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
//src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (cached) PASSED in 2.8s

Executed 0 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
```

With `short_uncached`
```
vscode ➜ /workspaces/bazel/bazel (uncached-test-summary-options) $ bazel-bin/src/bazel test //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests --test_filter=shortUncachedOption_allPassed --test_summary=short_uncached
INFO: Analyzed target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests up-to-date:
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests
  bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests.jar
INFO: Elapsed time: 0.264s, Critical Path: 0.00s
INFO: 1 process: 1 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action

Executed 0 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
```

Resolves bazelbuild#28062

RELNOTES: Reporting of cached test results can now be suppressed with `--test_summary=short_uncached` or `--test_summary=detailed_uncached`.

Closes bazelbuild#28290.

PiperOrigin-RevId: 857282700
Change-Id: Iaea823462344a6118bd5a112d734df5c35a1e152
@Silic0nS0ldier Silic0nS0ldier requested a review from a team as a code owner January 20, 2026 13:43
@github-actions github-actions bot added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Jan 20, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces short_uncached and detailed_uncached options for the --test_summary flag, allowing users to suppress cached test results from the summary. The implementation is clean and well-structured, particularly the refactoring in TerminalTestResultNotifier to handle the new options. The accompanying test changes are excellent, with a significant improvement in readability and maintainability through the use of a TestSummarySpec builder. New unit and integration tests thoroughly cover the new functionality. The documentation for the related command-line options has also been improved. Overall, this is a high-quality change with no issues found.

@Silic0nS0ldier Silic0nS0ldier changed the title [8.6.0] Add short_uncached and detailed_uncached options to --test_summaary [8.6.0] Add short_uncached and detailed_uncached options to --test_summary Jan 20, 2026
@Silic0nS0ldier
Copy link
Contributor Author

CI timeout: https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/31378/steps/canvas?jid=019bdba5-5ed5-40f5-84d4-454373c4ddbd#019bdba5-5ed5-40f5-84d4-454373c4ddbd

//src/test/java/com/google/devtools/build/lib/skyframe:SourceDirectoryIntegrationTest TIMEOUT in 3 out of 3 in 60.1s

appears to be unrelated.

Copy link
Member

@meisterT meisterT left a comment

Choose a reason for hiding this comment

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

Clicked retry on the timeout

@iancha1992 iancha1992 added this pull request to the merge queue Jan 20, 2026
Merged via the queue into bazelbuild:release-8.6.0 with commit 88832ab Jan 20, 2026
47 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jan 20, 2026
@iancha1992 iancha1992 added this to the 8.6.0 release blockers milestone Jan 20, 2026
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Feb 27, 2026
### What does this PR do?
Bump `.bazelversion` from 8.5.1 to 8.6.0.

### Motivation
Selected changes between 8.5.1 and 8.6.0:
- Fix visibility for implicit deps of parent rules (bazelbuild/bazel#28722)
- Force rctx.{download_and,}extract to create user-readable files (bazelbuild/bazel#28551)
- Fix disk cache failures on concurrent read-write access on Windows (bazelbuild/bazel#28529)
- Add a target_type argument to ctx.actions.symlink (bazelbuild/bazel#28538)
- Compensate for Windows filesystems lacking junction support (bazelbuild/bazel#28367)
  (our fix)
- Add short_uncached and detailed_uncached options to --test_summary (bazelbuild/bazel#28343)
- Add --experimental_strict_repo_env option (bazelbuild/bazel#28189)
- Make overlaid files executable in http_archive (bazelbuild/bazel#28277)
- Add bazel mod show_repo --all_repos and --all_visible_repos (bazelbuild/bazel#28012)
- Enable --experimental_retain_test_configuration_across_testonly (bazelbuild/bazel#28115)
- Add option to continue with local execution if remote cache is unavailable (bazelbuild/bazel#28001)
rdesgroppes added a commit to DataDog/datadog-agent that referenced this pull request Feb 27, 2026
### What does this PR do?
Bump `.bazelversion` from 8.5.1 to 8.6.0.

### Motivation
Selected changes between 8.5.1 and 8.6.0:
- Fix visibility for implicit deps of parent rules (bazelbuild/bazel#28722)
- Force rctx.{download_and,}extract to create user-readable files (bazelbuild/bazel#28551)
- Fix disk cache failures on concurrent read-write access on Windows (bazelbuild/bazel#28529)
- Add a target_type argument to ctx.actions.symlink (bazelbuild/bazel#28538)
- Compensate for Windows filesystems lacking junction support (bazelbuild/bazel#28367)
  (our fix)
- Add short_uncached and detailed_uncached options to --test_summary (bazelbuild/bazel#28343)
- Add --experimental_strict_repo_env option (bazelbuild/bazel#28189)
- Make overlaid files executable in http_archive (bazelbuild/bazel#28277)
- Add bazel mod show_repo --all_repos and --all_visible_repos (bazelbuild/bazel#28012)
- Enable --experimental_retain_test_configuration_across_testonly (bazelbuild/bazel#28115)
- Add option to continue with local execution if remote cache is unavailable (bazelbuild/bazel#28001)
gh-worker-dd-mergequeue-cf854d bot pushed a commit to DataDog/datadog-agent that referenced this pull request Feb 27, 2026
### What does this PR do?
Bump `bazel` version from 8.5.1 to 8.6.0 to benefit from a series of improvements and fixes.
Ours (bazelbuild/bazel#28367) allows to re-enable "convenience symlinks" for Windows users and makes [`path.realpath`](https://bazel.build/rules/lib/builtins/path#realpath) succeed when sharing a folder between a Linux host and a Windows VM.

### Motivation
Selected changes between 8.5.1 and 8.6.0:
- 💡 bazelbuild/bazel#28001
- bazelbuild/bazel#28012
- 💡 bazelbuild/bazel#28189
- bazelbuild/bazel#28277
- bazelbuild/bazel#28343
- 🐕 bazelbuild/bazel#28367
- bazelbuild/bazel#28529
- bazelbuild/bazel#28538
- bazelbuild/bazel#28551
- bazelbuild/bazel#28722

Co-authored-by: regis.desgroppes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants