Should Bazel extract the container-image for remote execution?

89 views
Skip to first unread message

Fredrik Medley

unread,
May 6, 2022, 5:39:15 AM5/6/22
to bazel-discuss
I'm about to implement support for the 'container-image' platform property to Buildbarn. The idea is to patch the input root with the whole content of the container image. We realised that maybe Bazel should do that instead.

Implementing it in Bazel would require a rule to download the container and list the content, possibly done remotely. Another variant is to build a container using rules_docker and then specify that as 'container-image' in a toolchain and/or platform. When running remote-execution, then all the files in the container would be listed in the input root (making the Merkle tree calculation slow unless caching).

Is this in the scope for what Bazel should be doing or should we just stick to the current 'container-image' platform property instead?

Best regards,
Fredrik

Fredrik Medley

unread,
May 10, 2022, 11:33:02 AM5/10/22
to bazel-discuss
The discussion about the remote execution API has been moved into https://groups.google.com/g/remote-execution-apis/c/1rzZxfY34vI.

For implementation in Bazel, I think two fields like `remote_input_root` and `action_input_directory` should be enough. Now, docker containers also specifies environment variables, so it is probably best to provide all the information through a specific `ContainerImageProvider` or something similar.

/Fredrik
Reply all
Reply to author
Forward
0 new messages