Closed danielepolencic closed 4 months ago
Hmm. The notable change between 1.40.0 and 1.40.1 is that we bumped bazel-lib to a version that brought in a pre-built tar linked against musl. https://github.com/aspect-build/rules_js/pull/1556. Guessing the breakage came from in there.
cc @alexeagle @dzbarsky
@Aghassi also reported hitting this
Just confirming we also had to bump our bazel-lib to 1.42.2 internally for this upgrade so we are on that version which aligns with the suspicion Greg cited
@Aghassi @danielepolencic was the failure on a single npm package, a subset of packages or all packages on your builds?
@gregmagolan
This is the error we are seeing on our pipeline that is failing
This is the error we are seeing on our pipeline that is failing
Same dep. Great. I'll see if I can repro that on rules_js in that case.
I'm able to repro it in rules_js with this change: https://github.com/aspect-build/rules_js/pull/1657.... but only on darwin. Linux CI is all green.
Correct, we only have it on Darwin too
I'm getting basically the same thing during NpmPackageExtract only on Windows on 1.40.1:
ERROR: C:/users/user/repos/project/BUILD.bazel:18:22: Extracting npm package yocto-queue@0.1.0 failed: (Exit -1073741515): bsdtar.exe failed: error executing NpmPackageExtract command (from target //:.aspect_rules_js/node_modules/yocto-queue@0.1.0/pkg)
cd /d C:/users/user/_bazel_user/bcrtdr5p/execroot/_main
external\aspect_bazel_lib~1.42.2~toolchains~bsd_tar_windows_amd64\libarchive\bin\bsdtar.exe --extract --no-same-owner --no-same-permissions --strip-components 1 --file external/aspect_rules_js~1.40.1~npm~js_deps__yocto-queue__0.1.0/package.tgz --directory bazel-out/x64_windows-opt/bin/node_modules/.aspect_rules_js/yocto-queue@0.1.0/node_modules/yocto-queue
# Configuration: 24065dc4cfd16feb0d9c94e85894e0bb03247f8d38981abd6c98c2262748fa0f
# Execution platform: @@local_config_platform//:host
If I run the same commands manually it works fine, which suggests it may be a sandbox thing and if I have to guess it's perhaps because the archive.dll is not being found when run under Bazel, as tar_toolchain
makes no reference to it.
@Aghassi great, I have a fix, I'll send out patches and get this percolating through the repos.
@aaliddell Would you mind filing a separate issues for that one? We are not using the hermetically linked bsdtar on Windows, so it would need a separate fix.
Working down the supply chain
Released bazel-lib 1.42.3 and 2.7.1 with the fix.
rules_js minimum bump on 1.x branch: https://github.com/aspect-build/rules_js/pull/1672
Fix released in v1.14.2
What happened?
Since I upgraded to 1.40.1 I can see this error when I build the project:
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: bazel 7.0.2Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:How to reproduce
No response
Any other information?
Reverting to 1.40.0 fixes the issue.