A fast Buildkite plugin that analyzes Bazel Event Protocol (BEP) protobuf files and creates focused annotations for build failures. Prefers native protobuf parsing when available for accuracy and performance, with a safe string-based fallback.
- โก Fast BEP processing โ scales to very large builds
- ๐ฏ Failure-focused โ concise, actionable failure details
- ๐ GitHub linking โ direct links to failing files/lines
- ๐ Auto-detection โ finds BEP files in common locations
- ๐งฐ Minimal deps โ requires Bash and Python 3; protobuf is optional
- ๐จ Clear annotations โ designed for Buildkiteโs annotation UI
- ๐ ๏ธ Bazel-native โ understands Bazel BEP failure types
- ๐ Robust โ retries annotation creation on transient errors
- Bash
- Python 3
- Bazel (to generate BEP files)
- Optional: Python
protobufpackage (recommended for best parsing)
Without
protobuf, the analyzer falls back to string-based parsing.
Path to the Bazel Event Protocol protobuf file to parse. If not provided, the plugin looks for common filenames: bazel-events.pb, bazel-bep.pb, bep.pb, events.pb.
If true, the plugin exits successfully when no BEP file is found.
Default: false
To ensure reliability and prevent memory issues, the analyzer enforces limits (configurable):
- File size: 100MB max BEP file size (
--max-file-sizein MB) - Failure count: 50 failures max (
--max-failures) - Annotation size: 1MB (Buildkite platform limit)
When limits are exceeded, warnings are logged and results are truncated safely. Defaults are defined in bin/config.py.
steps:
- label: "๐จ Build with Bazel"
command: |
bazel build //... --build_event_binary_file=bazel-events.pb
plugins:
- bazel-annotate#v1.1.1:
bep_file: bazel-events.pbsteps:
- label: "๐จ Build with Bazel"
command: |
# Command might not produce a BEP file
bazel build //...
plugins:
- bazel-annotate#v1.1.1:
skip_if_no_bep: truesteps:
- label: "๐งช Run Bazel tests"
command: |
bazel test //... --build_event_binary_file=bazel-test-events.pb
plugins:
- bazel-annotate#v1.1.1:
bep_file: bazel-test-events.pbsteps:
- label: "๐จ Build with Bazel"
command: |
bazel build //... --build_event_binary_file=bazel-build-events.pb
plugins:
- bazel-annotate#v1.1.1:
bep_file: bazel-build-events.pb
- label: "๐งช Test with Bazel"
command: |
bazel test //... --build_event_binary_file=bazel-test-events.pb
plugins:
- bazel-annotate#v1.1.1:
bep_file: bazel-test-events.pb
- label: "๐ฆ Package with Bazel"
command: |
bazel run //:package --build_event_binary_file=bazel-package-events.pb
plugins:
- bazel-annotate#v1.1.1:
bep_file: bazel-package-events.pb- Run shell tests in Docker:
docker compose run --rm tests bats tests- Run Python unit tests locally:
python3 -m unittest -v tests/test_analyzer.py- Linting and Shellcheck are covered in the Buildkite pipeline for the plugin (see
.buildkite/pipeline.yml).
| Elastic Stack | Agent Stack K8s | Hosted (Mac) | Hosted (Linux) | Notes |
|---|---|---|---|---|
| ๐ | ๐ | โ | ๐ | Agents on Linux/K8s need Bazel available |
- โ Fully supported
- ๐ Agents running on Linux or Kubernetes must provide Bazel
- Fork the repository
- Create a feature branch
- Add your changes, including tests
- Submit a pull request
The package is available as open source under the terms of the MIT License.