bazelbuild / examples

Examples for Bazel
http://bazel.build
Apache License 2.0
800 stars 497 forks source link

fix: set --noexperimental_repository_cache_hardlinks on frontend build #427

Closed gregmagolan closed 3 months ago

gregmagolan commented 3 months ago

This flag seems to be the cause of the rules_js npm deps .../package (No such file or directory) heisenbug that everyone is hitting.

Seen here https://buildkite.com/bazel/bazel-bazel-examples/builds/2811 for example,


(19:31:18) ERROR: /Users/buildkite/builds/bk-imacpro-14/bazel/bazel-bazel-examples/frontend/BUILD.bazel:10:22: Copying directory aspect_rules_js~~npm~npm__to-fast-properties__2.0.0/package failed: Exec failed due to IOException: /private/var/tmp/_bazel_buildkite/30fddcae6929acb19e14d436e7d4089f/execroot/_main/external/aspect_rules_js~~npm~npm__to-fast-properties__2.0.0/package (No such file or directory)
--
  | (19:31:18) ERROR: /Users/buildkite/builds/bk-imacpro-14/bazel/bazel-bazel-examples/frontend/BUILD.bazel:10:22: Copying directory aspect_rules_js~~npm~npm__scheduler__0.23.0/package failed: Exec failed due to IOException: /private/var/tmp/_bazel_buildkite/30fddcae6929acb19e14d436e7d4089f/execroot/_main/external/aspect_rules_js~~npm~npm__scheduler__0.23.0/package (No such file or directory)
  | (19:31:18) ERROR: /Users/buildkite/builds/bk-imacpro-14/bazel/bazel-bazel-examples/frontend/BUILD.bazel:10:22: Copying directory aspect_rules_js~~npm~npm__yallist__3.1.1/package failed: Exec failed due to IOException: /private/var/tmp/_bazel_buildkite/30fddcae6929acb19e14d436e7d4089f/execroot/_main/external/aspect_rules_js~~npm~npm__yallist__3.1.1/package (No such file or directory)
  | (19:31:18) ERROR: /Users/buildkite/builds/bk-imacpro-14/bazel/bazel-bazel-examples/frontend/BUILD.bazel:10:22: Copying directory aspect_rules_js~~npm~npm__update-browserslist-db__1.0.13__browserslist_4.22.2/package failed: Exec failed due to IOException: /private/var/tmp/_bazel_buildkite/30fddcae6929acb19e14d436e7d4089f/execroot/_main/external/aspect_rules_js~~npm~npm__update-browserslist-db__1.0.13__browserslist_4.22.2/package (No such file or directory)
  | (19:31:18) ERROR: /Users/buildkite/builds/bk-imacpro-14/bazel/bazel-bazel-examples/frontend/BUILD.bazel:10:22: Copying directory aspect_rules_js~~npm~npm__react__18.2.0/package failed: Exec failed due to IOException: /private/var/tmp/_bazel_buildkite/30fddcae6929acb19e14d436e7d4089f/execroot/_main/external/aspect_rules_js~~npm~npm__react__18.2.0/package (No such file or directory)

Need to do more work to confirm this with clients and customers who have hit this to see if they all have this flag set but in this repository anyway I'm able to consistently make the bug happen with the flag set and have not been able to make it happen without it.

alexeagle commented 3 months ago

I think we may as well merge this now, as it will help the Bazel team to keep their downstream pipeline green, and make PRs to this repo less painful due to spurious reds

gregmagolan commented 3 months ago

I think we may as well merge this now, as it will help the Bazel team to keep their downstream pipeline green, and make PRs to this repo less painful due to spurious reds

This ended up not being the issue but I found the problem after more testing. https://github.com/aspect-build/rules_js/pull/1533 should fix it.