bazel: Don't limit stdout/stderr

Bug: b/362298822
Change-Id: Idd99caef3c1ec02c898b54b7700e823f5097164e
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/237037
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
diff --git a/recipe_modules/bazel/api.py b/recipe_modules/bazel/api.py
index 1e534c5..30d849d 100644
--- a/recipe_modules/bazel/api.py
+++ b/recipe_modules/bazel/api.py
@@ -98,6 +98,10 @@
             config = config.get('pw', config).get('bazel_presubmit', config)
 
         base_args: list[str] = []
+
+        # Don't limit the amount Bazel will write to stdout/stderr.
+        base_args.append('--experimental_ui_max_stdouterr_bytes=-1')
+
         if config.get('remote_cache'):
             base_args.append('--config=remote_cache')
         if config.get('upload_local_results'):
diff --git a/recipes/bazel.expected/simple.json b/recipes/bazel.expected/simple.json
index e235b0d..722217a 100644
--- a/recipes/bazel.expected/simple.json
+++ b/recipes/bazel.expected/simple.json
@@ -1139,6 +1139,7 @@
       "[CLEANUP]/tmp_tmp_2/bazelisk",
       "build",
       "//...",
+      "--experimental_ui_max_stdouterr_bytes=-1",
       "--config=remote_cache",
       "--remote_upload_local_results=true"
     ],
@@ -1170,6 +1171,7 @@
       "[CLEANUP]/tmp_tmp_2/bazelisk",
       "test",
       "//...",
+      "--experimental_ui_max_stdouterr_bytes=-1",
       "--config=remote_cache",
       "--remote_upload_local_results=true"
     ],
@@ -1213,6 +1215,7 @@
       "[CLEANUP]/tmp_tmp_2/bazelisk",
       "build",
       "//...",
+      "--experimental_ui_max_stdouterr_bytes=-1",
       "--config=remote_cache",
       "--remote_upload_local_results=true"
     ],
@@ -1303,6 +1306,7 @@
       "[CLEANUP]/tmp_tmp_2/bazelisk",
       "test",
       "//...",
+      "--experimental_ui_max_stdouterr_bytes=-1",
       "--config=remote_cache",
       "--remote_upload_local_results=true"
     ],