Closed hofbi closed 4 months ago
Hi Markus, thanks for reaching out. I suspect some Python code in e.g. gensmg uses something like dirname(__file__)/path/to/some.template
to get a template. This escapes the sandbox and it's not going to work on RBE :) The combination of your suggestions 1. and 2. should fix the issue. If it works, please feel free to open a PR.
TBH, I neglected this project as I am working on rules_ros2 repo (that also has quite some active users). Are you actively using this rules_ros repo or just evaluating at the moment?
Fixed via https://github.com/mvukov/rules_ros/pull/7.
We identified some uncertainties in rules_ros while working on remote execution. We were also able to make them locally reproducible using the https://github.com/aspect-build/rules_py:
If I run
bazel build @ros_comm//:roscpp_lib
locally, this works fine. Now if I switch this load statement inrepositories/gencpp.BUILD.bazel
formload("@rules_python//python:defs.bzl", "py_binary", "py_library")
to the more stricter sandboxedload("@aspect_rules_py//py:defs.bzl", "py_library", "py_binary")
, I getNow here a few guesses to help solving this issue
args.add("-e", ctx.attr.data.files.to_list()[0].dirname)
) in here, since the default template dir defined in gemmsg seems to be wrong.Any help/hint would be appreciated.