cgroups enforce test-group sizes without ability to control
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
This is a continuation of a break-out discussion from https://github.com/bazelbuild/bazel/issues/26062#issuecomment-2997970694
Relevant parts of the discussion:
I noticed cgroups now also enforce test group sizes; that was surprising to me. I kind of wanted to turn off or change the sizes as we transition to cgroups (so many of our "small" tests exceed the memory limit but could not find an easy way).
I want to still support cgroup limits but just not the test size resource limits.
1. `getLocalResourceUsage` includes defaults for test sizes https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/test/TestTargetProperties.java#L206
2. this information is passed into the `Spawn` via https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java#L131
3. If the mnemonic is set, then the `LinuxSandboxSpawnRunner` uses the local resource usage https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L317
I wanted to support the `tags` like `resources:memory:20` but enabling this also enables the enforcement of the test sizes as per the previous bullet points.
Contributor guide
Assessment
This issue has not been assessed yet.