[8.7.0] Make local scheduling respect exec_properties resources (#29284)#17
Open
alexeagle wants to merge 1 commit into
Open
[8.7.0] Make local scheduling respect exec_properties resources (#29284)#17alexeagle wants to merge 1 commit into
alexeagle wants to merge 1 commit into
Conversation
…9284) Previously only tests supported a target level way to hint the resources required by the target. This is done with `tags = ["resources:cpu:10"]`. Now this syntax is supported for normal actions as well, and both normal actions and test actions support this same format in `exec_properties` with `exec_properties = {"resources:cpu": "10"}`, or exec_group specific versions like: `exec_properties = {"cpp_link.resources:cpu": "10"}`. Work towards bazelbuild#19679 (doesn't handle a default flag currently) Work towards bazelbuild#17368 Work towards bazelbuild#25770 Fixes bazelbuild#6477 Fixes bazelbuild#19805 Fixes bazelbuild#25195 Fixes bazelbuild#25792 Fixes bazelbuild#25793 RELNOTES[inc]: `exec_properties` now respects `resources:cpu` and `resources:memory` for local resource estimation. Closes bazelbuild#29284. PiperOrigin-RevId: 906919034 Change-Id: Ia9effd70a71f4e1f42021d945cdc7b1d9d52bbf6
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.
Summary
Cherry-picks bazelbuild#29284 onto
8.7.0-figmaso local resource scheduling honorsexec_propertiesresource hints (e.g.exec_properties = {"resources:cpu": "10"}) for all actions, not just tests via tags.ExecutionRequirements.parseResources()andResourceSet.withResourceOverrides()BaseSpawnandSimpleSpawn.getLocalResources()TestTargetProperties)BaseSpawn.javaandSimpleSpawn.javaby keeping the 8.7.0 caching pattern and layering onwithResourceOverridesFixes bazelbuild#6477, bazelbuild#19805, bazelbuild#25195, bazelbuild#25792, bazelbuild#25793.
Note: This is a behavior change (
RELNOTES[inc]):exec_propertiesresources now affect local scheduling, and invalid/empty resource values fail the build instead of being silently ignored.Test plan
bazel test //src/test/java/com/google/devtools/build/lib/actions:ActionsTestsbazel test //src/test/java/com/google/devtools/build/lib/rules/test:TestRulesTests --test_filter=TestTargetPropertiesTestexec_properties = {"resources:cpu": "N"}on a representative genrule/action target