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

[7.4.0] Do no crash if a requested resource is not available #23868

Closed
bazel-io opened this issue Oct 4, 2024 · 3 comments
Closed

[7.4.0] Do no crash if a requested resource is not available #23868

bazel-io opened this issue Oct 4, 2024 · 3 comments

Comments

@bazel-io
Copy link
Member

bazel-io commented Oct 4, 2024

Forked from #23541

@bazel-io bazel-io added this to the 7.4.0 release blockers milestone Oct 4, 2024
@bazel-io
Copy link
Member Author

bazel-io commented Oct 8, 2024

Cherry-pick was attempted but there were merge conflicts in the following file(s). Please resolve manually.

src/main/java/com/google/devtools/build/lib/actions/BUILD
src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java
src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java

cc: @bazelbuild/triage

@iancha1992
Copy link
Member

Cherry-pick was attempted but there were merge conflicts in the following file(s). Please resolve manually.

src/main/java/com/google/devtools/build/lib/actions/BUILD src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java

cc: @bazelbuild/triage

cc: @fmeum @meisterT

@fmeum
Copy link
Collaborator

fmeum commented Oct 9, 2024

#23911

github-merge-queue bot pushed a commit that referenced this issue Oct 9, 2024
Before:
```
Caused by: java.util.NoSuchElementException: Resource foo is not tracked in this resource set.
    at com.google.devtools.build.lib.actions.ResourceManager.assertExtraResourcesTracked(ResourceManager.java:499)
    at com.google.devtools.build.lib.actions.ResourceManager.areResourcesAvailable(ResourceManager.java:540)
```
After:
```
ERROR: src/test/java/com/google/devtools/build/lib/actions/BUILD:102:10: Testing //src/test/java/com/google/devtools/build/lib/actions:ActionsTests failed: Resource foo is not being tracked by the resource manager. Available resources are: cpu, memory
```

Fixes #19572

Closes #23541.

PiperOrigin-RevId: 682282327
Change-Id: Ifdff5f85de9e45ac119c2a2cfd161c054a722546 
(cherry picked from commit e5ab94b)

Closes #23868

Co-authored-by: Alessandro Patti <ale812@yahoo.it>
@keertk keertk closed this as completed Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants