Builds
── Builds ────────────────────────────────────────────────────────────────
── Builds ────────────────────────────────────────────────────────────────
A Build turns a BuildInput (identified by CID) into an output artifact DAG (also a CID), emitting progress events along the way. Builds are independent of one another (any number may exist at once).
Builds are purely in-memory runtime objects (like FUSE mounts): they do NOT survive a node restart and are not persisted to local storage.
Implementation note (current): the transform is a PASS-THROUGH — output_cid == input_cid. The lifecycle, event stream, target-ref/mount, and input-watching surface defined here is the real contribution; the actual build step is a placeholder to be filled in later.
Input source (CreateBuildRequest.input oneof) — three resulting kinds: • Explicit CID (explicit_input_cid): a standalone, one-shot build of a fixed BuildInput CID. NOT bound to any workspace; it never changes and runs once. • Workspace, not watching (workspace.watch = false): bound to a registered workspace; pins a snapshot of that workspace's current BuildInput CID at create time and runs once. • Workspace, watching / interactive (workspace.watch = true): bound to a registered workspace and follows its BuildInput — every workspace sync that produces a new BuildInput CID is adopted automatically and triggers an incremental re-run that continues from the build's current state.
A workspace-bound build is tied to that workspace's lifetime: deregistering the workspace cancels and removes its builds, ending any open Watch/Attach streams. Explicit-CID builds are unaffected by workspace changes.
Detached vs attached lifecycle: • Detached: CreateBuild → (GetBuild | WatchBuild) → StopBuild / DeleteBuild. The build runs server-side independent of any client; closing a WatchBuild stream does NOT stop or delete it. • Attached: CreateBuildAttached (create + stream in one call) or AttachBuild (bind to an existing build). The build's run is tied to the stream: if the client cancels/closes the RPC, the server STOPS the build and KEEPS its record (state BUILD_STATE_CANCELLED). DetachBuild severs that binding so the build keeps running.
Detach, stop and remove are three independent operations, each able to
cascade to the next by an explicit flag:
• DetachBuild — stop watching. stop also stops it.
• StopBuild — cancel the build's in-flight invocations and reap
its pods. remove also removes it.
• DeleteBuild — discard the record.
Removing implies stopping: a record may be discarded, but the workloads it
started may not be left running with nobody watching them. A disconnect
therefore stops rather than deletes — the moment right after a failure is
when the record is worth the most, and it used to be destroyed exactly
then.
Finished records are retained up to the daemon's builds.retain_finished
bound, evicting the least valuable first (failures outrank successes). A
retained record holds no GC pins; its log CIDs stay readable because the
log streams themselves are what pin their blocks.
Service builder.Builds, 16 rpcs.
CreateBuild(CreateBuildRequest) -> CreateBuildResponse
Create a detached build and return its initial snapshot. The build is queued and runs in the background. INVALID_ARGUMENT if the workspace path is non-canonical; NOT_FOUND if it is not registered.
Request: CreateBuildRequest
message CreateBuildRequest {
optional bool refetch = 3;
optional map<string, string> labels = 8;
oneof input {
string explicit_input_cid = 1;
WorkspaceInput workspace = 2;
}
oneof mode {
RunBuild run = 6;
FetchOnly fetch_only = 7;
}
}| Field | |
|---|---|
explicit_input_cid | A standalone, one-shot build of a fixed BuildInput CID. Not bound to any workspace. |
workspace | A workspace-bound build. FAILED_PRECONDITION if the workspace has not produced a BuildInput yet (no successful member sync). |
refetch | When true, bypass the member sync cache: every member's content provider is called even if the member's resolved spec hasn't changed since the last sync. Useful when upstream content changed without the spec changing (e.g. a mutable container tag). Does not affect the function-invocation cache cleared by bldr cache clear. |
run | |
fetch_only | |
labels | Free-form labels stamped onto the build. bldr.name is the well-known key carrying bldr build --name; it lives outside the mode oneof so a fetch-only build can be named too. |
Response: CreateBuildResponse
message CreateBuildResponse {
optional Build build = 1;
}CreateBuildAttached(CreateBuildRequest) -> stream BuildEvent
Create a build and immediately attach to it. The response stream carries
the build's events (a snapshot first, then live events). Cancelling or
closing this stream deletes the build, unless it was first detached via
DetachBuild.
Request: CreateBuildRequest
The same message as CreateBuildRequest.
Response: BuildEvent
Streamed by WatchBuild / AttachBuild / CreateBuildAttached.
The first message on every stream is a snapshot carrying the full current
Build; subsequent messages are incremental events. Every non-snapshot event
carries the generation it belongs to so clients can ignore stale events
after an incremental re-run.
message BuildEvent {
oneof event {
Build snapshot = 1;
BuildStarted started = 2;
BuildProgress progress = 3;
BuildSucceeded succeeded = 4;
BuildFailed failed = 5;
BuildInputUpdated input_updated = 6;
BuildAttachment attachment = 7;
TaskEvent task = 8;
BuildDeleted deleted = 9;
}
}| Field | |
|---|---|
snapshot | |
started | |
progress | |
succeeded | |
failed | |
input_updated | |
attachment | |
task | A node in the build's progress tree — chiefly the workspace-sync subtree (per member → provider → container layer), with cache hits shown as such. |
deleted | The build was removed from the node (terminal). |
ListBuilds(ListBuildsRequest) -> ListBuildsResponse
All builds, newest first. Optionally restricted to one workspace.
Request: ListBuildsRequest
message ListBuildsRequest {
oneof _workspace_canonical_path {
string workspace_canonical_path = 1;
}
}| Field | |
|---|---|
workspace_canonical_path | If set, restrict to builds of this workspace (canonical path). |
Response: ListBuildsResponse
message ListBuildsResponse {
repeated Build builds = 1;
}| Field | |
|---|---|
builds | Newest first. |
WatchBuilds(WatchBuildsRequest) -> stream ListBuildsResponse
Watch the whole build list live. Yields the current list first, then a
fresh full snapshot whenever any build is created, deleted, or changes
state — same Build entries as ListBuilds (status + metadata, not the
per-build progress tree). Detached: cancelling has no effect on any build.
Request: WatchBuildsRequest
message WatchBuildsRequest {
oneof _workspace_canonical_path {
string workspace_canonical_path = 1;
}
}| Field | |
|---|---|
workspace_canonical_path | If set, restrict to builds of this workspace (canonical path). |
Response: ListBuildsResponse
The same message as ListBuildsResponse.
GetBuild(GetBuildRequest) -> GetBuildResponse
Snapshot of a single build. NOT_FOUND if the id is unknown.
Request: GetBuildRequest
message GetBuildRequest {
optional string build_id = 1;
}Response: GetBuildResponse
message GetBuildResponse {
optional Build build = 1;
}GetBuildTests(GetBuildTestsRequest) -> GetBuildTestsResponse
The full per-case test breakdown for a build, aggregated across every test target in its output. Computed on demand by the daemon (fetching the BuildOutput + each TestResults DAG); clients never download the raw blocks. NOT_FOUND if the id is unknown. A running build (no output yet) yields an empty, incomplete summary.
Request: GetBuildTestsRequest
message GetBuildTestsRequest {
optional string build_id = 1;
}Response: GetBuildTestsResponse
The full per-case test breakdown for a build, aggregated across all of its
test targets. Cheap counts live in summary; targets carries the cases.
message GetBuildTestsResponse {
optional string build_id = 1;
optional BuildState state = 2;
optional TestSummary summary = 3;
repeated TestTarget targets = 4;
}| Field | |
|---|---|
build_id | |
state | The build's state (so the page can show "running" vs "completed"). |
summary | Aggregate over all targets (same shape as Build.test_summary). |
targets | Per-target results, one per ctx.addTest(name, …). |
GetBuildMetrics(GetBuildMetricsRequest) -> GetBuildMetricsResponse
The parsed metric rows of every metrics target the build produced (see
OutputKind::Metrics: a target whose payload is InfluxDB line-protocol
rows). Each row carries its target's name as the target tag, so one
response spans all targets and stays filterable. By default every row is
returned verbatim; query can filter (measurement / tag equality / field
subset) and aggregate (group_by tags + one of sum|avg|min|max|count|last).
Rows that fail to parse are reported per line in errors, never dropped
silently. Beside the targets' rows come the node's own for the build —
its pods' sccache traffic (measurements sccache, sccache_build,
sccache_not_cached, tagged target=sccache; see docs/sccache.md) —
which exist while the build runs. A running build with neither yields an
empty, incomplete response.
Request: GetBuildMetricsRequest
message GetBuildMetricsRequest {
optional string build_id = 1;
optional MetricsQuery query = 2;
}| Field | |
|---|---|
build_id | |
query | Optional row selection + aggregation; absent → every row verbatim. |
Response: GetBuildMetricsResponse
message GetBuildMetricsResponse {
optional string build_id = 1;
optional BuildState state = 2;
repeated MetricRowView rows = 3;
repeated MetricsParseError errors = 4;
optional bool complete = 5;
}| Field | |
|---|---|
build_id | |
state | The build's state (so a consumer can tell "no metrics yet" from "none"). |
rows | |
errors | |
complete | False while the build is still running (rows may still appear). |
WatchBuildMetrics(GetBuildMetricsRequest) -> stream GetBuildMetricsResponse
Like GetBuildMetrics, but a stream: emits the current state immediately, then a fresh snapshot whenever the build's metrics change: when its output lands, and — at most once a second — while its pods use sccache. Ends when the build reaches a terminal state.
Request: GetBuildMetricsRequest
The same message as GetBuildMetricsRequest.
Response: GetBuildMetricsResponse
The same message as GetBuildMetricsResponse.
GetBuildProblems(GetBuildProblemsRequest) -> GetBuildProblemsResponse
Everything a build's tooling said about code: type errors, lints, deprecations — the build's problems.
Two sources, one list. A controller reports diagnostics as its tooling
finds them, and any target the build declared as diagnostics (see
OutputKind::DIAGNOSTICS) is read out of its stored block chain and folded
in when the build produces it. A caller does not have to know which tool
took which route.
Its own RPC rather than a field on Build because a Build is re-sent on every list change, per retained build: diagnostics there had to be capped at 100 to keep that stream deliverable, which lost exactly the findings of the workspace that stopped compiling. Here the cost is paid by whoever asks, so nothing is dropped — the response pages instead.
NOT_FOUND if the id is unknown. A build with no findings yields an empty page, which is an answer rather than an absence.
Request: GetBuildProblemsRequest
message GetBuildProblemsRequest {
optional string build_id = 1;
optional uint32 page_size = 2;
optional string page_token = 3;
}| Field | |
|---|---|
build_id | |
page_size | Maximum problems to return. 0 asks the node to choose; it will not return more than it can send in one message. |
page_token | next_page_token from the previous response. Empty starts at the first page. Opaque: a client must not construct or parse one. |
Response: GetBuildProblemsResponse
message GetBuildProblemsResponse {
repeated CodeDiagnostic problems = 1;
optional string next_page_token = 2;
optional ProblemCounts counts = 3;
optional bool complete = 4;
}| Field | |
|---|---|
problems | |
next_page_token | Empty on the last page. Non-empty means there is more, and asking again with it returns the next page. |
counts | Totals across every page. |
complete | Whether this is the whole set. False while the build is still running, or has not yet produced the outputs its diagnostics targets live in — the difference between "no problems" and "no problems yet", which a client showing a green tick needs to know. |
WatchBuildProblems(WatchBuildProblemsRequest) -> stream BuildProblemsEvent
Like GetBuildProblems, but live: the findings so far, then each new batch as it is found, so a long typecheck reports its first error immediately rather than at the end.
The leading snapshot is sent before the subscription can miss anything, so a client that joins late sees the same set as one that was there from the start. A diagnostic may therefore arrive twice — once in the snapshot and again live — which a client dedupes on (path, line, column, code); the other way round would lose one in the gap, and lose it undetectably.
Ends when the build reaches a terminal state and its last batch is sent.
Request: WatchBuildProblemsRequest
message WatchBuildProblemsRequest {
optional string build_id = 1;
}Response: BuildProblemsEvent
One batch of a build's problems.
message BuildProblemsEvent {
optional uint64 generation = 1;
repeated CodeDiagnostic problems = 2;
optional bool reset = 3;
optional ProblemCounts counts = 4;
optional bool complete = 5;
}| Field | |
|---|---|
generation | The build generation these belong to. A watch build that regenerates starts a new one. |
problems | Problems newly known since the previous event. The first event of a generation carries everything known when the stream opened. |
reset | Discard what you have for this build and start from problems. |
counts | Totals for the generation so far, including this batch. |
complete | Whether the set is now final — the build reached a terminal state and its outputs have been read. |
WatchBuild(WatchBuildRequest) -> stream BuildEvent
Subscribe to a build's events WITHOUT binding its lifecycle. Yields the
current snapshot first, then live events. The stream ends cleanly when
the build is deleted or its workspace is deregistered; cancelling it has
no effect on the build (detached watch).
Request: WatchBuildRequest
message WatchBuildRequest {
optional string build_id = 1;
}Response: BuildEvent
The same message as BuildEvent.
AttachBuild(AttachBuildRequest) -> stream BuildEvent
Attach to an existing (typically detached) build: same stream semantics as WatchBuild, but cancelling/closing the stream STOPS the build (its record is kept). Use DetachBuild to sever the binding while leaving the build running.
Request: AttachBuildRequest
message AttachBuildRequest {
optional string build_id = 1;
}Response: BuildEvent
The same message as BuildEvent.
DetachBuild(DetachBuildRequest) -> DetachBuildResponse
Sever the lifecycle binding of an attached build so a later cancellation
of its attach stream no longer stops it. The build keeps running; any
active attach stream stays open as a plain watch. applied = false if the
build was already detached. With stop, cascades to StopBuild.
Request: DetachBuildRequest
message DetachBuildRequest {
optional string build_id = 1;
optional bool stop = 2;
}| Field | |
|---|---|
build_id | |
stop | Also stop the build (cascade to StopBuild). Detaching alone leaves it running; this is "stop watching AND stop working". |
Response: DetachBuildResponse
message DetachBuildResponse {
optional bool applied = 1;
optional bool was_stopped = 2;
}| Field | |
|---|---|
applied | False if the build was not attached. |
was_stopped | False unless stop was set and the build was still running. |
StopBuild(StopBuildRequest) -> StopBuildResponse
Stop a build: cancel its in-flight invocations (so a running pod.dag op —
e.g. a cloud-hypervisor VM — is torn down rather than left running) and
reap its pods. The record is KEPT and stays inspectable via GetBuild /
ListBuilds in state BUILD_STATE_CANCELLED, subject to retention. Open
Watch/Attach streams stay open and see the terminal snapshot. Idempotent:
was_running = false if the build had already finished. NOT_FOUND is not
returned — an unknown id yields was_running = false. With remove,
cascades to DeleteBuild.
Request: StopBuildRequest
message StopBuildRequest {
optional string build_id = 1;
optional bool remove = 2;
}| Field | |
|---|---|
build_id | |
remove | Also discard the record (cascade to DeleteBuild). |
Response: StopBuildResponse
message StopBuildResponse {
optional bool was_running = 1;
optional bool was_removed = 2;
}| Field | |
|---|---|
was_running | False if the build had already finished, or the id was unknown. |
was_removed | False unless remove was set and the record was discarded. |
DeleteBuild(DeleteBuildRequest) -> DeleteBuildResponse
Remove a build's record. Implies StopBuild: any FUSE mounts the build created (from its mount_targets) are unmounted and removed, its pods are reaped, and open Watch/Attach streams for it end cleanly. was_deleted = false if the id was unknown.
Request: DeleteBuildRequest
message DeleteBuildRequest {
optional string build_id = 1;
}Response: DeleteBuildResponse
message DeleteBuildResponse {
optional bool was_deleted = 1;
}| Field | |
|---|---|
was_deleted | False if the build_id was unknown. |
SetBuildTargets(SetBuildTargetsRequest) -> SetBuildTargetsResponse
Replace a build's targets spec, resuming the build under it. A live watching build regenerates at once (same input, next generation — newly selected targets build, deselected ones are no longer forced). A finished, failed or cancelled build goes back to RUNNING: its driver is respawned, so a failed build can succeed with fewer targets and a cancelled one can resume. A one-shot build still mid-run keeps its current generation (generations are serial; there is no preemption) and the spec applies if it is later resumed. FAILED_PRECONDITION if the build cannot be resumed (removed, or its workspace deregistered).
Request: SetBuildTargetsRequest
message SetBuildTargetsRequest {
optional string build_id = 1;
optional BuildTargetsSpec targets = 2;
}Response: SetBuildTargetsResponse
message SetBuildTargetsResponse {
optional Build build = 1;
}| Field | |
|---|---|
build | The build with the new spec applied. |
Types used above
WorkspaceInput
Take the build input from a registered workspace's BuildInput.
message WorkspaceInput {
optional string workspace_canonical_path = 1;
optional bool watch = 2;
}| Field | |
|---|---|
workspace_canonical_path | Must name a currently-registered workspace (canonical path). |
watch | If true, follow the workspace's BuildInput: every sync that changes the BuildInput CID is adopted automatically and triggers an incremental re-run (interactive). If false, the build pins the workspace's current BuildInput CID at create time and runs once. |
RunBuild
A normal build: run the (workspace's) build controller over the input.
message RunBuild {
repeated BuildRefTarget ref_targets = 2;
repeated BuildMountTarget mount_targets = 3;
repeated BuildExportTarget export_targets = 4;
repeated BuildDeployTarget deploy_targets = 5;
optional bool profile_pods = 6;
repeated string cache_read = 7;
repeated string cache_write = 8;
optional bool no_cache_read = 9;
optional bool no_cache_write = 10;
optional bool no_targets = 11;
optional BuildTargetsSpec targets_spec = 12;
repeated string run_targets = 13;
optional DistributedBuildPolicy distributed_policy = 14;
optional map<string, string> options = 15;
optional bool no_cache = 16;
optional SingleItemTarget single_item = 17;
}| Field | |
|---|---|
ref_targets | Output targets applied on every successful run. |
mount_targets | |
export_targets | |
deploy_targets | |
profile_pods | CPU-profile every pod this build starts. A pod that names its own profile in the pod.dag spec still wins — this is the default for the ones that do not. Each profile stays on its pod (PodInfo.profile_cid). |
cache_read | Which cache volumes this build may read from, as globset patterns matched against the volume name (bldr/daemon/cargo-target, cargo-registry). Empty → **/*, every volume. |
cache_write | Which cache volumes this build may write back to, same syntax and same default. A volume it may not write is used and then discarded — the build gets the speed-up, and leaves the shared cache exactly as it found it. |
no_cache_read | Deny all reads / writes. Needed because a repeated field cannot distinguish "no patterns given, use the default" from "an empty allow-list", and both are things a caller means. |
no_cache_write | |
no_targets | Build nothing: resolve the workspace and its build graph, then stop without forcing a single target. |
targets_spec | How the build chooses targets. Unset → WORKSPACE_DEFAULTS (or NONE when no_targets is set — the older spelling of the same intent). EXPLICIT carries the filter list; see [BuildTargetsSpec]. |
run_targets | Keep runnables running from this build's output, hot-swapping them on every successful round (--run FILTER). Each entry is a target filter over full target names selecting runnable targets, in the grammar of BuildTargetsSpec.filters; targets of other kinds under it are skipped, a [kind] naming another kind is refused, and matching no runnable fails the build. It also selects what it matches for building. |
distributed_policy | Where this build's invocations may execute. Unset → local when this node has the function, remote when it does not — see [DistributedBuildPolicy]. |
options | Per-build overrides of the workspace's options: map (bldr build -o key=value, repeatable). Each value is text the controller parses as YAML — a scalar, list or mapping — the same way bldr ws set does, and an override wins over the workspace's value for this build only; the manifest is not touched. The reserved key build_controller cannot be overridden: the controller is chosen before the request reaches one. |
no_cache | Skip the invocation-cache lookup for every function this build invokes (bldr build --no-cache). Everything genuinely re-runs; fresh results are still stored, so the cache is repopulated rather than left stale. Nothing shared is deleted. |
single_item | Materialise one registered item — an output, runnable or deployment — and report only its CID, with no run and no deploy (bldr build <member>:<item>). Exclusive with targets_spec: the item is the selection. |
BuildRefTarget
Write (part of) the build output as a local ref on every successful run.
message BuildRefTarget {
optional string ref_name = 1;
}| Field | |
|---|---|
ref_name | Local ref name to set. The whole output is stored under it. |
BuildMountTarget
FUSE-mount (part of) the build output on success, reusing the same machinery as CreateMount. The mount is refreshed to the new sub-DAG CID on each successful incremental re-run (like UpdateMount), is reported by ListMounts with its owning build_id, and is removed automatically when the build is deleted (DeleteBuild) or its workspace is deregistered.
message BuildMountTarget {
optional string path = 1;
optional uint32 fetch_timeout_secs = 3;
optional string name = 4;
repeated BuildResolvedPath resolved = 5;
}| Field | |
|---|---|
path | Absolute mount path on the server. With a name filter it is a path template, expanded per selected target exactly as BuildExportTarget.host_path is. |
fetch_timeout_secs | Block-fetch timeout in seconds. 0 → server default (30 s). |
name | A target filter selecting the outputs to mount, resolved the same way BuildExportTarget.name is. Empty → the whole output at path. |
resolved | Where each selected target is mounted, once the build knows its declared targets. Empty for a whole-output mount. |
BuildResolvedPath
One target an export or a mount placed, and the path its template resolved to for it.
message BuildResolvedPath {
optional string target = 1;
optional string path = 2;
}| Field | |
|---|---|
target | The full target name. |
path | The absolute path on the server. |
BuildExportTarget
Materialise build outputs to paths on the server filesystem on every
successful run (--export FILTER:PATH).
message BuildExportTarget {
optional string name = 1;
optional string host_path = 2;
repeated BuildResolvedPath resolved = 3;
}| Field | |
|---|---|
name | A target filter over full target names (the grammar of BuildTargetsSpec.filters). It acts on output directories and container images only; targets of other kinds under it are skipped, and a [kind] naming another kind is refused. It also selects what it matches for building. Matching nothing fails the build. |
host_path | Absolute destination path template on the server filesystem: {0}, {1}, … insert what the filter's wildcards matched (numbered left to right from 0), {key} the target's label key, {{/}} a literal brace. Every selected target must resolve to a path of its own, none inside another's. |
resolved | Where each selected target is written, once the build knows its declared targets. |
BuildDeployTarget
Invoke the build's deployments after a successful run (--deploy FILTER).
message BuildDeployTarget {
optional string name = 1;
}| Field | |
|---|---|
name | A target filter over full target names (the grammar of BuildTargetsSpec.filters) selecting the deployment targets to invoke. Targets of other kinds under it are skipped, and a [kind] naming another kind is refused. It also selects what it matches for building. Matching no deployment fails the build. |
BuildTargetsSpec
How a build chooses which declared targets to force.
message BuildTargetsSpec {
optional TargetsMode mode = 1;
repeated string filters = 2;
}| Field | |
|---|---|
mode | |
filters | Additive target filters, EXPLICIT mode only. Each is a glob over target names (matching the name or any /-boundary prefix; * within a segment, ** across) with optional bracket constraints: bldr/*[test], [deployment], **/lsp[bldr.runnable.lsp=v1]. |
SingleItemTarget
One registered item of one member, as bldr build <member>:<item> names it.
item is a path within the member (tests/unit); the colon on the command
line only says where the member's name — itself a path — ends.
message SingleItemTarget {
optional string member = 1;
optional string item = 2;
}FetchOnly
A fetch-only "build": fetch the workspace's members (streaming their progress as BuildEvent.task) and finish without running a build controller. Requires a workspace input.
message FetchOnly {
// no fields
}Build
The build resource. Returned by Create/Get/List and carried as the leading
snapshot event on Watch/Attach streams.
message Build {
optional string id = 1;
optional string workspace_canonical_path = 2;
optional BuildState state = 3;
optional string input_cid = 4;
optional string output_cid = 6;
optional bool attached = 7;
optional bool watch_input = 8;
repeated BuildRefTarget ref_targets = 9;
repeated BuildMountTarget mount_targets = 10;
repeated BuildRefResult ref_results = 11;
repeated BuildMountResult mount_results = 12;
optional int64 created_at_seconds = 13;
optional int64 started_at_seconds = 14;
optional int64 finished_at_seconds = 15;
optional string error = 16;
optional uint64 generation = 17;
optional string last_progress = 18;
repeated BuildExportTarget export_targets = 19;
repeated BuildExportResult export_results = 20;
repeated BuildDeployTarget deploy_targets = 21;
repeated BuildDeployResult deploy_results = 22;
optional string revision_cid = 23;
optional BuildOwner owner = 24;
optional TestSummary test_summary = 25;
repeated string target_members = 26;
repeated string produced_outputs = 27;
optional map<string, string> labels = 28;
optional bool deleted = 29;
optional TargetList targets = 30;
optional bool profile_pods = 31;
repeated string cache_read = 32;
repeated string cache_write = 33;
optional bool no_cache_read = 34;
optional bool no_cache_write = 35;
optional bool no_targets = 38;
optional BuildTargetsSpec targets_spec = 39;
repeated BuildAction actions = 40;
repeated string run_targets = 41;
optional DistributedBuildPolicy distributed_policy = 42;
optional BuildTaskCounts task_counts = 43;
optional map<string, string> option_overrides = 44;
optional bool no_cache = 45;
optional SingleItemTarget single_item = 46;
optional BuildSccacheSummary sccache = 47;
}| Field | |
|---|---|
id | |
workspace_canonical_path | The registered workspace this build is bound to (canonical path). Empty for a standalone explicit-CID build. |
state | |
input_cid | BuildInput CID currently being built. For a watching workspace build this tracks the workspace's current BuildInput CID and changes automatically as the workspace is re-synced; otherwise it is fixed for the build's life. |
output_cid | Output artifact CID, set once a run SUCCEEDS. (Pass-through build: equals input_cid.) Empty until the first successful run. |
attached | True while bound to a live attach stream (CreateBuildAttached/AttachBuild). |
watch_input | True if the build follows its workspace's BuildInput (interactive): every workspace sync that changes the BuildInput CID is adopted automatically and triggers an incremental re-run. Always false for explicit-CID and non-watching workspace builds. |
ref_targets | Output targets, fixed at create time and applied on every successful run. |
mount_targets | |
ref_results | Results of those targets from the most recent successful run. |
mount_results | |
created_at_seconds | Unix seconds. started_at / finished_at refer to the most recent run. |
started_at_seconds | |
finished_at_seconds | |
error | Set when state == FAILED. |
generation | Monotonic run counter, bumped on the initial run and on every incremental re-run (UpdateBuildInput). Lets clients correlate events with a run and discard events from a superseded run. |
last_progress | Latest progress message from the build controller (empty for pass-through builds or before the first progress report). |
export_targets | Export targets (target filters → path templates, each with the paths its targets resolved to) and their most-recent results. |
export_results | |
deploy_targets | Deploy targets (target filters selecting deployments) and their most-recent results. |
deploy_results | |
revision_cid | CID of the WorkspaceRevisionSnapshot this build is built against (the workspace's committed snapshot at build time), pinned for the build's lifetime. Empty for an explicit-CID build or a dirty workspace. |
owner | The resource that owns/manages this build, if any (e.g. a run's backing build). Extensible: today run, later deployment / mount. Absent for a plain user-created build. Clients use it to link the build to its owner. |
test_summary | Aggregate verdict of this build's test targets (case counts across all ctx.addTest(...) targets), computed by the daemon from the build output so clients need not download the full per-case results. Absent until the build succeeds and its output is a BuildOutput; zero-valued when the build declares no tests. Use GetBuildTests for the per-case breakdown. |
target_members | The member(s) this build is scoped to (the bldr build <member> positional). Empty when no positional was given — the build runs the workspace's default targets. Known at create time; part of the requested selection surfaced in the API/UI header (alongside ref_targets / export_targets / deploy_targets). |
produced_outputs | The <member>:<name> keys the most recent successful run actually produced (the BuildOutput's outputs + runnables + deployments + tests). Empty until the build succeeds. The "what it produced" half of the header. |
labels | Free-form labels attached at create time (same shape as Deployment.labels / Run.labels). The well-known bldr.name key carries the user's --name: the display name clients show instead of the UUID. Empty for an unnamed build, which is not an error — the UUID is the fallback. |
deleted | The build has been removed from the node. |
targets | What this build's workspace declares it can produce, and how current that list is. |
profile_pods | This build asked for every pod it starts to be CPU-profiled (--profile). |
cache_read | The cache-volume policy this build was created with — see RunBuild. |
cache_write | |
no_cache_read | |
no_cache_write | |
no_targets | This build was created with no_targets — it resolved the graph and forced nothing. On the snapshot so a viewer can tell "produced nothing because it was asked to" from "produced nothing because it failed". |
targets_spec | How this build chooses targets. Mutable while the build lives — SetBuildTargets replaces it, and a watch build regenerates against the new spec. Unset on builds created before the field existed (→ defaults). |
actions | The post-build actions this build carries, with their current state. Built from ref_targets / export_targets / deploy_targets / run_targets and re-driven every round. The *_results fields above stay as the per-kind record of the last successful application; this is the live view. |
run_targets | Target filters naming the runnables kept running from this build's output (--run), as requested. |
distributed_policy | Where this build's invocations may execute — see [DistributedBuildPolicy]. On the snapshot because it changes what a build is: two builds of the same input under different policies can legitimately behave differently, and a reader looking at a build that ran nowhere near this node should be able to see why. |
task_counts | How many of this build's tasks are in each state, as of the moment the build was read. |
option_overrides | Workspace options this build overrode (bldr build -o key=value), as the caller wrote them: key → the value text (parsed as YAML by the controller, exactly as bldr ws set parses it). Only the overrides, never the merged map — a reader wants to know what was changed about this build, and the workspace's own options are one status call away. Empty for a build that took the workspace as it stands. |
no_cache | Every function this build invokes skips the cache lookup and genuinely re-runs (bldr build --no-cache); fresh results are still stored. |
single_item | Set when the build materialises one registered item and nothing else (bldr build <member>:<item>). Such a build has no targets spec: the item is the whole selection. |
sccache | What the node's sccache server did for this build's pods, as of the moment the build was read (see docs/sccache.md). |
BuildRefResult
Outcome of one BuildRefTarget after a successful run.
message BuildRefResult {
optional string ref_name = 1;
optional string cid = 2;
optional string previous_cid = 3;
}| Field | |
|---|---|
ref_name | |
cid | The CID stored under the ref (the sub-DAG CID when dag_path was set). |
previous_cid | CID held by the ref before this write (empty if none). |
BuildMountResult
Outcome of one BuildMountTarget after a successful run.
message BuildMountResult {
optional string mount_id = 1;
optional string path = 2;
optional string cid = 3;
}| Field | |
|---|---|
mount_id | |
path | |
cid | The CID currently mounted (the sub-DAG CID when dag_path was set). |
BuildExportResult
Outcome of one exported target after a successful run.
message BuildExportResult {
optional string name = 1;
optional string host_path = 2;
optional string cid = 3;
}| Field | |
|---|---|
name | The full target name. |
host_path | |
cid | The FsNode CID that was materialised. |
BuildDeployResult
Outcome of one invoked deployment after a successful run.
message BuildDeployResult {
optional string name = 1;
optional string function = 2;
optional string output = 3;
}| Field | |
|---|---|
name | The full target name. |
function | The node function that was invoked. |
output | The invocation's output CID. |
BuildOwner
The resource managing a build. A run (and, in future, a deployment or FUSE mount) can back itself with a build; this points from the build to that owner so the UI can link them and lifecycle can cascade.
message BuildOwner {
optional string kind = 1;
optional string id = 2;
}| Field | |
|---|---|
kind | The owning resource kind: "run" | "deployment" | "mount". |
id | The owning resource's id (e.g. a run id). |
TestSummary
message TestSummary {
optional uint32 total = 1;
optional uint32 passed = 2;
optional uint32 failed = 3;
optional uint32 skipped = 4;
optional uint32 targets = 5;
optional bool complete = 6;
}| Field | |
|---|---|
total | |
passed | |
failed | |
skipped | |
targets | Number of test targets (ctx.addTest names) contributing to this summary. |
complete | False while partial (build running / results streaming in); true when final. |
TargetList
The targets a build's workspace declares, and how much to trust the list.
message TargetList {
optional TargetListStatus status = 1;
repeated BuildTarget targets = 2;
optional string error = 3;
}| Field | |
|---|---|
status | How current the list is. |
targets | Every declared target, sorted by name. Empty while generating and on failure. |
error | Why the list could not be produced. Set only with FAILED. |
BuildTarget
One thing a workspace can build, run, deploy or test.
message BuildTarget {
optional string name = 1;
optional TargetKind kind = 2;
optional map<string, string> labels = 3;
optional bool selected = 4;
optional TargetBuildStatus status = 5;
optional string output_cid = 6;
}| Field | |
|---|---|
name | Its full path: <member>/<scope path>/<name> — e.g. bldr/daemon/tests/unit. A target's name is where it was declared. |
kind | What it is, which decides what can be done with it. |
labels | Free-form labels the build attached, for the targets that carry any. |
selected | Whether the build's target filters select this target. Unselected targets are still listed — the full ledger of what the workspace could build. |
status | Where this target's build stands, for selected targets. Targets become ready one by one; DONE arrives per target, not with the build's end. |
output_cid | The target's produced CID, set with DONE — links (viewer, deploy, run, docs, coverage) work as soon as the target lands, mid-build. |
BuildAction
One post-build action: something the build does with a target once that target is built — write it somewhere, deploy it, run it.
Actions belong to targets, not to the build as a whole: an action waits for its own target and runs the moment that target lands, so a build with a slow target does not hold up an export of a fast one. Every round re-runs them against the new output, cancelling whatever the previous round still had in flight.
message BuildAction {
optional BuildActionKind kind = 1;
optional string target = 2;
optional string argument = 3;
optional BuildActionState state = 4;
optional string detail = 5;
optional string cid = 6;
optional string resource_id = 7;
optional string filter = 8;
}| Field | |
|---|---|
kind | |
target | The full name of the target this acts on, once filter is resolved against the declared targets; until then, and when it matches nothing, the filter itself. Empty for a ref and a whole-output mount. |
argument | Where it acts: the resolved host path for an export, the ref name for a ref, the resolved mount point for a mount. Empty for deploy and run. |
state | |
detail | What happened: the path written, the error, why it was cancelled. |
cid | The target CID this action last acted on. Lets a viewer tell an action that re-ran on new content from one that had nothing new to do. |
resource_id | The resource it created or updated, for the kinds that make one: the deployment id, the run id. |
filter | The target filter the request named this action's target with. One filter becomes one action per target it selects. Empty for a ref and a whole-output mount. |
BuildTaskCounts
A build's tasks by state. Every task is counted in exactly one field, so the
fields sum to total.
message BuildTaskCounts {
optional uint32 total = 1;
optional uint32 running = 2;
optional uint32 waiting = 3;
optional uint32 waiting_for_resources = 4;
optional uint32 queued = 5;
optional uint32 retrying = 6;
optional uint32 completed = 7;
optional uint32 cached = 8;
optional uint32 failed = 9;
optional uint32 cancelled = 10;
optional uint32 skipped = 11;
}| Field | |
|---|---|
total | |
running | Executing, or consulting the cache. |
waiting | Started, and blocked on something outside itself (TaskWaiting). |
waiting_for_resources | Held at a node's admission gate (TaskWaitingForResources): ready to run, not started, because the node has no capacity for it. Its own count rather than part of running or queued — it is neither in flight nor waiting on other tasks, and on a busy node it is most of a build. |
queued | Declared, waiting on other tasks of the build. |
retrying | Between attempts. |
completed | |
cached | |
failed | |
cancelled | |
skipped | Planned and deliberately not run (TaskSkipped). |
BuildSccacheSummary
Aggregate case counts over one or more test targets. total == passed +
failed + skipped. complete is false while results are still being computed
or the build is mid-run (partial); true once the aggregate is final.
A build's sccache traffic, summed over every pod of the build that asked for
sccache. Server-side counts (lookups, transfers, wall time) are measured by
the node as it answers; the compile counts are what the pods' sccache
wrappers reported back (RecordStats).
message BuildSccacheSummary {
optional uint32 pods = 1;
optional uint64 lookups = 2;
optional uint64 hits = 3;
optional uint64 misses = 4;
optional uint64 puts = 5;
optional uint64 put_failures = 6;
optional uint64 bytes_downloaded = 7;
optional uint64 bytes_uploaded = 8;
optional double lookup_seconds = 9;
optional double download_seconds = 10;
optional double upload_seconds = 11;
optional uint64 preprocessor_hits = 12;
optional uint64 preprocessor_misses = 13;
optional uint64 preprocessor_puts = 14;
optional uint64 compile_requests = 15;
optional uint64 not_cacheable = 16;
optional uint64 compilations = 17;
optional uint64 compile_fails = 18;
optional map<string, uint64> not_cached_reasons = 19;
}| Field | |
|---|---|
pods | Pods of this build the node served an sccache socket to. |
lookups | Object-cache lookups, and how they came out. |
hits | |
misses | |
puts | Entries stored, and stores that were refused (read-only pod, oversized entry) or failed. |
put_failures | |
bytes_downloaded | Entry bytes sent to the pods on hits, and received from them on puts. |
bytes_uploaded | |
lookup_seconds | Server-side wall time answering lookups that missed, lookups that hit (the download), and puts (the upload), in seconds. |
download_seconds | |
upload_seconds | |
preprocessor_hits | Preprocessor-cache (C/C++ direct mode) entries: found, missing, stored. |
preprocessor_misses | |
preprocessor_puts | |
compile_requests | Compiler invocations the wrappers saw, the ones they could not cache, the ones they had to compile, and the ones that failed to compile. |
not_cacheable | |
compilations | |
compile_fails | |
not_cached_reasons | Why compiles were not cached (incremental, crate-type, ...) → count, as the wrappers reported them. |
BuildStarted
message BuildStarted {
optional uint64 generation = 1;
optional string input_cid = 2;
optional int64 started_at_seconds = 3;
}BuildProgress
A free-form progress event emitted while RUNNING (a build log line, a step transition, etc.).
message BuildProgress {
optional uint64 generation = 1;
optional string message = 2;
optional map<string, string> fields = 3;
}| Field | |
|---|---|
generation | |
message | |
fields | Optional structured key/values for richer UIs. |
BuildSucceeded
message BuildSucceeded {
optional uint64 generation = 1;
optional string output_cid = 2;
optional int64 finished_at_seconds = 3;
repeated BuildRefResult ref_results = 4;
repeated BuildMountResult mount_results = 5;
repeated BuildExportResult export_results = 6;
repeated BuildDeployResult deploy_results = 7;
}BuildFailed
message BuildFailed {
optional uint64 generation = 1;
optional string error = 2;
optional int64 finished_at_seconds = 3;
}BuildInputUpdated
Emitted on a watch_input build when the workspace it follows produces a new BuildInput CID (i.e. after a workspace sync), immediately before the resulting incremental run's BuildStarted.
message BuildInputUpdated {
optional uint64 generation = 1;
optional string input_cid = 2;
}| Field | |
|---|---|
generation | Generation of the incremental run this adoption kicks off. |
input_cid | The newly adopted BuildInput CID (the workspace's current value). |
BuildAttachment
Emitted when a build's attachment flips (e.g. DetachBuild was called, or a
new client attached). attached mirrors Build.attached.
message BuildAttachment {
optional bool attached = 1;
}BuildDeleted
The build was removed from the node: no snapshot, log or progress tree for it can be fetched again.
message BuildDeleted {
optional string reason = 1;
}| Field | |
|---|---|
reason | Why it went away, for a client that wants to say so. Free-form and for humans — clients must not branch on it. |
TestTarget
One test target's result: its name, the CID of its TestResults DAG (empty if the target produced no TestResults — it "passes by building"), a per-target summary, and the cases themselves.
message TestTarget {
optional string name = 1;
optional string cid = 2;
optional TestSummary summary = 3;
repeated TestCaseView cases = 4;
optional bool truncated = 5;
}| Field | |
|---|---|
name | |
cid | |
summary | |
cases | The cases themselves (reusing the shared TestCaseView / TestCaseStatus). |
truncated | True if the case list was capped (very large suite); summary still counts every case, only cases is truncated. |
MetricsQuery
Row selection and aggregation for build metrics. Selection criteria AND together; aggregation applies after selection.
message MetricsQuery {
optional string measurement = 1;
optional map<string, string> tags = 2;
repeated string fields = 3;
optional string agg = 4;
repeated string group_by = 5;
}| Field | |
|---|---|
measurement | Exact measurement name to keep. Empty = all measurements. |
tags | Tag equality matchers, all must hold. The target name is matchable as the target tag like any other. |
fields | Keep only these fields; a row left with none is dropped. Empty = all. |
agg | Aggregation operator: one of sum, avg, min, max, count, last. Empty = no aggregation (raw rows). Numeric ops skip non-numeric fields. |
group_by | Tag keys to group by when aggregating (the measurement always groups). Tags not listed here are dropped from aggregated rows. |
MetricRowView
One metric sample: measurement + indexed tags + value fields (+ optional sample time). The line-protocol row, parsed.
message MetricRowView {
optional string measurement = 1;
optional map<string, string> tags = 2;
optional map<string, MetricValue> fields = 3;
oneof _timestamp_ns {
int64 timestamp_ns = 4;
}
}MetricValue
message MetricValue {
oneof kind {
double f = 1;
int64 i = 2;
uint64 u = 3;
bool b = 4;
string s = 5;
}
}MetricsParseError
A line of a metrics target that failed to parse: which target, which line, and why. Reported alongside the rows that did parse.
message MetricsParseError {
optional string target = 1;
optional uint32 line = 2;
optional string error = 3;
}ProblemCounts
Totals over the whole set, not over the page in hand.
On every page on purpose. A reader deciding whether to page on wants to know what is left, and a client that had to sum pages to learn the total could only ever know it after fetching all of them — which is the thing paging exists to avoid.
message ProblemCounts {
optional uint32 errors = 1;
optional uint32 warnings = 2;
optional uint32 infos = 3;
optional uint32 total = 4;
}TargetsMode
Where a build's target selection comes from.
enum TargetsMode {
TARGETS_MODE_UNSPECIFIED = 0;
TARGETS_MODE_WORKSPACE_DEFAULTS = 1;
TARGETS_MODE_NONE = 2;
TARGETS_MODE_EXPLICIT = 3;
}| Value | |
|---|---|
TARGETS_MODE_UNSPECIFIED | Unset — treated as WORKSPACE_DEFAULTS. |
TARGETS_MODE_WORKSPACE_DEFAULTS | The workspace's options.targets filter list, re-read every generation — a watching build follows edits to it. |
TARGETS_MODE_NONE | Build nothing: import + typecheck + report the target list only. |
TARGETS_MODE_EXPLICIT | Exactly the filters in [BuildTargetsSpec.filters]. |
DistributedBuildPolicy
Where a build's invocations are allowed to execute.
A build's work is a tree of function invocations, and every one of them can
in principle run on this node or on a peer that provides the same function.
This is the build's say in that choice. It applies to the whole tree — the
pod.dag calls a controller makes and everything nested under them — because
"this build stays here" is not a statement you can make about half a build.
The local invocation cache is not execution and is always consulted: a hit returns a CID without running anything, anywhere.
enum DistributedBuildPolicy {
DISTRIBUTED_BUILD_POLICY_LOCAL_EXCEPT_UNSUPPORTED = 0;
DISTRIBUTED_BUILD_POLICY_LOCAL_ONLY = 1;
DISTRIBUTED_BUILD_POLICY_LOCAL_EXCEPT_QUEUED = 2;
DISTRIBUTED_BUILD_POLICY_NON_LOCAL = 3;
}| Value | |
|---|---|
DISTRIBUTED_BUILD_POLICY_LOCAL_EXCEPT_UNSUPPORTED | Local when this node has the function, a peer when it does not. What every build did before there was a policy, and what an unset field means. |
DISTRIBUTED_BUILD_POLICY_LOCAL_ONLY | Never leave this node. An invocation this node cannot serve fails instead of being shopped out — for a build whose inputs, secrets or side effects are not the cluster's business. |
DISTRIBUTED_BUILD_POLICY_LOCAL_EXCEPT_QUEUED | Local when it can start now; otherwise local and remote compete and whichever is ready first takes the work. A queue here is a reason to look elsewhere, not a reason to wait — but a peer is only better if it actually answers, so the local wait is never abandoned to find out. |
DISTRIBUTED_BUILD_POLICY_NON_LOCAL | Never execute here: every invocation goes to a peer, even one this node could serve. What proves the distributed path actually works, and the only policy that fails outright on a node with no peers. |
BuildState
enum BuildState {
BUILD_STATE_UNSPECIFIED = 0;
BUILD_STATE_PENDING = 1;
BUILD_STATE_RUNNING = 2;
BUILD_STATE_SUCCEEDED = 3;
BUILD_STATE_FAILED = 4;
BUILD_STATE_CANCELLED = 5;
}| Value | |
|---|---|
BUILD_STATE_UNSPECIFIED | |
BUILD_STATE_PENDING | Created and queued; no run has started yet. |
BUILD_STATE_RUNNING | A run is in progress; BuildProgress events are being emitted. |
BUILD_STATE_SUCCEEDED | The most recent run finished successfully; output_cid is set. An interactive build stays here until the next UpdateBuildInput moves it back to RUNNING. |
BUILD_STATE_FAILED | The most recent run failed; error is set. For an interactive build a later UpdateBuildInput may move it back to RUNNING. |
BUILD_STATE_CANCELLED | The build was stopped before finishing — by StopBuild, by a DetachBuild/stop cascade, or because its attached client disconnected. The record is retained in this state so the run can still be inspected. |
TargetListStatus
How much to trust a [TargetList].
enum TargetListStatus {
TARGET_LIST_STATUS_UNSPECIFIED = 0;
TARGET_LIST_STATUS_GENERATING = 1;
TARGET_LIST_STATUS_FAILED = 2;
TARGET_LIST_STATUS_DONE = 3;
TARGET_LIST_STATUS_STALE = 4;
}| Value | |
|---|---|
TARGET_LIST_STATUS_UNSPECIFIED | |
TARGET_LIST_STATUS_GENERATING | The controller is working on it — distinct from a workspace that genuinely declares nothing. |
TARGET_LIST_STATUS_FAILED | The list could not be produced: the build code did not type-check, or failed while declaring. A list failure, not necessarily a build failure. |
TARGET_LIST_STATUS_DONE | Fresh, and describes the build code as it currently stands. |
TARGET_LIST_STATUS_STALE | A watch build whose inputs have moved since the list was produced. Still the last good answer — worth showing, worth marking. |
TargetKind
What a target is. Decides which verb applies to it: an output is exported, a test run for its verdict, a runnable started, a deployment invoked.
enum TargetKind {
TARGET_KIND_UNSPECIFIED = 0;
TARGET_KIND_OUTPUT_DIRECTORY = 1;
TARGET_KIND_CONTAINER_IMAGE = 2;
TARGET_KIND_TEST = 3;
TARGET_KIND_RUNNABLE = 4;
TARGET_KIND_DEPLOYMENT = 5;
TARGET_KIND_COVERAGE = 6;
TARGET_KIND_METRICS = 7;
TARGET_KIND_DIAGNOSTICS = 8;
TARGET_KIND_PIPELINE = 9;
}| Value | |
|---|---|
TARGET_KIND_UNSPECIFIED | |
TARGET_KIND_OUTPUT_DIRECTORY | |
TARGET_KIND_CONTAINER_IMAGE | |
TARGET_KIND_TEST | |
TARGET_KIND_RUNNABLE | |
TARGET_KIND_DEPLOYMENT | |
TARGET_KIND_COVERAGE | A coverage report (ctx.addCoverage). Its own kind rather than an output directory because what a client does with it is different: there is a percentage to show and files to rank by it, none of which a file tree offers. |
TARGET_KIND_METRICS | A metrics blob (ctx.addMetrics): line-protocol rows queried via GetBuildMetrics — numbers to chart, not a tree to browse. |
TARGET_KIND_DIAGNOSTICS | A diagnostics report (ctx.addDiagnostics): the messages a tool emitted about code — compiler errors, lints, type errors. Its own kind because what a client does with findings is rank them by severity, group them by rule and jump to the place each names; a file tree offers none of that, and a test target would reduce the set to one bit. |
TARGET_KIND_PIPELINE | A pipeline definition (scope.addPipelineTarget): a declarative pipeline authored by build code and stored as a typed block. Its own kind because a consumer executes a pipeline rather than browsing it — the block is a definition to run, with a shape of its own, and a file tree says none of that. |
TargetBuildStatus
One selected target's build progress. Deliberately coarse: targets share a DAG, so most of a target's work happens inside tasks shared with others — there is no meaningful per-target queue position. A selected target carries no status until its own resolution starts; only DONE/FAILED are final.
enum TargetBuildStatus {
TARGET_BUILD_STATUS_UNSPECIFIED = 0;
TARGET_BUILD_STATUS_BUILDING = 1;
TARGET_BUILD_STATUS_DONE = 2;
TARGET_BUILD_STATUS_FAILED = 3;
TARGET_BUILD_STATUS_NOT_FOUND = 4;
}| Value | |
|---|---|
TARGET_BUILD_STATUS_UNSPECIFIED | Nothing asserted yet (unselected, or its resolution has not begun). |
TARGET_BUILD_STATUS_BUILDING | |
TARGET_BUILD_STATUS_DONE | |
TARGET_BUILD_STATUS_FAILED | |
TARGET_BUILD_STATUS_NOT_FOUND | Not a target at all: a filter that selected nothing, listed under the text of the filter itself. A typo, a renamed target and a deliberately empty selection are indistinguishable in a list of what was selected, and only one of the three is what anyone meant. |
BuildActionKind
enum BuildActionKind {
BUILD_ACTION_KIND_UNSPECIFIED = 0;
BUILD_ACTION_KIND_REF = 1;
BUILD_ACTION_KIND_EXPORT = 2;
BUILD_ACTION_KIND_DEPLOY = 3;
BUILD_ACTION_KIND_RUN = 4;
BUILD_ACTION_KIND_MOUNT = 5;
}| Value | |
|---|---|
BUILD_ACTION_KIND_UNSPECIFIED | |
BUILD_ACTION_KIND_REF | Point a local ref at the target's CID (--ref). |
BUILD_ACTION_KIND_EXPORT | Materialise the target onto the host filesystem (--export). |
BUILD_ACTION_KIND_DEPLOY | Invoke the target as a deployment (--deploy). |
BUILD_ACTION_KIND_RUN | Keep the target running (--run). A rebuild hot-swaps the live run's changed mounts rather than restarting it, where the runnable allows it. |
BUILD_ACTION_KIND_MOUNT | FUSE-mount the target (--mount). |
BuildActionState
enum BuildActionState {
BUILD_ACTION_STATE_UNSPECIFIED = 0;
BUILD_ACTION_STATE_SCHEDULED = 1;
BUILD_ACTION_STATE_RUNNING = 2;
BUILD_ACTION_STATE_DONE = 3;
BUILD_ACTION_STATE_FAILED = 4;
BUILD_ACTION_STATE_CANCELLED = 5;
BUILD_ACTION_STATE_NO_TARGET = 6;
}| Value | |
|---|---|
BUILD_ACTION_STATE_UNSPECIFIED | |
BUILD_ACTION_STATE_SCHEDULED | Waiting for its target to be built this round. |
BUILD_ACTION_STATE_RUNNING | Acting now: exporting, deploying, starting or swapping a run. |
BUILD_ACTION_STATE_DONE | |
BUILD_ACTION_STATE_FAILED | |
BUILD_ACTION_STATE_CANCELLED | Its target failed, the build was stopped, or a new round superseded it before it finished. Distinct from FAILED: nothing went wrong with the action itself, so a viewer should not go looking for its error. |
BUILD_ACTION_STATE_NO_TARGET | The action's filter selects no target it can act on, or placing what it selected failed (a path template naming a missing label, two targets on one path); detail says which. The build fails as soon as its declared targets are known, before anything is written. |
Data
Content-addressed data: GC, named refs, single-block blob/IPLD get/put, recursive network fetch, and filesystem-tree import/export.
Deployments
Deployments — invoke a Deployment block (a node function + options, declared by a build or addressed directly by CID) and track it like a build. A deployment is side-effecting and never cached: every CreateDeployment runs.