bazelstarlark

Does bazel theoretically allow http requests inside bazel build rules?


Is there any possibility to write http requests in starlark build rule or via some executable invoked by ctx.actions.run ?

I know it can be done with bazel test (inside test runners), but can it be done in build phase? I know this goes against network sandboxing (but lets say we turn it off)


Solution

  • You can set execution_requirements to include requires-network.

    Some notes: