Skip to content

[9.2.0] Truncate "Detecting cycles with roots" log to avoid huge java.log entries (https://github.com/bazelbuild/bazel/pull/29380)#29413

Open
bazel-io wants to merge 1 commit intobazelbuild:release-9.2.0from
bazel-io:cp29380-9.2.0-220531
Open

[9.2.0] Truncate "Detecting cycles with roots" log to avoid huge java.log entries (https://github.com/bazelbuild/bazel/pull/29380)#29413
bazel-io wants to merge 1 commit intobazelbuild:release-9.2.0from
bazel-io:cp29380-9.2.0-220531

Conversation

@bazel-io
Copy link
Copy Markdown
Member

Description

When a build has tens or hundreds of thousands of top-level keys, the full cycleRoots collection could be serialized into a single log line. Cap the logged sample at 100 entries and include the total count.

Motivation

Our java.log grew to ~200MB in some cases due to this single log for builds with pre-selected targets.

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Closes #29380.

PiperOrigin-RevId: 906371168
Change-Id: I201375f98c81a311624b3082bf9fd029f36d1923

Commit b6088e3

…ries (bazelbuild#29380)

### Description

When a build has tens or hundreds of thousands of top-level keys, the full cycleRoots collection could be serialized into a single log line. Cap the logged sample at 100 entries and include the total count.

### Motivation
Our java.log grew to ~200MB in some cases due to this single log for builds with pre-selected targets.

### Build API Changes
No

### Checklist

- [x] I have added tests for the new use cases (if any).
- [x] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: None

Closes bazelbuild#29380.

PiperOrigin-RevId: 906371168
Change-Id: I201375f98c81a311624b3082bf9fd029f36d1923
@bazel-io bazel-io requested a review from a team as a code owner April 27, 2026 22:06
@bazel-io bazel-io added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 27, 2026
@bazel-io bazel-io requested review from fmeum and meisterT April 27, 2026 22:06
@iancha1992 iancha1992 removed the request for review from fmeum April 27, 2026 22:16
@iancha1992 iancha1992 enabled auto-merge April 27, 2026 22:16
@iancha1992 iancha1992 added the team-Performance Issues for Performance teams label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Performance Issues for Performance teams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants