How buildbarn/bonanza works
Bonanza is an experimental Bazel-compatible remote build system. Its principal workflow is to submit local source and a build request, perform build analysis remotely, fetch required dependencies, schedule and execute actions on workers, then expose progress and results. The tree shows dedicated services and model packages for these stages; the README documents the overall workflow and compatibility goals. Source excerpts are limited, so internal service-to-service edges are shown only where supported by the documented architecture or sampled worker setup.
Main entry points: bonanza_builder/main.go Build service · bonanza_worker/main.go Execution worker · bonanza_bazel/main.go Bazel-compatible CLI · analysis Build analysis
Components 20
Client and UI
- Bazel-compatible CLI
cmd/bonanza_bazel/main.go - Build browser
cmd/bonanza_browser/main.go - Build status
pkg/proto/buildqueuestate/buildqueuestate.proto
Build processing
- Build service
cmd/bonanza_builder/main.go - Build analysis
pkg/model/analysis - Bazel Starlark
pkg/model/starlark - Dependency evaluation
pkg/model/evaluation - Repository fetcher
cmd/bonanza_fetcher/main.go - Fetch model
pkg/model/fetch
Remote execution
- Build scheduler
cmd/bonanza_scheduler/main.go - Action routing
pkg/scheduler/routing - Execution worker
cmd/bonanza_worker/main.go - Worker protocol
pkg/remoteworker - Storage-backed execution
pkg/model/executewithstorage
Object storage
- Storage frontend
cmd/bonanza_storage_frontend/main.go - Storage shard
cmd/bonanza_storage_shard/main.go - DAG storage
pkg/storage/dag - Object store
pkg/storage/object - Tag storage
pkg/storage/tag
Other components
- Developer or caller
Connections 21
- Developer or caller → Bazel-compatible CLI: invokes
- Developer or caller → Build browser: views builds
- Bazel-compatible CLI → Storage frontend: uploads source
- Bazel-compatible CLI → Build service: requests build
- Build service → Build analysis: analyzes targets
- Build analysis → Bazel Starlark: evaluates rules
- Build analysis → Dependency evaluation: evaluates dependencies
- Dependency evaluation → Repository fetcher: requests repositories
- Repository fetcher → Fetch model: fetches inputs
- Build service → Build scheduler: schedules actions
- Build scheduler → Action routing: routes actions
- Build scheduler → Execution worker: dispatches work
- Execution worker → Worker protocol: serves execution
- Execution worker → Storage-backed execution: loads stored actions
- Execution worker → Storage frontend: uploads results
- Build service → Build status: reports status
- Build browser → Build status: reads status
- Storage frontend → Storage shard: forwards storage requests
- Storage shard → DAG storage: stores DAGs
- DAG storage → Object store: reads and writes objects
- Storage shard → Tag storage: stores tags