Repository navigation
Fix builtin action resource set regression introdued by #29284 - #30747
Silic0nS0ldier wants to merge 3 commits into
Conversation
|
A followup to this PR is planned that will remove EDIT: Removal composed better than expected. Addressing here. |
|
@bazel-io fork 9.3.0 |
|
Let me know when you want me to take a look. I'm also looking into this now, we might need to fix more |
|
What are the steps to make this non-draft? |
3c740c7 to
f076d29
Compare
|
Is this ready for review? (I assumed it was not since it has the "draft" tag") |
|
@Silic0nS0ldier Is this ready for review? It's currentlly in draft mode. |
|
Sorry for the delay. PR was raised in a rush (I had other responsibilities to attend to) so I'd not scrutinized some parts as much as others (hence draft). I've now had the chance to fully look it over (and action feedback), so this is now ready for review. |
lberki
left a comment
There was a problem hiding this comment.
Thanks! Looks very reasonable.
|
thanks for fixing! |
…build#29284 (https… (bazelbuild#31136) …://github.com/bazelbuild/pull/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 <!-- Thank you for contributing to Bazel! Please read the contribution guidelines: https://bazel.build/contribute --> ### Description <!-- Please provide a brief summary of the changes in this PR. --> ### Motivation <!-- Why is this change important? Does it fix a specific bug or add a new feature? If this PR fixes an existing issue, please link it here (e.g. "Fixes bazelbuild#1234"). --> ### Build API Changes <!-- Does this PR affect the Build API? (e.g. Starlark API, providers, command-line flags, native rules) If yes, please answer the following: 1. Has this been discussed in a design doc or issue? (Please link it) 2. Is the change backward compatible? 3. If it's a breaking change, what is the migration plan? --> No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes <!-- If this is a new feature, please add 'RELNOTES[NEW]: <description>' here. If this is a breaking change, please add 'RELNOTES[INC]: <reason>' here. If this change should be mentioned in release notes, please add 'RELNOTES: <reason>' here. --> RELNOTES: None Commit bazelbuild@af88dde Co-authored-by: Jordan Mele <[email protected]>
Description
Fixes a regression introduced by #29284 where local resource specifications (
resources:*:*,cpu:*andmemory:*) affected builtin actions such as;test.xmlgenerator actionAlso moves resource overriding into
ResourceSetOrBuilderto reduce the risk of drift betweenBaseSpawnandSimpleSpawn.Motivation
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.xmlgeneration, 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 wheretest.xmlgeneration scheduling is not differentiated from spawn running in UI and potentially elsewhere).Build API Changes
No
Checklist
Release Notes
RELNOTES: Fix for regression in #29284 that caused select builtin actions to incorrectly inherit resource set overrides.