rules_buf icon indicating copy to clipboard operation
rules_buf copied to clipboard

Fix remote execution

Open smertnik3sh opened this issue 9 months ago • 5 comments
trafficstars

When you use remote execution, your "host" and "execution" platforms may differ. For example you can run the build on a remote Linux cluster from your Mac. In this case, choosing binary files like here is incorrect (Linux agent trying to run Mac binary).

In this patch, repositories with binaries for each platform are generated. Repositories are linked to the toolchains. As a result, during the build process, basel gets the correct versions of the binaries.

I think that the described problem has been fixed in this pr. But I can't check it because it's based on too old rules version). If you plan to integrate changes from that pr to actual code base - just close my pr.

smertnik3sh avatar Feb 06 '25 17:02 smertnik3sh

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 06 '25 17:02 CLAassistant

I tried to run this using Bazel 7 and it was unable to locate the toolchains.

srikrsna-buf avatar Feb 12 '25 08:02 srikrsna-buf

Strange... In our repository everything is ok. We use bazel 7.5.0. Can you send me full error text pls? What os and cpu arch you use?

smertnik3sh avatar Feb 12 '25 11:02 smertnik3sh

I found problem that looked like "execvp( ... /external/rules_buf++buf+rules_buf_toolchains/buf, ...)": No such file or directory" when running bazel in examples. Was you spoke about that one? After last commit results of "bazel test //..." (bazel version 7.5.0) inside examples before and after patch look like the same.

smertnik3sh avatar Feb 12 '25 16:02 smertnik3sh

Thank you for looking into it. I still see that issue if I run USE_BAZEL_VERSION=7.2.0 bazel test //... inside the workspace example

srikrsna-buf avatar Feb 14 '25 12:02 srikrsna-buf

@smertnik3sh Can you sign the CLA? I'll take a look at the error and merge this

srikrsna-buf avatar May 29 '25 03:05 srikrsna-buf

I already signed, but last commit from this pr had wrong metadata (wrong email). I paid no attention, sorry.

smertnik3sh avatar May 30 '25 16:05 smertnik3sh