-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect node binary uploaded for remote execution #3444
Comments
Hey guys, just to ask: what would cause this? I can try taking a look at doing some modifications to rules_nodejs within my corporate network (where I can try the builds on buildbarn), and then contribute back any fixes, but I'm still learning Bazel and just not quite sure where to start. Any pointers on where to look would be helpful. Thanks, |
Hi there! I think I'm hitting this as well. In my case is with It seems weird to me because looking at |
FWIW, @gregmagolan used this toolchain (from a Mac host) with Engflow RBE yesterday and got a correct nodejs interpreter on the exec platform, so I don't think this is totally broken. We might need a repro. |
hi @alexeagle @gregmagolan. I've created a repro. The failing target is in the branch Hope this helps =) |
Hi! I've bumped into the same stuff with RBE. Are there any known workarounds? |
I recently ran into a similar issue at work; we're also using EngFlow for RBE. I was running a rule that uses the nodejs toolchain. I wanted to run a build on a local Mac first using nodejs & then hand the result off to RBE to run tests against it (the testing is also using nodejs). My build was always resolving I traced the issue down to our Engflow cross-platform configuration in I think this is the common thing to do for EngFlow. For example, the configs have I'm not sure what the ideal solution is. We can't drop the platform overrides in many cases because we need to support RBE and we need to be able to use EngFlow for both local & remote builds. One terrible workaround we're considering for our custom toolchains is lying in the toolchain definition and saying that the macOS binaries are also compatible with Linux 🤦🏾♀️ . That way, we can expose all compatible binaries, and make an entry point for the toolchain that detects which platform we're on and uses the correct binary. When we run on macoOS with the host platform set to Linux, we can detect and run the right binary. |
I don't think this issue is in scope for rules_nodejs anymore which only supplies the Node.js toolchain as of v6.0.0. Downstream canonical JavaScript + Node.js ruleset is now https://github.com/aspect-build/rules_js. If this is still an issue please open up a new issue in the rules_js where the js_binary rule now lives. |
🐞 bug report
Affected Rule
Seemingly any rule that executes
run_node
In my particular case,
ts_project
is causing this error, but I get the same error with otherrun_node
-based rules (including ones that I have written).Is this a regression?
Not sure
Description
I'm not sure if this is specifically a
rules_nodejs
problem, but it seems like it might be.When running any
run_node
-based rule with--remote_executor
, Bazel seems to upload the Node binary of the host platform rather than the binary for the execution platform. I'm running Bazel from Mac (host platform), and trying to execute on a remote Linux Buildbarn cluster.Here is the error that I'm getting:
Note in the second to last line of output that the machine can't execute
nodejs_darwin_amd64/bin/nodejs/bin/node
(trying to run the Mac binary on a Linux machine).🔬 Minimal Reproduction
Unfortunately I don't have a publicly-facing remote build cluster to share a reproduction on, but the project is simply running a
ts_project
rule and using--remote-executor
. Thets_project
rule works correctly when building locally.I think the simplest minimal reproduction is simply running a
ts_project
rule from a host machine that is of a different platform than the remote executor's platform.🔥 Exception or Error
^-- Bazel attempting to run MacOS binary on Linux
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
Anything else relevant?
It looks like there are a few related issues. Not sure if the first one has been addressed even though it was closed.
The text was updated successfully, but these errors were encountered: