Recommend using --verbose_failures for debugging

See this question on Stack Overflow: https://stackoverflow.com/questions/62456527/how-to-debug-remote-cache-write-failures

I just had an issue with Bazel where I gave my service account rights to read and write in my GCS bucket, but I did not give it blob admin rights, and Bazel tried to do a delete, which failed with this exception:

```
WARNING: Writing to Remote Cache:
com.google.devtools.build.lib.remote.BulkTransferException
	at com.google.devtools.build.lib.remote.RemoteCache.waitForBulkTransfer(RemoteCache.java:225)
        ...
	Suppressed: com.google.devtools.build.lib.remote.http.HttpException: 403 Forbidden
```

However, [the way the error message is created](https://github.com/bazelbuild/bazel/blob/9cc17b52abc6e05212843a9c167553b410528982/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java#L307) made it only display like this without `--verbose_failures`:

```
WARNING: Writing to Remote Cache:
BulkTransferException
```

This was a very generic error, and I did not find anything online telling me how to get a better error message. Only reading the source tipped me off to the option of using `--verbose_failures`.

I might also later send a PR updating `RemoteSpawnCache` to fix the error message to add something like `Pass --verbose_failures for full backtrace` if called without `--verbose_failures`.

Closes #12945.

PiperOrigin-RevId: 387342220
1 file changed
tree: f6b64c96cce7c2d4a20c45703e52aa768186774a
  1. .bazelci/
  2. examples/
  3. scripts/
  4. site/
  5. src/
  6. third_party/
  7. tools/
  8. .bazelrc
  9. .gitattributes
  10. .gitignore
  11. AUTHORS
  12. BUILD
  13. CHANGELOG.md
  14. CODEBASE.md
  15. CODEOWNERS
  16. combine_distfiles.py
  17. combine_distfiles_to_tar.sh
  18. compile.sh
  19. CONTRIBUTING.md
  20. CONTRIBUTORS
  21. distdir.bzl
  22. distdir_deps.bzl
  23. ISSUE_TEMPLATE.md
  24. LICENSE
  25. README.md
  26. WORKSPACE
README.md

Bazel

{Fast, Correct} - Choose two

Build and test software of any size, quickly and reliably.

  • Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.

  • One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.

  • Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.

  • Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.

Getting Started

Documentation

Contributing to Bazel

See CONTRIBUTING.md

Build status