How antmicro/buildgrid works
BuildGrid is a remote build-execution service implementing the Remote Execution and Remote Workers APIs. A build client submits an action; the execution service hands it to the execution instance and scheduler, which coordinate worker bots and expose operation updates. The client uses CAS to supply inputs and retrieve outputs, while the action cache can reuse prior results. The tree also shows capability discovery, ByteStream, and reference storage. The controller wiring and several service handlers are sampled; other subsystem links reflect documented product scope and are kept conservative where implementation excerpts are unavailable.
Main entry points: scheduler.py Scheduler · controller.py Execution controller · execution/instance.py Execution instance · operations/instance.py Operations instance
Components 23
Execution and scheduling
- Execution controller
buildgrid/server/controller.py - Execution instance
buildgrid/server/execution/instance.py - Scheduler
buildgrid/server/scheduler.py - Operations instance
buildgrid/server/operations/instance.py
Worker coordination
- Bots interface
buildgrid/server/bots/instance.py - Lease execution
buildgrid/bot/tenantmanager.py
Content and results
- CAS instance
buildgrid/server/cas/instance.py - CAS storage
buildgrid/server/cas/storage/storage_abc.py - Action cache
buildgrid/server/actioncache/instance.py - S3 action cache
buildgrid/server/actioncache/s3storage.py - Reference cache
buildgrid/server/referencestorage/storage.py
Client-facing APIs
- Execution service
buildgrid/server/execution/service.py - Operations service
buildgrid/server/operations/service.py - Bots service
buildgrid/server/bots/service.py - CAS and ByteStream
buildgrid/server/cas/service.py - Action cache service
buildgrid/server/actioncache/service.py - Reference service
buildgrid/server/referencestorage/service.py - Capabilities service
buildgrid/server/capabilities/service.py - Capabilities instance
buildgrid/server/capabilities/instance.py
Persistence
- Persistent state
buildgrid/server/persistence/interface.py
Other components
- Build client
- Worker bot
- External S3 storage
Connections 28
- Build client → Execution service: submits actions
- Execution service → Execution instance: executes request
- Execution controller → Scheduler: constructs
- Execution controller → Execution instance: constructs
- Execution controller → Bots interface: constructs
- Execution controller → Operations instance: constructs
- Execution instance → Scheduler: schedules jobs
- Execution controller → Execution service: registers instances
- Build client → Operations service: queries operations
- Operations service → Operations instance: handles requests
- Operations instance → Scheduler: tracks jobs
- Worker bot → Bots service: reports sessions
- Bots service → Bots interface: dispatches requests
- Bots interface → Scheduler: shares scheduler
- Build client → CAS and ByteStream: transfers blobs
- CAS and ByteStream → CAS instance: handles requests
- CAS instance → CAS storage: reads and writes
- Build client → Action cache service: queries results
- Action cache service → Action cache: handles requests
- Scheduler → Action cache: checks cached results
- Action cache → CAS storage: stores results
- S3 action cache → External S3 storage: persists cache keys
- Build client → Reference service: uses references
- Reference service → Reference cache: handles requests
- Reference cache → CAS storage: checks blobs
- Build client → Capabilities service: discovers capabilities
- Capabilities service → Capabilities instance: returns capabilities
- Scheduler → Persistent state: stores scheduler state