Open manuelnaranjo opened 1 day ago
@manuelnaranjo My understanding is that resource allocation in Bazel works very different for local vs remote execution. I forget the details, but I think it has to do with execution_requirements
for remote resource usage and tags for local usage for tests. For build actions, the rule author can use the resource_set
API to try to guide Bazel.
Since this ruleset doesn't have any expensive build actions, I don't think there's much point in using resource_set
, and you should be able to just use tags
or execution_requirements
to control resource usage.
It's totally possible that I'm missing something, could you help me understand what support you were thinking was needed from the rules?
I'm thinking more along the lines the itest_service entries specify how much RAM and CPU is needed and then I service_test adds it all up. But I guess that's not possible
There's two challenges with that:
Do you want to try to prototype something in a fork and let me know how it works for you?
@dzbarsky fair point, I think you're right, I looked into the actions DefaultInfo and RunEnvironmentInfo and DefaultInfo and nothing allows to set that from inside the rule handler, I guess it's something I could help in documenting though, I would say CPU limits are not as bad as memory limits, let's say you want to use Cassandra or Elastic Search, this java services are very memory hungry and you don't want your resources to starve and end with kernel pagination or OOM
First of all let me say that the rationale behind this project is incredible! I've been watching at testcontainers for a while, and even though it's great from the developer perspective it's not so compelling from the management side. A nice feature of Bazel is the scheduler and the fact that you can rely on it doing a decent job to keep your resources utilized but not burned out, how does the rules deal with this? I think it doesn't at all, I don't see any tags like cpu= mem=, am I correct to assume that's the case? Has anyone tried to do this? I wouldn't mind see if I can manage some time for this, but before I jump I rather ask