build: avoid common node_modules/ bazel slowness pitfall (#48329)

It's very easy to have some random `node_modules/` folder floating
around in the repository. Especially coming from the old AIO
example boilerplate setup (which heavily relied on nested node modules).

These `node_modules/` folders can contain millions of files and might
be accidentally picked up by Bazel `glob`'s (if they are authored
in way that selects all nested files).

This could surface in `aio/tools/examples/shared` or individual content
examples, causing the Bazel analysis phase or runfile forest creation
to take forever given more than 1.5 files being dealt with.

Note that we keep the `examples/shared` node modules folder gitignored
as otherwise Renovate may have problems when updating the folder.

PR Close #48329
This commit is contained in:
Paul Gschwendtner
2022-12-01 21:31:21 +00:00
committed by Andrew Kushnir
parent c0fe82049f
commit ff07194e92
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
/bazel-out
/integration/bazel/bazel-*
*.log
node_modules
/node_modules/
# CircleCI temporary file for cache key computation.
# See `save_month_to_file` in `.circleci/config.yml`.
+1
View File
@@ -8,6 +8,7 @@
# Node
/node_modules
/tools/examples/shared/node_modules
npm-debug.log
yarn-error.log