aspect-build / aspect-build/rules_js

[Bug]: js_image_layer splitter breaks compatibility with `container_test` on macos in latest version

Open
#2,206 0 comments 0 reactions 1 assignee Claimed by @thesayyn View on GitHub
bug
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What happened?

What we saw in the most recent version is `js_image_layer` now will fail a `container_test` as it seems to embed the wrong node toolchain given the platform as macos. Here is theoutput we saw internally

```
(cd /private/var/tmp/_bazel_username/bb7b3564bee62e3f03df1d433a591137/sandbox/darwin-sandbox/1443/execroot/company && \
exec env - \
TMPDIR=/var/folders/bg/y3dtg0gj387f6cdjl4k46g7m0000gn/T/ \
/usr/bin/sandbox-exec -f /private/var/tmp/_bazel_username/bb7b3564bee62e3f03df1d433a591137/sandbox/darwin-sandbox/1443/sandbox.sb /var/tmp/_bazel_username/install/96e26d97222159f904e14600d7490eb0/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/private/var/tmp/_bazel_username/bb7b3564bee62e3f03df1d433a591137/sandbox/darwin-sandbox/1443/stats.out' external/nodejs_linux_amd64/bin/nodejs/bin/node bazel-out/darwin_arm64-fastbuild-ST-d3aa92d73336/bin/project/src/e2e/layers_js_image_layer_splitter.mjs)
external/nodejs_linux_amd64/bin/nodejs/bin/node: external/nodejs_linux_amd64/bin/nodejs/bin/node: cannot execute binary file
Target //project/src/e2e:container_test failed to build
```

### Version

Development (host) and target OS/architectures:

Output of `bazel --version`: 7.3

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:

Language(s) and/or frameworks involved: 2.3.5 rules_js, Node 18

### How to reproduce

```shell
I don't have a simple repro yet, but feeding a js_image_layer target into container_test is how we spotted this.
```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.