Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Currently, the resource_set attribute of `ctx.actions.run` (an similar) can only be set to a function returning a dictionary with a limited set of keys/resources (mem, cpu, and local_test). This change removes this restriction, allowing any resource know to the resource manager. RELNOTES: `resource_set` function can now reference custom resources Closes bazelbuild#27950
0dff987 to
a47a795
Compare
|
Ok, here is the code for #27950. Still missing:
|
|
Unit tests could be added to https://cs.opensource.google/bazel/bazel/+/master:src/test/java/com/google/devtools/build/lib/starlark/StarlarkRuleContextTest.java;l=822?q=resource_set&ss=bazel%2Fbazel, which already has a few. |
|
I don't know what is the deal with the |
|
@gregestren Friendly ping, although I assume this has some overlap with local exec (@meisterT for your opinion on this) |
|
I think this is the right approach, but would appreciate a look from someone owning the Build API |
Currently, the resource_set attribute of
ctx.actions.run(an similar) can only be set to a function returning a dictionary with a limited set of keys/resources (mem, cpu, and local_test). This change removes this restriction, allowing any resource known to the resource manager.RELNOTES:
resource_setfunction can now reference custom resourcesCloses #27950