Open Ryang20718 opened 4 months ago
@AlessandroPatti
@Ryang20718 @fmeum I am unable to repro this issue with the following commands
pushd $(mktemp -d)
touch MODULE.bazel
echo 'sh_test(name="a",srcs=["test.sh"],tags=["resources:foo:1"])' >> BUILD.bazel
echo 'sh_test(name="b",srcs=["test.sh"],tags=["resources:foo:1"])' >> BUILD.bazel
echo 'sleep 10' > test.sh
chmod u+x test.sh
USE_BAZEL_VERSION=7.1.2 bazelisk test //... --spawn_strategy=local --local_resources=foo=1 --disk_cache= --remote_cache= --nocache_test_results
The output looks like
[9 / 11] 2 actions, 1 running
Testing //:a; 6s local
[Sched] Testing //:b; 6s
Maybe related to https://github.com/bazelbuild/bazel/issues/19709?
@AlessandroPatti
we have --local_test_jobs=8
which seems to take precedence over the local_resources?
But yeah, with that removed it works!. I think that makes sense, if we tag all of our jobs with resources, probably shouldn't be using --local_test_jobs
I think that this interaction is still pretty confusing - could you reopen?
Description of the bug:
I expect the
resource:<name>:amount
tag to restrict test concurrencyWhich category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
sh_test( name = "a", srcs = ["test.sh"], tags = ["resources:foo:1"], )
sh_test( name = "b", srcs = ["test.sh"], tags = ["resources:foo:1"], )
assuming this is in the root dir, if I run
bazel test //... --local_resources=foo=1
, I'd expect test a and b to run serially, but currently they run in parallelWhich operating system are you running Bazel on?
ubuntu 20.04
What is the output of
bazel info release
?release 7.1.2
If
bazel info release
returnsdevelopment 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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
https://github.com/bazelbuild/bazel/issues/18153
Any other information, logs, or outputs that you want to share?
No response