Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add resource_set support to repository_ctx.execute #23721

Open
dgoldstein0 opened this issue Sep 23, 2024 · 0 comments
Open

add resource_set support to repository_ctx.execute #23721

dgoldstein0 opened this issue Sep 23, 2024 · 0 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Local-Exec Issues and PRs for the Execution (Local) team team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: feature request

Comments

@dgoldstein0
Copy link

Description of the feature request:

bazel actions have a concept of resource_set that allows bazel's scheduler to know roughly how much cpu or memory an action may take and avoid overcommitting resources accordingly. This feature would be useful in repository_ctx.execute as well.

Which category does this issue belong to?

Local Execution, Rules API

What underlying problem are you trying to solve with this feature?

repository_rules may be used to do compute heavy tasks, e.g. invoking 3rd party build systems or package managers. These may end up using a lot of cpu or memory, so having bazel know there are limits to the parallelization possible would help avoid resource starvation scenarios that can lead to flakey builds and livelock. My company has observed such flakey builds in our production build environment, and while we've worked around it with some options that help reduce the resource intensity, we could still end up back in that situation in the future.

Which operating system are you running Bazel on?

linux ubuntu 22.04

What is the output of bazel info release?

release 6.1.0-1c2df03733503215490047c398d25fe5b5553a0e

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@github-actions github-actions bot added team-Local-Exec Issues and PRs for the Execution (Local) team team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts labels Sep 23, 2024
@coeuvre coeuvre added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Local-Exec Issues and PRs for the Execution (Local) team team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants