Skip to content

[9.3.0] Fix builtin action resource set regression introdued by #29284 (https… - #31136

Merged
iancha1992 merged 1 commit into
bazelbuild:release-9.3.0from
iancha1992:cp30748
Sep 15, 2026
Merged

iancha1992 merged 1 commit into
bazelbuild:release-9.3.0from
iancha1992:cp30748

Conversation

@iancha1992

Copy link
Copy Markdown
Member

…://github.com//pull/30747)

Fixes a regression introduced by #29284 where local resource specifications (resources:*:*, cpu:* and memory:*) affected builtin actions such as;

  • test.xml generator action
  • C spawn include scanner

Also moves resource overriding into ResourceSetOrBuilder to reduce the risk of drift between BaseSpawn and SimpleSpawn.

Deriving local resource sets in these builtin spawns causes otherwise lightweight tasks to backup (and temporarily block) other larger spawns due to them taking an unreasonably high number of resource permits. In the case of test.xml generation, when resources are exhausted it can cause tests to visibly appear as if they are running for much longer than they really are (exacerbation of an existing issue where test.xml generation scheduling is not differentiated from spawn running in UI and potentially elsewhere).

No

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

RELNOTES: Fix for regression in #29284 that caused select builtin actions to incorrectly inherit resource set overrides.

Closes #30747.

PiperOrigin-RevId: 981231820
Change-Id: If2dd7b33fefca8ebe2ba4866cc87bc7316230fd1

Description

Motivation

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

Commit af88dde

 (bazelbuild#30747)

Fixes a regression introduced by bazelbuild#29284 where local resource specifications (`resources:*:*`, `cpu:*` and `memory:*`) affected builtin actions such as;
- `test.xml` generator action
- C spawn include scanner

Also moves resource overriding into `ResourceSetOrBuilder` to reduce the risk of drift between `BaseSpawn` and `SimpleSpawn`.

Deriving local resource sets in these builtin spawns causes otherwise lightweight tasks to backup (and temporarily block) other larger spawns due to them taking an unreasonably high number of resource permits. In the case of `test.xml` generation, when resources are exhausted it can cause tests to visibly appear as if they are running for much longer than they really are (exacerbation of an existing issue where `test.xml` generation scheduling is not differentiated from spawn running in UI and potentially elsewhere).

No

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

RELNOTES: Fix for regression in bazelbuild#29284 that caused select builtin actions to incorrectly inherit resource set overrides.

Closes bazelbuild#30747.

PiperOrigin-RevId: 981231820
Change-Id: If2dd7b33fefca8ebe2ba4866cc87bc7316230fd1
@iancha1992
iancha1992 requested a review from a team as a code owner September 14, 2026 20:23
@github-actions github-actions Bot added team-Performance Issues for Performance teams team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Sep 14, 2026
@iancha1992
iancha1992 marked this pull request as draft September 14, 2026 20:24
@iancha1992 iancha1992 changed the title Fix builtin action resource set regression introdued by #29284 (https… [9.3.0] Fix builtin action resource set regression introdued by #29284 (https… Sep 14, 2026
@iancha1992
iancha1992 requested a review from lberki September 14, 2026 20:37
@iancha1992

Copy link
Copy Markdown
Member Author

Could you please review the changes in:
src/main/java/com/google/devtools/build/lib/actions/BUILD
src/main/java/com/google/devtools/build/lib/actions/SimpleSpawn.java
src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java
src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
src/test/java/com/google/devtools/build/lib/actions/SpawnTest.java

Thank you!

@iancha1992
iancha1992 marked this pull request as ready for review September 14, 2026 20:37
@iancha1992
iancha1992 added this pull request to the merge queue Sep 14, 2026
Merged via the queue into bazelbuild:release-9.3.0 with commit 4611dd7 Sep 15, 2026
43 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Performance Issues for Performance teams team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants